Method and system for automatically acquiring aerial screenshot of building
By extracting building data from the topographic map database and analyzing parameters from aerial photos, combined with the coordinate projection principle of photogrammetry, the pixel position conversion and screenshot generation of buildings in aerial images are realized, solving the problem of time-consuming and error-prone problems of manual screenshot selection, and achieving efficient and accurate automatic method of obtaining aerial screenshots of buildings.
Patent Information
- Application Number
- CN202510086318.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-05-06
AI Technical Summary
Manually filtering and obtaining screenshots of specific buildings from massive aerial image data is a time-consuming and error-prone task, and it is difficult to meet the needs of quickly and accurately obtaining aerial screenshots of buildings.
By extracting the outer contour corner coordinates and height data of the building from the topographic map database, combining the inner and outer orientation elements and pixel size information of aerial photos, the calculation is performed using the coordinate projection principle of photogrammetry to realize the pixel position conversion of the building on the image film, and aerial screenshots of the building are generated through image processing technology.
It realizes efficient and accurate automatic screenshots of specific buildings from aerial image data, reducing the time and error rate of manual operation, and meeting the need to quickly and accurately obtain aerial screenshots of buildings.
Smart Images

Figure FT_1 
Figure FT_2 
Figure SMS_1
Abstract
Description
1. Technical Field
[0001] The present invention relates to the technical field of aerial image data processing, and in particular to a method and system for automatically acquiring aerial screenshots of buildings, aiming to efficiently and accurately extract screenshot information of specific buildings from aerial image data. 2. Background Technology
[0002] Aerial images are increasingly used in many fields such as modern urban construction and geographic information research. However, manually screening and obtaining screenshots of specific buildings from massive amounts of aerial image data is an extremely time-consuming and error-prone task. Traditional methods are difficult to meet the needs of quickly and accurately obtaining aerial screenshots of buildings. Therefore, a highly automated and accurate solution is urgently needed. III. Summary of the invention Method for automatically obtaining aerial screenshots of buildings Step 1: Building data collection
[0003] The coordinate information of the outer contour corner points of the target building and the height data of the building are extracted from the topographic map database. As an important carrier of geographic information, the topographic map contains the building outline and height information, which provides basic data support for subsequent precise positioning and screenshot processing. Step 2: Aerial photo parameter analysis
[0004] For each aerial photo, its internal and external orientation elements are analyzed in detail. Among them, the internal orientation elements include the image principal point coordinates (x0, y0) and the principal distance (f), which describe the internal geometric relationship between the photography center and the photo; the external orientation elements include the longitude, latitude, altitude, heading angle (ω), side angle (φ), and photo rotation angle (κ) at the time of shooting. These data determine the position and posture of the photo in space. At the same time, the pixel size information of the photo is obtained, which is crucial for the proportion calculation in the coordinate conversion process. Step 3: Coordinate projection calculation
[0005] Based on the coordinate projection principle of photogrammetry, combined with the building data obtained in step one and the aerial photo parameters obtained by analysis in step two, an accurate mathematical model is constructed for calculation. Through a series of complex spatial coordinate conversion formulas, the coordinates of the real building in the ground coordinate system are converted to the pixel position in the photo coordinate system. In the specific calculation process, the earth ellipsoid model (for example, the WGS84 world ellipsoid parameters: major semi-axis a = 6378137.0, the first eccentricity square e2 = 0.00669437999013) and the various postures and position information of the camera during shooting are fully considered to ensure the accuracy and reliability of the calculation results. For example, in the calculation process, the longitude and latitude of the camera shooting position and the target building position are first converted into radians, and then the rotation matrix and projection matrix are constructed according to the internal and external orientation elements of the camera, thereby realizing the conversion from ground coordinates to photo coordinates. Step 4: Screenshot generation
[0006] Based on the pixel positions of the four corner points of the building on the image calculated in step three, use software to develop an image cropping tool and draw a red frame to mark the outline of the building, so as to intuitively display the position of the building in the aerial image; or directly crop the area to generate an aerial screenshot containing only the target building, thereby meeting the needs of aerial image data of buildings in different application scenarios. System for automatically acquiring aerial screenshots of buildings Data acquisition module
[0007] Responsible for establishing connection with the topographic map database and exchanging data, accurately obtaining the outer contour corner coordinates and height data of the target building, and transmitting these data to the subsequent processing module. Parameter parsing module
[0008] For the input aerial photos, special image analysis algorithms and tools are used to extract the internal and external orientation elements and pixel size information in the photos, and organize this information into a standard data format that can be used by other modules of the system. Coordinate calculation module
[0009] Receive the building data from the data acquisition module and the aerial photo parameters from the parameter analysis module, calculate according to the pre-set coordinate projection calculation algorithm (such as the algorithm based on the principle of photogrammetry described in the above step three), obtain the pixel position information of the building on the photo, and pass the result to the screenshot processing module. Screenshot processing module
[0010] According to the building pixel position information provided by the coordinate calculation module, the image processing library is used to perform image cropping and red frame marking operations. In the image cropping operation, the film is cropped according to the specified pixel range; when red frame marking, a rectangular frame is accurately drawn according to the pixel position. Finally, the aerial screenshot of the building is generated and stored or output for user use or further data analysis and processing. Related algorithm implementation Construct the rotation matrix R:
[0011] Formula and matrix form:
[0012] Here, mR1 is first transposed (mR1.Transpose()), and then multiplied with the other two matrices in sequence. The purpose is to comprehensively consider the rotation posture of the film and the conversion relationship from the geographic coordinate system to the ENU coordinate system, and then further construct the rotation matrix R required for the conversion process from the ENU coordinate system to the film coordinate system. Construct the translation matrix T:
[0013] Formula and matrix form:
[0014] Among them, H is the camera height. Combined with the previously calculated radius of curvature N, latitude B, longitude L and camera height, the translation matrix T is constructed by operating with the rotation matrix R. This matrix is used to describe the position translation during the conversion from the ENU coordinate system to the image coordinate system. Construct the projection matrix:
[0015] Formula and matrix form:
[0016] First, Rt is constructed by performing a series of operations on R and T (which involves matrix multiplication, column exchange operations, etc.), and then multiplied by the internal orientation element correlation matrix K to obtain the projection matrix P. This projection matrix P plays a key role in the final calculation of the pixel position of the target object (such as a building) on the film. The coordinate projection positioning is achieved by multiplying the coordinates of the target object in the ground coordinate system (represented by latitude, longitude and altitude information) with the P matrix and converting it into pixel coordinates in the film coordinate system. Calculate the pixel position of the target object on the image
[0017] Formula and matrix operation form: First, construct the coordinate matrix LLA of the target object in the geographic coordinate system (expressed in the form of longitude and latitude coordinates containing height information):
[0018] Where objectLongitudeRad and objectLatitudeRad are the longitude and latitude (converted to radians) of the target object (such as a building), objectHeight is the height of the target object, and N is the radius of curvature of the y-axis obtained by calculation.
[0019] Then, by multiplying it with the projection matrix, we get the coordinate representation Pt in the image coordinate system:
[0020] Finally, extract the pixel position coordinates on the image from Pt:
[0021] Here, ImageWidth is a parameter related to the width of the film. Through such calculation, the coordinates of the target object in the real geographic space are converted into the corresponding pixel position coordinates on the film, so that subsequent image cropping and red frame marking operations can be performed according to the coordinates to obtain aerial screenshots of the building.
[0022] These mathematical formulas and matrix operations work together to form a complete calculation logic from obtaining relevant input data (building information, camera parameters, aerial photo parameters, etc.) to finally calculating the pixel position of the building on the film. They are the core mathematical foundation of the entire method of automatically obtaining aerial screenshots of buildings.
[0023] The above realizes the conversion function from longitude and latitude coordinates (LLA) to image coordinates (UV), and plays a core role in the coordinate calculation module of the system. IV. Description of the drawings
[0024] FIG. 1 is a system architecture diagram for automatically acquiring aerial screenshots of buildings according to the present invention.
[0025] In the figure, the light blue "data acquisition module" has a code symbol (<>) inside, and its function is to establish a connection with the topographic map database to collect data such as the coordinates and height of the outer contour corner points of the target building; the purple "parameter analysis module" also has a code symbol (<>), which is used to analyze the input aerial photos and extract the internal and external orientation elements and pixel size information; the orange "coordinate calculation module" has a gear pattern inside, which is responsible for receiving the data from the first two modules and calculating the pixel position information of the building on the photo according to a specific algorithm; the pink "screenshot processing module" has an image and tool icon, which cuts or marks the photo with a red frame according to the coordinate calculation results to generate aerial screenshots of the building. Each module is connected in sequence and works together to realize the function of automatically obtaining aerial screenshots of buildings.
[0026] FIG. 2 is a data processing flow chart of the present invention for automatically acquiring aerial screenshots of buildings.
[0027] In the figure, the left side starts with the "topographic map", which is one of the data sources of the entire process. Starting from the topographic map, through the "topographic attribute extraction" step (represented by light blue diamonds), the coordinates and height of the building's outer contour corners are obtained from the topographic map. This information is important basic data for subsequent processing. The right side starts with the "aerial photograph", which is also a key data source. For the aerial photograph, "photo parameter extraction" (represented by dark blue diamonds) is performed to extract the internal and external orientation elements and pixel size information in the photo using special technologies and algorithms. The above-mentioned building's outer contour corner coordinates and height information, internal and external orientation elements and pixel size information extracted from the topographic map and aerial photographs are used as inputs to enter the "coordinate projection calculation" step (represented by orange diamonds). This step performs complex calculations and processing on the input data based on a specific coordinate projection calculation algorithm (such as an algorithm based on the principle of photogrammetry), and finally obtains the pixel position information of the building on the photo. After obtaining the pixel position information on the photo, enter the "image cropping and red frame marking" step (represented by pink diamonds). In this step, image processing techniques and tools are used to crop the aerial photographs based on the calculated pixel position information, accurately cropping the area containing the building, or marking the red frame, that is, accurately drawing a rectangular frame on the photograph based on the pixel position to highlight the building. After this step, a "building screenshot" is finally generated, completing the entire process of automatically obtaining aerial screenshots of buildings.
[0028] This flowchart clearly shows the complete process of the present invention from data acquisition, parameter extraction, coordinate calculation to the final generation of building screenshots and the logical relationship between the steps, which helps to understand the technical solution and implementation process of the present invention. V. Specific Implementation Methods System Initialization and Data Preparation
[0029] At the system startup stage, the data acquisition module is first configured so that it can correctly connect to the topographic map database, and the parameters and rules for data extraction are set to ensure that the coordinates of the outer contour corner points and height data of the target building can be accurately obtained. At the same time, the parameter parsing module is initialized so that it can recognize and parse the parameters of aerial photos in different formats.
[0030] Prepare aerial photo data to ensure the integrity of the photos and the availability of parameter information. Aerial photos can be stored in specific folders or databases so that the system can easily read and process them. Data collection and parameter analysis
[0031] The data acquisition module searches and extracts the relevant data of the target building from the topographic map database according to the preset rules, and transmits it to the coordinate calculation module.
[0032] The parameter parsing module processes the input aerial photos one by one, extracts the internal and external orientation elements of the photos (such as obtained from the metadata of the photos or special image tag information) and pixel size information, and organizes these data into a unified format and passes them to the coordinate calculation module. Coordinate calculation and screenshot generation
[0033] After receiving the data from the data acquisition module and the parameter analysis module, the coordinate calculation module uses the initCamera method to initialize the relevant matrix and variables according to the camera parameters, and then calls the GetPhotoPosition method to calculate the pixel position of the building on the photo.
[0034] The screenshot processing module uses the image processing library (such as OpenCV) to perform red frame annotation or cropping operations based on the pixel position information obtained by the coordinate calculation module. In the annotation operation, a rectangular frame is drawn according to the pixel coordinates and displayed on the image; in the cropping operation, the image is cropped according to the pixel range and the generated building aerial screenshot is saved.
[0035] Through the above steps, the method and system for automatically obtaining aerial screenshots of buildings of the present invention can efficiently and accurately obtain aerial screenshots of specific buildings from a large amount of aerial image data, providing powerful technical support and data guarantee for urban planning, building monitoring, real estate management and other fields.
[0036] Please note that the above patent application documents are only examples. When applying for a patent, it is necessary to write, organize and submit it in detail according to specific legal requirements and the regulations of the Patent Office, including a more in-depth explanation and proof of the novelty, creativity and practicality of the invention, and provide more complete and accurate drawings, examples, etc. At the same time, the code part may need to be further optimized and annotated so that the examiner can understand its role and implementation in the invention.
Claims
1. A method for automatically obtaining aerial screenshots of buildings, characterized in that: The following steps are involved: Obtain the coordinates of the corner points of the building's outer contour and the building's height from the topographic map; parse the internal and external orientation elements of each aerial photo, wherein the internal and external orientation elements include the image principal point coordinates, principal distance, longitude, latitude, altitude, heading angle, lateral angle, image rotation angle, and image pixel size when photographed; calculate the pixel position of the real building coordinates on the photo based on the acquired building data and aerial photo parameters through coordinate projection positioning; By means of software development, image cropping and red frame marking are performed according to the calculated pixel position of the building on the film to obtain aerial screenshots of the building.
2. The method for automatically obtaining aerial screenshots of buildings according to claim 1, wherein when analyzing the parameters of the aerial photograph, the internal and external orientation elements and pixel size information are extracted from the metadata or image tag information of the photograph.
3. According to the method for automatically obtaining aerial screenshots of buildings as described in claim 1, the coordinate projection positioning calculation step adopts a mathematical model constructed based on the principle of photogrammetry, and the model considers the earth ellipsoid model and the camera shooting posture and position information to perform spatial coordinate conversion calculation.
4. According to the method for automatically obtaining aerial screenshots of buildings as described in claim 1, the software development means uses an image processing library to perform image cropping and red frame marking operations, and the image processing library includes but is not limited to OpenCV.
5. A system for automatically acquiring aerial screenshots of buildings, characterized in that: include: A data acquisition module is used to obtain the coordinates of the corner points of the building's outer contour and the building's height data from the topographic map; Parameter analysis module, used to analyze the internal and external orientation elements and image pixel size of each aerial photo; A coordinate calculation module is used to calculate the pixel position of the real building coordinates on the photo through coordinate projection positioning based on the building data obtained by the data acquisition module and the aerial photo parameters analyzed by the parameter analysis module; The screenshot processing module is used to perform image cropping and red frame marking operations based on the pixel positions calculated by the coordinate calculation module using software development methods to obtain aerial screenshots of buildings.
6. The system for automatically acquiring aerial screenshots of buildings according to claim 5, wherein the data acquisition module is configured to establish a connection with a topographic map database and extract target building data according to preset rules.
7. According to the system for automatically acquiring aerial screenshots of buildings as claimed in claim 5, the parameter parsing module is capable of identifying and parsing parameters of aerial photos in different formats and arranging them into a unified format that can be used by other modules of the system.
8. According to the system for automatically acquiring aerial screenshots of buildings as described in claim 5, the coordinate calculation module adopts the coordinate projection positioning calculation method described in claim 1 for calculation, and utilizes a module containing specific algorithm code to implement the calculation function, and the specific algorithm code includes a method for initializing relevant matrices and variables according to camera parameters and a method for calculating the pixel position of the building on the image.
9. The system for automatically acquiring aerial screenshots of buildings according to claim 5, wherein the screenshot processing module is operated using the image processing library described in claim 4.