Construction project area measurement method and system based on drone aerial photography

By performing color correction, noise removal and bee algorithm edge detection in drone aerial measurement technology, the problems of light and distortion impact are solved, and efficient and accurate measurement of building area is achieved, suitable for complex terrain and difficult-to-reach areas.

CN118823587BActive Publication Date: 2024-11-22邹辉
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411258933.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-11-22
Estimated Expiration
2044-09-10

AI Technical Summary

Technical Problem

The existing drone aerial measurement technology is affected by factors such as lighting conditions, shooting angle and lens distortion, resulting in a decline in image quality, which in turn affects the accuracy of construction project area measurement.

Method used

The construction project area measurement method based on drone aerial photography includes manipulating the drone for aerial photography, color correction, noise removal and contrast enhancement of aerial images, edge detection using bee algorithm, calculate the number of pixels inside the outline and convert them into actual Area data.

Benefits of technology

Improves the efficiency and accuracy of measurements, reduces human errors, enables measurements in complex terrain, reduces safety risks of on-site work, and improves data traceability and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118823587B_ABST
    Figure CN118823587B_ABST
Patent Text Reader

Abstract

A method and system for measuring the area of ​​a construction project by drone aerial photography, which relates to the technical field of construction project area measurement. The method comprises: operating a drone to perform aerial photography of a target construction project area to obtain an aerial image of the target construction project area; preprocessing the aerial image, including color correction, noise removal, and contrast enhancement operations, to obtain a processed aerial image; identifying the edge of a building in the aerial image to determine the outline of the building; calculating the number of pixels inside the outline according to the identified building outline, and converting the number of pixels into the actual area data of the building; and outputting and saving the measured actual area data of the building. The present invention utilizes drone aerial photography and image processing technology to achieve fast and accurate construction project area measurement, thereby improving measurement efficiency and accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of construction engineering area measurement, and in particular to a construction engineering area measurement method and system based on unmanned aerial vehicle (UAV) aerial photography. Background Art

[0002] With the rapid development of drone technology and image processing technology, construction area measurement methods based on drone aerial photography have gradually emerged. Drones can efficiently fly over target areas and quickly capture high-quality aerial images, providing a rich data source for subsequent area measurement. At the same time, with the help of advanced image processing and analysis technology, we can extract the precise outline of the building from these aerial images and calculate the actual area of ​​the building based on this.

[0003] However, existing drone aerial photography measurement technology still faces some challenges. For example, aerial images may be affected by a variety of factors such as lighting conditions, shooting angles, lens distortion, etc., resulting in a decrease in image quality, which in turn affects the accuracy of area measurement. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a method and system for measuring the area of ​​a construction project based on drone aerial photography, which can efficiently and accurately measure the actual area of ​​a building, thereby improving the measurement efficiency and accuracy.

[0005] In order to solve the above technical problems, the technical solution of the present invention is as follows:

[0006] In a first aspect, a method for measuring the area of ​​a construction project based on drone aerial photography, the method comprising:

[0007] Operate the drone to take aerial photos of the target construction project area to obtain aerial images of the target construction project area;

[0008] Preprocess the aerial images, including color correction, noise removal, and contrast enhancement operations, to obtain processed aerial images;

[0009] Identify building edges in aerial images to determine building outlines;

[0010] According to the identified building outline, the number of pixels inside the outline is calculated, and the number of pixels is converted into the actual area data of the building;

[0011] Output and save the measured actual building area data.

[0012] Furthermore, the drone is operated to take aerial photos of the target construction project area to obtain aerial images of the target construction project area, including:

[0013] Identify target construction project areas and drones for aerial photography;

[0014] Plan the flight route of the drone and launch the drone to a predetermined altitude at a safe take-off point;

[0015] The camera angle of the drone is adjusted via the remote control, and the drone is operated for aerial photography according to the planned flight route to obtain aerial images of the target construction project area.

[0016] Further, the aerial images are preprocessed, including color correction, noise removal, and contrast enhancement operations, to obtain processed aerial images, including:

[0017] Use the image processing library to load the aerial image and perform color correction by adjusting the gain of the red, green, and blue channels in the image;

[0018] Perform noise assessment on aerial images to identify the type and degree of noise in the images;

[0019] The grayscale distribution of the aerial image is analyzed, the grayscale of the image is adjusted, and the preprocessed image is saved to the specified path using the image processing library to obtain the processed aerial image.

[0020] Further, identifying the building edges in the aerial image to determine the outline of the building includes:

[0021] Load the aerial image dataset and initialize the bee population, where each bee represents a set of edge detection parameters;

[0022] Each bee performs edge detection operations on the aerial image according to its own parameters;

[0023] The detected edges were compared with the true building edges, and the quality of edge detection was evaluated by calculating the precision and recall metrics, with the metrics being used as the amount of nectar of the food source;

[0024] The employed bees conduct a local search for the current food source and determine the parameter combination that matches the edge detection effect;

