A method and device for measuring building height
By using images to establish a virtual coordinate system and deep learning models to identify the highest line, the problem of waste of measurement resources in the prior art is solved, and low-cost and efficient building height measurement is achieved.
Patent Information
- Application Number
- CN202210488313.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-06
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2042-05-06
AI Technical Summary
The prior art requires a lot of manpower or financial resources in building height measurement, and the method of combining laser ranging and satellite imagery with virtual rulers is not convenient to implement.
By acquiring the image of the building, establishing a virtual coordinate system in the image, identifying the height of the building, using a deep learning model to determine the highest line of the building, and making measurements based on the scale of the virtual coordinate system.
It realizes low cost and high efficiency in building height measurement, reduces technical requirements and economic costs for technicians, simplifies the measurement process, and saves resources.
Smart Images

Figure CN114926523B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of video image processing, and in particular to a method and device for measuring the height of a building. Background Art
[0002] At present, during the construction of a building, it is necessary to regularly monitor the building height to provide feedback on the construction progress of the building. Usually, technicians complete the height measurement by deploying laser ranging equipment on site, or by acquiring satellite images and combining them with the virtual ruler of map software. However, in actual application, the above methods require a lot of manpower or financial resources and are not easy to implement. Summary of the invention
[0003] The embodiments of the present application provide a method and device for measuring the height of a building, which are used to simplify the process of measuring the height of a building and save resources consumed in the measurement.
[0004] To achieve the above objectives, the present application provides the following technical solutions:
[0005] In a first aspect, a method for measuring the height of a building is provided, comprising: determining the highest line of a building in a first image of the building; obtaining a virtual coordinate system of the building; wherein the virtual coordinate system is located in a plane where a side surface of the building is located, the vertical axis of the virtual coordinate system is the direction of the height of the building, and the scale on the vertical axis is used to indicate the predicted height of the building; based on the scale corresponding to the highest line on the vertical axis, determining a first predicted height of the building.
[0006] Since laser ranging or methods based on satellite images combined with virtual rulers are not easy to implement, they consume more resources in the process of regular monitoring. Therefore, the building height measurement method proposed in this application is adopted, by acquiring an image of the building, and establishing a virtual coordinate system based on the building in the image to identify the height of the building. The measurement of the building height is completed at a lower cost, which helps to simplify the process of measuring the building height and save resources consumed in measurement compared to the higher technical requirements for technicians in the laser ranging process or the higher economic cost of obtaining satellite images.
[0007] In a possible implementation manner, after acquiring the virtual coordinate system of the building, the method further includes: displaying the virtual coordinate system in the first image.
[0008] This possible implementation method helps technicians to intuitively determine the coordinates of the building in the virtual coordinate system during the measurement process.
[0009] In a possible implementation, before determining the highest line of the building in the first image of the building, the method also includes: acquiring a historical image of the building; wherein the point state of the camera used to acquire the historical image and the camera used to acquire the first image is the same, and the point state is used to characterize the position and acquisition parameters of the camera; determining a plurality of marking points in the historical image, the plurality of marking points being marking points in the side; and generating a virtual coordinate system according to the pixel coordinates of each marking point, the pixel coordinates being the coordinates of the marking point in the historical image.
[0010] This possible implementation method provides a specific implementation method for generating a virtual coordinate system. The virtual coordinate system that fits the side is generated by the coordinates of multiple marking points on the same side of the building, which can intuitively determine the height of the building.
[0011] In a possible implementation, the method further includes: calibrating the vertical axis of the virtual coordinate system based on a blueprint of the building or actual heights of multiple locations of the building.
[0012] This possible implementation method provides a specific implementation method for scale calibration in a virtual coordinate system, which helps to simplify the process of measuring the height of a building by combining the actual measurable partial height of the building in the virtual coordinate system to determine the overall height of the building.
[0013] In one possible implementation, determining the highest line of a building in a first image of the building includes: inputting the first image into a deep learning model to obtain the highest line of the building; wherein the deep learning model is used to identify the highest line of the building in the image.
[0014] This possible implementation method provides a specific implementation method for identifying the highest line of a building in an image. Determining the highest line of a building through a computer device helps to improve the accuracy of measuring the height of the building.
[0015] In a possible implementation, the method further includes: obtaining the actual height of the building when the first image is captured; calculating the difference between the first predicted height and the actual height; when the difference is greater than a first threshold, adjusting the vertical axis scale of the virtual coordinate system according to the difference.
[0016] This possible implementation method provides a specific implementation method for adjusting the vertical axis scale of the virtual coordinate system according to the error, which helps to improve the accuracy of measuring the height of the building.
[0017] In a possible implementation, the method also includes: acquiring a second image of the building; wherein the acquisition time interval of the second image and the first image is greater than or equal to a preset time interval; the point state of the camera used to acquire the second image is the same as that used to acquire the first image, and the point state is used to characterize the position and acquisition parameters of the camera; determining a second predicted height of the building based on the highest line of the second image; and outputting an alarm message if the difference between the first predicted height and the second predicted height is less than a height threshold.
[0018] This possible implementation method provides a specific implementation method for monitoring the building height to provide feedback on the building construction progress, which helps to improve construction efficiency and promote construction progress by measuring the building height.
[0019] In a second aspect, a computer device is provided, including a functional unit for executing any one of the methods provided in the first aspect, wherein the actions performed by each functional unit are implemented by hardware or by executing corresponding software through hardware. For example, the computer device may include: a processing unit and an acquisition unit; the processing unit is used to determine the highest line of a building in a first image of the building; the acquisition unit is used to acquire a virtual coordinate system of the building; wherein the virtual coordinate system is located in a plane where one side of the building is located, the vertical axis of the virtual coordinate system is the direction where the height of the building is located, and the scale on the vertical axis is used to indicate the predicted height of the building; the processing unit is also used to determine the first predicted height of the building based on the scale corresponding to the highest line on the vertical axis.
[0020] In a third aspect, a computer device is provided, comprising: a processor and a memory. The processor is connected to the memory, the memory is used to store computer-executable instructions, and the processor executes the computer-executable instructions stored in the memory, thereby implementing any one of the methods provided in the first aspect.
[0021] In a fourth aspect, a chip is provided, comprising: a processor and an interface circuit; the interface circuit is used to receive code instructions and transmit them to the processor; the processor is used to run the code instructions to execute any one of the methods provided in the first aspect.
[0022] In a fifth aspect, a computer-readable storage medium is provided, comprising computer execution instructions, which, when executed on a computer, enable the computer to execute any one of the methods provided in the first aspect.
[0023] In a sixth aspect, a computer program product is provided, comprising computer execution instructions, which, when executed on a computer, cause the computer to execute any one of the methods provided in the first aspect.
[0024] The technical effects brought about by any implementation method in the second to sixth aspects can refer to the technical effects brought about by the corresponding implementation method in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 A schematic diagram of the structure of a computer device provided in an embodiment of the present application;
[0026] Figure 2 A schematic diagram of a flow chart of a building height measurement method provided in an embodiment of the present application;
[0027] Figure 3 A schematic diagram of an image including a building provided in an embodiment of the present application;
[0028] Figure 4 An image schematic diagram of generating a virtual coordinate system provided in an embodiment of the present application;
[0029] Figure 5 A schematic diagram of the composition of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] In the description of this application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, "at least one" means one or more, and "plurality" means two or more. The words "first", "second", etc. do not limit the quantity and execution order, and the words "first", "second", etc. do not limit them to be different.
[0031] It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0032] The embodiment of the present application provides a building height measurement method, which can be applied to computer equipment. The embodiment of the present application does not impose any restrictions on the specific form of the computer equipment. For example, the computer equipment can be a terminal device. Among them, the terminal device can be referred to as: terminal, user equipment (UE), terminal equipment, access terminal, user unit, user station, mobile station, remote station, remote terminal, mobile device, user terminal, wireless communication equipment, user agent or user device, etc. The terminal device can be a mobile phone, augmented reality (AR) device, virtual reality (VR) device, tablet computer, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), etc.
[0033] In terms of hardware implementation, the above-mentioned computer device can be implemented as follows: Figure 1 The computer device shown is implemented as shown. Figure 1 FIG. 1 is a schematic diagram of the hardware structure of a computer device 10 provided in an embodiment of the present application. The computer device 10 can be used to implement the functions of the above-mentioned computer devices.
[0034] Figure 1 The computer device 10 shown may include: a processor 101 , a memory 102 , a communication interface 103 , and a bus 104 . The processor 101 , the memory 102 , and the communication interface 103 may be connected via the bus 104 .
[0035] The processor 101 is the control center of the computer device 10, and may be a general-purpose central processing unit (CPU) or other general-purpose processors, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0036] As an example, the processor 101 may include one or more CPUs, such as Figure 1 CPU 0 and CPU 1 are shown in .
[0037] The memory 102 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0038] In a possible implementation, the memory 102 may exist independently of the processor 101. The memory 102 may be connected to the processor 101 via a bus 104 and used to store data, instructions, or program codes. When the processor 101 calls and executes the instructions or program codes stored in the memory 102, the building height measurement method provided in the embodiment of the present application can be implemented.
[0039] In another possible implementation, the memory 102 may also be integrated with the processor 101 .
[0040] The communication interface 103 is used for connecting the computer device 10 to other devices through a communication network, which may be Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc. The communication interface 103 may include a receiving unit for receiving data and a sending unit for sending data.
[0041] The bus 104 may be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 1 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0042] It should be pointed out that Figure 1 The structure shown in the figure does not constitute a limitation on the computer device 10, except Figure 1In addition to the components shown, the computer device 10 may include more or fewer components than shown, or combine certain components, or arrange the components differently. For example, the computer device 10 may also include a display screen for displaying images.
[0043] like Figure 2 FIG. 1 is a flow chart of a building height measurement method provided by the present application. The method comprises:
[0044] S201. A computer device determines a highest line of a building in a first image of the building.
[0045] The first image refers to an image including at least one side of a building, and the image can show the height of the complete building. Figure 3 The shown example is an example of the first image.
[0046] Optionally, the highest line of the building refers to a line connecting the positions of the highest points of the buildings in the image.
[0047] Optionally, the computer device inputs the first image into a deep learning model to obtain the highest line of the building in the first image. The deep learning model is used to identify the highest line of the building in the image. For example, Figure 3 The dotted line in the first image is the highest line of the building in the first image.
[0048] It is understandable that during the construction of a building, the building is constructed from low to high floors, and the height of the building can reflect the current construction progress. Among them, the deep learning model based on identifying the highest line of the building includes multiple recognition methods, for example, identifying the outline of the building according to the color difference between the building and the background in the image, thereby determining the highest line of the building. The computer device can also determine the highest line of the building in other ways, and this application does not limit this.
[0049] S202: The computer device obtains a virtual coordinate system of the building.
[0050] The virtual coordinate system is located in a plane where one side of the building is located, the vertical axis of the virtual coordinate system is the direction where the height of the building is located, and the scale on the vertical axis is used to indicate the predicted height of the building.
[0051] Optionally, before executing step S202, the computer device obtains a historical image of the building, determines a plurality of marking points in the historical image, and generates a virtual coordinate system according to the pixel coordinates of each marking point.
[0052] The point state of the camera used to collect the historical image and the first image is the same, and the point state is used to characterize the position and acquisition parameters of the camera. The acquisition parameters refer to the state of the camera when collecting images, including the camera internal parameters such as the pitch angle, focal length, and the direction in which the camera collects images. The position of the camera can be represented by the latitude and longitude information of the camera.
[0053] The plurality of marking points are marking points on one side of a building in the historical image, and the pixel coordinates are coordinates of the marking points in the historical image.
[0054] Optionally, the computer device determines a plurality of marking points in the historical image for determining at least two parallel lines parallel to the bottom edge of the side of the building. Specifically, the computer device first determines two marking points in the historical image. The two marking points are used to determine parallel lines parallel to the bottom edge of the building in the historical image. It is understandable that the bottom edge of the building is the edge of the building that is parallel to (fits) the ground in the image. The bottom edge can be image-recognized by the computer device to determine the boundary line between the building and the ground as the bottom edge of the building. For example, Figure 4 As shown, A and B are both sides of the building. Determine P and Q, or M and N, in side A. The straight line where PQ is located or the straight line where MN is located is parallel to the bottom side of side A.
[0055] Optionally, based on determining a parallel line of a bottom edge, two marking points are determined again in the historical image. The two marking points determined again are used to determine a parallel line parallel to the bottom edge of the building in the historical image. For example, if PQ is determined for the first time, MN can be determined for the second time; if MN is determined for the first time, PQ can be determined for the second time. The two parallel lines corresponding to the marking points determined twice help to correct the angle between the parallel line determined for the first time and the bottom edge of the side, that is, the parallel lines determined twice are used to locate the side through the parallelism with the bottom edge of the side.
[0056] Optionally, the computer device generates a virtual coordinate system according to the pixel coordinates of each marking point, specifically including: generating a rectangular coordinate system according to a plane of perspective imaging of at least two parallel lines; determining a reference point in the rectangular coordinate system to obtain a virtual coordinate system.
[0057] For example, Figure 4 As shown, the at least two parallel lines include PQ and MN, and may also include MP and NQ.
[0058] Optionally, the above determination of the reference point in the rectangular coordinate system can be understood as determining the origin in the virtual coordinate system. Specifically, the reference point can be determined by identifying the intersection point between the ground and at least two surfaces of the building. Figure 4The point O shown in FIG. By determining the origin of the longitudinal axis of the virtual coordinate system, the height of the building measured by the longitudinal axis of the virtual coordinate system can be accurately determined.
[0059] Optionally, the above-mentioned multiple marking points and reference points may be determined by manual selection by a technician in the historical image.
[0060] It is understandable that during the construction of the current building, there may be factors in the historical images collected that affect the computer equipment's recognition of the above-mentioned multiple marking points and reference points. For example, when determining the bottom edge of the building, the computer equipment needs to identify the boundary between the building and the ground, and the boundary between the building and the ground may be blocked by construction waste or equipment, personnel, etc., thereby affecting the accuracy of the computer equipment's recognition. Therefore, manual calibration by technicians helps the computer equipment to better determine the above information.
[0061] Determining a plane and generating a virtual coordinate system based on two horizontal parallel lines manually drawn by the user in the above manner helps to simplify the complexity of generating the plane where the virtual coordinate system is located and improve the processing efficiency of the computer device.
[0062] The vertical axis of the virtual coordinate system also includes a scale for indicating the height of the building in the image.
[0063] Optionally, the computer device calibrates the vertical axis of the virtual coordinate system based on the drawings of the building or the actual heights of multiple locations of the building. The actual heights of multiple locations of the building refer to the actual heights of any multiple locations on the side of the building. It is understood that the actual height is a height that can be measured through actual operation, such as the height of a floor.
[0064] It is understandable that the building drawings include the design height, which is the reference height during the construction process. The actual height of the building should be within an acceptable range of error from the design height. Therefore, the design height can be used as the actual height of the building for calibration. For example, Figure 4 As shown, the construction workers measure the actual height between NQs, calculate the ratio between the height in the image and the actual height based on the actual height of the NQ and the distance between the NQs in the image, and determine the scale based on the ratio. For example, if the actual height of the NQ is 3 meters and the height of the NQ in the image is 3 centimeters, the ratio between the image and the actual height is 1:100.
[0065] Optionally, after the above step S202, the computer device displays a virtual coordinate system in the first image.
[0066] It is understandable that the computer equipment used to measure the height of the building in the image is operated by technical personnel. When the virtual coordinate system is displayed in the image, it helps the technical personnel to intuitively determine the state of the virtual coordinate system, such as the degree of fit with the side of the building, which facilitates adjustment. In addition, when measuring the height subsequently, the height value can be directly read in the virtual coordinate system on the image, thereby improving the user experience.
[0067] S203. The computer device determines a first predicted height of the building based on the scale corresponding to the highest line on the vertical axis.
[0068] Specifically, according to the above method, the position of the highest line identified in step S201 in the virtual coordinate system is determined, and its corresponding scale is determined to obtain the first predicted height of the building. The first predicted height is the predicted height of the building in the first image.
[0069] Optionally, the computer device obtains the actual height of the building when the first image is captured, and calculates the difference between the first predicted height and the actual height, and when the difference is greater than a first threshold, adjusts the vertical axis scale of the virtual coordinate system according to the difference.
[0070] It is understandable that the calibration process performed in the above step S202 has manual measurement errors. When the errors are accumulated, there is a deviation between the first predicted height corresponding to the highest line of the measured building and the actual height of the building. If the deviation is greater than the first threshold, the computer device adjusts the vertical axis scale of the virtual coordinate system according to the deviation. The first threshold is a preset error value, such as 0.02 meters. Exemplarily, if the first predicted height is greater than the actual height of the building, and the difference is 0.05 meters, when the difference is greater than the first threshold, the computer device subtracts 0.05 meters from the first predicted height, redefines the vertical axis scale, and performs calibration.
[0071] Optionally, after the above step S203, the computer device acquires a second image of the building, wherein the acquisition time interval of the second image and the first image is greater than or equal to the preset time interval, and the point state of the camera used to acquire the second image and the first image is the same, and the point state is used to characterize the position and acquisition parameters of the camera. The computer device determines the second predicted height of the building based on the highest line of the second image, and outputs an alarm message if the difference between the first predicted height and the second predicted height is less than the height threshold.
[0072] It is understandable that during the construction of the building, the computer device periodically obtains the height of the building to characterize the progress of the construction. In the present application, the acquisition process of the second image of the building by the computer device is the same as that of the first image. The same acquisition process means that the point state of the camera that acquires the image is the same, and the description of the point state is consistent with the above and will not be repeated. Based on the images acquired in the same point state, the position of the building in the image should be a fixed position. Therefore, the computer device measures the buildings in multiple images based on the same virtual coordinate system.
[0073] It should be noted that the height threshold is a preset threshold, which is related to the image acquisition frequency and construction capacity. For example, under normal operation, the construction progress is about 5 meters per month, so images can be collected once a month, and the construction progress is judged based on the difference between the predicted height of the building in the image of this month and the predicted height of the building in the image collected last month. If it is less than 5 meters, it is considered that the construction is slow, and the computer device can output an alarm message. Among them, the alarm message is used to indicate that the construction progress in the past month is less than 5 meters.
[0074] Optionally, the computer device also outputs an image record, which is an image for measuring the height of a building, and may also include a virtual coordinate axis for analysis based on the image to facilitate observation.
[0075] Measuring the building height by the above method solves the problem of consuming a lot of resources when currently measuring by laser ranging or based on satellite images combined with a virtual ruler. By adopting the building height measurement method in this application, an image of the building is obtained, and a virtual coordinate system is established in the image based on the building to identify the height of the building. Among them, there are no high requirements for the image of the building, so the measurement of the building height is completed at a lower cost, which reduces the technical requirements for technicians in the laser ranging process. The measurement method for obtaining satellite images helps to reduce economic costs, simplify the process of measuring the height of buildings, and save resources consumed in measurement.
[0076] The above mainly introduces the scheme of the embodiment of the present application from the perspective of the method. It is understandable that in order to realize the above functions, the computer device includes at least one of the hardware structure and software modules corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.
[0077] The embodiment of the present application can divide the computer device into functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0078] For example, Figure 5 A possible structural schematic diagram of a computer device (referred to as computer device 50) involved in the above embodiment is shown, and the computer device 50 includes a processing unit 501 and an acquisition unit 502. The processing unit 501 is used to determine the highest line of a building in a first image of the building; the acquisition unit 502 is used to acquire a virtual coordinate system of the building; wherein the virtual coordinate system is located in a plane where one side of the building is located, the vertical axis of the virtual coordinate system is the direction where the height of the building is located, and the scale on the vertical axis is used to indicate the predicted height of the building; the processing unit 501 is also used to determine the first predicted height of the building based on the scale corresponding to the highest line on the vertical axis.
[0079] Optionally, the acquisition unit 502 is also used to acquire historical images of the building; wherein the point state of the camera used to acquire the historical image and the camera used to acquire the first image is the same, and the point state is used to characterize the position and acquisition parameters of the camera; the processing unit 501 is also used to determine multiple marking points in the historical image, and the multiple marking points are marking points in the side; the processing unit 501 is also used to generate a virtual coordinate system according to the pixel coordinates of each marking point, and the pixel coordinates are the coordinates of the marking point in the historical image.
[0080] Optionally, the processing unit 501 is further configured to calibrate the vertical axis of the virtual coordinate system based on a blueprint of the building or actual heights of multiple locations of the building.
[0081] Optionally, the processing unit 501 is specifically used to input the first image into a deep learning model to obtain the highest line of the building; wherein the deep learning model is used to identify the highest line of the building in the image.
[0082] Optionally, the acquisition unit 502 is also used to obtain the actual height of the building when the first image is captured; the processing unit 501 is also used to calculate the difference between the first predicted height and the actual height; the processing unit 501 is also used to adjust the vertical axis scale of the virtual coordinate system according to the difference when the difference is greater than a first threshold.
[0083] Optionally, the acquisition unit 502 is also used to acquire a second image of the building; wherein the acquisition time interval of the second image and the first image is greater than or equal to a preset time interval; the point state of the camera used to acquire the second image is the same as that used to acquire the first image, and the point state is used to characterize the position and acquisition parameters of the camera; the processing unit 501 is also used to determine the second predicted height of the building based on the highest line of the second image; the computer device 50 also includes an output unit 503, and if the difference between the first predicted height and the second predicted height is less than a height threshold, the output unit 503 is used to output an alarm message.
[0084] Optionally, the computer device 50 further includes a storage unit 504. The storage unit 504 is used to store computer-executable instructions, and other units in the computer device can perform corresponding actions according to the computer-executable instructions stored in the storage unit 504.
[0085] For the detailed description of the above optional methods, please refer to the above method embodiments, which will not be repeated here. In addition, the explanation of any of the above computer devices 50 and the description of the beneficial effects can refer to the above corresponding method embodiments, which will not be repeated here.
[0086] As an example, combining Figure 1 , the functions partially or completely implemented by the processing unit 501, the acquisition unit 502, the output unit 503 and the storage unit 504 in the computer device 50 can be Figure 1 Processor 101 in the Figure 1 The acquisition unit 502 can also be implemented by Figure 1 The receiving unit in the communication interface 103 is implemented.
[0087] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed on a computer, the computer is enabled to execute any of the methods executed by the computer devices provided above.
[0088] For the explanation of the relevant contents and description of the beneficial effects of any of the above-mentioned computer-readable storage media, reference may be made to the above-mentioned corresponding embodiments, which will not be repeated here.
[0089] The embodiment of the present application also provides a chip. The chip integrates a control circuit and one or more ports for implementing the functions of the above-mentioned computer device 50. Optionally, the functions supported by the chip can be referred to above and will not be repeated here. A person of ordinary skill in the art can understand that all or part of the steps of implementing the above-mentioned embodiment can be completed by instructing the relevant hardware through a program. The program can be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a random access memory, etc. The above-mentioned processing unit or processor can be a central processing unit, a general-purpose processor, an application specific integrated circuit (ASIC), a microprocessor (digital signal processor, DSP), a field programmable gate array (field programmable gatearray, FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof.
[0090] The embodiment of the present application also provides a computer program product including instructions, when the instructions are run on a computer, the computer executes any one of the methods in the above embodiments. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means to another website site, computer, server, or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more servers that can be integrated with the medium. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., an SSD), etc.
[0091] It should be noted that the above-mentioned devices for storing computer instructions or computer programs provided in the embodiments of the present application, such as but not limited to the above-mentioned memories, computer-readable storage media and communication chips, etc., are all non-transitory.
[0092] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing computer program instructions on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. Computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that contains one or more servers that can be integrated with a medium. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).
[0093] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other changes to the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple situations. A single processor or other unit may implement several functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
[0094] Although the present application has been described in conjunction with specific features and embodiments thereof, it is obvious that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely exemplary illustrations of the present application as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art may make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for measuring building height, characterized in that: include: Acquire a historical image of a building; wherein the point state of a camera used to acquire the historical image and the first image is the same, and the point state is used to characterize the position and acquisition parameters of the camera; Determine a plurality of marking points in the historical image, wherein the plurality of marking points are marking points in one side of the building; Generate a virtual coordinate system according to the pixel coordinates of each of the marking points, wherein the pixel coordinates are the coordinates of the marking point in the historical image; wherein the virtual coordinate system is located in the plane where the side surface is located, the vertical axis of the virtual coordinate system is the direction where the height of the building is located, and the scale on the vertical axis is used to indicate the predicted height of the building; determining a highest line of the building in a first image of the building; Determining a first predicted height of the building based on a scale corresponding to the highest line on the vertical axis; The method further comprises: Acquire the actual height of the building when the first image is captured; Calculating a difference between the first predicted height and the actual height; When the difference is greater than a first threshold, the vertical axis scale of the virtual coordinate system is adjusted according to the difference.
2. The method according to claim 1, characterized in that: The method further comprises: The vertical axis of the virtual coordinate system is calibrated based on the blueprint of the building or the actual heights of multiple locations of the building.
3. The method according to claim 1, characterized in that Determining a highest line of the building in a first image of the building comprises: The first image is input into a deep learning model to obtain the highest line of the building; wherein the deep learning model is used to identify the highest line of the building in the image.
4. The method according to claim 1, characterized in that: The method further comprises: Acquire a second image of the building; wherein the time interval between the acquisition of the second image and the first image is greater than or equal to a preset time interval; the point state of the camera used to acquire the second image and the camera used to acquire the first image is the same, and the point state is used to characterize the position and acquisition parameters of the camera; determining a second predicted height of the building based on a highest line of the second image; If the difference between the first predicted altitude and the second predicted altitude is less than the altitude threshold, a warning message is output.
5. A computer device, characterized in that: include: An acquisition unit, used for acquiring a historical image of a building; wherein the point state of a camera used for acquiring the historical image and the first image is the same, and the point state is used for representing the position and acquisition parameters of the camera; The processing unit is further used to determine a plurality of marking points in the historical image, wherein the plurality of marking points are marking points in one side of the building; The processing unit is further used to generate a virtual coordinate system according to the pixel coordinates of each of the marking points, wherein the pixel coordinates are the coordinates of the marking point in the historical image; wherein the virtual coordinate system is located in the plane where the side surface is located, the vertical axis of the virtual coordinate system is the direction where the height of the building is located, and the scale on the vertical axis is used to indicate the predicted height of the building; The processing unit is further configured to determine the highest line of the building in the first image of the building; The processing unit is further used to determine a first predicted height of the building based on a scale corresponding to the highest line on the vertical axis; The acquisition unit is further used to acquire the actual height of the building when the first image is acquired; The processing unit is further used to calculate the difference between the first predicted height and the actual height; The processing unit is further configured to adjust the vertical axis scale of the virtual coordinate system according to the difference when the difference is greater than a first threshold.
6. The computer device according to claim 5, characterized in that The processing unit is further used to calibrate the vertical axis of the virtual coordinate system based on the blueprint of the building or the actual heights of multiple locations of the building; The processing unit is specifically used to input the first image into a deep learning model to obtain the highest line of the building; wherein the deep learning model is used to identify the highest line of the building in the image; The acquisition unit is further used to acquire a second image of the building; wherein the acquisition time interval between the second image and the first image is greater than or equal to a preset time interval; the point state of the camera used to acquire the second image and the camera used to acquire the first image is the same, and the point state is used to characterize the position and acquisition parameters of the camera; The processing unit is further configured to determine a second predicted height of the building based on a highest line of the second image; The computer device also includes an output unit, and if the difference between the first predicted altitude and the second predicted altitude is less than an altitude threshold, the output unit is used to output warning information.
7. A computer device, characterized in that: include: Processor and memory; The processor is connected to the memory, the memory is used to store computer-executable instructions, and the processor executes the computer-executable instructions stored in the memory, thereby performing the method according to any one of claims 1 to 4.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program, and when the program is executed on the computer, the computer is caused to execute the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Method and device for measuring size of object
CN107218887A
Perspective distortion shelf image correction method and device
CN108038826A
Method and device for determining space coordinates of target object, equipment and storage medium
CN113804100A
Quadratic element image measurement method and device based on mobile terminal
CN114166187A