Patent Publication Number: US-10769802-B2

Title: Indoor distance measurement method

Description:
CROSS REFERENCE TO RELATED APPLICATIONS 
     This application is a U.S. National Stage entry under 35 U.S.C. § 371 based on International Application No. PCT/CN2016/114055, filed on Dec. 31, 2016, which was published under PCT Article 21(2) and which claims priority to Chinese Patent Application No. 201610411893.8, filed on Jun. 13, 2016. The disclosure of the priority applications are hereby incorporated herein in their entirety by reference. 
     TECHNICAL FIELD 
     The present disclosure relates to the technical field of augmented reality, and more specifically to an indoor distance measurement method. 
     BACKGROUND 
     Augmented Reality (AR) is a technique integrating a real environment with virtual auxiliary information of objects through a computer to enhance the user&#39;s understanding and experience of the real world. Virtual information is applied to the real world, and computer-generated virtual objects, scenes, or system prompts are superimposed with real world scenarios to enhance the reality. In visualized augmented reality, the user overlays the real world with computer graphics into a multilayer by using a helmet display to see the real world around it. 
     When the AR device is used outdoors, the position coordinates can be acquired by a GPS sensor, and the distance between the AR device position and the target position is calculated based on their coordinates. However, when it is used indoors, GPS sensors cannot be used for distance measurement indoors, since GPS cannot effectively perform positioning indoors, and the distance to be measured indoors is relatively small. In the prior art, laser rangefinders are often used to measure the indoor distance and the height of objects. However, laser rangefinders are expensive and not suitable for products which do not require high measurement accuracy and products which are relatively cheap. In addition, in the prior art there is also a method of acquiring the position and height information of a target object by graphic image processing, but this method needs a very large calculation amount and is not very accurate. In addition, other objects, desirable features and characteristics will become apparent from the subsequent summary and detailed description, and the appended claims, taken in conjunction with the accompanying drawings and this background. 
     SUMMARY 
     In view of the above problems, the present disclosure provides an indoor distance measurement method to solve the problems of the prior art that the cost is high, the calculation amount is large and the accuracy is not high when the augmented reality device measures the distance between the target object and itself and the height of the target object. 
     To achieve the above object, the technical solutions of the present disclosure are as follows. 
     An indoor distance measurement method comprising: 
     acquiring a horizontal distance between a camera on an augmented reality device and a target object by using a direction sensor provided on the augmented reality device; 
     acquiring a height of the target object according to the horizontal distance between the camera and the target object by using the direction sensor provided on the augmented reality device; and 
     superimposing and displaying the horizontal distance and the height of the target object on a real-world scene displayed by the augmented reality device. 
     In some embodiments, the step of acquiring a horizontal distance between a camera on an augmented reality device and a target object by using a direction sensor provided on the augmented reality device comprises: 
     acquiring, by using the direction sensor, an included angle α of a connecting line between the camera on the augmented reality device and an intersection of the bottom of the target object and the ground with respect to a direction perpendicular to the ground, or an included angle α of a connecting line between the camera and an intersection of an extension line of the target object and the ground with respect to a direction perpendicular to the ground; 
     acquiring a vertical distance h1 between the camera and the ground; and 
     acquiring the horizontal distance L between the camera and the target object by calculating based on the included angle α and the vertical distance h1 by using the formula L=h1×tan α. 
     In some embodiments, the step of acquiring a vertical distance h1 between the camera and the ground comprises: 
     defining the vertical distance h1 between the camera and the ground by subtracting a preset value from a body height value inputted by a user. 
     In some embodiments, before acquiring the included angle by using the direction sensor, a reference value of the direction sensor is acquired by using the following steps: 
     when the camera is disposed perpendicular to the ground, disposed parallel to the ground and upward, or disposed parallel to the ground and downward, the theoretical angle values acquired by the direction sensor should be 0°, 90° or 270° respectively, and the reference value is defined as a difference between the angle value actually acquired by the direction sensor and the theoretical angle value; and 
     the angle of the connecting line between the camera and the target object acquired by the direction sensor is the actual angle value acquired by the direction sensor minus the reference value. 
     In some embodiments, with respect to a target object whose height is less than the camera and whose bottom is in contact with the ground, the step of acquiring a height of the target object according to the horizontal distance between the camera and the target object by using the direction sensor provided on the augmented reality device comprises: 
     acquiring an included angle β1 of a connecting line between the camera and a top of the target object with respect to a direction perpendicular to the ground by using the direction sensor; 
     acquiring a vertical distance h2 between the camera and the top of the target object by calculating based on the included angle β1 and the acquired horizontal distance L by using the formula h2=L/tan β1; and 
     acquiring the height h of the target object by using the formula h=h1−h2, wherein h1 is the vertical distance between the camera and the ground. 
     In some embodiments, with respect to a target object whose height is greater than the camera and whose bottom is in contact with the ground, the step of acquiring a height of the target object according to the horizontal distance between the camera and the target object by using the direction sensor provided on the augmented reality device comprises: 
     acquiring an included angle β2 of a connecting line between the camera and a top of the target object with respect to a direction perpendicular to the ground by using the direction sensor; and 
     acquiring a height h′ of the target object by calculating based on the included angle β2, the acquired included angle α and the horizontal distance L by using the formula h′=tan(β2-90°)×L+tan(90−α)×L. 
     In some embodiments, with respect to a target object whose bottom is not in contact with the ground, the step of acquiring a height of the target object according to the horizontal distance between the camera and the target object by using the direction sensor provided on the augmented reality device comprises: 
     acquiring an included angle β3 of a connecting line between the camera and a top of the target object with respect to a direction perpendicular to the ground by using the direction sensor; 
     acquiring an included angle β4 of a connecting line between the camera and a bottom of the target object with respect to a direction perpendicular to the ground by using the direction sensor; and 
     acquiring a height h″ of the target object by calculating based on the included angle β3, the included angle β4 and the acquired horizontal distance L by using the formula h″=tan(β3−90°)×L+tan(90°−β4)×L. 
     In some embodiments, before the step of acquiring a height of the target object according to the horizontal distance between the camera and the target object by using the direction sensor provided on the augmented reality device, the method further comprises: 
     selecting an intersection of the bottom of the target object and the ground or an intersection of the extension line of the target object and the ground, selecting a point at the top of the target object, and selecting a point at the bottom of the target object; and 
     marking these selected points respectively by directing the camera to these selected points for a period of time exceeding a preset time. 
     In some embodiments, the method further comprises: providing mode matching selection keys on the augmented reality device to match with the following three measurement modes respectively: measuring the horizontal distance between the camera and the target object, measuring the height of a target object whose bottom is in contact with the ground, and measuring the height of a target object whose bottom is not in contact with the ground. 
     In some embodiments, the method further comprises: according to whether the number of the selected points marked by the user is one, two or three, automatically matching by the augmented reality device the following three measurement modes: measuring the horizontal distance between the camera and the target object, measuring the height of a target object whose bottom is in contact with the ground, and measuring the height of a target object whose bottom is not in contact with the ground. 
     The advantageous effects of the present disclosure are as follows. The indoor distance measurement method provided by the present disclosure, by only acquiring an included angle of the connecting line between the camera and the intersection of the bottom of the target object and the ground with respect to the direction perpendicular to the ground or an included angle of the connecting line between the camera and the intersection between the extension line of the target object and the ground with respect to the direction perpendicular to the ground, an included angle of the connecting line between the camera and the top of the target object with respect to the direction perpendicular to the ground, and an included angle of the connecting line between the camera and the bottom of the target object with respect to the direction perpendicular to the ground, and then further based on the vertical distance between the camera and the ground, calculates the horizontal distance between the camera and the target object and the height of the target object by using the Pythagorean theorem. Therefore, the calculation method is simple and quick, the calculation amount is small, and the cost is low. 
    
    
     
       BRIEF DESCRIPTION OF DRAWINGS 
       The present invention will hereinafter be described in conjunction with the following drawing figures, wherein like numerals denote like elements, and: 
         FIG. 1  is a flowchart of an indoor distance measurement method according to an embodiment of the present disclosure; 
         FIG. 2  is a schematic diagram of acquiring the horizontal distance between a camera and a target object by using an augmented reality device according to an embodiment of the present disclosure; 
         FIG. 3  is a schematic diagram of acquiring the height of a target object, whose height is less than the camera and whose bottom is in contact with the ground, by using an augmented reality device according to an embodiment of the present disclosure; 
         FIG. 4  is a schematic diagram of acquiring the height of a target object, whose height is greater than the camera and whose bottom is in contact with the ground, by using an augmented reality device according to an embodiment of the present disclosure; and 
         FIG. 5  is a schematic diagram of acquiring the height of a target object, whose bottom is not in contact with the ground, by using an augmented reality device according to an embodiment of the present disclosure. 
     
    
    
     DETAILED DESCRIPTION 
     The following detailed description is merely exemplary in nature and is not intended to limit the invention or the Application and uses of the invention. Furthermore, there is no intention to be bound by any theory presented in the preceding background of the invention or the following detailed description. 
     In order to make the objectives, technical solutions and advantages of the present disclosure clearer, the present disclosure is further described in detail with reference to the accompanying drawings. 
     As shown in  FIG. 1 , the present disclosure provides an indoor distance measurement method comprising: 
     Step S 110 : acquiring a horizontal distance between a camera on an augmented reality device and a target object by using a direction sensor provided on the augmented reality device; 
     Step S 120 : acquiring a height of the target object according to the horizontal distance between the camera and the target object by using the direction sensor provided on the augmented reality device; and 
     Step S 130 : superimposing and displaying the horizontal distance and the height of the target object on a real-world scene displayed by the augmented reality device. 
     In a preferred embodiment of the present disclosure, before acquiring the included angle by using the direction sensor, a reference value of the direction sensor is acquired by using the following steps: 
     When the camera is disposed perpendicular to the ground, disposed parallel to the ground and upward, or disposed parallel to the ground and downward, the theoretical angle values acquired by the direction sensor should be 0°, 90° or 270° respectively, and the reference value is defined as a difference between the angle value actually acquired by the direction sensor and the theoretical angle value, so the angle of the connecting line between the camera and the target object acquired by the direction sensor is the actual angle value acquired by the direction sensor minus the reference value. For example, when the camera is disposed perpendicular to the ground, the included angle of a ray emitted from the camera acquired by the direction sensor with respect to the direction perpendicular to the ground is 5°, and since the theoretical angle value of the ray emitted from the camera with respect to the direction perpendicular to the ground should be 0°, the reference value will be defined as 5°. When the included angle of the connecting line between the camera and the target object is acquired by the direction sensor afterwards, the angle value actually acquired by the direction sensor should be subtracted by the reference value 5° in order to improve the measurement accuracy of the direction sensor. 
     As shown in  FIG. 2 , the step  120  of acquiring a horizontal distance between a camera on an augmented reality device and a target object by using a direction sensor provided on the augmented reality device comprises: 
     Acquiring, by using the direction sensor, an included angle α of the connecting line between the camera (i.e., the point C in  FIG. 2 ) and the intersection of the bottom of the target object and the ground with respect to the direction perpendicular to the ground, or an included angle α of the connecting line between the camera and the intersection between the extension line of the target object and the ground with respect to the direction perpendicular to the ground; 
     acquiring a vertical distance h1 between the camera and the ground, that is, the distance of B 1 C 1  in  FIG. 2 ; and 
     acquiring the horizontal distance L between the camera and the target object, that is, the distance of B 1 A 1  in  FIG. 2 , by calculating based on the included angle α and the vertical distance h1 by using the formula L=h1×tan α. 
     In a specific embodiment of the present disclosure, the step of acquiring a vertical distance h1 between the camera and the ground comprises: defining the vertical distance h1 between the camera and the ground by subtracting a preset value from the body height value inputted by the user. Since when the user wears the AR device on the head, the AR device is lower than the user&#39;s forehead, the vertical distance between the AR device&#39;s camera and the ground is less than the user&#39;s body height value. Therefore, a preset value must be subtracted from the user&#39;s body height value to improve the accuracy, and the preset value may take an empirical value, such as 11 cm. 
     As shown in  FIG. 3 , with respect to a target object whose height is less than the camera and whose bottom is in contact with the ground, the intersection between the bottom of the target object and the ground is the point A 2 , and the top of the target object is the point D 2 . The step of acquiring a height of the target object according to the horizontal distance between the camera and the target object by using the direction sensor provided on the augmented reality device comprises: 
     acquiring an included angle β1 of the connecting line C 2 D 2  between the camera (the point C 2 ) and the top of the target object (the point D 2 ) with respect to the direction perpendicular to the ground C 2 B 2  by using the direction sensor; 
     acquiring a vertical distance h2 between the camera and the top of the target object, that is, the distance of C 2 E 2  in  FIG. 3 , by calculating based on the included angle β1 and the horizontal distance L acquired as stated above, that is, the distance of B 2 A 2  in  FIG. 3 , by using the formula h2=L/tan β1, wherein D 2 E 2  is perpendicular to C 2 B 2 ; and 
     acquiring the height h of the target object, that is, the distance of A 2 D 2  in  FIG. 3 , by using the formula h=h1−h2, wherein h1 is the vertical distance between the camera and the ground. 
     As shown in  FIG. 4 , with respect to a target object whose height is greater than the camera and whose bottom is in contact with the ground, the intersection between the bottom of the target object and the ground is the point A 3 , and the top of the target object is the point D 3 . The step of acquiring a height of the target object by using the direction sensor provided on the augmented reality device comprises: 
     acquiring an included angle β2 of the connecting line C 3  D 3  between the camera (the point C 3 ) and the top of the target object (the point D 3 ) with respect to the direction perpendicular to the ground C 3 B 3  by using the direction sensor; and 
     acquiring the height h′ of the target object by calculating based on the included angle β2, the acquired included angle α and the horizontal distance L by using the formula h′=tan(β2−90°)×L+tan(90°−α)×L, 
     wherein α is the included angle between C 3 B 3  and C 3 A 3  and may be acquired directly by the sensor, and L is the distance of B 3 A 3  and may be calculated by using the formula B 3 A 3 =h1×tan α. If a perpendicular line C 3 E 3  is drawn from the point C to the point A 3 D 3 , tan(β2−90°)×L is the distance of D 3 E 3 , and tan(90°−α)×L is the distance of A 3 E 3 . 
     As shown in  FIG. 5 , with respect to a target object whose bottom is not in contact with the ground, the intersection between the extension line of the target object and the ground is the point A 4 , and the top of the target object is the point D 4 . The step of acquiring a height of the target object by using the direction sensor provided on the augmented reality device comprises: 
     acquiring an included angle β3 of the connecting line C 4  D 4  between the camera and the top of the target object with respect to the direction perpendicular to the ground C 4 B 4  by using the direction sensor; 
     acquiring an included angle β4 of the connecting line C 4  E 4  between the camera and the bottom of the target object with respect to the direction perpendicular to the ground C 4 B 4  by using the direction sensor; and 
     acquiring the height h″ of the target object by calculating based on the included angle β3, the included angle β4 and the acquired horizontal distance L by using the formula h″=tan(β3−90°)×L+tan(90°−β4)×L, 
     wherein L is the distance of B 4 A 4  and may be calculated by using the formula B 4 A 4 =B 4 C 4 ×tan α, and α is the included angle between C 4 B 4  and C 4 A 4  and may be acquired directly by the sensor. If a perpendicular line C 4 F 4  is drawn from the point C to the point E 4 D 4 , tan(β3−90°)×L is the distance of D 4 F 4 , and tan(90°−β4)×L is the distance of F 4 E 4 . 
     It should be noted that, the bottom of the target object being not in contact with the ground comprises two types of situations. One is that the intersection between the extension line of the target object and the ground can be directly seen. For example, if the target object is a window, the intersection of the extension line of the window and the ground can be determined by the intersection of the wall under the window and the ground. The other situation is that the target object is suspended, the intersection between the extension line of the target object and the ground cannot be directly seen, and the intersection must be determined by other methods. For example, a string with a weight at its end may be suspended at the bottom of the target object, and the point on the ground that the weight is in contact with is determined as the intersection between the extension line of the target object and the ground. 
     In a specific embodiment of the present disclosure, before the step of acquiring a height of the target object according to the horizontal distance between the camera and the target object by using the direction sensor provided on the augmented reality device, it is necessary to select a point at the top of the target object, select a point at the bottom of the target object, and select the intersection of the bottom of the target object and the ground or the intersection between the extension line of the target object and the ground. These selected points may be marked in the following two ways. One is to mark these selected points respectively by directing the camera to the selected points for a period of time exceeding a preset time. That is, after the camera is aimed at these selected points for a preset time, for example, 3 seconds, the camera can acquire the selected points. The other way is that, the selected points can be acquired by directing the camera to the selected points and then clicking the confirm box or key on the input device provided with the AR device, such as a Bluetooth keyboard. 
     In a preferred embodiment of the present disclosure, the method further comprises: according to whether the number of the selected points marked by the user is one, two or three, automatically matching by the augmented reality device the following three measurement modes: measuring the horizontal distance between the camera and the target object, measuring the height of a target object whose bottom is in contact with the ground, and measuring the height of a target object whose bottom is not in contact with the ground. That is, when the user marks one selected point, the AR device automatically matches with measuring the horizontal distance between the camera and the target object, and the selected point marked is the intersection of the bottom of the target object and the ground, or the intersection between the extension line of the target object and the ground. When the user marks two selected points, the AR device automatically matches with measuring the height of a target object whose bottom is in contact with the ground, and the two selected points are the intersection of the bottom of the target object and the ground, and a point at the top of the target object. When the user marks three selected points, the AR device automatically matches with measuring the height of a target object whose bottom is not in contact with the ground, and the three selected points are the intersection between the extension line of the target object and the ground, a point at the bottom of the target object, and a point at the top of the target object. 
     In another preferred embodiment of the present disclosure, the method further comprises: providing mode matching selection keys on the augmented reality device to match with the following three measurement modes respectively: measuring the horizontal distance between the camera and the target object, measuring the height of a target object whose bottom is in contact with the ground, and measuring the height of a target object whose bottom is not in contact with the ground. When the user presses different selection keys, the AR device enters different measurement modes. 
     In summary, the advantageous effects of the embodiments of the present disclosure are as follows. The indoor distance measurement method provided by the present disclosure, by only acquiring an included angle of the connecting line between the camera and the intersection of the bottom of the target object and the ground with respect to the direction perpendicular to the ground or an included angle of the connecting line between the camera and the intersection between the extension line of the target object and the ground with respect to the direction perpendicular to the ground, an included angle of the connecting line between the camera and the top of the target object with respect to the direction perpendicular to the ground, and an included angle of the connecting line between the camera and the bottom of the target object with respect to the direction perpendicular to the ground, and then further based on the vertical distance between the camera and the ground, calculates the horizontal distance between the camera and the target object and the height of the target object by using the Pythagorean theorem. Therefore, the calculation method is simple and quick, the calculation amount is small, and the cost is low. 
     While at least one exemplary embodiment has been presented in the foregoing detailed description, it should be appreciated that a vast number of variations exist. It should also be appreciated that the exemplary embodiment or exemplary embodiments are only examples, and are not intended to limit the scope, applicability, or configuration of the invention in any way. Rather, the foregoing detailed description will provide those skilled in the art with a convenient road map for implementing an exemplary embodiment, it being understood that various changes may be made in the function and arrangement of elements described in an exemplary embodiment without departing from the scope of the invention as set forth in the appended claims and their legal equivalents.