[0025] Observer bees select food sources based on the information provided by employed bees and the amount of nectar in the food source. If a food source fails to find a parameter combination that matches the edge detection effect in continuous searches, scout bees are dispatched to conduct random searches.

[0026] Repeat the iteration until the preset number of iterations is reached, and select the final individual as the edge detection parameter;

[0027] Perform edge detection on the aerial image using edge detection parameters to determine the outlines of buildings.

[0028] Furthermore, the accuracy calculation formula is: ;

[0029] in, Indicates accuracy; Indicates the total number of categories; Indicates The weight of each category; Indicates The number of true positive examples for a class; Indicates The number of true negative examples for the class; Indicates The number of false positives for the class; Indicates The number of false negatives for a class; Indicates The fuzziness of the category boundaries; Indicates Edge detection error of the category; Indicates The weight of the category.

[0030] Furthermore, the calculation formula of recall is: ;

[0031] in, represents the recall rate; Indicates the number of edges of different categories; Indicates The true positive weight of each class, Indicates The false negative weights of each category; Indicates The edge detection confidence adjustment coefficient of each category, Indicates The edge detection error adjustment coefficient for each category.

[0032] Furthermore, the number of pixels inside the contour is calculated as: ;

[0033] in, Indicates the total number of pixels; Represents the contour area; Indicated in coordinates The pixel weight at ; Indicated in coordinates The pixel value at ; Represents the edge detection confidence adjustment coefficient; represents the edge detection error adjustment coefficient; represents the base of natural logarithms; Representing coordinates The nonlinear adjustment coefficient at ; Representing coordinates Additional adjustment factor at .

[0034] Secondly, the construction project area measurement system based on drone aerial photography includes:

[0035] The drone aerial photography module is used to control the drone to fly to the target building area for aerial photography to obtain image data;

[0036] An image preprocessing module is used to preprocess image data, including color correction, noise removal and contrast enhancement operations;

[0037] A building edge recognition module is used to recognize the building edges in the aerial image to determine the outline of the building;

[0038] The area calculation module is used to automatically count the number of pixels inside the identified building outline and convert the pixel values ​​into actual area data;

[0039] The data output and saving module is used to export and save the actual area data of the building obtained through measurement.

[0040] According to a third aspect, a computing device includes:

[0041] one or more processors;

[0042] The storage device is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method described.

[0043] In a fourth aspect, a computer-readable storage medium stores a program, and when the program is executed by a processor, the method described is implemented.

[0044] The above solution of the present invention includes at least the following beneficial effects:

[0045] Drones can quickly cover large areas and quickly obtain high-resolution images of target buildings, reducing a lot of on-site work time and human resources. Image preprocessing (such as color correction and noise removal) improves image quality and makes building edge identification more accurate. Precise edge detection and pixel calculation methods improve the accuracy of building area measurement. Drones can take aerial photos in complex or inaccessible terrain, overcoming the environmental limitations of traditional ground measurement and obtaining comprehensive image data.

[0046] Automated image processing and analysis reduces the complexity of manual operations, reduces human errors, and quickly generates accurate building area data. It reduces the direct work of on-site surveyors on construction sites and reduces the safety risks associated with high-risk environments. The images and processing results obtained by drones can be saved as electronic files for easy archiving, review and reference, improving data traceability. Through high-resolution images and processing tools, detailed building area analysis can be carried out and support subsequent design and planning work. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 It is a flow chart of a method for measuring the area of ​​a construction project based on drone aerial photography provided by an embodiment of the present invention.

[0048] Figure 2 It is a schematic diagram of a construction project area measurement system based on drone aerial photography provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0049] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0050] like Figure 1 As shown, an embodiment of the present invention proposes a method for measuring the area of ​​a construction project based on drone aerial photography, and the method comprises the following steps:

[0051] Step 1: operate a drone to take aerial photos of the target construction project area to obtain an aerial image of the target construction project area;

[0052] Step 2, preprocessing the aerial image, including color correction, noise removal, and contrast enhancement operations, to obtain a processed aerial image;

[0053] Step 3, identifying the building edges in the aerial image to determine the outline of the building;

[0054] Step 4, according to the identified building outline, calculate the number of pixels inside the outline, and convert the number of pixels into the actual area data of the building;

[0055] Step 5: Output and save the measured actual building area data.

[0056] In the embodiment of the present invention, by operating the drone for aerial photography, the entire target construction project area can be quickly covered, the measurement time is shortened, the work efficiency is improved, and the time cost is reduced. The image quality is effectively improved by performing pre-processing operations such as color correction, noise removal, and contrast enhancement on the aerial images. This makes the subsequent building edge recognition more accurate, thereby improving the accuracy of area calculation.

[0057] The use of automated image processing technology can automatically identify the edges of buildings and calculate their areas, reducing human intervention and errors and improving the objectivity and consistency of measurements.

