VLC dynamic positioning method and system based on mean shift and unscented Kalman filter
The VLC dynamic positioning method through mean shift and unscented Kalman filtering solves the robustness and real-time problems of indoor positioning systems in the existing technology, achieves accurate positioning under high-frequency motion and occlusion, and improves indoor positioning Positioning accuracy and efficiency.
Patent Information
- Application Number
- CN201910485565.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-06-05
- Publication Date
- 2024-09-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing indoor positioning technologies, such as visible light positioning systems based on photodiodes, have problems such as poor robustness, susceptibility to interference from ambient light and reflected light, low positioning accuracy, and failure to position when the target moves, and smartphone cameras and VLP systems The combination has not been able to effectively solve these problems.
The VLC dynamic positioning method using mean shift and unscented Kalman filter is used to control the LED lights to turn on and off at high frequencies through the LED drive circuit. It is combined with the CMOS camera to identify the LED lights. The mean shift algorithm and unscented Kalman filter are used for image sequence tracking and positioning calculation. The position of the terminal in the world coordinate system improves the robustness and real-time performance of positioning.
It achieves accurate positioning under high-frequency motion and occlusion, reduces the error of positioning results, improves the maximum allowable motion speed and algorithm operating efficiency, and ensures the robustness and real-time performance of the VLP system.
Smart Images

