Indoor target position estimation method, device and system, and storage medium
By combining monocular vision technology with inertial navigation, depth estimation and image segmentation networks are used to solve the problem of positioning error accumulation in autonomous positioning solutions and achieve high-precision and stable indoor target position estimation.
Patent Information
- Application Number
- CN202410792212.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2044-06-19
AI Technical Summary
In the estimation of indoor target positions in existing autonomous positioning solutions, positioning errors accumulate over time, resulting in a decrease in accuracy and unable to meet the requirements for high accuracy and stability.
Using monocular vision technology combined with inertial navigation, the distance between the target and the shooting point is obtained through the monocular depth estimation network and image segmentation network, and the inertial navigation coordinate system is used to accurately estimate the target position to avoid error accumulation.
It achieves high-precision target position estimation indoors, and positioning errors do not accumulate over time. It provides high-precision and stable positioning results, and is suitable for autonomous positioning in unknown environments.
Smart Images

Figure CN118823104A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image data, and in particular relates to a method and device, a system and a storage medium for estimating the position of an indoor target based on monocular vision. Background Art
[0002] People spend more than 80% of their time indoors. With the development of science and technology, the demand for obtaining indoor target locations is getting higher and higher. Location services are gradually being applied to emergency rescue, tracking, monitoring and other scenarios. Therefore, how to obtain high-precision indoor target location estimation results has become an urgent problem to be solved.
[0003] The Global Position System (GPS) can provide high-precision position calculation for signal receiving devices in outdoor environments. However, since GPS signals are microwave signals of 1227.6MHz and 1575.42MHz, they will be blocked by walls and buildings in indoor environments, resulting in large target position positioning errors. Existing indoor target position calculation methods can be roughly divided into two categories: autonomous positioning solutions and non-autonomous positioning solutions. Non-autonomous positioning solutions estimate the position coordinates of indoor objects by sending positioning signals from nodes pre-arranged indoors, mainly including radio frequency identification positioning technology, ultrasonic positioning technology, Bluetooth positioning technology, wireless local area network positioning technology, ultra-wideband positioning technology, etc. using wireless positioning technology; or installing GPS signal receivers indoors to estimate the target position. The indoor target position obtained in this way usually has a high positioning accuracy, but it requires the nodes to be arranged in advance, which cannot meet the needs in unknown environments, and the deployment of equipment requires more manpower and material resources, and the cost is relatively expensive. Autonomous positioning solutions use inertial navigation technology to provide continuous estimation of the position coordinates of the carrier, and provide estimation results of the target position by moving the carrier to the target. This method does not require the deployment of nodes in advance, has lower costs and is more applicable, but positioning errors will accumulate over time and can easily cause large offset errors. Summary of the invention
[0004] The problem to be solved by the present invention is to provide a method and device, system and storage medium for estimating the position of an indoor target based on monocular vision, which can prevent the positioning error from accumulating over time while maintaining high-precision positioning, and solve the problem of error accumulation under the current autonomous positioning scheme.
[0005] To achieve the above object, the present invention adopts the following technical solution:
[0006] A method for estimating an indoor target position, comprising:
[0007] Step S1, obtaining indoor target image information;
[0008] Step S2: According to the indoor target image information, the distance between the target and the shooting point is obtained through a monocular depth estimation network and an image segmentation network; wherein the image segmentation network is composed of an encoder part based on the Vision Transformer architecture and a mask decoder part based on a self-attention mechanism;
[0009] Step S3: According to the distance between the target and the shooting point, the coordinates of the target in the inertial navigation coordinate system are obtained to complete the estimation of the target position.
[0010] Preferably, in step S1, the target is photographed at any two different positions, the photographed pictures, camera parameters and three-axis accelerometer and three-axis gyroscope data of the foot inertial sensor are collected, and the position coordinates of the shooting points in the inertial navigation coordinate system during the two shots are recorded.
[0011] Preferably, step S2 comprises:
[0012] Input the indoor target image information into the monocular depth estimation network to obtain a depth image;
[0013] Input the indoor target image information into the image segmentation network to obtain the pixel position of the target;
[0014] The depth image is read according to the pixel position of the target to obtain the distance from the target to the shooting point.
[0015] Preferably, in step S3, the coordinates of the shooting points in the navigation coordinate system during the two shots are used, based on the distances between the target and the two shooting points, and the coordinates of the target in the inertial navigation coordinate system are calculated by constructing an equation using a trigonometric relationship. Specifically:
[0016] Assume that the angle between the first shot and the positive direction of the y-axis of the inertial navigation coordinate system is α. In the triangle formed by the target and the two shots, the following equation can be constructed based on the triangular relationship:
[0017]
[0018] Among them, d x , d y are the coordinate differences of the two shots along the positive direction of the x-axis and y-axis in the navigation coordinate system, respectively. i Indicates the distance from the i-th shooting point to the target. Let A = d x , B=d y , The above formula can be simplified as:
[0019] Asinα+Bcosα=C
[0020] It can be solved
[0021]
[0022] The value of cosα can be obtained from sinα:
[0023]
[0024] Thus, the target position calculated based on O1 can be obtained for:
[0025]
[0026] Similarly, let the angle between the second shot and the positive direction of the y-axis of the inertial navigation coordinate system be β, and the target position based on O2 can be solved. In order to balance the estimation error, the final target position estimation result P(x, y) is and The estimated average result is:
[0027]
[0028] Preferably, the monocular depth estimation network comprises a plurality of consecutive 2D convolutional layers, the convolutional layers are connected to the pooling layers, and the pooling layers are connected to the plurality of deconvolutional layers.
[0029] The present invention also provides an indoor target position estimation device, comprising:
[0030] An acquisition module is used to acquire indoor target image information;
[0031] The processing module is used to obtain the distance between the target and the shooting point based on the indoor target image information through a monocular depth estimation network and an image segmentation network; wherein the image segmentation network consists of an encoder part based on the Vision Transformer architecture and a mask decoder part based on the self-attention mechanism;
[0032] The estimation module is used to obtain the coordinates of the target in the inertial navigation coordinate system according to the distance between the target and the shooting point, and complete the estimation of the target position.
[0033] The present invention also provides an indoor target position estimation system, comprising: a memory and a processor, wherein the memory stores a computer program executed by the processor, and the computer program executes an indoor target position estimation method when executed by the processor.
[0034] The present invention also provides a storage medium, on which a computer program is stored, and the computer program executes the indoor target position estimation method when running.
[0035] The present invention has the following advantages:
[0036] (1) Improve the accuracy of indoor target position estimation: By introducing a combination of monocular vision and inertial navigation technology, the position coordinate observations from visual calculation are provided for target position estimation, which can continuously and effectively optimize the indoor target position calculated by the autonomous positioning solution.
[0037] (2) The present invention only requires the image observation results of the carrier on the target at two different positions and the inertial navigation data to estimate the target position with high accuracy. At the same time, it can estimate complex problems such as coordinate system conversion and position estimation by itself, without the need for initial alignment or calibration during operation, thereby achieving high-precision autonomous target position estimation.
[0038] (3) The present invention has good robustness and solves the problem of error accumulation over time in the current autonomous positioning method. The error changes little, the overall positioning accuracy is stable, and it has good applicability and practicality. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] 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 embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0040] Figure 1 is a flow chart of a method for estimating an indoor target position according to an embodiment of the present invention;
[0041] Figure 2 Schematic diagram of a monocular depth estimation network;
[0042] Figure 3 Schematic diagram of the image segmentation network;
[0043] Figure 4 This is a schematic diagram of the camera imaging model;
[0044] Figure 5 Schematic diagram of target position coordinate mapping calculation. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0047] Embodiment 1:
[0048] like Figure 1 As shown, the present invention provides an indoor target position estimation method, comprising:
[0049] Step S1, obtaining indoor target image information;
[0050] Step S2: According to the indoor target image information, the distance between the target and the shooting point is obtained through a monocular depth estimation network and an image segmentation network;
[0051] Step S3: According to the distance between the target and the shooting point, the coordinates of the target in the inertial navigation coordinate system are obtained to complete the estimation of the target position.
[0052] As an implementation method of an embodiment of the present invention, in step S1, the target is photographed at any two different positions, the photographed pictures, camera parameters, and three-axis accelerometer and three-axis gyroscope data of the foot inertial sensor are collected, and the position coordinates of the shooting points in the inertial navigation coordinate system during the two shots are recorded.
[0053] Furthermore, the pedestrian is equipped with a head-mounted monocular camera and an inertial sensor device on the foot. When walking in an indoor environment, the target is photographed for the first time, and the photographed image is recorded as I1. The three-axis accelerometer and three-axis gyroscope measurement data of the foot inertial sensor at this time are collected. Through quadratic integration and zero-speed error correction, the position coordinates O1 (x1, y1) of the shooting location at this time in the inertial navigation coordinate system are obtained, and the focal length of the camera at this time is recorded as f1; the pedestrian continues to walk to position O2 and photographs the target again, and the photographed image is recorded as I2. The foot inertial sensor data is also collected at this time to obtain the coordinates O2 (x2, y2) in the inertial navigation coordinate system at this time, and the focal length of the camera at this time is recorded as f2.
[0054] As an implementation method of an embodiment of the present invention, a monocular depth estimation network includes multiple continuous 2D convolutional layers, a convolutional layer is spliced with a pooling layer, and a pooling layer is spliced with multiple deconvolutional layers. The image segmentation network consists of an encoder part based on the VisionTransformer architecture and a mask decoder part based on the self-attention mechanism; step S2 includes: inputting the indoor target image information into the monocular depth estimation network to obtain a depth image; inputting the indoor target image information into the image segmentation network to obtain the pixel position of the target; reading the depth image according to the pixel position of the target to obtain the distance from the target to the shooting point.
[0055] Further, in step S2, the camera coordinate system is defined as the positive direction of the x-axis is the direction of the camera optical axis along the lens outward, and the y-axis is perpendicular to the x-axis and parallel to the camera imaging plane. Next, the distance from the target to the shooting point is calculated based on images I1 and I2 combined with monocular vision technology.
[0056] First, I1 and I2 are input into the constructed monocular depth estimation network. The structure of the monocular depth estimation network is as follows: Figure 2 As shown in the figure, it contains 6 stacked 2D convolution layers to gradually extract deep pixel features in images I1 and I2, followed by a global average pooling layer to aggregate the extracted deep pixel features and reduce the feature dimension and computational complexity. Then, 4 deconvolution layers are used to gradually restore the feature resolution and generate the final depth images D1 and D2 of I1 and I2, where the pixel value of each point represents the actual distance from the corresponding pixel point in I1 and I2 to the camera lens.
[0057] Secondly, after obtaining the depth images of I1 and I2, the real distance from the target to the camera lens cannot be read from the depth images D1 and D2 because the unknown target is in the pixel area of I1 and I2. To solve this problem, an image segmentation network is constructed to segment the pixel area of the target from the image segmentation network. The structure of the image segmentation network is shown in the figure below: Figure 3 As shown, it is divided into an encoder and a decoder. The encoder part is designed based on the Vision Transformer architecture. First, the input image is linearly mapped to a feature vector according to the pixel block, and then the pixel block is encoded according to the position and embedded in the feature vector. The feature vector undergoes feature interaction through the self-attention mechanism, and the output feature is input to the mask decoder based on self-attention after adjusting the number of channels. After the multi-layer perceptron linearly maps the feature, the self-attention calculation is performed again to generate a feature classification vector, and the multi-layer perceptron outputs the instance-level segmentation mask image. I1 and I2 are input into the image segmentation network, the output mask image is selected as the target image, the position of the mask in the image is read, and the pixel coordinate range S1 and S2 of the target in I1 and I2 are obtained respectively. K points are randomly sampled in S1 and S2 (k is usually 5 in actual implementation), and the coordinate average point mean1(X1, Y1) and mean2(X2, Y2) of the k points are taken as the pixel coordinate position of the target in I1 and I2. The pixel values corresponding to mean1 and mean2 in D1 and D2 are the distances from the target to the monocular camera lens during the two shots, which are recorded as L1 and L2 respectively.
[0058] After obtaining the above information, we start to calculate the position of the target in the camera coordinate system. The camera imaging model diagram is as follows: Figure 4As shown in the figure, taking the process of calculating the coordinates of the target in the camera coordinate system from the image I1 as an example, a plane is made through mean1 that is perpendicular to the camera optical axis and intersects with the camera optical axis at point C. The line connecting mean1 and C is projected as an oblique line AB on the camera imaging plane, where the projection of C corresponds to point B and the target corresponds to point A. Then the pair of triangles formed by the points mean1, C, the camera lens O, and A, B have a similar relationship. Reading the camera parameters, the full frame size of the sensor is H*W, and the resolution size of the image I1 is H1*W1, then the length of the oblique line AB len can be calculated AB for:
[0059]
[0060] From this, we can get the OA length from the camera lens to the corresponding position of the target on the imaging plane:
[0061]
[0062] Thus, in the similarity relationship, the similarity ratio ratio1 is:
[0063]
[0064] Based on the above relationship, the coordinates of the target in the camera coordinate system can be obtained:
[0065]
[0066] Similarly, based on image I2, the target coordinate position p′2 (x′2, y′2) in the camera coordinate system at the time of the second shooting can be calculated. Based on p′1 and p′2, the distances dis1 and dis2 between the target P and the two shooting points O1 and O2 can be obtained as follows:
[0067]
[0068] As an implementation method of an embodiment of the present invention, in step S3, the position coordinates of the shooting points in the navigation coordinate system during the two shots are used, based on the distances between the target and the two shooting points respectively, and an equation is constructed using a trigonometric relationship to calculate the coordinates of the target in the inertial navigation coordinate system.
[0069] Since there is an angle offset between the inertial navigation coordinate system and the camera coordinate system, coordinate transformation is required to obtain the available coordinates of the target in the inertial navigation coordinate system. The embodiment of the present invention proposes an algorithm for coordinate transformation using only existing data without introducing additional technology and equipment.
[0070] like Figure 5As shown in the figure, the angle between the line connecting the target and the shooting point and the positive direction of the y-axis of the inertial navigation coordinate system is set to α during the first shooting. A straight line along the positive direction of the x-axis is made through O1, intersecting with PO2 at point D, and intersecting with the positive direction of the y-axis of O2 at point E. A perpendicular line is made through P to O1D, intersecting at point F. Then the triangle O2ED and the triangle PDF satisfy the similarity relationship, so the length of CD can be obtained by trigonometric calculation. CD With DF length len DF for:
[0071]
[0072] Among them, d x , d y is the difference between the coordinates of O1 and O2 along the positive direction of the x and y axes in the navigation coordinate system. Therefore, in the triangle CDF, according to the Pythagorean theorem:
[0073] len CF 2 +len DF 2 =len CD 2
[0074] Define len by cosine CD =dis1cosα, after substituting into the above formula and simplifying, we can get:
[0075]
[0076] Let A = d x , B=d y , The above formula is the solution equation:
[0077] Asinα-Bcosα=C
[0078] Let x = sinα, the above formula can be simplified to:
[0079]
[0080] The solution is:
[0081]
[0082] Therefore, based on the sinα value, the cosα value can be obtained as:
[0083]
[0084] Thus, the target position estimated based on the initial shooting position O1 is obtained for:
[0085]
[0086] Similarly, let the angle between the second shot and the positive direction of the y-axis of the inertial navigation coordinate system be β, and the target position based on O2 can be solved. In order to balance the estimation error, the final target position estimation result P(x, y) is and The estimated average result is:
[0087]
[0088]
[0089] Embodiment 2:
[0090] The embodiment of the present invention further provides an indoor target position estimation device, comprising:
[0091] An acquisition module is used to acquire indoor target image information;
[0092] The processing module is used to obtain the distance between the target and the shooting point based on the indoor target image information through a monocular depth estimation network and an image segmentation network; wherein the image segmentation network consists of an encoder part based on the Vision Transformer architecture and a mask decoder part based on the self-attention mechanism;
[0093] The estimation module is used to obtain the coordinates of the target in the inertial navigation coordinate system according to the distance between the target and the shooting point, and complete the estimation of the target position.
[0094] Embodiment 3:
[0095] An embodiment of the present invention further provides an indoor target position estimation system, comprising: a memory and a processor, wherein the memory stores a computer program executed by the processor, and the computer program executes an indoor target position estimation method when executed by the processor.
[0096] Embodiment 4:
[0097] An embodiment of the present invention further provides a storage medium, on which a computer program is stored, and the computer program executes the indoor target position estimation method when running.
[0098] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.
Claims
1. A method for estimating indoor target position, characterized in that: include: Step S1, obtaining indoor target image information; Step S2: According to the indoor target image information, the distance between the target and the shooting point is obtained through a monocular depth estimation network and an image segmentation network; wherein the image segmentation network is composed of an encoder part based on the Vision Transformer architecture and a mask decoder part based on a self-attention mechanism; Step S3: According to the distance between the target and the shooting point, the coordinates of the target in the inertial navigation coordinate system are obtained to complete the estimation of the target position.
2. The indoor target position estimation method according to claim 1, characterized in that: In step S1, the target is photographed at any two different positions, the photographed pictures, camera parameters, and three-axis accelerometer and three-axis gyroscope data of the foot inertial sensor are collected, and the position coordinates of the shooting points in the inertial navigation coordinate system during the two shots are recorded.
3. The indoor target position estimation method according to claim 2, characterized in that: Step S2 includes: Input the indoor target image information into the monocular depth estimation network to obtain a depth image; Input the indoor target image information into the image segmentation network to obtain the pixel position of the target; The depth image is read according to the pixel position of the target to obtain the distance from the target to the shooting point.
4. The indoor target position estimation method according to claim 3, characterized in that: In step S3, the coordinates of the shooting points in the navigation coordinate system during the two shots are used, based on the distances between the target and the two shooting points, and the coordinates of the target in the inertial navigation coordinate system are calculated by constructing an equation using a trigonometric relationship.
5. The indoor target position estimation method according to claim 4, characterized in that: The monocular depth estimation network consists of multiple consecutive 2D convolutional layers, which are connected to pooling layers, and pooling layers are connected to multiple deconvolutional layers.
6. An indoor target position estimation device, characterized in that: include: An acquisition module is used to acquire indoor target image information; The processing module is used to obtain the distance between the target and the shooting point based on the indoor target image information through a monocular depth estimation network and an image segmentation network; wherein the image segmentation network consists of an encoder part based on the Vision Transformer architecture and a mask decoder part based on the self-attention mechanism; The estimation module is used to obtain the coordinates of the target in the inertial navigation coordinate system according to the distance between the target and the shooting point, and complete the estimation of the target position.
7. An indoor target position estimation system, comprising: A memory and a processor, wherein the memory stores a computer program executed by the processor, and when the computer program is executed by the processor, the indoor target position estimation method according to any one of claims 1 to 5 is executed.
8. A storage medium having a computer program stored thereon, wherein the computer program executes the indoor target position estimation method according to any one of claims 1 to 5 when running.
Citation Information
Patent Citations
Multi-modal indoor ranging and positioning method based on mobile phone camera and sensor
CN109059895A
Three-dimensional scene fusion method and device based on monocular estimation
CN111340864A
Target pose estimation method based on monocular vision and inertial navigation fusion
CN117968640A
Head-mounted Beidou inertial camera fusion integrated positioning system, device and method
CN118149792A
Target ranging system based on self-supervised monocular depth estimation method
CN118172399A