[0058] Drone aerial photography is not restricted by ground conditions and can handle complex terrain and hard-to-reach areas. At the same time, it is suitable for construction projects of different types and sizes, showing strong flexibility and adaptability. The measured actual area data of the building can be displayed in an intuitive and easy-to-read way, which is convenient for users to understand and analyze. At the same time, the data export and save functions allow users to view and process data anytime and anywhere, which greatly facilitates subsequent work. By reducing the need for manual field measurements, this method reduces labor costs and related expenses. At the same time, the operating cost of drones is relatively low, further reducing the overall cost of measurement work.

[0059] In a preferred embodiment of the present invention, the above step 1, operating a drone to take aerial photos of the target construction project area to obtain an aerial image of the target construction project area, may include:

[0060] Step 11, determine the target construction project area and drone for aerial photography;

[0061] Step 12, plan the flight route of the drone, start the drone at a safe take-off point and fly it to a predetermined altitude;

[0062] Step 13, adjust the camera angle of the drone through the remote control, and operate the drone to take aerial photos according to the planned flight route to obtain aerial images of the target construction project area.

[0063] In the embodiment of the present invention, before taking aerial photos, the target construction project area to be photographed is clearly identified.

[0064] Choose a drone for aerial photography, taking into account the characteristics of the area (size, topography, etc.) and the required image quality. Plan the flight path of the drone based on the shape, size and characteristics of the target area to ensure that the area to be photographed is fully covered. The flight path planning also needs to consider safety to avoid the drone flying into no-fly zones or dangerous areas. Choose a safe and open take-off point to ensure that the drone can take off smoothly and avoid accidental collisions. Maneuver the drone to a predetermined shooting altitude, which should ensure that a clear and comprehensive image of the construction project can be captured. Use the remote control to adjust the camera angle of the drone in real time to ensure that different perspectives and details of the target construction project area can be captured. According to the previously planned flight route, operate the drone for continuous aerial photography operations to obtain high-quality aerial images.

[0065] By clearly defining the target area and selecting the drone, you can ensure the accuracy and comprehensiveness of aerial photography to meet specific project needs. Detailed planning of flight routes helps prevent drones from flying into dangerous or no-fly areas, improving the safety of aerial photography operations. Comply with relevant flight regulations to ensure the compliance of aerial photography activities. Through pre-planned flight routes and efficient drone operations, aerial photography of the entire target area can be completed quickly, improving work efficiency. Timely aerial photography operations help capture the latest progress of construction projects and ensure the timeliness of information. By adjusting the camera angle and flight altitude, high-quality, high-resolution aerial images can be obtained. These images can capture subtle changes and detailed features of construction projects.

[0066] When specifically applied, this includes:

[0067] Step 11: Conduct a detailed survey of the construction project area to be photographed to understand its geographical location, scope, surrounding environment, etc. Select a drone based on the characteristics of the target area and the requirements for aerial photography. For example, if the target area is large or the terrain is complex, you need to select a drone with a long battery life and stable flight performance.

[0068] Step 12. Use mapping software to plan the flight route of the drone according to the shape and size of the target area. Make sure the route can fully cover the target area and avoid repeated shooting. Choose a safe and unobstructed take-off point to ensure that the drone can take off smoothly and reach the predetermined height. At the same time, considering the drone's endurance and flight range, make sure that the take-off point is moderately away from the target area. Set a suitable flight altitude based on the aerial photography needs and the characteristics of the target area. Too low an altitude may affect the clarity of the image, while too high an altitude may cause loss of image details. Therefore, it is necessary to find a balance.

[0069] Step 13. During the flight, adjust the camera angle of the drone in real time through the remote control. This ensures that the camera is always aimed at the target area and captures the required image information. Operate the drone to take aerial photos according to the previously planned flight route. During the flight, always pay attention to the status of the drone and the image quality of the target area to ensure the smooth progress of the aerial photography. During the aerial photography process, monitor the shooting quality through the real-time images sent back by the drone. If you find that the image quality is poor or the shooting angle is not suitable, you can adjust the drone position and camera angle in time.

[0070] In a preferred embodiment of the present invention, the above step 2, preprocessing the aerial image, including color correction, noise removal, and contrast enhancement operations to obtain a processed aerial image, may include:

[0071] Step 222, using an image processing library to load the aerial image, and perform color correction by adjusting the gains of the red, green, and blue channels in the image;

[0072] Step 223, performing noise assessment on the aerial image to identify the type and degree of noise in the image;

[0073] Step 224 , analyzing the grayscale distribution of the aerial image, adjusting the grayscale of the image, and using the image processing library to save the pre-processed image to a specified path to obtain a processed aerial image.

[0074] In an embodiment of the present invention, an image processing library is used to load aerial images into a processing environment. Color correction is performed on the loaded image, and the color deviation is corrected by adjusting the gain of the red, green, and blue color channels in the image to make the image color more realistic and accurate. Noise assessment is performed on the aerial image to identify the type and degree of noise present in the image, such as Gaussian noise, salt and pepper noise, etc. According to the identified noise type and degree, median filtering is performed to reduce noise interference in the image and improve image quality. The grayscale distribution of the aerial image is analyzed to understand the brightness range and contrast of the image. According to the analysis results of the grayscale distribution, the grayscale of the image is adjusted, and the contrast of the image is enhanced by stretching or compressing the dynamic range of the grayscale value, so that the details in the image are clearer and more discernible. The pre-processed aerial image is saved to a specified path using the image processing library for subsequent use and analysis.