Figure CN110233667B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of visible light communication, and in particular to a VLC dynamic positioning method and system based on mean shift and unscented Kalman filtering. Background Art
[0002] Indoor positioning technology has broad application prospects in indoor places such as commercial centers, large public buildings (subways, airports, libraries, etc.), high-risk industrial parks, hospitals, and nursing homes where GPS assistance is not very effective and navigation and positioning services are urgently needed.
[0003] Common indoor positioning technologies include infrared (IR), ultrasonic, radio frequency identification (RFID), wireless local area network (WLAN), Bluetooth and ultra-wideband (UWB). Based on these technologies, different implementation schemes have been developed. However, considering the positioning accuracy or the ability to resist electromagnetic interference, or the high cost of hardware equipment, these have obvious disadvantages and are difficult to promote.
[0004] Compared with the above-mentioned indoor positioning technologies, visible light positioning (VLP) technology has outstanding advantages such as rich bandwidth resources, strong anti-electromagnetic interference ability, high positioning accuracy, and strong lighting ability. In addition, the cost of hardware equipment supporting the VLP system is relatively small because complex equipment for precise measurement is not required. Therefore, VLP technology has broad application prospects in the field of indoor positioning.
[0005] There are two modes of indoor positioning systems based on VLP: positioning based on photodiodes (PD) and positioning based on image sensors (IS). However, due to the sensitivity of photodiodes to the direction of the light beam, the mobility of the positioning terminal is severely limited. It also has another significant disadvantage, namely poor robustness. Even at the same location, repeated measurements will produce fluctuating values of light intensity. In addition, the PD-based VLP system is easily disturbed by ambient light and reflected light. At the same time, the received angle and signal strength need to be accurately measured. Otherwise, there will be obvious errors in the positioning results.
[0006] Theoretically, IS performs better than PD in the field of VLP, but existing research has not achieved satisfactory results in terms of positioning accuracy, real-time and robustness. When the target moves at a faster speed, the image of the LED becomes blurred, which may cause positioning failure. In addition, when the light path between the LED and the positioning terminal is blocked, because most positioning algorithms are based on two or more LEDs, the algorithm is likely to fail when one LED is missing in the image. In addition, the shielding effect is a fatal problem in the field of VLP. If the optical flow method is used to solve this problem, the amount of calculation will become very large.
[0007] On the other hand, current smartphones are already equipped with high-resolution complementary metal oxide semiconductor (CMOS) sensor cameras, which can be easily combined with the IS-based VLP approach and have great commercial value. Summary of the invention
[0008] The purpose of the present invention is to provide a VLC dynamic positioning method and system based on mean shift and unscented Kalman filtering in order to address the performance deficiencies of existing methods and VLP systems and meet the current requirements for indoor positioning technology.
[0009] The first technical purpose of the present invention can be achieved by adopting the following technical solutions:
[0010] A VLC dynamic positioning method based on mean shift and unscented Kalman filtering, the VLC dynamic positioning method comprising the following steps:
[0011] S1, control the high-frequency on and off of the LED light through the LED driving circuit, find the area where the LED exists through LED-ID recognition, identify the LED ID, and obtain the initial position of the positioning terminal;
[0012] S2, using mean shift algorithm and unscented Kalman filter to dynamically track the LED lights in the image sequence and calculate the relative position relationship between the pixel coordinates of the LED lights in the current frame and the initial frame;
[0013] S3. Combining the initial position of the positioning terminal with the relative position relationship to obtain the current position of the positioning terminal in the world coordinate system.
[0014] Furthermore, the process of step S1 is as follows:
[0015] S101, controlling the on and off of the output current through the LED driving circuit, so that the LED lamp flashes at a specified frequency;
[0016] S102, using a camera to shoot an LED light, and converting the frequency of the LED light turning on and off into information on the number of LED light stripes on the image captured by the camera;
[0017] S103, the camera transmits the image to the positioning terminal through the USB cable, and then transmits it to the server through the local area network. The server converts the LED image into a grayscale image, and then performs Gaussian filtering and binarization processing to obtain a binary LED stripe image, and then performs feature extraction and feature detection on the binary LED stripe image to obtain the ID of the LED lamp;
[0018] S104, calculating the actual initial position of the positioning terminal, ie, the robot, by using the world coordinates of the plurality of LED lights and the geometric relationship in the world coordinate system.
[0019] Furthermore, the step S2 comprises the following steps:
[0020] S201, using the Epanechikov kernel function to describe the model of the tracking target, assuming that the initial position of the tracking target in the current frame image is first located at the center point b0 of the target position in the previous frame image, estimating the probability density of the target area in the current image frame, calculating the Bhattacharyya coefficient ρ(b0) of the center point b0 and the Bhattacharyya coefficients ρ(b) of other points, if ρ(b)>ρ(b0), then the center of the search area is transferred to point b, if the distance between point b and the center point b0 is less than an arbitrary small constant ε, then the current cycle is terminated, and point b is the center point of the tracking target area in the current frame image, otherwise repeat the above calculation;
[0021] The above is the process of the mean shift algorithm;
[0022] S202, introduce the unscented Kalman filter optimization algorithm, set is the state vector of the target, where x and y represent the coordinates of the target center point; and They represent the derivatives of x and y, i.e. the speed of the target; h k|k-1 Indicates the change in kernel function bandwidth of the target from time k-1 to time k, Y k As the observed variable of the target, initialize the unscented Kalman filter:
[0023]
[0024]
[0025] is the state vector X k The mean value, P k is the state vector X k The variance of
[0026] Assume that the i-th Sigma point corresponding to the target state vector at time k-1 is The number of Sigma points is 2n+1.
[0027] Calculate Sigma points:
[0028]
[0029]
[0030]
[0031] In the formula α is a parameter to be selected, 0<α≤10 -4 ;
[0032] use Represents the observation value of the i-th Sigma point at the target center at time k, and brings the Sigma point into the following state transition equation F and observation equation H:
[0033]
[0034]
[0035] Calculate the average value of the state vector and the observed variables before updating at this moment:
[0036]
[0037]
[0038] is the observed variable Y k The average value of is the weight coefficient of the mean,
[0039] Calculate the Kalman gain K:
[0040]
[0041] In the formula β ≥ 0 and is zero here.
[0042] And bring it into the following two equations to update the mean and variance of the state vector;
[0043]
[0044]
[0045] S203, introduce the unscented Kalman filter into the mean shift algorithm, use the unscented Kalman filter to predict the most likely position of the target in the current frame, and then use it as the prior information of the mean shift algorithm, let the mean shift algorithm search the area, when the LED light is blocked, use the tracking result of the target by the mean shift algorithm as the observation model of the unscented Kalman filter, and combine it with the noise matrix to obtain the final output.
[0046] Furthermore, the step S3 uses the relative position relationship between the pixel coordinates of the LED light in the current frame and the LED light in the initial frame to establish a linear mapping from the pixel coordinates to the world coordinates through coordinate transformation between different coordinate systems, and then uses the geometric position relationship between the LED light and the positioning terminal to calculate the relative position relationship between the pixel coordinates of the current frame and the initial frame positioning terminal by similar triangles, and then combines the initial position of the positioning terminal to calculate the position of the positioning terminal in the world coordinate system.
[0047] Furthermore, the estimation process of the probability density in step S201 is as follows:
[0048] In the kth frame image, suppose there are n k Pixels In the target area, the kernel function bandwidth is h, and the feature space is evenly divided into m sub-intervals. Then the probability density of the target model eigenvalue u=1,…,m is estimated as:
[0049]
[0050] in is the normalization constant, function k() is the contour function of the kernel function, and the weight of each pixel is measured by the distance from the center point (i.e., a0 in the formula), t(a i ) is point a i The eigenvalue at δ(t(a i )-u) is used to determine whether the characteristic value of the pixel belongs to the uth interval. The center point of the initial frame is a0, and its probability density is estimated as
[0051]
[0052] Furthermore, the calculation equation of the Bhattacharyya coefficient is as follows:
[0053]
[0054]
[0055] in is the weight of the i-th point.
[0056] Furthermore, the Gaussian white noise matrix W of the state transition equation F and the observation equation H k and V k satisfies the following statistical properties:
[0057] W k ~N(0,Q k )V k ~N(0,R k )
[0058] Among them, Q k and R k are the covariance matrices of the two noise matrices respectively.
[0059] Another technical purpose of the present invention can be achieved by adopting the following technical solutions:
[0060] A VLC dynamic positioning system based on mean shift and unscented Kalman filtering, the VLC dynamic positioning system comprising a VLC transmitter, a VLC receiver and a server;
[0061] The VLC transmitter includes a 28V constant voltage source, an LED drive circuit, an LED lamp and a power adapter; the LED lamp is powered by a 28V constant voltage source; the LED drive circuit controls the LED lamp to generate high-frequency on and off; the power adapter converts the input voltage into a 5V voltage and then supplies power to the LED drive circuit separately;
[0062] The VLC receiving end includes a positioning terminal and a camera subsystem; wherein the camera subsystem includes a CMOS camera and a CMOS camera parameter setting module; the CMOS camera is used to continuously capture real-time images of LED lights; the CMOS camera is connected to the positioning terminal and transmits the acquired images to the positioning terminal; the positioning terminal includes a WIFI module and a liquid crystal display, and the WIFI module transmits the images to the server end;
[0063] The server end includes an image processing subsystem, an image tracking module and an unscented Kalman filter; the image processing subsystem includes a color image conversion grayscale image module, an image filtering module, an image binarization module and an LED light recognition module, each module is connected in sequence to receive and process images to realize LED light recognition, and transmit the image and the ID of the LED light to the unscented Kalman filter and the image tracking module; the unscented Kalman filter includes an LED light position prediction module, an LED light position optimization module, and a Kalman filter parameter update module, and transmits the current LED prediction result to the image tracking module; the image tracking module tracks and locates the target in real time, transmits the positioning information to the positioning terminal through the WIFI module, and finally displays the positioning information by applying a control voltage to the liquid crystal display screen of the positioning terminal.
[0064] Furthermore, the LED driving circuit uses an STM32 system board as a chip, and uses a DD311 high-frequency switch to control the on and off of the current of the LED lamp, so that the LED lamp can be turned on and off at a high frequency.
[0065] Furthermore, the CMOS camera parameter setting module is used to set the focal length, exposure time, exposure compensation, and sensitivity of the CMOS camera, so that the CMOS camera can clearly capture the LED image.
[0066] Compared with the prior art, the present invention has the following advantages and effects:
[0067] 1. The method used in the present invention only needs to know the initial position of the LED and the relative position relationship with the positioning terminal, thus avoiding the repetition of the complex VLP positioning algorithm.
[0068] 2. The present invention uses a mean shift algorithm to track the moving LED in the image sensor, which solves the problem of blur effect and ensures real-time performance.
[0069] 3. The present invention adopts unscented Kalman filtering, which improves the maximum allowable movement speed of the positioning terminal and reduces the running time of the algorithm.
[0070] 4. The present invention adopts a mean shift algorithm with good robustness. In a simple background, even if most of the LEDs in the image are blocked, the VLP method will not fail.
[0071] 5. The present invention combines the results of the visible light positioning method with the noise matrix of the unscented Kalman filter to obtain the output when the LED is blocked, thereby reducing the error of the positioning result. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] Figure 1 It is a schematic diagram of a VLC dynamic positioning method based on mean shift and unscented Kalman filtering disclosed in the present invention;
[0073] Figure 2 Schematic diagram of the working principle of the rolling door effect of an industrial camera in an embodiment of the present invention;
[0074] Figure 3 It is a schematic diagram of the traceless conversion process in the present invention;
[0075] Figure 4 is a schematic diagram of the world coordinate system, image coordinate system and camera coordinate system in the present invention;
[0076] Figure 5 is a schematic diagram of the geometric relationship between the LED and the image sensor in an embodiment of the present invention;
[0077] Figure 6 It is a device composition structure diagram of the VLC dynamic positioning system based on mean shift and unscented Kalman filtering disclosed in the present invention. DETAILED DESCRIPTION
[0078] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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.
[0079] Embodiment 1
[0080] As attached Figure 1 As shown, this embodiment discloses a VLC dynamic positioning method based on mean shift and unscented Kalman filtering, comprising the following steps:
[0081] S1, control each LED light to light up and down at different frequencies. When the dynamic visible light positioning algorithm is started, the LED-ID recognition algorithm is used to find the area where the LED light is located, and then the ID of each LED is identified, and the initial position of the positioning terminal is obtained;
[0082] In a specific embodiment, step S1 includes the following sub-steps:
[0083] S101, programming the single-chip microcomputer so that different pins thereof output pulse sequences of different frequencies, inputting the pulse sequences of different frequencies into the LED driving circuit, and the LED driving circuit controls the on and off of the output current, thereby making the LED flash at a specified frequency;
[0084] S102, as attached Figure 2 As shown, a camera with a rolling shutter mechanism of a complementary metal oxide semiconductor (CMOS) image sensor is used to shoot LED lights, and the characteristics of exposure and data readout line by line are utilized to convert the frequency of LED lights on and off into the number of LED light stripes on the image captured by the camera;
[0085] S103, the camera transmits the image to the positioning terminal through the USB cable, and then transmits it to the server through the local area network. The server converts the LED image into a grayscale image, and then performs Gaussian filtering and binarization processing to obtain a binary LED stripe image, and then performs feature extraction and feature detection on the binary image to obtain the ID of the LED lamp;
[0086] S104, obtaining the ID of each LED to obtain the world coordinates of each LED, and using the world coordinates of multiple LED lights and the geometric relationship in the world coordinate system to calculate the actual initial position of the positioning terminal, i.e., the robot;
[0087] S2, using mean shift algorithm and unscented Kalman filter to dynamically track the LED lights in the image sequence, and using the algorithm to calculate the relative position relationship between the pixel coordinates of the LED lights in the current frame and the initial frame;
[0088] In a specific embodiment, step S2 includes the following sub-steps:
[0089] S201, using the Epanechikov kernel function to describe the model of the tracking target, in the k-th frame image, assuming that there are n k Pixels In the target area, assuming that the initial position of the target tracked in the current frame image is first located at the center point b0 of the target position in the previous frame image, the kernel function bandwidth is h, and the feature space is evenly divided into m sub-intervals, then the probability density of the target model eigenvalue u=1,…,m is estimated as:
[0090]
[0091] in is the normalization constant, function k() is the contour function of the kernel function, and the weight of each pixel is measured by the distance from the center point (i.e., a0 in the formula), t(a i ) is point a i The eigenvalue at δ(t(a i )-u) is used to determine whether the characteristic value of the pixel belongs to the uth interval. The center point of the initial frame is a0, and its probability density is estimated as
[0092]
[0093] Using kernel density estimation, the weight of each sample point is related to its distance from the center point, which can ensure that the mean shift process makes the kernel function converge to the point where the estimated density is zero.
[0094] Then use the following equation to calculate the Bhattacharyya coefficient ρ(b0) of b0:
[0095]
[0096] Then the Bhattacharyya coefficient ρ(b) is calculated for each point using the following formula:
[0097]
[0098] in is the weight of each point.
[0099] The Bhattacharyya coefficient has a good fit with the mean shift algorithm, so the Bhattacharyya coefficient is selected to measure the similarity between the target model and the candidate model.
[0100] If ρ(b)>ρ(b0), the center of the search area is transferred to point b. If the distance between b and b0 is less than any small constant ε, the loop ends and point b is the center point of the tracking target area in the current frame image. Otherwise, the above calculation is repeated.
[0101] S202, introduce the unscented Kalman filter optimization algorithm, set is the state vector of the target, where x and y represent the coordinates of the target center point; and They represent the derivatives of x and y, i.e. the speed of the target; h k|k-1 Indicates the change in kernel function bandwidth of the target from time k-1 to time k. k is the observed variable of the target. First initialize the unscented Kalman filter:
[0102]
[0103]
[0104] is the state vector X k The mean value, P k is the state vector X k The variance of
[0105] Assume that the i-th Sigma point corresponding to the target state vector at time k-1 is The number of Sigma points is 2n+1. Then as shown in the following Figure 3 As shown, the Sigma point is calculated using the following three equations:
[0106]
[0107]
[0108]
[0109] In the formula α is a candidate parameter, 0<α≤10 -4 .
[0110] use It represents the observation value of the i-th Sigma point at the target center at time k. Substitute the Sigma point into the following state transition equation F and observation equation H:
[0111]
[0112]
[0113] Then the state vector and the average value of the observed variables before updating can be calculated by the following equation:
[0114]
[0115]
[0116] is the observed variable Y k The average value of is the weight coefficient of the mean,
[0117] The Kalman gain K is calculated by the following formula:
[0118]
[0119] In the formula β ≥ 0 and is zero here.
[0120] Finally, bring K into the following two equations to update the mean and variance of the state vector:
[0121]
[0122]
[0123] The target position calculated by the unscented Kalman filter algorithm each time is compared with its previous position, thereby updating and correcting the state model of the unscented Kalman filter;
[0124] S203, introduce the unscented Kalman filter into the mean shift algorithm, use the unscented Kalman filter to predict the most likely position of the target in the current frame, and then use it as the prior information of the mean shift algorithm to let the mean shift algorithm search the area. This solution can effectively reduce the number of iterations, improve the real-time performance of positioning, and increase the maximum allowable operating speed of the positioning terminal.
[0125] In addition, the Gaussian white noise matrix W of the state transition equation and the observation equation k and V k satisfies the following statistical properties:
[0126] W k ~N(0,Q k )V k ~N(0,R k )
[0127] Where Q k and R kare the covariance matrices of the two noise matrices respectively. When the LED is blocked, the tracking result of the target by the mean shift algorithm is used as the observation model of the unscented Kalman filter, and the final output is obtained by combining the noise matrix, which can effectively solve the problem of LED being blocked.
[0128] The relative position relationship between the pixel coordinates of the LED light in the current frame and the LED light in the initial frame can be obtained through the mean shift algorithm combined with the unscented Kalman filter.
[0129] S3, using the initial position of the positioning terminal obtained in S1 and the relative position relationship obtained in S2, obtaining the current position of the positioning terminal in the world coordinate system;
[0130] In a specific embodiment, the process of step S3 is as follows:
[0131] Using the relative position relationship between the pixel coordinates of the current frame LED light and the initial frame LED light, as shown in the attached Figure 4 As shown in the figure, a linear mapping from pixel coordinates to world coordinates is established through coordinate transformation between different coordinate systems. Then, as shown in the figure, Figure 5 As shown, by using the geometric position relationship between the LED light and the positioning terminal, the relative position relationship between the pixel coordinates of the positioning terminal in the current frame and the initial frame can be calculated by similar triangles, and then combined with the initial position of the positioning terminal, the position of the positioning terminal in the world coordinate system is finally calculated.
[0132] Embodiment 2
[0133] like Figure 6 As shown, this embodiment discloses a VLC dynamic positioning system based on mean shift and unscented Kalman filtering. The VLC dynamic positioning system includes: a VLC transmitter, a VLC receiver and a server.
[0134] Among them, the VLC transmitter includes a 28V constant voltage source, an LED drive circuit, an LED lamp and a power adapter;
[0135] The LED lamp is powered by a 28V constant voltage source, which can make the LED lamp have a constant and appropriate light intensity; the LED driving circuit uses an STM32 system board as a chip, and uses a DD311 high-frequency switch to control the on and off of the current of the LED lamp, so that the LED lamp produces a high-frequency on and off that cannot be recognized by the human eye. The on and off frequency of each LED lamp is different, so the above-mentioned LED can be used as a unique ID optical signal transmitter; the power adapter converts the input voltage into a voltage of about 5V to power the LED driving circuit separately.
[0136] The VLC receiving end includes a positioning terminal and a camera subsystem;
[0137] The camera subsystem consists of a CMOS camera and a CMOS camera parameter setting module. The CMOS camera parameter setting module sets the focal length, exposure time, exposure compensation, and sensitivity of the CMOS camera, so that the CMOS camera can clearly capture the LED image. The CMOS camera continuously captures the real-time image of the LED light. Due to the rolling shutter effect of the camera, that is, the characteristics of exposure and reading data line by line, the image of the LED light with different numbers of light and dark stripes can be obtained. The camera is directly connected to the positioning terminal and transmits the obtained image to the positioning terminal. The positioning terminal includes a WIFI module and an LCD display, and transmits the image to the server through the WIFI module.
[0138] The server side includes an image processing subsystem, an image tracking module, and an unscented Kalman filter;
[0139] The image processing subsystem includes a color image conversion grayscale image module, an image filtering module, an image binarization module and an LED light recognition module. Each module is connected in sequence to receive and process the image to realize LED recognition, and then transmit the image and the LED ID to the unscented Kalman filter and the image tracking module; the unscented Kalman filter includes an LED light position prediction module, an LED light position optimization module, and a Kalman filter parameter update module; the unscented Kalman filter transmits the current LED prediction result to the image tracking module; the image tracking module tracks and locates the target in real time, transmits the positioning information to the positioning terminal using the WIFI module, and finally displays the positioning information by applying a control voltage to the LCD screen of the positioning terminal.
[0140] The present invention adopts an unscented Kalman filter to assist an image tracking module for positioning, which can effectively improve the real-time and robustness of positioning and is suitable for mobile terminal devices such as smart phones, tablet computers, mobile robots, etc.
[0141] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.
Claims
1. A VLC dynamic positioning method based on mean shift and unscented Kalman filtering, characterized in that: The VLC dynamic positioning method comprises the following steps: S1, control the high-frequency on and off of the LED light through the LED driving circuit, find the area where the LED exists through LED-ID recognition, identify the LED ID, and obtain the initial position of the positioning terminal; S2, using mean shift algorithm and unscented Kalman filter to dynamically track the LED lights in the image sequence and calculate the relative position relationship between the pixel coordinates of the LED lights in the current frame and the initial frame; The step S2 comprises the following steps: S201, using the Epanechikov kernel function to describe the model of the tracking target, assuming that the initial position of the tracking target in the current frame image is first located at the center point b0 of the target position in the previous frame image, estimating the probability density of the target area in the current image frame, calculating the Bhattacharyya coefficient ρ(b0) of the center point b0 and the Bhattacharyya coefficients ρ(b) of other points, if ρ(b)>ρ(b0), then the center of the search area is transferred to point b, if the distance between point b and the center point b0 is less than an arbitrary small constant ε, then the current cycle is terminated, and point b is the center point of the tracking target area in the current frame image, otherwise repeat the above calculation; The process of estimating the probability density in step S201 is as follows: In the kth frame image, suppose there are n k Pixels In the target area, the kernel function bandwidth is h, and the feature space is evenly divided into m sub-intervals. Then the probability density of the target model eigenvalue u=1,…,m is estimated as: in is the normalization constant, function k() is the contour function of the kernel function, and the weight of each pixel is measured by the distance from the center point b0. i ) is point a i The eigenvalue at δ(t(a i )-u) is used to determine whether the characteristic value of the pixel belongs to the uth interval. The center point of the initial frame is a0, and its probability density is estimated as S202, set is the state vector of the target at time k, where x and y represent the coordinates of the target center point; and They represent the derivatives of x and y, i.e. the speed of the target; h k|k-1 Indicates the change in kernel function bandwidth of the target from time k-1 to time k, Y k is the observed variable of the target at time k, and the unscented Kalman filter is initialized: is the state vector X k The mean value, P k is the state vector X k The variance of Assume that the i-th Sigma point corresponding to the target state vector at time k-1 is The number of Sigma points is 2n+1; Calculate Sigma points: In the formula α is a parameter to be selected, 0<α≤10 -4 ; use Represents the observation value of the i-th Sigma point at the target center at time k, and brings the Sigma point into the following state transition equation F and observation equation H: Calculate the average value of the state vector and the observed variables before updating at this moment: is the observed variable Y k The average value of is the weight coefficient of the mean, i=1,…,2n; Calculate the Kalman gain K: In the formula i=1,…2n,β≥0 and its value is zero here; And bring it into the following two equations to update the mean and variance of the state vector: S203, using the unscented Kalman filter to predict the most likely position of the target in the current frame, and then using it as the prior information of the mean shift algorithm, allowing the mean shift algorithm to search the area, when the LED light is blocked, using the tracking result of the target by the mean shift algorithm as the observation model of the unscented Kalman filter, combined with the noise matrix to obtain the final output; S3. Combining the initial position of the positioning terminal with the relative position relationship to obtain the current position of the positioning terminal in the world coordinate system.
2. The VLC dynamic positioning method based on mean shift and unscented Kalman filtering according to claim 1, characterized in that: The process of step S1 is as follows: S101, controlling the on and off of the output current through the LED driving circuit, so that the LED lamp flashes at a specified frequency; S102, using a camera to shoot an LED light, and converting the frequency of the LED light turning on and off into information on the number of LED light stripes on the image captured by the camera; S103, the camera transmits the image to the positioning terminal through the USB cable, and then transmits it to the server through the local area network. The server converts the LED image into a grayscale image, and then performs Gaussian filtering and binarization processing to obtain a binary LED stripe image, and then performs feature extraction and feature detection on the binary LED stripe image to obtain the ID of the LED lamp; S104, calculating the actual initial position of the positioning terminal, ie, the robot, by using the world coordinates of the plurality of LED lights and the geometric relationship in the world coordinate system.
3. The VLC dynamic positioning method based on mean shift and unscented Kalman filtering according to claim 1 is characterized in that: The step S3 uses the relative position relationship between the pixel coordinates of the LED light in the current frame and the LED light in the initial frame to establish a linear mapping from the pixel coordinates to the world coordinates through coordinate transformation between different coordinate systems, and then uses the geometric position relationship between the LED light and the positioning terminal to calculate the relative position relationship between the pixel coordinates of the positioning terminal in the current frame and the initial frame by similar triangles, and then combines the initial position of the positioning terminal to calculate the position of the positioning terminal in the world coordinate system.
4. The VLC dynamic positioning method based on mean shift and unscented Kalman filtering according to claim 1 is characterized in that: The calculation equation of the Bhattacharyya coefficient is as follows: in is the weight of the i-th point.
5. The VLC dynamic positioning method based on mean shift and unscented Kalman filtering according to claim 1 is characterized in that: The Gaussian white noise matrix W of the state transition equation F and the observation equation H k and V k satisfies the following statistical properties: W k ~N(0,Q k )V k ~N(0,R k ) Among them, Q k and R k are the covariance matrices of the two noise matrices respectively.
6. A VLC dynamic positioning system according to any one of claims 1 to 5 of the VLC dynamic positioning method based on mean shift and unscented Kalman filtering, characterized in that: The VLC dynamic positioning system comprises a VLC transmitting end, a VLC receiving end and a server end; The VLC transmitter includes a 28V constant voltage source, an LED drive circuit, an LED lamp and a power adapter; the LED lamp is powered by a 28V constant voltage source; the LED drive circuit controls the LED lamp to generate high-frequency on and off; the power adapter converts the input voltage into a 5V voltage and then supplies power to the LED drive circuit separately; The VLC receiving end includes a positioning terminal and a camera subsystem; wherein the camera subsystem includes a CMOS camera and a CMOS camera parameter setting module; the CMOS camera is used to continuously capture real-time images of LED lights; the CMOS camera is connected to the positioning terminal and transmits the acquired images to the positioning terminal; the positioning terminal includes a WIFI module and a liquid crystal display, and the WIFI module transmits the images to the server end; The server end includes an image processing subsystem, an image tracking module and an unscented Kalman filter; the image processing subsystem includes a color image conversion grayscale image module, an image filtering module, an image binarization module and an LED light recognition module, each module is connected in sequence to receive and process images to realize LED light recognition, and transmit the image and the ID of the LED light to the unscented Kalman filter and the image tracking module; the unscented Kalman filter includes an LED light position prediction module, an LED light position optimization module, and a Kalman filter parameter update module, and transmits the current LED prediction result to the image tracking module; the image tracking module tracks and locates the target in real time, transmits the positioning information to the positioning terminal through the WIFI module, and finally displays the positioning information by applying a control voltage to the liquid crystal display screen of the positioning terminal.
7. The VLC dynamic positioning system based on mean shift and unscented Kalman filtering according to claim 6, characterized in that: The LED driving circuit adopts an STM32 system board as a chip, and adopts a DD311 high-frequency switch to control the on and off of the current of the LED lamp, so that the LED lamp can be turned on and off at a high frequency.
8. The VLC dynamic positioning system based on mean shift and unscented Kalman filtering according to claim 6, characterized in that: The CMOS camera parameter setting module is used to set the focal length, exposure time, exposure compensation, and sensitivity of the CMOS camera, so that the CMOS camera can clearly capture the LED image.
