A test method for reconstructing tiff format files using real-scene 3D software
Patent Information
- Application Number
- CN202210452273.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-27
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2042-04-27
AI Technical Summary
[0002]目前市场上还没有专门针对实景三维重建软件生产质量的测试解决方案,大多数是通过生产完成后人为去查看审阅,每次人为审阅核查浪费了时间,需要人为去再次提交
[0016]通过cv2.rectangle()方法根据直角拐点信息在tiff格式文件上画出矩形。
Smart Images

Figure CN114706788B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of real-scene three-dimensional reconstruction software, and in particular to a testing method for real-scene three-dimensional software to reconstruct tiff format files. Background Art
[0002] Currently, there is no testing solution specifically for the production quality of real-life 3D reconstruction software on the market. Most of them are manually reviewed and checked after production is completed. Each manual review wastes time and requires manual resubmission.
[0003] The industry currently has real-scene 3D reconstruction software such as ContextCapture, PhotoScan, and Pix4Dmapper. However, there is no effective testing method for the TIFF file results produced. After production is completed, the actual results are manually compared with the original data. This is affected by human factors such as long production cycles, manual waiting time, slow execution speed, incomplete scene testing, and misinterpretation of results, resulting in low testing efficiency.
[0004] Therefore, the existing technology has defects and needs to be improved. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a testing method for reconstructing tiff format files using real-scene three-dimensional software, so as to solve the problems mentioned in the background technology.
[0006] The technical solution of the present invention is as follows: a testing method for reconstructing tiff format files using real-scene three-dimensional software is provided, comprising the following steps.
[0007] S1: Obtain the aerial image submitted to the real scene modeling software, obtain the geographic information of the XML file in the aerial triangulation result file, and obtain the reconstructed TIFF format file.
[0008] S2: Based on the geographic information in the XML file in the aerial triangulation results file, obtain the shooting orientation of the photo in the aerial image, and compare the photo with the reconstructed TIFF format file of the orientation; if the similarity reaches 99% or above, proceed to step S3; if the similarity is less than 99%, directly determine that the test has failed and proceed to step S4.
[0009] S3: Read the content of the tiff format file. If the black blocks in the tiff format file account for 1% or more of the entire tiff format file, the test fails. If the black blocks in the tiff format file account for less than 1% of the entire tiff format file, the test passes; proceed to step S4.
[0010] S4: Output test results.
[0011] By comparing data for similarity and checking for black blocks, the test results are output, eliminating the need for manual comparison with the original data. This effectively reduces production cycles, improves execution speed, and comprehensively tests scenarios, avoiding the impact of human factors such as misinterpretation of results, effectively improving test efficiency. After manually reviewing the test results, tiff format files that failed the test can be refined and modified, and retested to ultimately pass the test, ensuring that the tiff format files are basically consistent with the actual scene and meet application requirements.
[0012] The specific steps of the similarity comparison in step S2 are as follows: S21: using geographic information system software, converting the trajectory of the aerial positioning and orientation system during the aerial image in the XML file into the coordinate system of the TIFF format file; obtaining the converted photo; S22: loading the TIFF format file and the converted photo with the corresponding coordinates into the geographic information system software at the same time; if the range of the TIFF format file and the range of the converted photo are 99% or more consistent, then it is determined that the similarity between the photo and the reconstructed TIFF format file of the same location is 99% or more; if the similarity is not 99% or more consistent, then it is determined that the similarity between the photo and the reconstructed TIFF format file of the same location is less than 99%. The consistency ratio is determined by calculating the overlapping area of the range of the TIFF format file and the range of the converted photo.
[0013] The specific steps for calculating the proportion of black blocks in step S3 are as follows: S31: Obtain the grayscale value of the TIFF format file using the cv2.threshold method in Python OpenCV, filter out the grayscale value of black, and obtain the black block; S32: Detect the contour of the black block using the cv2.findContours() method and calculate the contour area of the black block; S33: Divide the contour area of the black block by the total area of the TIFF format file to obtain the proportion of the contour area of the black block to the area of the entire TIFF format file. The total area of the TIFF format file is calculated using cv2.contourArea.
[0014] The steps of the method for calculating the contour area of the black block are as follows: divide the contour of the black block into several rectangles, obtain the right-angle inflection point information of each rectangle, thereby obtaining the length and width of each rectangle, and then calculate the area of each rectangle. The areas of all rectangles are superimposed to obtain the area of the entire contour.
[0015] The right-angle inflection point information of the rectangle includes x, y, w, and h; wherein (x, y) is the coordinate of the lower left corner of the rectangle, w is the width, h is the length, (x+w, y+h) is the coordinate of the upper right corner of the matrix, (x, y+h) is the coordinate of the lower right corner of the matrix, and (x+w, y) is the coordinate of the upper left corner of the matrix.
[0016] Use the cv2.rectangle() method to draw a rectangle on the tiff format file according to the right-angle inflection point information.
[0017] There are multiple computers, and the multiple computers run simultaneously in a distributed manner.
[0018] By adopting the above scheme, the present invention provides a test method for reconstructing tiff format files using real-scene three-dimensional software. By comparing the similarity of the data to see if it is consistent, and then checking whether there are black blocks, the test results are outputted without manual comparison with the original data, which effectively reduces the production cycle, improves the slow execution speed, and comprehensively tests the scene, avoids the influence of human factors such as misreading the results, and effectively improves the test efficiency. After manually checking the test results, the tiff format files that have not passed the test can be refined and modified, and tested again, and finally the test is passed, so that the tiff format files are basically consistent with the real scene and meet the application requirements. The present invention can well solve the problems of incomplete scene coverage, long waiting period for production scene data execution, and manual inspection errors. In theory, it ensures that the data completed in production are all in line with the requirements. If they are not in line with the requirements, unqualified test results will be outputted so that personnel can quickly locate the problem and repair it, and it supports the distributed simultaneous operation of multiple computers, which greatly improves the test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION
[0020] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0021] See also Figure 1 The present invention provides a testing method for reconstructing tiff format files using real-scene three-dimensional software, comprising the following steps.
[0022] S1: Obtain the aerial image submitted to the real scene modeling software, obtain the geographic information of the XML file in the aerial triangulation result file, and obtain the reconstructed TIFF format file.
[0023] S2: Based on the geographic information in the XML file in the aerial triangulation results file, obtain the shooting orientation of the photo in the aerial image, and compare the photo with the reconstructed TIFF format file of the orientation; if the similarity reaches 99% or above, proceed to step S3; if the similarity is less than 99%, directly determine that the test has failed and proceed to step S4.
[0024] S3: Read the content of the tiff format file. If the black blocks in the tiff format file account for 1% or more of the entire tiff format file, the test fails. If the black blocks in the tiff format file account for less than 1% of the entire tiff format file, the test passes; proceed to step S4.
[0025] S4: Output test results.
[0026] By comparing data for similarity and checking for black blocks, the test results are output, eliminating the need for manual comparison with the original data. This effectively reduces production cycles, improves execution speed, and comprehensively tests scenarios, avoiding the impact of human factors such as misinterpretation of results, effectively improving test efficiency. After manually reviewing the test results, tiff format files that failed the test can be refined and modified, and retested to ultimately pass the test, ensuring that the tiff format files are basically consistent with the actual scene and meet application requirements.
[0027] S21: Using geographic information system software, convert the trajectory of the aerial positioning and orientation system during the aerial imagery in the XML file into the coordinate system of a TIFF format file; thereby obtaining a converted photo; S22: simultaneously loading the TIFF format file and the converted photo with corresponding coordinates into the geographic information system software; if the range of the TIFF format file and the range of the converted photo match by 99% or more, then the similarity between the photo and the reconstructed TIFF format file at that location is determined to be 99% or more; if the match does not reach 99% or more, then the similarity between the photo and the reconstructed TIFF format file at that location is determined to be less than 99%. The matching ratio is determined by calculating the overlapping area between the ranges of the TIFF format file and the converted photo.
[0028] The specific steps for calculating the proportion of black blocks in step S3 are as follows: S31: Obtain the grayscale value of the TIFF format file using the cv2.threshold method in Python OpenCV, filter out the grayscale value of black, and obtain the black block; S32: Detect the contour of the black block using the cv2.findContours() method and calculate the contour area of the black block; S33: Divide the contour area of the black block by the total area of the TIFF format file to obtain the proportion of the contour area of the black block to the area of the entire TIFF format file. The total area of the TIFF format file is calculated using cv2.contourArea.
[0029] The steps of the method for calculating the contour area of the black block are as follows: divide the contour of the black block into several rectangles, obtain the right-angle inflection point information of each rectangle, thereby obtaining the length and width of each rectangle, and then calculate the area of each rectangle. The areas of all rectangles are superimposed to obtain the area of the entire contour.
[0030] The right-angle inflection point information of the rectangle includes x, y, w, and h; wherein (x, y) is the coordinate of the lower left corner of the rectangle, w is the width, h is the length, (x+w, y+h) is the coordinate of the upper right corner of the matrix, (x, y+h) is the coordinate of the lower right corner of the matrix, and (x+w, y) is the coordinate of the upper left corner of the matrix.
[0031] Use the cv2.rectangle() method to draw a rectangle on the tiff format file according to the right-angle inflection point information.
[0032] There are multiple computers, and the multiple computers run simultaneously in a distributed manner.
[0033] In summary, the present invention provides a test method for reconstructing tiff format files using real-scene three-dimensional software. By comparing the similarity of the data to see if they are consistent, and then checking whether there are black blocks, the test results are output without manual comparison with the original data, which effectively reduces the production cycle, improves the slow execution speed, and comprehensively tests the scene, avoids the influence of human factors such as misreading the results, and effectively improves the test efficiency. After manually checking the test results, the tiff format files that have not passed the test can be refined and modified, and tested again, and finally the test is passed, so that the tiff format files are basically consistent with the real scene and meet the application requirements. The present invention can well solve the problems of incomplete scene coverage, long waiting period for production scene data execution, and errors in manual inspection. In theory, it ensures that the data completed in production are all in line with the requirements. If they are not in line, unqualified test results will be output so that personnel can quickly locate the problem and repair it. It also supports the distributed simultaneous operation of multiple computers, greatly improving the test efficiency.
[0034] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A test method for reconstructing tiff format files using real-scene 3D software, characterized in that: The following steps are involved: S1: Obtain the aerial image submitted to the reality modeling software, obtain the geographic information of the XML file in the aerial triangulation result file, and obtain the reconstructed TIFF format file; the aerial image includes several photos; S2: Based on the geographic information in the XML file in the aerial triangulation results, the photo shooting orientation in the aerial image is obtained, and the photo is compared with the reconstructed TIFF file of the orientation. If the similarity reaches 99% or above, the process proceeds to step S3. If the similarity is less than 99%, the test is directly judged as unqualified and the process proceeds to step S4. S3: Read the content of the TIFF format file. If the black blocks in the TIFF format file account for 1% or more of the entire TIFF format file, the test fails. If the black blocks in the TIFF format file account for less than 1% of the entire TIFF format file, the test passes; then proceed to step S4. S4: Output test results; The specific steps for calculating the proportion of black blocks in step S3 are: S31: Obtain the grayscale value of the tiff format file through the cv.threshold method in Python opencv, filter out the black grayscale value, and obtain the black block; S32: Detect the outline of the black block through the cv2.findContours() method and calculate the outline area of the black block; S33: The ratio of the black block's outline area to the area of the entire tiff file is obtained by dividing the black block's outline area by the total area of the tiff file; The total area of the tiff format file is calculated by cv.contourArea; The specific steps of the similarity comparison in step S2 are: S21: using geographic information system software, converting the trajectory of the aerial positioning and orientation system during the aerial photography in the XML file into the coordinate system of the TIFF format file; obtaining the converted photo; S22: Loading the TIFF format file and the converted photo with the corresponding coordinates into the geographic information system software at the same time. If the range of the TIFF format file and the range of the converted photo are consistent with each other by 99% or more, it is determined that the similarity between the photo and the reconstructed TIFF format file of the same location is consistent with each other by 99% or more. If the similarity does not reach 99% or more, it is determined that the similarity between the photo and the reconstructed TIFF format file of the same location is less than 99%.
2. The method for testing a tiff format file reconstructed by a real-scene 3D software according to claim 1, characterized in that: The matching ratio is determined by calculating the overlapping area between the TIFF file and the converted photo.
3. The method for testing a tiff format file reconstructed by a real-scene 3D software according to claim 1 or 2, characterized in that: The geographic information system software is arcgis.
4. The method for testing a tiff format file reconstructed by a real-scene 3D software according to claim 1, characterized in that: The steps of the method for calculating the contour area of the black block are as follows: divide the contour of the black block into several rectangles, obtain the right-angle inflection point information of each rectangle, thereby obtaining the length and width of each rectangle, and then calculate the area of each rectangle. The areas of all rectangles are superimposed to obtain the area of the entire contour.
5. The method for testing a tiff format file reconstructed by a real-scene 3D software according to claim 4, characterized in that: The right-angle inflection point information of the rectangle includes x, y, w, and h; wherein (x, y) is the coordinate of the lower left corner of the rectangle, w is the width, h is the length, (x+w, y+h) is the coordinate of the upper right corner of the matrix, (x, y+h) is the coordinate of the lower right corner of the matrix, and (x+w, y) is the coordinate of the upper left corner of the matrix.
6. The method for testing a tiff format file reconstructed by a real-scene 3D software according to claim 4, characterized in that: Use the cv2.rectangle() method to draw a rectangle on the tiff format file according to the right-angle inflection point information.
7. The method for testing a tiff format file reconstructed by a real-scene 3D software according to claim 1, characterized in that: Multiple computers are used for testing, and multiple computers run simultaneously in a distributed manner.
Citation Information
Patent Citations
Testing method of CG rendering client
CN108334450A
Face verification method and device, server and readable storage medium
CN110532746A