[0075] Color correction can correct color deviations caused by shooting conditions, equipment differences and other factors, making the image color closer to the real scene and improving the visual effect and color accuracy of the image. The noise removal operation can effectively reduce noise interference in the image, improve the image clarity and signal-to-noise ratio, and help the accuracy of subsequent processing steps such as edge detection and area calculation. The contrast enhancement operation can highlight the details and edge information in the image, making the outline of the building clearer and easier to identify and measure the area. The preprocessing operation can comprehensively improve the quality of aerial images, including color, clarity, contrast and other aspects, providing a more accurate and reliable data basis for subsequent area measurement work.

[0076] The pre-processed aerial images are more standardized and unified, which is convenient for batch processing and analysis, improving work efficiency and data processing accuracy. At the same time, saving the pre-processed images also facilitates data archiving and sharing.

[0077] When specifically applied, this includes:

[0078] Step 222, use the image processing library to load the aerial image and convert it into a digital format for subsequent processing. Select a standard color space as a reference, such as RGB. This standard defines the distribution and response characteristics of color channels (red, green, blue). Analyze each color channel (red, green, blue) in the image and calculate the average value of each color channel.

[0079] The average value of the red channel is calculated as: ;

[0080] in, represents the average value of the red channel; Indicates the height of the image; Indicates the width of the image; A 2D array representing the red channel.

[0081] The average value of the green channel is calculated as: ;

[0082] in, represents the average value of the green channel; A two-dimensional array representing the green channel.

[0083] The average value of the blue channel is calculated as: ;

[0084] in, represents the average value of the blue channel; A two-dimensional array representing the blue channel. This will help understand the actual color distribution of the image. By comparing the extracted color distribution information with the data in the standard color space, the deviation of the image on each color channel can be identified. For example, if the average value of the red channel in the image is higher than the standard value, it means that the color deviation of the red channel is large. Based on the comparison results, the specific value of the color deviation is determined.

[0085] The deviation can be expressed as the difference or ratio between the actual value and the standard value for each color channel. The deviation data will be used to determine how to adjust the gain of the color channel. The required gain value for each color channel is calculated based on the color deviation.

[0086] The red channel gain value calculation formula is: ;in, Indicates the red channel gain value; represents the expected average value of the red channel in the standard color space; Represents the actual average value of the red channel in the image.

[0087] The green channel gain value calculation formula is: ;in, Indicates the green channel gain value; represents the expected average value of the green channel in the standard color space; Represents the actual average value of the green channel in the image.

[0088] The blue channel gain value calculation formula is: ;in, Indicates the blue channel gain value; represents the expected average value of the blue channel in the standard color space; Represents the actual average value of the blue channel in the image. Used to adjust the intensity of color channels to make them closer to a standard color space.

[0089] For example, if the deviation of the red channel is 1.2 times, the gain value of the red channel needs to be set to 1 / 1.2. Apply a linear transformation to the pixel values ​​of each color channel. Specifically, multiply the pixel values ​​of each color channel by the corresponding gain factor. This adjusts the intensity of the color channel to match the expected value of the standard color space. Combine the adjusted color channel data to generate a corrected image. The corrected image should reflect the adjusted color channels, thereby improving the color accuracy of the image. Compare the corrected image with the original image. The effect of color correction can be checked by visual comparison or statistical analysis to ensure that the color of the image is closer to the standard color space.

[0090] Step 223, load the image to be processed into the image processing library and convert it to an appropriate format (such as a grayscale image or individual channels of a color image). Relatively smooth areas are identified in the image. These areas do not contain obvious structures or textures and are suitable for noise analysis. Observe the selected smooth areas to see if there are obvious noise patterns, such as random bright spots or dark spots. These noises may affect the image quality. Perform a Fourier transform on the image to convert the image from the spatial domain to the frequency domain. The Fourier transform can decompose the image into the sum of different frequency components, helping to identify the type and frequency characteristics of the noise. Analyze the Fourier transformed image and view the spectrum (frequency domain image). Noise will appear in the spectrum as high amplitude areas concentrated at certain specific frequency points. For example: Salt and pepper noise: appears in the spectrum as small dots scattered across the entire frequency range. Gaussian noise: presents a relatively flat distribution in the spectrum. Determine the type of noise based on the characteristics of the spectrum. Determine the main frequency components and distribution of the noise to select median filtering for denoising. It removes noise by replacing the value of each pixel with the median of the pixel values ​​in its neighborhood.

