A mobile phone-based indoor automatic positioning method
Through the technology combined with mobile phone camera and direction sensor, anchor points in video information are extracted and moving distance and angle are obtained, which solves the problem of large indoor positioning error rate and achieves high-precision indoor trajectory positioning.
Patent Information
- Application Number
- CN202210776892.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-04
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2042-07-04
AI Technical Summary
The error rate of the positioning result in the prior art is relatively large when positioning indoors, and the error will increase with the increase of walking distance, which cannot effectively meet the requirements of automatic trajectory laying.
By using the mobile phone camera to collect video information on the ground during the walk, extract the anchor points in the video information, obtain the moving distance of each step, and draw the positioning navigation trajectory in combination with the current angle obtained by the direction sensor.
It realizes indoor walking track positioning without external equipment, improves the accuracy of indoor positioning, and does not involve indoor privacy and improves user experience.
Smart Images

Figure CN115235449B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of mobile phone positioning, and in particular relates to an indoor automatic positioning method based on a mobile phone. Background Art
[0002] Android smartphone indoor trajectory marking has always been a pain point in the industry. Since there is no GPS signal indoors, accurate positioning is impossible. The current solution is to use hardware devices, such as LiDAR, Wi-Fi, Bluetooth, and gyroscope inertial navigation and other positioning technologies to achieve indoor walking trajectory mapping. However, in the absence of existing equipment such as Wi-Fi, Bluetooth, and gyroscopes indoors, the use of indoor navigation systems cannot effectively meet the requirements of automatic trajectory marking. In addition, the accuracy of current mobile phone sensors is not high, the error rate of positioning results is relatively large, and the error will increase with the longer the walking distance. Summary of the invention
[0003] In view of this, the purpose of the present invention is to overcome the shortcomings of the prior art and provide an indoor automatic positioning method based on a mobile phone to solve the problem that the error rate of the positioning result is relatively large when performing indoor positioning in the prior art, and the error increases with the longer the walking distance.
[0004] According to a first aspect of an embodiment of the present application, a mobile phone-based indoor automatic positioning method is provided, the method comprising:
[0005] Use the camera to collect video information of the ground during walking;
[0006] Extracting anchor points from the video information;
[0007] Using the anchor point to obtain the moving distance of each step during walking;
[0008] Use the orientation sensor to obtain the current angle of the phone;
[0009] Drawing a positioning navigation track according to the moving distance of each step during the walking process and the current angle of the mobile phone;
[0010] Wherein, the camera and the direction sensor are arranged on the mobile phone.
[0011] Preferably, the extracting the anchor point in the video information includes:
[0012] The motion tracking technology of ARCore is used to extract anchor points in the video information.
[0013] Preferably, the using the anchor point to obtain the moving distance of each step during walking includes:
[0014] When starting, selecting an anchor point corresponding to any position in the video information captured by the camera as the starting anchor point;
[0015] During walking, the coordinates of the current step are obtained by using the two anchor points in the video information corresponding to the current step; when walking to the next step, the coordinates of the next step are obtained by using the two anchor points in the video information corresponding to the next step;
[0016] According to the coordinates of the current step and the coordinates of the next step, the moving distances of the current step and the next step are obtained.
[0017] Preferably, the step of obtaining the coordinates of the current step by using two anchor points in the video information corresponding to the current step includes:
[0018] Using the attribute coordinate function of the WindowManager form in the SDK of the mobile phone Android system, the pixel anchor point coordinate values corresponding to the two anchor points in the video information corresponding to the current step are obtained, and the pixel anchor point coordinate values include the coordinate value x1 corresponding to the X axis and the coordinate value y1 corresponding to the Y axis in the world coordinate system;
[0019] (x1, y1) is the coordinate of the current step.
[0020] Preferably, the step of obtaining the coordinates of the next step by using two anchor points in the video information corresponding to the next step includes:
[0021] Using the attribute coordinate function of the WindowManager window in the SDK of the mobile phone Android system, the pixel anchor point coordinate values corresponding to the two anchor points in the video information corresponding to the next step are obtained, and the pixel anchor point coordinate values include the coordinate value x2 corresponding to the X axis and the coordinate value y2 corresponding to the Y axis in the world coordinate system;
[0022] (x2, y2) are the coordinates of the next step.
[0023] Preferably, obtaining the moving distance between the current step and the next step according to the coordinates of the current step and the coordinates of the next step includes:
[0024] The moving distance D between the current step and the next step is determined as follows:
[0025] D = Math.sqrt(x1*x2+y1*y2)
[0026] In the above formula, x1 and y1 are the coordinate values corresponding to the X-axis and Y-axis of the current step in the world coordinate system; x2 and y2 are the coordinate values corresponding to the X-axis and Y-axis of the next step in the world coordinate system.
[0027] Preferably, the obtaining the current angle of the mobile phone by using the direction sensor includes:
[0028] The direction sensor is used to collect the rotation angle of the mobile phone in the Z-axis direction to obtain the mobile phone azimuth angle values[0], where the range of the mobile phone azimuth angle is [0, 360]. When values[0] is equal to 0, the mobile phone azimuth angle is due north; when values[0] is equal to 90, the mobile phone azimuth angle is due east; when values[0] is equal to 180, the mobile phone azimuth angle is due south; when values[0] is equal to 270, the mobile phone azimuth angle is due west.
[0029] Determine the current angle A of the phone as follows:
[0030]
[0031] In the above formula, π is the circumference of a circle.
[0032] Preferably, the method further comprises:
[0033] It is determined whether the moving distance of each step falls within a first preset threshold range. If the moving distance of each step does not fall within the first preset threshold range, a voice prompt is issued to remind the user to correct the walking posture; if the moving distance of each step falls within the first preset threshold range, there is no need to issue a voice prompt to remind the user to correct the walking posture.
[0034] Preferably, the method further comprises:
[0035] Using the acceleration sensor of the mobile phone to collect the acceleration of the mobile phone in the Z-axis direction;
[0036] If the acceleration of the mobile phone in the Z-axis direction does not fall within the second preset threshold range, a voice prompt is issued to remind the user to keep the mobile phone parallel to the ground; if the acceleration of the mobile phone in the Z-axis direction falls within the second preset threshold range, there is no need to issue a voice prompt to remind the user to keep the mobile phone parallel to the ground.
[0037] Preferably, the method further comprises:
[0038] When turning or stopping walking during walking, when starting again, an anchor point corresponding to any position in the video information captured by the camera is selected as the starting anchor point.
[0039] The present invention adopts the above technical scheme, and the beneficial effects that can be achieved include: by using a camera to collect video information of the ground during walking, extracting anchor points in the video information, using the anchor points to obtain the moving distance of each step during walking, using a direction sensor to obtain the current angle of the mobile phone, and drawing a positioning navigation trajectory according to the moving distance of each step during walking and the current angle of the mobile phone, it is possible to perform indoor walking trajectory marking and positioning without the need for external equipment, thereby improving the accuracy of indoor positioning; at the same time, shooting the ground positioning walking with a camera will not involve indoor privacy, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 The present invention is a flow chart showing a method for indoor automatic positioning based on a mobile phone according to an exemplary embodiment.
[0042] Figure 2 The invention is a block diagram showing an indoor automatic positioning device based on a mobile phone according to an exemplary embodiment. DETAILED DESCRIPTION
[0043] To make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be described in detail below. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other implementation methods obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.
[0044] Embodiment 1
[0045] Figure 1 is a flow chart of a method for indoor automatic positioning based on a mobile phone according to an exemplary embodiment. Figure 1 As shown, the method can be but is not limited to being used in a terminal, and includes the following steps:
[0046] Step 101: using a camera to collect video information of the ground during walking;
[0047] Step 102: extracting anchor points from video information;
[0048] Step 103: Using the anchor point to obtain the moving distance of each step during the walking process;
[0049] Step 104: using the direction sensor to obtain the current angle of the mobile phone;
[0050] Step 105: Draw a positioning navigation track according to the moving distance of each step during the walking process and the current angle of the mobile phone;
[0051] Among them, the camera and the direction sensor are arranged on the mobile phone.
[0052] Specifically, when collecting video information of the ground during walking using a camera, the mobile phone needs to be level with the ground.
[0053] It should be noted that the method of "drawing a positioning navigation track by the number of steps during walking and the moving distance of each step, combined with the positive direction angle of the handheld mobile phone (i.e. the current angle of the mobile phone)" involved in the embodiment of the present invention is well known to those skilled in the art, so its specific implementation method is not described in detail. In some embodiments, the positioning navigation track can be drawn on the mobile phone screen, which is convenient for users to view and improve the user experience.
[0054] An embodiment of the present invention provides an indoor automatic positioning method based on a mobile phone. The method uses a camera to collect ground video information during walking, extracts anchor points in the video information, uses the anchor points to obtain the moving distance of each step during walking, uses a direction sensor to obtain the current angle of the mobile phone, and draws a positioning navigation trajectory according to the moving distance of each step during walking and the current angle of the mobile phone. This realizes indoor walking trajectory dot positioning without the need for external equipment, thereby improving the accuracy of indoor positioning. At the same time, shooting ground positioning walking with a camera does not involve indoor privacy, thereby improving user experience.
[0055] Furthermore, step 102 extracts anchor points in the video information, including:
[0056] Use ARCore's motion tracking technology to extract anchor points from video information.
[0057] It should be noted that ARCore is a technology launched by Google, so ARCore's motion tracking technology is well known to those skilled in the art, and therefore, its specific implementation will not be described in detail. In some embodiments, the anchor points in the video information extracted using ARCore's motion tracking technology are also referred to as feature points.
[0058] For example, place the phone's camera parallel to the floor, use a handheld smart phone to record the ground image in real time, and then use ARCore's motion tracking technology to extract anchor points in the video information.
[0059] It can be understood that anchor points are extracted based on the pixels of the video frame. Anchor points are composed of one or more pixels, that is, markers composed of one or more image pixels. The anchor points are used as walking feature tracking to determine whether the camera is moving. That is, if the anchor points are moving, the camera is also moving. By using ARCore's motion tracking technology to extract anchor points from video information, and then using the extracted anchor points to obtain the moving distance of each step during walking, the error of indoor positioning is reduced.
[0060] Further, step 103 includes:
[0061] Step 1031: when starting, selecting an anchor point corresponding to any position in the video information captured by the camera as the starting anchor point;
[0062] Step 1032: During the walking process, the coordinates of the current step are obtained by using two anchor points in the video information corresponding to the current step; when walking to the next step, the coordinates of the next step are obtained by using two anchor points in the video information corresponding to the next step;
[0063] Specifically, in step 1032, the coordinates of the current step are obtained by using two anchor points in the video information corresponding to the current step, including:
[0064] Using the attribute coordinate function of the WindowManager form in the SDK of the Android system of the mobile phone, obtain the pixel anchor point coordinate values corresponding to the two anchor points in the video information corresponding to the current step. The pixel anchor point coordinate values include the coordinate value x1 corresponding to the X axis and the coordinate value y1 corresponding to the Y axis in the world coordinate system;
[0065] (x1, y1) is the coordinate of the current step;
[0066] Specifically, in step 1032, using two anchor points in the video information corresponding to the next step, the coordinates of the next step are obtained, including:
[0067] Using the attribute coordinate function of the WindowManager window in the SDK of the Android system of the mobile phone, obtain the pixel anchor point coordinate values corresponding to the two anchor points in the video information corresponding to the next step. The pixel anchor point coordinate values include the coordinate value x2 corresponding to the X axis and the coordinate value y2 corresponding to the Y axis in the world coordinate system;
[0068] (x2,y2) is the coordinate of the next step;
[0069] Step 1033: Obtain the moving distance between the current step and the next step according to the coordinates of the current step and the coordinates of the next step;
[0070] Specifically, step 1033 includes:
[0071] Determine the moving distance D between the current step and the next step by the following formula:
[0072] D = Math.sqrt(x1*x2+y1*y2)
[0073] In the above formula, x1 and y1 are the coordinate values of the X-axis and Y-axis in the world coordinate system of the current step respectively; x2 and y2 are the coordinate values of the X-axis and Y-axis in the world coordinate system of the next step respectively.
[0074] It should be noted that WindowManager refers to the mobile phone screen window information, which is specifically used to display, manage, store and record the relevant information of the current mobile phone display status. For example: mobile phone screen size, mobile phone pixels, mobile phone brightness, mobile phone lock screen, incoming call messages, SMS reminders and alarms, etc. It inherits the View view manager of the mobile phone system and is used to manage the screen and display view, including the current hand touching the screen, the camera scanning the screen pixels and the coordinate record. And when the current work is completed, the current working memory will be automatically destroyed to achieve the best display performance of the mobile phone.
[0075] The method involved in the embodiment of the present invention of "using the attribute coordinate function of the WindowManager form in the SDK of the mobile phone Android system to obtain the pixel anchor point coordinate values corresponding to the two anchor points in the video information corresponding to the current step and the next step respectively" is well known to those skilled in the art, and therefore, its specific implementation method will not be described in detail.
[0076] In some optional embodiments, when starting, set the camera to shoot a certain position on the ground as the starting point (AnchorNode automatically positions its own node in the world through the camera, and the first anchor point is set when a plane is detected), execute real-time acquisition of camera video frames, and then obtain the coordinates of the current step and the next step through the two anchor points in the video frame, as well as the camera posture POSE, so as to calculate the moving distance of the current step and the next step.
[0077] It can be understood that the moving distance between the current step and the next step is the moving distance of each step during walking. By using the two anchor points in the video information to further obtain the moving distance of each step, the accuracy of indoor positioning is improved, and the situation where the indoor positioning error is large due to the inability to effectively meet the automatic track marking requirements when there is no existing equipment such as Wi-Fi, Bluetooth, gyroscope, etc.
[0078] In some embodiments, the floor texture can be detected by using an AR plane detector but is not limited to spreading white dots PointCloud on the plane to identify the existence of anchor points, thereby further being able to better identify the accuracy of calculating the distance of plane nodes obtained through video frames while walking.
[0079] Further, step 104 includes:
[0080] Step 1041: Use the direction sensor to collect the rotation angle of the mobile phone in the Z-axis direction to obtain the mobile phone azimuth angle values[0], and the range of the mobile phone azimuth angle is [0, 360]. When values[0] is equal to 0, the mobile phone azimuth angle is due north; when values[0] is equal to 90, the mobile phone azimuth angle is due east; when values[0] is equal to 180, the mobile phone azimuth angle is due south; when values[0] is equal to 270, the mobile phone azimuth angle is due west;
[0081] For example, assuming that the value of values[0] is 0, 90, 180 or 270, when the mobile phone is placed horizontally, the four directions directly in front of the mobile phone are due north, due east, due south and due west; in some embodiments, the compass can be set by, but not limited to, the method in step 1041;
[0082] Step 1042: Determine the current angle A of the mobile phone according to the following formula:
[0083]
[0084] In the above formula, π is the circumference of a circle.
[0085] It should be noted that when performing indoor positioning with a mobile phone, the mobile phone needs to be held roughly parallel to the ground to automatically mark the route of the walking trajectory. Therefore, values[0] is obtained and the angle is converted using the sin algorithm to obtain the angle of the mobile phone's positive direction. In addition, since the mobile phone may rotate slightly during walking, causing the trajectory to be distorted, the angle change within 5 degrees is not updated.
[0086] It is understandable that traditional mobile phone magnetic sensors will be interfered by the magnetic field and cause inaccurate direction. This application improves the accuracy of indoor positioning of the mobile phone by using the direction sensor to obtain the rotation angle of the mobile phone in the Z-axis direction, and then calculates the current angle of the mobile phone through an algorithm.
[0087] The indoor positioning method provided in this application can be used for real estate indoor mapping and Internet indoor positioning network testing, thereby saving product design and development costs; it can also provide an SDK for rapid integration into any product, saving more development time.
[0088] In some optional embodiments, the direction sensor is also used to collect the tilt angle of the mobile phone in the X-axis direction to obtain the mobile phone tilt angle values[1], and the range of the mobile phone tilt angle is [-180, 180];
[0089] It is understandable that, assuming that the phone is placed on a table and the table is completely horizontal, values[1] should be 0; start lifting the phone from the top until the phone rotates 180 degrees along the x-axis (the screen is now placed horizontally on the table with the screen facing downwards), during this rotation process, the value of values[1] will change from 0 to -180, that is, when the phone is lifted, the value of values[1] will gradually decrease until it equals -180; assuming that the phone is lifted from the bottom until the phone rotates 180 degrees along the x-axis, the value of values[1] will change from 0 to 180.
[0090] In some optional embodiments, a direction sensor is also used to collect the rolling angle of the mobile phone in the Y-axis direction to obtain the rolling angle values[2] of the mobile phone, and the range of the rolling angle of the mobile phone is [-90,90];
[0091] It is understandable that, assuming that the phone is placed horizontally on the table with the screen facing up, if the table is flat, the value of values[2] should be 0; if the phone is gradually lifted from the left, the value of values[2] will gradually decrease until it is placed vertically. At this time, the value of values[2] is -90, and from the right it is 0-90; assuming that it continues to roll to the right or left in the vertical position, the value of values[2] will continue to change between -90 and 90.
[0092] Furthermore, the method further includes:
[0093] Determine whether the moving distance of each step is within the first preset threshold range. If the moving distance of each step is not within the first preset threshold range, issue a voice prompt to remind the user to correct the walking posture; if the moving distance of each step is within the first preset threshold range, there is no need to issue a voice prompt to remind the user to correct the walking posture.
[0094] In some optional embodiments, when an adult walks, the distance of each step is approximately within the range of 0.4m-0.6m. If it exceeds this range, a corresponding voice prompt is given to allow the user to correct the walking posture. If the mobile phone camera is moved parallel to the handheld free telescopic device without walking, and the longest distance that the handheld free telescopic device can move the mobile phone camera parallel to the handheld free telescopic device is generally 0.35m, then this distance is not counted as the step distance.
[0095] It can be understood that by setting the first preset threshold range to remind the user to correct the walking posture, the accuracy of indoor positioning of the mobile phone is improved.
[0096] It should be noted that the embodiments of the present invention do not limit the "first preset threshold range". In some embodiments, it can be set by technical personnel in this field according to engineering needs, expert experience or experimental data. For example, the first preset threshold range can be but is not limited to [0.4m, 0.6m].
[0097] Furthermore, the method further includes:
[0098] Use the accelerometer of the mobile phone to collect the acceleration of the mobile phone in the Z-axis direction;
[0099] If the acceleration of the mobile phone in the Z-axis direction does not fall within the second preset threshold range, a voice prompt is issued to remind the user to keep the mobile phone parallel to the ground; if the acceleration of the mobile phone in the Z-axis direction falls within the second preset threshold range, there is no need to issue a voice prompt to remind the user to keep the mobile phone parallel to the ground.
[0100] It is understandable that the acceleration of the mobile phone in the Z-axis direction is collected through the accelerometer threshold in the mobile phone, thereby reminding the user to keep the mobile phone parallel to the ground to avoid affecting the trajectory calculation, thereby improving the accuracy of the mobile phone's indoor positioning.
[0101] It should be noted that the embodiments of the present invention do not limit the "second preset threshold range". In some embodiments, it can be set by technical personnel in this field according to engineering needs, expert experience or experimental data. For example, the second preset threshold range can be but is not limited to [-1.78, +1.78].
[0102] Furthermore, the method further includes:
[0103] When turning or stopping during walking, when starting again, an anchor point corresponding to any position in the video information captured by the camera is selected as the starting anchor point.
[0104] It is understandable that in order to improve the accuracy of step counting, whenever a corner is encountered or the pace is stopped at a high speed, the anchor point is restarted to reduce the error of indoor positioning.
[0105] An embodiment of the present invention provides an indoor automatic positioning method based on a mobile phone. The method uses a camera to collect ground video information during walking, extracts anchor points in the video information, uses the anchor points to obtain the moving distance of each step during walking, uses a direction sensor to obtain the current angle of the mobile phone, and draws a positioning navigation trajectory according to the moving distance of each step during walking and the current angle of the mobile phone. This realizes indoor walking trajectory dot positioning without the need for external equipment, thereby improving the accuracy of indoor positioning. At the same time, shooting ground positioning walking with a camera does not involve indoor privacy, thereby improving user experience.
[0106] Embodiment 2
[0107] In order to implement the indoor automatic positioning method based on a mobile phone provided in the above embodiment, the embodiment of the present invention also provides an indoor automatic positioning device based on a mobile phone, referring to Figure 2 , the device comprises:
[0108] The first acquisition module is used to use a camera to collect video information of the ground during walking;
[0109] An extraction module, used to extract anchor points from video information;
[0110] The first acquisition module is used to obtain the moving distance of each step during the walking process using the anchor point;
[0111] The second acquisition module is used to acquire the current angle of the mobile phone using the direction sensor;
[0112] The drawing module is used to draw the positioning navigation track according to the moving distance of each step during walking and the current angle of the mobile phone;
[0113] Among them, the camera and the direction sensor are arranged on the mobile phone.
[0114] Furthermore, the extraction module is specifically used for:
[0115] Use ARCore's motion tracking technology to extract anchor points from video information.
[0116] Furthermore, the first acquisition module is specifically used for:
[0117] When starting, select an anchor point corresponding to any position in the video information captured by the camera as the starting anchor point;
[0118] During walking, the coordinates of the current step are obtained by using the two anchor points in the video information corresponding to the current step; when walking to the next step, the coordinates of the next step are obtained by using the two anchor points in the video information corresponding to the next step;
[0119] According to the coordinates of the current step and the coordinates of the next step, get the moving distance of the current step and the next step.
[0120] Furthermore, the coordinates of the current step are obtained by using the two anchor points in the video information corresponding to the current step, including:
[0121] Using the attribute coordinate function of the WindowManager form in the SDK of the Android system of the mobile phone, obtain the pixel anchor point coordinate values corresponding to the two anchor points in the video information corresponding to the current step. The pixel anchor point coordinate values include the coordinate value x1 corresponding to the X axis and the coordinate value y1 corresponding to the Y axis in the world coordinate system;
[0122] (x1,y1) is the coordinate of the current step.
[0123] Furthermore, the coordinates of the next step are obtained by using the two anchor points in the video information corresponding to the next step, including:
[0124] Using the attribute coordinate function of the WindowManager window in the SDK of the Android system of the mobile phone, obtain the pixel anchor point coordinate values corresponding to the two anchor points in the video information corresponding to the next step. The pixel anchor point coordinate values include the coordinate value x2 corresponding to the X axis and the coordinate value y2 corresponding to the Y axis in the world coordinate system;
[0125] (x2,y2) is the coordinate of the next step.
[0126] Furthermore, the second acquisition module is specifically used for:
[0127] Determine the moving distance D between the current step and the next step by the following formula:
[0128] D = Math.sqrt(x1*x2+y1*y2)
[0129] In the above formula, x1 and y1 are the coordinate values of the X-axis and Y-axis in the world coordinate system of the current step respectively; x2 and y2 are the coordinate values of the X-axis and Y-axis in the world coordinate system of the next step respectively.
[0130] Furthermore, the direction sensor is used to obtain the current angle of the mobile phone, including:
[0131] Use the direction sensor to collect the rotation angle of the mobile phone in the Z-axis direction to obtain the mobile phone azimuth angle values[0]. The range of the mobile phone azimuth angle is [0, 360]. Among them, when values[0] is equal to 0, the mobile phone azimuth angle is due north; when values[0] is equal to 90, the mobile phone azimuth angle is due east; when values[0] is equal to 180, the mobile phone azimuth angle is due south; when values[0] is equal to 270, the mobile phone azimuth angle is due west;
[0132] Determine the current angle A of the phone as follows:
[0133]
[0134] In the above formula, π is the circumference of a circle.
[0135] Furthermore, the device further comprises:
[0136] The first judgment module is used to judge whether the moving distance of each step is within the first preset threshold range. If the moving distance of each step is not within the first preset threshold range, a voice prompt is issued to remind the user to correct the walking posture; if the moving distance of each step is within the first preset threshold range, there is no need to issue a voice prompt to remind the user to correct the walking posture.
[0137] Furthermore, the device further comprises:
[0138] The second acquisition module is used to use the acceleration sensor of the mobile phone to collect the acceleration of the mobile phone in the Z-axis direction;
[0139] The second judgment module is used to issue a voice prompt to remind the user to keep the phone parallel to the ground if the acceleration of the mobile phone in the Z-axis direction does not fall within the second preset threshold range; if the acceleration of the mobile phone in the Z-axis direction falls within the second preset threshold range, there is no need to issue a voice prompt to remind the user to keep the phone parallel to the ground.
[0140] Furthermore, the device further comprises:
[0141] The setting module is used to select an anchor point corresponding to any position in the video information captured by the camera as the starting anchor point when turning or stopping walking during walking and starting again.
[0142] An embodiment of the present invention provides an indoor automatic positioning device based on a mobile phone. A first acquisition module uses a camera to collect ground video information during walking, an extraction module extracts anchor points in the video information, the first acquisition module uses the anchor points to obtain the moving distance of each step during walking, the second acquisition module uses a direction sensor to obtain the current angle of the mobile phone, and the drawing module draws a positioning navigation trajectory according to the moving distance of each step during walking and the current angle of the mobile phone, thereby realizing indoor walking trajectory dot positioning without external equipment, thereby improving the accuracy of indoor positioning; at the same time, shooting the ground positioning walking with a camera will not involve indoor privacy, thereby improving user experience.
[0143] It can be understood that the device embodiment provided above corresponds to the method embodiment described above, and the corresponding specific contents can be referenced to each other and will not be repeated here.
[0144] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.
[0145] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.
[0146] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram and the combination of the processes and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0147] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction method, which is implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0148] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0149] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A mobile phone-based indoor automatic positioning method, characterized in that: The method comprises: Use the camera to collect video information of the ground during walking; Extracting anchor points from the video information; Using the anchor point to obtain the moving distance of each step during walking; Use the orientation sensor to obtain the current angle of the phone; Drawing a positioning navigation track according to the moving distance of each step during the walking process and the current angle of the mobile phone; Wherein, the camera and the direction sensor are arranged on the mobile phone; The method of using the anchor point to obtain the moving distance of each step during walking includes: when starting, selecting an anchor point corresponding to any position in the video information captured by the camera as the starting anchor point; during walking, using two anchor points in the video information corresponding to the current step to obtain the coordinates of the current step; when walking to the next step, using two anchor points in the video information corresponding to the next step to obtain the coordinates of the next step; according to the coordinates of the current step and the coordinates of the next step, obtaining the moving distances of the current step and the next step; The method of using two anchor points in the video information corresponding to the current step to obtain the coordinates of the current step includes: using the attribute coordinate function of the WindowManager window in the SDK of the mobile phone Android system to obtain the pixel anchor point coordinate values corresponding to the two anchor points in the video information corresponding to the current step, wherein the pixel anchor point coordinate values include the coordinate value x1 corresponding to the X axis and the coordinate value y1 corresponding to the Y axis in the world coordinate system; (x1, y1) is the coordinate of the current step; The method of using two anchor points in the video information corresponding to the next step to obtain the coordinates of the next step includes: using the attribute coordinate function of the WindowManager form in the SDK of the mobile phone Android system to obtain the pixel anchor point coordinate values corresponding to the two anchor points in the video information corresponding to the next step, the pixel anchor point coordinate values including the coordinate value x2 corresponding to the X-axis and the coordinate value y2 corresponding to the Y-axis in the world coordinate system; (x2, y2) is the coordinate of the next step.
2. The method according to claim 1, characterized in that The extracting the anchor point in the video information comprises: The motion tracking technology of ARCore is used to extract anchor points in the video information.
3. The method according to claim 1, characterized in that The method of obtaining the current angle of the mobile phone by using the direction sensor includes: The direction sensor is used to collect the rotation angle of the mobile phone in the Z-axis direction to obtain the mobile phone azimuth angle values[0], where the range of the mobile phone azimuth angle is [0, 360]. When values[0] is equal to 0, the mobile phone azimuth angle is due north; when values[0] is equal to 90, the mobile phone azimuth angle is due east; when values[0] is equal to 180, the mobile phone azimuth angle is due south; when values[0] is equal to 270, the mobile phone azimuth angle is due west. Determine the current angle A of the phone as follows: In the above formula, π is the circumference of a circle.
4. The method according to claim 1, characterized in that: The method further comprises: It is determined whether the moving distance of each step falls within a first preset threshold range. If the moving distance of each step does not fall within the first preset threshold range, a voice prompt is issued to remind the user to correct the walking posture; if the moving distance of each step falls within the first preset threshold range, there is no need to issue a voice prompt to remind the user to correct the walking posture.
5. The method according to claim 1, characterized in that The method further comprises: Using the acceleration sensor of the mobile phone to collect the acceleration of the mobile phone in the Z-axis direction; If the acceleration of the mobile phone in the Z-axis direction does not fall within the second preset threshold range, a voice prompt is issued to remind the user to keep the mobile phone parallel to the ground; if the acceleration of the mobile phone in the Z-axis direction falls within the second preset threshold range, there is no need to issue a voice prompt to remind the user to keep the mobile phone parallel to the ground.
6. The method according to claim 1, characterized in that The method further comprises: When turning or stopping walking during walking, when starting again, an anchor point corresponding to any position in the video information captured by the camera is selected as the starting anchor point.
Citation Information
Patent Citations
Pedestrian step length estimation method based on intelligent mobile terminal equipment
CN104535077A
Method and system for acquiring indoor navigation data based on intelligent mobile terminal
CN105241445A