[0091] Use the median filter function provided by the image processing library: ;in, represents the filtered image; represents the median; represents the row index of the image, Represents the column index of the image; Indicates that the image is the pixel value of the position; Indicates the filter window size; Relative to the position in the image The row offset of Relative to the position in the image Column offsets are used to process the image. Set an appropriate filter window size (such as 3×3, 5×5, etc.) to balance the denoising effect and image detail preservation. Compare the images before and after denoising to observe the denoising effect. Check the smooth area and other important areas to determine whether the noise is effectively removed and whether the main details of the image are preserved. By calculating the mean square error between the denoised image and the original image, the lower the MSE value, the better the denoising effect.

[0092] The formula for calculating the mean square error is: ;

[0093] in, represents the mean square error between the denoised image and the original image; Indicates the height of the image; Indicates the width of the image; Indicates that the original image is at position The pixel value of Indicates the denoised image at position The pixel value of .

[0094] Step 224, import the image processing library and load the target image. Make sure the image is a grayscale image. If it is a color image, convert it to a grayscale image first. Use the function in the image processing library to calculate the grayscale histogram: ;in, Represents the grayscale histogram; Indicates that the image is at position Gray value of Indicates the gray level currently being focused on; Indicates the height of the image; Indicates the width of the image; Indicates a condition.

[0095] This will generate a frequency distribution graph for each gray level (from 0 to 255), showing how often each gray level appears in the image. Check the distribution of the histogram. If the histogram is concentrated in the lower or higher gray value areas, the image may have low contrast. If the analysis results show low contrast, apply histogram equalization. This will redistribute the gray values ​​in the image to make the gray distribution of the histogram more even, thereby improving contrast.

[0096] The grayscale histogram of the enhanced image is calculated as: ;in, Indicates the enhanced image in gray level Histogram values ​​of ; Indicates that the enhanced image is at position Grayscale values. Compare with the histogram of the original image. Check that the enhanced image shows a wider grayscale range to confirm that the contrast has been improved. Visually compare the original and enhanced images to ensure that image details are clearer and the contrast is significantly improved. Check the enhanced image for overexposed (brightness values ​​close to 255) or underexposed (brightness values ​​close to 0) areas. If these areas are present, histogram equalization may have caused a loss of image detail or distortion. Make adjustments to these areas to ensure that the enhancement is natural and not distorted.

[0097] In a preferred embodiment of the present invention, the above step 3, identifying the edge of the building in the aerial image to determine the outline of the building, may include:

[0098] Step 31, load the aerial image data set and initialize the bee population, each bee represents a set of edge detection parameters;

[0099] Step 32, each bee performs edge detection operation on the aerial image according to its own parameters;

[0100] Step 33, comparing the detected edge with the real building edge, evaluating the quality of edge detection by calculating the precision and recall indicators, and using the indicators as the nectar amount of the food source;

[0101] Step 34, the employed bees conduct a local search for the current food source to determine a parameter combination that matches the edge detection effect;

[0102] Step 35, the observation bees select a food source based on the information provided by the employed bees and the nectar amount of the food source. If a food source does not find a parameter combination that matches the edge detection effect in the continuous search, the scout bees are dispatched to perform a random search;

[0103] Step 36, repeat the iteration until the preset number of iterations is reached, and select the final individual as the edge detection parameter;

[0104] Step 37, edge detection is performed on the aerial image using edge detection parameters to determine the outline of the building.

[0105] In an embodiment of the present invention, an aerial image dataset and corresponding real building edge annotated images are imported. These images will be used to train and test the effect of the edge detection algorithm. The parameter range of the edge detection algorithm is set, such as the threshold of edge detection or the size of the filter. A bee population is randomly generated, and each bee represents a set of edge detection parameters. The positions of these bees (i.e., parameter combinations) are initialized in the search space. The edge detection parameters of each bee are applied to each aerial image. An edge detection operation is performed to extract edge information in the image. The detected edge image is compared with the real edge annotated image. Accuracy and recall rate indicators are calculated to evaluate the effect of edge detection. The quality of the "food source" of each bee is evaluated based on these indicators as its nectar amount.

[0106] Hired bees perform local searches around the current optimal parameters to find better parameter combinations. By fine-tuning the parameters, they look for configurations that can further improve edge detection. Observer bees select the best food source (i.e., the optimal parameter combination) based on the amount of nectar (i.e., the evaluation metric). If a parameter combination fails to improve in multiple local searches, it may be replaced. If continuous searches fail to find an improved parameter combination, scout bees are sent to perform global random searches. Scout bees explore new parameter spaces and try to find optimization directions that have not been discovered. Repeat the above steps multiple times (the set number of iterations). In each round of iteration, the behavior of hired bees and scout bees helps to gradually improve the edge detection parameters.

[0107] After completing the preset number of iterations, select the parameter combination of the evaluation index as the final edge detection parameter. Use the selected optimal parameters to perform edge detection on all aerial images to generate edge images of buildings. The outline of the building is determined through these edge images to complete the task of identifying the building outline.

[0108] Through the global and local search capabilities of the honey bee algorithm, edge detection parameters can be effectively found, thereby improving the accuracy of edge detection. The adaptive search mechanism of the honey bee algorithm is suitable for handling complex edge detection tasks and can find the final parameter combination under various images and conditions. The honey bee algorithm can process multiple parameter combinations in parallel, which improves processing efficiency, especially when processing large-scale aerial image data. Accurate edge detection parameters can more accurately identify building outlines and improve the overall performance of the building recognition system. This method combines the global search capabilities of the honey bee algorithm with the actual needs of edge detection, providing an effective image processing solution that is particularly suitable for building recognition in aerial images.

[0109] In a preferred embodiment of the present invention, the calculation formula of accuracy is: ;

[0110] in, Indicates accuracy; Indicates the total number of categories; Indicates The weight of each category; Indicates The number of true positive examples for a class; Indicates The number of true negative examples for the class; Indicates The number of false positives for the class; Indicates The number of false negatives for a class; Indicates The fuzziness of the category boundaries; Indicates Edge detection error of the category; Indicates The weight of the category.

[0111] In the embodiment of the present invention, the accuracy It is an important indicator to measure the performance of the classifier, which indicates the proportion of samples correctly classified by the classifier to the total samples. Represents the number of different categories, each of which corresponds to a set of performance indicators (such as , , , These indicators are used to evaluate the performance of the classifier on this category. Different categories may have different importance, which can be expressed by weights. This can be reflected in the fact that, for example, in medical diagnosis, accurate identification of some diseases may be more important than others, so those categories can be given a higher weight.

[0112] True example Indicates the number of samples that are actually positive and correctly predicted as positive by the classifier; true negative examples Represents the number of samples that are actually negative and correctly predicted as negative by the classifier. Both are examples of correct predictions by the classifier. Indicates the number of samples that are actually negative but are mistakenly predicted as positive by the classifier; false negative examples Indicates the number of samples that are actually positive but are incorrectly predicted as negative by the classifier. Both of these are examples of incorrect predictions by the classifier. In some cases, the boundaries of the categories may not be clear, making classification difficult. Boundary fuzziness Reflecting this uncertainty, it may be set based on domain knowledge or expert assessment.

[0113] In the accuracy calculation, The number of true positives and true negatives is adjusted to reflect the effect of this ambiguity on classification accuracy. In some applications, such as image processing or pattern recognition, edge detection is a critical step. Edge Detection Error represents the error in identifying object boundaries, which affects the performance of the classifier. In the accuracy calculation, it is calculated by subtracting And add in the denominator Let's take this error into account.

[0114] By introducing the weight of each category , which can pay more attention to important categories, making the classification results more representative of the accuracy of key categories. Allows to take boundary uncertainty into account during evaluation by taking edge detection error into account Taking this into account can correct the systematic errors that occur during the detection process and improve the actual accuracy of the evaluation results. and false negatives The accuracy calculation not only reflects the true positive and negative examples, but also takes into account the impact of recognition errors, thus providing a more comprehensive performance evaluation. , this formula is applicable to the case where the categories are unevenly distributed. Important categories can be highlighted by increasing their weights.

[0115] In a preferred embodiment of the present invention, the calculation formula of the recall rate is: ;

[0116] in, represents the recall rate; Indicates the number of edges of different categories; Indicates The true positive weight of each class, Indicates The false negative weights of each category; Indicates The edge detection confidence adjustment coefficient of each category, Indicates The edge detection error adjustment coefficient for each category.

[0117] In the embodiment of the present invention, edge detection is performed on each category to identify true examples. and false negatives Then, according to the set weights and and adjustment factor and , for each category and The weighted and adjusted number of true positive samples and false negative samples is used to calculate the recall rate, which is the proportion of correctly identified positive samples to all true positive samples.

[0118] use The adjustment factor takes into account the confidence of edge detection, thereby improving the accuracy of the recall rate and reducing the impact of edge detection uncertainty. and , the formula can reflect the importance of each category in the recall calculation, allowing optimization for key categories. Adjusting the impact of false negatives makes the recall rate not only consider true positives, but also comprehensively consider false negatives caused by detection failures. It is applicable to situations with different numbers of categories, ensuring that the recall rate of each category is evaluated independently, which is particularly effective in tasks with diverse category margins. By adjusting the coefficient, the error in edge detection can be corrected, thus improving the reliability of the recall rate.

[0119] In a preferred embodiment of the present invention, the above step 4, calculating the number of pixels inside the outline according to the identified building outline, and converting the number of pixels into actual area data of the building, may include:

[0120] In an embodiment of the present invention, a fixed threshold is selected, and pixels greater than the threshold are set to white (foreground), and pixels less than the threshold are set to black (background). The threshold is dynamically determined based on the characteristics of the local area of ​​the image, which can better handle the situation of uneven illumination. The grayscale image is converted into a binary image to highlight the building area. Based on the image feature extraction method, the binary image is passed as input to the contour detection algorithm. Contour detection is performed to extract the boundary contour of the building in the binary image. The algorithm will identify and output the coordinates or path information of the contour.

[0121] Based on the output of the detection algorithm (such as a point set or path of a contour), further processing is performed. The contours are smoothed to reduce noise and repair discontinuities. Major contours are screened and retained as needed, and small, irrelevant contours are removed. The detected contours are smoothed to reduce noise and irregularities and improve the quality of the contours. Contour corrections are made as needed, such as removing small isolated contours or filling holes in the contours. Based on the identified contours, the area inside the contours is filled to create a binary image containing only the building area. The total number of pixels within the filled area is counted, which represents the area of ​​the building. Based on the resolution of the image and actual measurements (such as known reference objects), the actual area unit corresponding to each pixel is determined. The actual area of ​​the building is calculated by multiplying the number of pixels by the pixel-to-actual area conversion ratio: ;in, Indicates the actual area; Indicates the number of pixels; Indicates the actual area of ​​each pixel; Indicates the number of pixels per unit area.

[0122] In a preferred embodiment of the present invention, the calculation formula for the number of pixels inside the contour is: ;

[0123] in, Indicates the total number of pixels; Represents the contour area; Indicated in coordinates The pixel weight at ; Indicated in coordinates The pixel value at ; Represents the edge detection confidence adjustment coefficient; represents the edge detection error adjustment coefficient; represents the base of natural logarithms; Representing coordinates The nonlinear adjustment coefficient at ; Representing coordinates Additional adjustment factor at .

[0124] In an embodiment of the present invention, Represents the contour area The total number of pixels in the area. This value is calculated by taking into account multiple attributes of each pixel in the area. Defines the area in which the number of pixels is to be counted. Each pixel position There is an associated weight , this weight is based on the pixel's location, color, brightness image features. Weights are used to emphasize or weaken the impact of certain pixels on the total. Pixel value Indicated in coordinates The pixel intensity at . In a grayscale image, this is the grayscale value; in a color image, it represents the value of a color channel. Edge detection confidence adjustment factor , this factor reflects the edge detection algorithm at a specific pixel location A high confidence level means that the position is more likely to be on the true contour edge, so its influence may be enhanced. Nonlinear adjustment coefficient Through the exponential function Introduces non-linear adjustments that allow finer control over certain pixels, based on local characteristics of the pixel or global image properties. Additional adjustment coefficients Through the logarithmic function Introduced to further fine-tune each pixel's contribution to the total. This factor is set based on specific image characteristics.

[0125] The formula provides a more accurate estimate of the number of pixels by taking into account multiple factors such as pixel weight, pixel value, edge detection confidence, error adjustment, nonlinear adjustment, and additional adjustment coefficients. This comprehensive consideration helps improve the accuracy of the calculation, especially when the image edges are blurred or there is a lot of noise. Edge detection confidence adjustment coefficient and error adjustment factor It can improve the pixel calculation in the edge area, reduce the impact of errors, and improve the ability to capture the edge of the contour. Adjustment coefficient and nonlinear factor It can effectively suppress the influence of noise, making the calculated number of pixels more stable and reliable. This helps to reduce the interference of unnecessary noise on the contour detection results. Can be adjusted to specific image and application needs.

[0126] In a preferred embodiment of the present invention, the above step 5 outputs and saves the measured actual area data of the building.

[0127] Determine the format in which the data will be saved, including text files, spreadsheets, and database records. Organize and verify the calculated actual area data. Ensure that the data is accurate and includes information such as the unique identifier of the building (such as the building number or name), the actual area value, and the measurement time. Arrange the data into a structure that is suitable for the output format. For example, a text format may include a header and data rows, while a spreadsheet may arrange the data in rows and columns. When writing the data to a text file, ensure that it is clearly formatted to make it easy to read. For example, use a format with one row per data item and include necessary labels. In spreadsheet software (such as Excel), enter the data into designated table cells and format it (such as setting column widths, applying data formats, etc.) to enhance readability. When entering the data into a database, ensure that the appropriate table structure is created and the data is recorded in the appropriate fields. Check whether the field type matches the data type. Choose a storage path, such as a local hard drive, a network share, or cloud storage. Ensure that the path has appropriate permissions and can ensure the security of the data. Give the file a descriptive and standardized name, such as including the measurement date or building number, to facilitate identification and management.

[0128] Save the formatted data to the specified path. Ensure that the file saving process is completed without errors or interruptions. Open the saved file and check whether the data is written correctly and the format is as expected. Ensure that the data is complete and the file is not damaged. Record relevant information about the saving operation, including the operation time, file path, operator, etc. Ensure that the data is backed up in case the original data is lost or damaged. You can choose to back up manually or use an automatic backup tool to copy the data to the backup location. Confirm the results of the data output and saving process. Check whether the data can be accessed and viewed through the selected tool (such as a text editor, spreadsheet software, or database management tool). Send the data file to relevant personnel or systems as needed, such as via email, shared folders, or data management platforms.

[0129] like Figure 2 As shown, the embodiment of the present invention also provides a construction project area measurement system 20 based on drone aerial photography, including:

[0130] The drone aerial photography module 21 is used to control the drone to fly to the target building area to perform aerial photography operations to obtain image data;

[0131] An image preprocessing module 22, used for preprocessing image data, including color correction, noise removal and contrast enhancement operations;

[0132] A building edge recognition module 23 is used to recognize the building edge in the aerial image to determine the outline of the building;

[0133] The area calculation module 24 is used to automatically count the number of pixels inside the identified building outline and convert the pixel values ​​into actual area data;

[0134] The data output and storage module 25 is used to export and store the actual area data of the building obtained through measurement.

[0135] It should be noted that the system is a system corresponding to the above method, and all implementation methods in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.

[0136] The embodiment of the present invention further provides a computing device, comprising: a processor, a memory storing a computer program, wherein when the computer program is executed by the processor, the method described above is executed. All implementations in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.

[0137] The embodiment of the present invention also provides a computer-readable storage medium storing instructions, which, when executed on a computer, enable the computer to execute the method described above. All implementations in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.

[0138] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A construction project area measurement method based on drone aerial photography, characterized in that: The method comprises: Operate the drone to take aerial photos of the target construction project area to obtain aerial images of the target construction project area; Preprocess the aerial images, including color correction, noise removal, and contrast enhancement operations, to obtain processed aerial images; Identify building edges in aerial images to determine building outlines; According to the identified building outline, the number of pixels inside the outline is calculated, and the number of pixels is converted into the actual area data of the building; Output and save the measured actual building area data; Identify building edges in aerial images to determine building outlines, including: Load the aerial image dataset and initialize the bee population, where each bee represents a set of edge detection parameters; Each bee performs edge detection operations on the aerial image according to its own parameters; The detected edges were compared with the true building edges, and the quality of edge detection was evaluated by calculating the precision and recall metrics, with the metrics being used as the amount of nectar of the food source; The employed bees conduct a local search for the current food source and determine the parameter combination that matches the edge detection effect; Observer bees select food sources based on the information provided by employed bees and the amount of nectar in the food source. If a food source fails to find a parameter combination that matches the edge detection effect in continuous searches, scout bees are dispatched to conduct random searches. Repeat the iteration until the preset number of iterations is reached, and select the final individual as the edge detection parameter; Edge detection parameters are used to perform edge detection on aerial images to determine the outline of buildings; the accuracy is calculated as: ; in, Indicates accuracy; Indicates the total number of categories; Indicates The weight of each category; Indicates The number of true positive examples for a class; Indicates The number of true negative examples for the class; Indicates The number of false positives for the class; Indicates The number of false negatives for a class; Indicates The fuzziness of the category boundaries; Indicates The edge detection error of the category; the calculation formula of recall rate is: ; in, represents the recall rate; Indicates the number of edges of different categories; Indicates The true positive weight of each class; Indicates The false negative weights of each category; Indicates The edge detection confidence adjustment coefficient of each category, Indicates The edge detection error adjustment coefficient of each category; the number of pixels inside the contour is calculated as: ; in, Indicates the total number of pixels; Represents the contour area; Indicated in coordinates The pixel weight at ; Indicated in coordinates The pixel value at ; Represents the edge detection confidence adjustment coefficient; represents the edge detection error adjustment coefficient; represents the base of natural logarithms; Representing coordinates The nonlinear adjustment coefficient at ; Representing coordinates Additional adjustment factor at .

2. The construction project area measurement method based on drone aerial photography according to claim 1 is characterized in that: Operate the drone to take aerial photos of the target construction project area to obtain aerial images of the target construction project area, including: Identify target construction project areas and drones for aerial photography; Plan the flight route of the drone and launch the drone to a predetermined altitude at a safe take-off point; The camera angle of the drone is adjusted via the remote control, and the drone is operated for aerial photography according to the planned flight route to obtain aerial images of the target construction project area.

3. The construction project area measurement method based on drone aerial photography according to claim 2 is characterized in that: Preprocess the aerial images, including color correction, noise removal, and contrast enhancement operations, to obtain processed aerial images, including: Use the image processing library to load the aerial image and perform color correction by adjusting the gain of the red, green, and blue channels in the image; Perform noise assessment on aerial images to identify the type and degree of noise in the images; The grayscale distribution of the aerial image is analyzed, the grayscale of the image is adjusted, and the preprocessed image is saved to the specified path using the image processing library to obtain the processed aerial image.

4. The construction engineering area measurement system based on drone aerial photography is characterized by: Applied to the method according to any one of claims 1 to 3, comprising: The drone aerial photography module is used to control the drone to fly to the target building area for aerial photography to obtain image data; An image preprocessing module is used to preprocess image data, including color correction, noise removal and contrast enhancement operations; A building edge recognition module is used to recognize the building edges in the aerial image to determine the outline of the building; The area calculation module is used to automatically count the number of pixels inside the identified building outline and convert the pixel values ​​into actual area data; The data output and saving module is used to export and save the actual area data of the building obtained through measurement.

5. A computing device, characterized in that: include: one or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method as claimed in any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program, which implements the method according to any one of claims 1 to 3 when executed by a processor.