WO2018233692A1 - Positioning method, storage medium, and positioning system - Google Patents

Positioning method, storage medium, and positioning system Download PDF

Info

Publication number
WO2018233692A1
WO2018233692A1 PCT/CN2018/092439 CN2018092439W WO2018233692A1 WO 2018233692 A1 WO2018233692 A1 WO 2018233692A1 CN 2018092439 W CN2018092439 W CN 2018092439W WO 2018233692 A1 WO2018233692 A1 WO 2018233692A1
Authority
WO
WIPO (PCT)
Prior art keywords
positioning
led
wifi
terminal
grid point
Prior art date
Application number
PCT/CN2018/092439
Other languages
French (fr)
Chinese (zh)
Inventor
杨坤
贾倩
李秋婷
吴传喜
余万涛
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2018233692A1 publication Critical patent/WO2018233692A1/en

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S5/00Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations
    • G01S5/02Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations using radio waves
    • G01S5/0252Radio frequency fingerprinting
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S5/00Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations
    • G01S5/02Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations using radio waves
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S11/00Systems for determining distance or velocity not using reflection or reradiation
    • G01S11/12Systems for determining distance or velocity not using reflection or reradiation using electromagnetic waves other than radio waves
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2411Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W64/00Locating users or terminals or network equipment for network management purposes, e.g. mobility management
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S2205/00Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations
    • G01S2205/01Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations specially adapted for specific applications
    • G01S2205/02Indoor

Definitions

  • the present disclosure relates to the field of positioning, and in particular to a positioning method, a storage medium, and a positioning system.
  • indoor location services which are increasingly urgent for demand, have developed rapidly in indoor positioning technology. They are research hotspots in the era of mobile internet, and gradually play a role in all walks of life, which has a certain impact on people's daily life.
  • the indoor environment is limited by the positioning time, positioning accuracy, and indoor complex environment. The positioning effect is still not ideal in practical applications.
  • the common methods of indoor positioning mainly include the following:
  • the infrared ray is positioned by the infrared ray emitted by the infrared ray transmitter received by the optical sensor in the room.
  • the Active Badge System an infrared outdoor positioning system developed by AT&T Labs at the University of Cambridge, is known as the first generation of indoor positioning systems.
  • Ambiplex proposed in 2011 that the IR.Loc system is positioned by measuring thermal radiation, with a positioning accuracy of 20 to 30 cm in the range of 10 m.
  • the implementation of the infrared indoor positioning system consists of two parts: an infrared emitter and an infrared receiver.
  • the infrared emitter is a fixed node of the network
  • the infrared receiver is mounted on the target to be positioned as a mobile terminal.
  • the advantages of infrared indoor positioning are high positioning accuracy, responsiveness, and low cost for a single device.
  • the Bluetooth indoor positioning is located by the fingerprint positioning algorithm according to the measurement terminal device signal strength.
  • iBeacon is a protocol technology developed by Apple for Bluetooth positioning. The positioning accuracy is 2 ⁇ 3m.
  • the shopping application Shopkick is deployed in the mall.
  • iBeacon is applied in real life. China's “find deer” and “Guangfa easy go” and other APPs This mode is also used for positioning.
  • Bluetooth positioning technology has high security, low cost, low power consumption and small size. At present, most mobile terminals have their own Bluetooth modules, which is easy to popularize and deploy.
  • Radio Frequency Identification (RFID) positioning technology uses radio frequency signals for non-contact two-way communication to exchange data for identification and positioning purposes.
  • RFID positioning systems include the Cricket system developed by the MIT Oxygen project, the SpotON system of the University of Washington, and the RADAR system of Microsoft Corporation.
  • RFID technology has a large transmission range and low cost.
  • the infrared positioning method is limited to the line of sight positioning, and the infrared information is greatly attenuated in the air, and can only be used for short
  • the distance positioning and positioning accuracy are easily affected by other light sources
  • the Bluetooth indoor positioning method is susceptible to interference from external noise signals, the signal stability is poor, and the communication range is small
  • the RF indoor positioning method has a short working distance, and the longest is only tens of meters.
  • the radio frequency signal does not have the communication capability, and only the radio frequency identification technology cannot be used for indoor positioning, and must be combined with other auxiliary technologies to complete.
  • the technical problem to be solved by the present disclosure is to provide a positioning method, a storage medium, and a positioning system, which are used to solve the problem that the positioning accuracy in the prior art is not high.
  • the present disclosure provides a positioning method, including:
  • the final positioning position of the positioning terminal is obtained according to the weight position corresponding to the WiFi positioning position, the LED positioning position, and the two positioning positions.
  • the positioning area is divided into a plurality of grid points in advance, the WiFi weight value corresponding to the WiFi positioning on each grid point is obtained, and the LED corresponding to the LED positioning on each grid point is obtained.
  • the WiFi weight value corresponding to the grid point closest to the WiFi positioning position is used as the weight value corresponding to the WiFi positioning position; and the grid point closest to the LED positioning position is corresponding to The LED weight value is used as the weight value corresponding to the LED positioning position.
  • the WiFi weight value corresponding to the WiFi location on each grid point is obtained, including:
  • a WiFi classifier that uses the RSSI data for location prediction positioning is obtained
  • the method further includes:
  • the WiFi fingerprint library is divided into a training set and a verification set according to a set ratio
  • the support vector machine algorithm SVM nonlinear classifier is selected and trained in the Python language to obtain the WiFi classifier.
  • the positioning terminal is predicted and located according to the WiFi classifier, and the WiFi positioning position of the positioning terminal is obtained.
  • the LED weight values corresponding to the LED positioning on each grid point are obtained, including:
  • the LED fingerprint library is obtained
  • an LED classifier for position prediction positioning using LED positioning data is obtained
  • the method further includes:
  • the LED fingerprint library is divided into a training set and a verification set according to a set ratio
  • the support vector machine algorithm SVM nonlinear classifier is selected and trained in the Python language to obtain the LED classifier.
  • the LED positioning data includes: a heading angle, a pitch angle, and a roll angle of the device that collects the LED positioning data, and position coordinates of one or more LED lights captured by the device on the image. .
  • the positioning terminal is predicted and positioned to obtain an LED positioning position of the positioning terminal.
  • the final positioning position of the positioning terminal is obtained by formula (1):
  • the present disclosure also provides a method for acquiring an LED positioning signal, including
  • the heading angle, the pitch angle and the roll angle of the positioning terminal, and the coordinates of the identified LED lamp in the image form a positioning signal at the position and position of the positioning terminal.
  • image processing is performed to obtain a blinking frequency of each LED light in the image, including:
  • the spacing of the black and white stripes is counted by the radon transform, and the blinking frequency of the LED corresponding to the contour of the graphic is calculated according to the spacing.
  • the present disclosure also provides a storage medium storing a positioning program for performing positioning, the program comprising:
  • the final positioning position of the positioning terminal is obtained according to the weight position corresponding to the WiFi positioning position, the LED positioning position, and the two positioning positions.
  • the positioning area is divided into a plurality of grid points in advance, the WiFi weight value corresponding to the WiFi positioning on each grid point is obtained, and the LED corresponding to the LED positioning on each grid point is obtained.
  • the WiFi weight value corresponding to the grid point closest to the WiFi positioning position is used as the weight value corresponding to the WiFi positioning position; and the grid point closest to the LED positioning position is corresponding to The LED weight value is used as the weight value corresponding to the LED positioning position.
  • the WiFi weight value corresponding to the WiFi location on each grid point is obtained, including:
  • a WiFi classifier that uses the RSSI data for location prediction positioning is obtained
  • the program includes:
  • the WiFi fingerprint library is divided into a training set and a verification set according to a set ratio
  • the support vector machine algorithm SVM nonlinear classifier is selected and trained in the Python language to obtain the WiFi classifier.
  • the positioning terminal is predicted and located according to the WiFi classifier, and the WiFi positioning position of the positioning terminal is obtained.
  • the LED weight values corresponding to the LED positioning on each grid point are obtained, including:
  • the LED fingerprint library is obtained
  • an LED classifier for position prediction positioning using LED positioning data is obtained
  • the program further comprises:
  • the LED fingerprint library is divided into a training set and a verification set according to a set ratio
  • the support vector machine algorithm SVM nonlinear classifier is selected and trained in the Python language to obtain the LED classifier.
  • the LED positioning data includes: a heading angle, a pitch angle, and a roll angle of the device that collects the LED positioning data, and position coordinates of one or more LED lights captured by the device on the image. .
  • the positioning terminal is predicted and positioned to obtain an LED positioning position of the positioning terminal.
  • the final positioning position of the positioning terminal is obtained by formula (1):
  • the present disclosure also provides a storage medium storing a program for acquiring an LED positioning signal, the program comprising:
  • the heading angle, the pitch angle and the roll angle of the positioning terminal, and the coordinates of the identified LED lamp in the image form a positioning signal at the position and position of the positioning terminal.
  • image processing is performed to obtain a blinking frequency of each LED light in the image, including:
  • the spacing of the black and white stripes is counted by the radon transform, and the blinking frequency of the LED corresponding to the contour of the graphic is calculated according to the spacing.
  • the present disclosure also provides a positioning system including a plurality of wireless routers disposed in a positioning area, a plurality of LED lights, and a positioning terminal, a monitoring terminal, and a server:
  • the positioning terminal collects the WiFi positioning signal and the LED positioning signal of the location grid point, and sends the positioning signal to the server;
  • the server locates the positioning terminal according to the WiFi positioning signal and the LED positioning signal, and sends the positioning information to the monitoring terminal;
  • the monitoring terminal receives the positioning information and displays the location of the positioning terminal.
  • the server includes a storage medium storing a fusion locator.
  • the positioning terminal includes the storage medium stored above for an image processing program.
  • the LEDs are modulated to a square wave signal, and the modulation frequencies of the individual LED lamps are different.
  • the present disclosure proposes a fusion positioning method and system based on WiFi and visible light, which combines the advantages of the two positioning methods, and realizes the complementary advantages of different positioning methods, thereby effectively combining WiFi positioning and visible light positioning, thereby improving positioning accuracy and stability.
  • FIG. 3 is a schematic structural view of a positioning system in an embodiment of the present disclosure.
  • the embodiment of the present disclosure proposes a dynamic fingerprint fusion positioning method based on WiFi and visible light.
  • a classifier for performing WiFi positioning and LED positioning is separately constructed, and then a system for performing fusion positioning is constructed. This process is referred to as an "offline phase" in this embodiment. Using the built system to perform the process of fusion positioning, this process is called the “online phase”.
  • the embodiment includes two major parts, and the first part is a fusion positioning system that separately constructs a WiFi classifier and an LED classifier, and fuses the two positioning methods together.
  • the second part is to use the built-in WiFi classifier and LED classifier, as well as the fusion positioning system for specific positioning.
  • the room Positioning area
  • the grid point size is 1m ⁇ 1m.
  • each newly acquired RSSI data is input into the WiFi classifier, and a predicted positioning result of the RSSI data collection location is obtained, and the positioning result can locate the target location into a specific grid point.
  • a square wave signal (a square wave higher than 100 Hz, the human eye does not notice the flicker, and does not cause visual discomfort, but only The brightness will be appropriately reduced, and the square wave signal is easy to handle, and the anti-interference ability is strong), usually modulated to 200 Hz-4000 Hz, and each LED lamp is modulated to a different frequency.
  • the circular panel light is selected in this scheme. If it is a normal lamp, the light-emitting area can be enlarged by adding a lamp cover.
  • the positioning terminal sets the camera exposure time (shutter) (the normal mobile phone camera can adjust the exposure time), so that the LED lights in the captured image show light and dark stripes; the remaining objects will be presented on the image. It is a black background (due to the short exposure time, the effect of non-illuminating objects such as ceilings and furniture forming a "blackout" in the image), which is more advantageous for image processing. As shown in Figure 1.
  • the structure classifier needs to extract features first.
  • the feature In the "WiFi positioning link", the feature is directly available, that is, the value of RSSI.
  • the LED positioning the amount of image data captured is very large, and the really useful information is very small, so it is necessary to pre-process the image, extract the feature, and the fingerprint library stores the feature instead of the entire image.
  • the frequency of each LED lamp is different, and the performance in the captured image is that the stripe pitch (width corresponds to the modulated frequency) is different, as shown in FIG. 2, therefore, by image processing, the corresponding image of the lamp can be identified.
  • the frequency is equal to the identification of the LED light.
  • the position coordinates of each LED lamp are fixed, so the imaging position of different LED lights in the image can be a feature of positioning.
  • binarization processing is to set a global threshold T, and use T to image the data. Divided into two parts: a pixel group larger than T and a pixel group smaller than T. The pixel value of the pixel group larger than T is set to white or black, and the pixel value of the pixel group smaller than T is set to black or white.
  • each LED light Separates each LED light, extract the contour information of each LED light, and find the center position of each LED (the pixel position in the image). Within each contour, the radon transform can be used to calculate the pitch of the black and white stripes, thereby calculating the blinking frequency of the LED and performing LED lamp recognition based on the blinking frequency.
  • the range that can be captured is limited, and it is difficult to capture multiple LEDs at the same time, so the orientation cannot be located. If the direction cannot be determined, the positioning accuracy will be greatly reduced.
  • the angle at which the phone takes a photo also affects the imaging position of the LED in the image.
  • Using the three-dimensional angle as another feature of LED positioning can improve the accuracy of positioning.
  • smartphones Android, IOS
  • the API for 3D tilt is open, so the 3D tilt feature is easy to obtain.
  • the first three features represent the three-dimensional tilt angle
  • a fingerprint library requires collecting data (LED positioning data) in each grid point, extracting the information in the image according to the feature format shown above, and obtaining the three-dimensional tilt angle, storing it, and each grid point. After the collection is completed, the LED fingerprint library can be constructed. Unlike WiFi positioning, only data is collected once at each location because the data obtained by the camera is relatively stable.
  • the method is the same as WiFi positioning.
  • the LED positioning also selects the SVM classifier, but the feature dimension is different (WiFi positioning 4D features, LED positioning 11-dimensional features).
  • regression regression
  • the mobile phone automatically takes a photo, recognizes the LED according to the image processing method described above, and then acquires the three-dimensional tilt angle to jointly form the 11-dimensional feature. It is possible to input the LED classifier constructed in (3) and output a predicted positioning result based on the LED positioning.
  • LED positioning is directly dependent on the position of the LED in the image, and the LED is sometimes invisible, that is, the mobile phone camera can not capture the LED, and therefore can not get the positioning result, then it needs to rely more on WiFi positioning.
  • ⁇ (x r (i)) represents the squared error of the predicted value coordinate x r (i) of the i-th acquired sample at the lattice point r and the true coordinate x r .
  • the predicted value coordinate x r (i) is predicted by the classifier obtained above, and the real coordinate x r is obtained by actual measurement.
  • the grid coordinates predicted by the system are (1, 2), and the actual grid coordinates are (1, 1), then Therefore, if the index is small, that is, the closer the predicted position and the real position are, the better the positioning accuracy of the system is represented.
  • Equation (2) is the weight calculation formula, and argmin is the w rj value obtained by the minimum of the above formula.
  • N is the number of samples collected at grid point r
  • r represents the grid location
  • j represents the fingerprint library
  • the weight coefficient of the fingerprint library j at the grid point r can be calculated. Specifically, in the offline stage, assuming that we have collected the WiFi location fingerprint database and the LED location fingerprint database, we now take 80% of the data in the fingerprint library for classifier training, and the remaining 20% of the data is used to calculate the weight value. .
  • 2 , 0 ⁇ w ⁇ 1 to be the smallest. In this example, w 0.5, that is, when we take this value, we can make ⁇ (w*x1) the smallest, which is 0.
  • w 11 refers to the optimization weight of the WiFI positioning of the grid 1
  • w 12 refers to the optimized weight of the LED positioning of the grid 1 . That is to say, each grid point can calculate the optimization weight of the corresponding WiFi positioning and the optimization weight of the LED positioning by the above method.
  • the positioning terminal collects data of its location
  • f j (x) refers to the most similar grid r coordinate obtained by the data collected on the line matching the fingerprint library j, and then multiplied by the weight w rj of the corresponding fingerprint corresponding to the corresponding position obtained under the line to obtain the final positioning position p.
  • the result of the positioning prediction by the WiFi classifier is (1, 2)
  • the result of the positioning prediction by the LED classifier is (2, 1)
  • the grid point in the fingerprint database that is most similar to the prediction result is found.
  • the solution in this embodiment dynamically adjusts the positioning result according to the weight, thereby improving the performance of the entire system; combining the advantages of the two positioning methods to achieve complementary advantages of different positioning methods, thereby enabling WiFi
  • the combination of positioning and visible light positioning improves the accuracy and stability of positioning.
  • an embodiment of the present disclosure also relates to a positioning system including a wireless local area network and visible light communication.
  • the positioning system comprises a positioning end, a server end and a monitoring end, wherein the positioning end is carried by the monitored target, which is used for locating the location of the target and transmitting the location information to the server end; the server side calculates the positioning result, realizes the positioning fusion, and The positioning result is sent to the monitoring end; the monitoring end is carried by the monitor, and it can view the position information of the monitored target in real time.
  • the communication system includes two parts: a wireless local area network and a visible light communication.
  • the wireless local area network includes a plurality of APs (Access Points), which transmit a WiFi signal as a transmitting end, and the mobile phone serves as a receiving end to perform wireless positioning by using signal strength.
  • APs Access Points
  • the visible light communication system includes a plurality of LED lights of different frequencies, and the mobile phone recognizes different LED lights through visible light communication for positioning.
  • the positioning system of this embodiment can also be used for multi-target positioning and monitoring, that is, one monitoring terminal mobile phone can monitor a plurality of different positioning terminals.
  • FIG. 4 The process of positioning using the system is as shown in FIG. 4, including:
  • Step 401 the positioning terminal firstly realizes the collection of the WiFi RSSI and the LED visible light signal, and the LED visible light signal is the image captured by the camera. After the image processing, the frequency and position information contained in the LED image are extracted to form the LED positioning information; The positioning terminal then sends the WiFi positioning information and the LED positioning information to the server.
  • Step 402 The server calculates a final positioning result, and performs predictive positioning on the positioning terminal according to the wireless local area network WiFi positioning signal sent by the positioning terminal, to obtain a WiFi positioning position of the positioning terminal.
  • the final positioning position of the positioning terminal is obtained according to the weight position corresponding to the WiFi positioning position, the LED positioning position, and the two positioning positions.
  • Step 403 The server sends the positioning result to the monitoring terminal, and displays the location of the positioning terminal to implement positioning.
  • the embodiment also relates to a storage medium disposed on the server side, and the storage medium may be a server, or a storage, calling, and processing device of a data installed on the server, used to establish a WiFi fingerprint database, and construct a WiFi classification. And perform WiFi positioning, establish LED fingerprint library, LED classifier and LED positioning, and use to establish weight matrix, and integrate WiFi positioning and LED positioning to determine the final positioning result.
  • the storage medium stores a positioning program for performing positioning, the program comprising:
  • the final positioning position of the positioning terminal is obtained according to the weight position corresponding to the WiFi positioning position, the LED positioning position, and the two positioning positions.
  • the positioning area is divided into a plurality of grid points in advance, the WiFi weight values corresponding to the WiFi positioning on each grid point are obtained, and the LED weight values corresponding to the LED positioning on each grid point are obtained;
  • the WiFi weight value corresponding to the grid point closest to the WiFi positioning position is used as the weight value corresponding to the WiFi positioning position; and the grid point closest to the LED positioning position is corresponding to The LED weight value is used as the weight value corresponding to the LED positioning position.
  • the WiFi weight value corresponding to the WiFi location on each grid point is obtained, including:
  • a WiFi classifier that uses the RSSI data for location prediction positioning is obtained
  • the method further includes:
  • the WiFi fingerprint library is divided into a training set and a verification set according to a set ratio
  • the support vector machine algorithm SVM nonlinear classifier is selected and trained in the Python language to obtain the WiFi classifier.
  • the positioning terminal is predicted and located, and the WiFi positioning position of the positioning terminal is obtained.
  • obtaining LED weight values corresponding to LED positioning on each grid point including:
  • the LED fingerprint library is obtained
  • an LED classifier for position prediction positioning using LED positioning data is obtained
  • the method further includes:
  • the LED fingerprint library is divided into a training set and a verification set according to a set ratio
  • the support vector machine algorithm SVM nonlinear classifier is selected and trained in the Python language to obtain the LED classifier.
  • the LED positioning data includes: a heading angle, a pitch angle, and a roll angle of the device that collects the LED positioning data, and position coordinates of the one or more LED lights captured by the device on the image.
  • the predictive positioning of the positioning terminal is performed according to the LED classifier, and the LED positioning position of the positioning terminal is obtained.
  • the embodiment of the present disclosure further relates to a storage medium, which is located at the positioning terminal side, and may be a positioning terminal, or a hardware device for data storage and processing of the positioning terminal.
  • the storage medium stores a program for acquiring an LED positioning signal, the program comprising:
  • the heading angle, the pitch angle and the roll angle of the positioning terminal, and the coordinates of the identified LED lamp in the image form a positioning signal at the position and position of the positioning terminal.
  • image processing is performed to obtain the flicker frequency of each LED lamp in the image, including:
  • the spacing of the black and white stripes is counted by the radon transform, and the blinking frequency of the LED corresponding to the contour of the graphic is calculated according to the spacing.
  • the present disclosure proposes a fusion positioning method and system based on WiFi and visible light, which combines the advantages of the two positioning methods, and realizes the complementary advantages of different positioning methods, thereby effectively combining WiFi positioning and visible light positioning, thereby improving positioning accuracy and stability.
  • the advantages of the two positioning methods based on WiFi and visible light are integrated, and the advantages of different positioning methods are complemented, thereby effectively combining the WiFi positioning and the visible light positioning, thereby improving the positioning accuracy and stability.

Abstract

A positioning method, a storage medium, and a positioning system. The positioning method comprises: performing predictive positioning of a terminal to be positioned according to a wireless local area network WiFi positioning signal sent by the terminal to be positioned, so as to obtain a WiFi-based position of the terminal to be positioned; performing predictive positioning of the terminal to be positioned according to a light-emitting diode (LED) positioning signal sent by the terminal to be positioned, so as to obtain an LED-based position of the terminal to be positioned; and obtaining the final position of the terminal to be positioned according to the WiFi-based position, the LED-based position and the weights of the two positions. The positioning method combines the advantages of the two positioning methods to achieve the complementary advantages of different positioning methods, and accordingly, the WiFi positioning and the visible light positioning are effectively combined, thereby improving the positioning precision and stability.

Description

一种定位方法、存储介质及定位系统Positioning method, storage medium and positioning system 技术领域Technical field
本公开涉及定位领域,特别是涉及一种定位方法、存储介质及定位系统。The present disclosure relates to the field of positioning, and in particular to a positioning method, a storage medium, and a positioning system.
背景技术Background technique
近年来,面向需求越来越迫切的室内位置服务,室内定位技术发展迅速,是移动互联时代的研究热点,逐步在各行各业发挥作用,给人们的日常生活带来了一定的影响。但与室外环境相比,室内环境受定位时间、定位精度及室内复杂环境等条件的限制,定位效果在实际应用中还很不理想。In recent years, indoor location services, which are increasingly urgent for demand, have developed rapidly in indoor positioning technology. They are research hotspots in the era of mobile internet, and gradually play a role in all walks of life, which has a certain impact on people's daily life. However, compared with the outdoor environment, the indoor environment is limited by the positioning time, positioning accuracy, and indoor complex environment. The positioning effect is still not ideal in practical applications.
目前,常见的室内定位的方法主要有以下几种:At present, the common methods of indoor positioning mainly include the following:
1、红外线定位1, infrared positioning
红外线定位通过室内的光学传感器接收到的红外线发射器发射出的特定红外线(Infrared Ray)后进行定位。Cambridge大学AT&T实验室开发的红外线室外定位系统Active Badge System被称为第一代的室内定位系统。Ambiplex在2011年提出了IR.Loc系统通过测量热辐射进行定位,10m范围内的定位精度达到20~30cm。The infrared ray is positioned by the infrared ray emitted by the infrared ray transmitter received by the optical sensor in the room. The Active Badge System, an infrared outdoor positioning system developed by AT&T Labs at the University of Cambridge, is known as the first generation of indoor positioning systems. Ambiplex proposed in 2011 that the IR.Loc system is positioned by measuring thermal radiation, with a positioning accuracy of 20 to 30 cm in the range of 10 m.
红外线室内定位系统的实现包含两个部分:红外线发射器和红外线接收器。通常,红外线发射器是网络的固定节点,而红外线接收器安装在待定位目标上,作为移动终端。红外线室内定位的优点是定位精度高,反应灵敏,单个器件成本低廉。The implementation of the infrared indoor positioning system consists of two parts: an infrared emitter and an infrared receiver. Usually, the infrared emitter is a fixed node of the network, and the infrared receiver is mounted on the target to be positioned as a mobile terminal. The advantages of infrared indoor positioning are high positioning accuracy, responsiveness, and low cost for a single device.
2、蓝牙室内定位2, Bluetooth indoor positioning
蓝牙室内定位根据测量终端设备信号强度通过指纹定位算法进行定位。iBeacon是苹果公司制定的专用于蓝牙定位的一种协议技术,定位精度在2~3m,购物应用Shopkick在商场中布局iBeacon应用在实际生活中,我国的“寻鹿”“广发easy go”等APP也采用该模式定位。蓝牙定位技术安全性高、成本低、功耗低、设备体积小,目前大部分手机终端都自带蓝牙模块,容易大范围的普及和部署实施。The Bluetooth indoor positioning is located by the fingerprint positioning algorithm according to the measurement terminal device signal strength. iBeacon is a protocol technology developed by Apple for Bluetooth positioning. The positioning accuracy is 2~3m. The shopping application Shopkick is deployed in the mall. iBeacon is applied in real life. China's “find deer” and “Guangfa easy go” and other APPs This mode is also used for positioning. Bluetooth positioning technology has high security, low cost, low power consumption and small size. At present, most mobile terminals have their own Bluetooth modules, which is easy to popularize and deploy.
3、射频识别定位3, radio frequency identification and positioning
射频识别(Radio Frequency Identification,简称RFID)定位技术利用射频信号进行非接触式双向通信交换数据以达到识别和定位的目的。目前,具有代表性的RFID定位系统有MIT Oxygen项目开发的Cricket系统、华盛顿大学的SpotON系统、微软公司的RADAR系统等。RFID技术传输范围大、成本很低。Radio Frequency Identification (RFID) positioning technology uses radio frequency signals for non-contact two-way communication to exchange data for identification and positioning purposes. At present, representative RFID positioning systems include the Cricket system developed by the MIT Oxygen project, the SpotON system of the University of Washington, and the RADAR system of Microsoft Corporation. RFID technology has a large transmission range and low cost.
虽然目前有很多成熟的定位方法,然而每种定位方法都有其显著的无法避免的缺点,例如,红外线定位方法限制于视距定位、红外线信息在空气中的衰减很大,只能用于短距定位、定位精度很容易受到其它光源的影响;蓝牙室内定位方法易受到外部噪声信号的干扰,信号稳定性较差,通信范围较小;射频室内定位方法作用距离短,最长只有几十米,而且射频信号不具有通信能力,只使用射频识别技术是不能进行室内定位的,必须与其他 辅助技术相结合才能完成。Although there are many mature positioning methods at present, each positioning method has its own significant unavoidable disadvantages. For example, the infrared positioning method is limited to the line of sight positioning, and the infrared information is greatly attenuated in the air, and can only be used for short The distance positioning and positioning accuracy are easily affected by other light sources; the Bluetooth indoor positioning method is susceptible to interference from external noise signals, the signal stability is poor, and the communication range is small; the RF indoor positioning method has a short working distance, and the longest is only tens of meters. Moreover, the radio frequency signal does not have the communication capability, and only the radio frequency identification technology cannot be used for indoor positioning, and must be combined with other auxiliary technologies to complete.
发明内容Summary of the invention
本公开要解决的技术问题是提供一种定位方法、存储介质及定位系统,用以解决现有技术室内定位精度不高的问题。The technical problem to be solved by the present disclosure is to provide a positioning method, a storage medium, and a positioning system, which are used to solve the problem that the positioning accuracy in the prior art is not high.
为解决上述技术问题,一方面,本公开提供一种定位方法,包括:To solve the above technical problem, in one aspect, the present disclosure provides a positioning method, including:
根据定位终端发送的无线局域网WiFi定位信号,对所述定位终端进行预测定位,得到所述定位终端的WiFi定位位置;Determining and positioning the positioning terminal according to the wireless local area network WiFi positioning signal sent by the positioning terminal, and obtaining a WiFi positioning position of the positioning terminal;
根据定位终端发送的发光二极管LED定位信号,对所述定位终端进行预测定位,得到所述定位终端的LED定位位置;Determining and positioning the positioning terminal according to the LED LED positioning signal sent by the positioning terminal, and obtaining the LED positioning position of the positioning terminal;
根据所述WiFi定位位置和LED定位位置,分别获取与上述两定位位置对应的权重值;Obtaining a weight value corresponding to the two positioning positions according to the WiFi positioning position and the LED positioning position;
根据所述WiFi定位位置、LED定位位置,以及两定位位置各自对应的权重值,得到所述定位终端最终的定位位置。The final positioning position of the positioning terminal is obtained according to the weight position corresponding to the WiFi positioning position, the LED positioning position, and the two positioning positions.
在一个实施例中,在进行定位之前,预先将定位区域划分为若干个格点,获取每个格点上基于WiFi定位对应的WiFi权重值,以及获取每个格点上基于LED定位对应的LED权重值;In an embodiment, before the positioning is performed, the positioning area is divided into a plurality of grid points in advance, the WiFi weight value corresponding to the WiFi positioning on each grid point is obtained, and the LED corresponding to the LED positioning on each grid point is obtained. Weights;
在定位过程中,将与所述WiFi定位位置最接近的格点所对应的WiFi权重值,作为所述WiFi定位位置对应的权重值;将与所述LED定位位置最接近的格点所对应的LED权重值,作为所述LED定位位置对应的权重值。In the positioning process, the WiFi weight value corresponding to the grid point closest to the WiFi positioning position is used as the weight value corresponding to the WiFi positioning position; and the grid point closest to the LED positioning position is corresponding to The LED weight value is used as the weight value corresponding to the LED positioning position.
在一个实施例中,获取每个格点上基于WiFi定位对应的WiFi权重值,包括:In an embodiment, the WiFi weight value corresponding to the WiFi location on each grid point is obtained, including:
根据在每个格点上采集的设定次数的接收信号强度指示RSSI数据,得到WiFi指纹库;Obtaining a WiFi fingerprint database according to the received signal strength of the set number of times collected at each grid point indicating the RSSI data;
根据WiFi指纹库,得到利用RSSI数据进行位置预测定位的WiFi分类器;According to the WiFi fingerprint library, a WiFi classifier that uses the RSSI data for location prediction positioning is obtained;
利用公式(2)、(3)计算每个格点上基于WiFi定位对应的WiFi权重值w r1Calculating the WiFi weight value w r1 corresponding to the WiFi location on each grid point using equations (2) and (3);
Figure PCTCN2018092439-appb-000001
Figure PCTCN2018092439-appb-000001
ε(x r(i))=||x r(i)-x r|| 2  公式(3) ε(x r (i))=||x r (i)-x r || 2 Formula (3)
其中,argmin表示公式(2)最小取得的w r1值;ε(x r(i))表示在格点r的第i个采集数据的预测定位坐标x r(i)与真实位置坐标x r的平方误差;N是在格点r采集样本个数,r代表格点编号,r=1,…,R。 Where argmin represents the minimum obtained w r1 value of equation (2); ε(x r (i)) represents the predicted positioning coordinate x r (i) of the i-th collected data at grid point r and the true position coordinate x r Square error; N is the number of samples collected at grid point r, r is the grid number, r = 1, ..., R.
在一个实施例中,所述方法还包括:In an embodiment, the method further includes:
得到WiFi指纹库之后,按照设定比例将WiFi指纹库划分为训练集和验证集;After obtaining the WiFi fingerprint database, the WiFi fingerprint library is divided into a training set and a verification set according to a set ratio;
选择支持向量机算法SVM非线性分类器,利用Python语言进行训练,得到所述WiFi分类器。The support vector machine algorithm SVM nonlinear classifier is selected and trained in the Python language to obtain the WiFi classifier.
在一个实施例中,根据所述WiFi分类器,对所述定位终端进行预测定位,得到所述 定位终端的WiFi定位位置。In an embodiment, the positioning terminal is predicted and located according to the WiFi classifier, and the WiFi positioning position of the positioning terminal is obtained.
在一个实施例中,获取每个格点上基于LED定位对应的LED权重值,包括:In one embodiment, the LED weight values corresponding to the LED positioning on each grid point are obtained, including:
根据在每个格点上采集的LED定位数据,得到LED指纹库;According to the LED positioning data collected at each grid point, the LED fingerprint library is obtained;
根据LED指纹库,得到利用LED定位数据进行位置预测定位的LED分类器;According to the LED fingerprint library, an LED classifier for position prediction positioning using LED positioning data is obtained;
利用公式(3)(4)计算每个格点上基于LED定位对应的LED权重值w r2Calculate the LED weight value w r2 corresponding to the LED positioning on each grid point using equations (3) and (4);
Figure PCTCN2018092439-appb-000002
Figure PCTCN2018092439-appb-000002
ε(x r(i))=||x r(i)-x r|| 2   公式(3) ε(x r (i))=||x r (i)-x r || 2 Formula (3)
其中,argmin表示公式(2)最小取得的w r2值;ε(x r(i))表示在格点r的第i个采集数据的预测定位坐标x r(i)与真实位置坐标x r的平方误差;N是在格点r采集样本个数,r代表格点编号,r=1,…,R。 Where argmin represents the minimum obtained w r2 value of equation (2); ε(x r (i)) represents the predicted positioning coordinate x r (i) of the i-th collected data at grid point r and the true position coordinate x r Square error; N is the number of samples collected at grid point r, r is the grid number, r = 1, ..., R.
在一个实施例中,所述方法还包括:In an embodiment, the method further includes:
得到LED指纹库之后,按照设定比例将LED指纹库划分为训练集和验证集;After obtaining the LED fingerprint library, the LED fingerprint library is divided into a training set and a verification set according to a set ratio;
选择支持向量机算法SVM非线性分类器,利用Python语言进行训练,得到所述LED分类器。The support vector machine algorithm SVM nonlinear classifier is selected and trained in the Python language to obtain the LED classifier.
在一个实施例中,所述LED定位数据包括:采集所述LED定位数据的设备的航向角、俯仰角和横滚角,以及所述设备拍摄的一个或多个LED灯在图像上的位置坐标。In one embodiment, the LED positioning data includes: a heading angle, a pitch angle, and a roll angle of the device that collects the LED positioning data, and position coordinates of one or more LED lights captured by the device on the image. .
在一个实施例中,根据所述LED分类器,对所述定位终端进行预测定位,得到所述定位终端的LED定位位置。In an embodiment, according to the LED classifier, the positioning terminal is predicted and positioned to obtain an LED positioning position of the positioning terminal.
在一个实施例中,所述定位终端最终的定位位置通过公式(1)求得:In one embodiment, the final positioning position of the positioning terminal is obtained by formula (1):
Figure PCTCN2018092439-appb-000003
Figure PCTCN2018092439-appb-000003
其中,p表示所述定位终端最终的定位位置;j=1,2;f 1(x)表示格点r处基于WiFi定位得到的预测定位位置;f 2(x)表示格点r处基于LED定位得到的预测定位位置;w r1表示格点r处基于WiFi定位对应的权重值;w r2表示格点r处基于LED定位对应的权重值。 Where p denotes the final positioning position of the positioning terminal; j=1, 2; f 1 (x) denotes a predicted positioning position based on WiFi positioning at the grid point r; f 2 (x) denotes an LED based on the grid point r The predicted positioning position obtained by the positioning; w r1 represents the weight value corresponding to the WiFi positioning at the grid point r; w r2 represents the weight value corresponding to the LED positioning at the grid point r.
另一方面,本公开还提供一种LED定位信号的获取方法,包括In another aspect, the present disclosure also provides a method for acquiring an LED positioning signal, including
利用定位终端拍摄包括LED灯的图像;Using an positioning terminal to capture an image including an LED light;
进行图像处理,获取图像中各个LED灯的闪烁频率,根据所述闪烁频率对被拍摄的LED灯识别;Performing image processing to acquire a blinking frequency of each LED light in the image, and identifying the captured LED light according to the blinking frequency;
获取识别的LED灯在图像中的坐标,以及获取定位终端的航向角、俯仰角和横滚角;Obtaining coordinates of the identified LED light in the image, and obtaining a heading angle, a pitch angle, and a roll angle of the positioning terminal;
由定位终端的航向角、俯仰角和横滚角,以及被识别的LED灯在图像中的坐标,构成定位终端再其位置格点处的定位信号。The heading angle, the pitch angle and the roll angle of the positioning terminal, and the coordinates of the identified LED lamp in the image form a positioning signal at the position and position of the positioning terminal.
在一个实施例中,进行图像处理,获取图像中各个LED灯的闪烁频率,包括:In one embodiment, image processing is performed to obtain a blinking frequency of each LED light in the image, including:
将彩色图像转换为灰度图像;Converting a color image to a grayscale image;
依次进行图像模糊处理、二值化处理;Perform image blurring and binarization processing in sequence;
分离出图像中每一个LED灯对应的图形,提取每一个图形的轮廓信息,并找出中心位置;Separating the graphics corresponding to each LED light in the image, extracting the contour information of each graphic, and finding the center position;
在每个图形轮廓内,通过radon变换,统计出黑白条纹的间距,根据所述间距计算出该图形轮廓对应的LED的闪烁频率。Within each contour of the graph, the spacing of the black and white stripes is counted by the radon transform, and the blinking frequency of the LED corresponding to the contour of the graphic is calculated according to the spacing.
另一方面,本公开还提供一种存储介质,所述存储介质存储有用于进行定位的定位程序,所述程序包括:In another aspect, the present disclosure also provides a storage medium storing a positioning program for performing positioning, the program comprising:
根据定位终端发送的无线局域网WiFi定位信号,对所述定位终端进行预测定位,得到所述定位终端的WiFi定位位置;Determining and positioning the positioning terminal according to the wireless local area network WiFi positioning signal sent by the positioning terminal, and obtaining a WiFi positioning position of the positioning terminal;
根据定位终端发送的发光二极管LED定位信号,对所述定位终端进行预测定位,得到所述定位终端的LED定位位置;Determining and positioning the positioning terminal according to the LED LED positioning signal sent by the positioning terminal, and obtaining the LED positioning position of the positioning terminal;
根据所述WiFi定位位置和LED定位位置,分别获取与上述两定位位置对应的权重值;Obtaining a weight value corresponding to the two positioning positions according to the WiFi positioning position and the LED positioning position;
根据所述WiFi定位位置、LED定位位置,以及两定位位置各自对应的权重值,得到所述定位终端最终的定位位置。The final positioning position of the positioning terminal is obtained according to the weight position corresponding to the WiFi positioning position, the LED positioning position, and the two positioning positions.
在一个实施例中,在进行定位之前,预先将定位区域划分为若干个格点,获取每个格点上基于WiFi定位对应的WiFi权重值,以及获取每个格点上基于LED定位对应的LED权重值;In an embodiment, before the positioning is performed, the positioning area is divided into a plurality of grid points in advance, the WiFi weight value corresponding to the WiFi positioning on each grid point is obtained, and the LED corresponding to the LED positioning on each grid point is obtained. Weights;
在定位过程中,将与所述WiFi定位位置最接近的格点所对应的WiFi权重值,作为所述WiFi定位位置对应的权重值;将与所述LED定位位置最接近的格点所对应的LED权重值,作为所述LED定位位置对应的权重值。In the positioning process, the WiFi weight value corresponding to the grid point closest to the WiFi positioning position is used as the weight value corresponding to the WiFi positioning position; and the grid point closest to the LED positioning position is corresponding to The LED weight value is used as the weight value corresponding to the LED positioning position.
在一个实施例中,获取每个格点上基于WiFi定位对应的WiFi权重值,包括:In an embodiment, the WiFi weight value corresponding to the WiFi location on each grid point is obtained, including:
根据在每个格点上采集的设定次数的接收信号强度指示RSSI数据,得到WiFi指纹库;Obtaining a WiFi fingerprint database according to the received signal strength of the set number of times collected at each grid point indicating the RSSI data;
根据WiFi指纹库,得到利用RSSI数据进行位置预测定位的WiFi分类器;According to the WiFi fingerprint library, a WiFi classifier that uses the RSSI data for location prediction positioning is obtained;
利用公式(2)、(3)计算每个格点上基于WiFi定位对应的WiFi权重值w r1Calculating the WiFi weight value w r1 corresponding to the WiFi location on each grid point using equations (2) and (3);
Figure PCTCN2018092439-appb-000004
Figure PCTCN2018092439-appb-000004
ε(x r(i))=||x r(i)-x r|| 2  公式(3) ε(x r (i))=||x r (i)-x r || 2 Formula (3)
其中,argmin表示公式(2)最小取得的w r1值;ε(x r(i))表示在格点r的第i个采集数据的预测定位坐标x r(i)与真实位置坐标x r的平方误差;N是在格点r采集样本个数,r代表格点编号,r=1,…,R。 Where argmin represents the minimum obtained w r1 value of equation (2); ε(x r (i)) represents the predicted positioning coordinate x r (i) of the i-th collected data at grid point r and the true position coordinate x r Square error; N is the number of samples collected at grid point r, r is the grid number, r = 1, ..., R.
在一个实施例中,所述程序包括:In one embodiment, the program includes:
得到WiFi指纹库之后,按照设定比例将WiFi指纹库划分为训练集和验证集;After obtaining the WiFi fingerprint database, the WiFi fingerprint library is divided into a training set and a verification set according to a set ratio;
选择支持向量机算法SVM非线性分类器,利用Python语言进行训练,得到所述WiFi分类器。The support vector machine algorithm SVM nonlinear classifier is selected and trained in the Python language to obtain the WiFi classifier.
在一个实施例中,根据所述WiFi分类器,对所述定位终端进行预测定位,得到所述 定位终端的WiFi定位位置。In an embodiment, the positioning terminal is predicted and located according to the WiFi classifier, and the WiFi positioning position of the positioning terminal is obtained.
在一个实施例中,获取每个格点上基于LED定位对应的LED权重值,包括:In one embodiment, the LED weight values corresponding to the LED positioning on each grid point are obtained, including:
根据在每个格点上采集的LED定位数据,得到LED指纹库;According to the LED positioning data collected at each grid point, the LED fingerprint library is obtained;
根据LED指纹库,得到利用LED定位数据进行位置预测定位的LED分类器;According to the LED fingerprint library, an LED classifier for position prediction positioning using LED positioning data is obtained;
利用公式(3)(4)计算每个格点上基于LED定位对应的LED权重值w r2Calculate the LED weight value w r2 corresponding to the LED positioning on each grid point using equations (3) and (4);
Figure PCTCN2018092439-appb-000005
Figure PCTCN2018092439-appb-000005
ε(x r(i))=||x r(i)-x r|| 2  公式(3) ε(x r (i))=||x r (i)-x r || 2 Formula (3)
其中,argmin表示公式(2)最小取得的w r2值;ε(x r(i))表示在格点r的第i个采集数据的预测定位坐标x r(i)与真实位置坐标x r的平方误差;N是在格点r采集样本个数,r代表格点编号,r=1,…,R。 Where argmin represents the minimum obtained w r2 value of equation (2); ε(x r (i)) represents the predicted positioning coordinate x r (i) of the i-th collected data at grid point r and the true position coordinate x r Square error; N is the number of samples collected at grid point r, r is the grid number, r = 1, ..., R.
在一个实施例中,所述程序还包括:In one embodiment, the program further comprises:
得到LED指纹库之后,按照设定比例将LED指纹库划分为训练集和验证集;After obtaining the LED fingerprint library, the LED fingerprint library is divided into a training set and a verification set according to a set ratio;
选择支持向量机算法SVM非线性分类器,利用Python语言进行训练,得到所述LED分类器。The support vector machine algorithm SVM nonlinear classifier is selected and trained in the Python language to obtain the LED classifier.
在一个实施例中,所述LED定位数据包括:采集所述LED定位数据的设备的航向角、俯仰角和横滚角,以及所述设备拍摄的一个或多个LED灯在图像上的位置坐标。In one embodiment, the LED positioning data includes: a heading angle, a pitch angle, and a roll angle of the device that collects the LED positioning data, and position coordinates of one or more LED lights captured by the device on the image. .
在一个实施例中,根据所述LED分类器,对所述定位终端进行预测定位,得到所述定位终端的LED定位位置。In an embodiment, according to the LED classifier, the positioning terminal is predicted and positioned to obtain an LED positioning position of the positioning terminal.
在一个实施例中,所述定位终端最终的定位位置通过公式(1)求得:In one embodiment, the final positioning position of the positioning terminal is obtained by formula (1):
Figure PCTCN2018092439-appb-000006
Figure PCTCN2018092439-appb-000006
其中,p表示所述定位终端最终的定位位置;j=1,2;f 1(x)表示格点r处基于WiFi定位得到的预测定位位置;f 2(x)表示格点r处基于LED定位得到的预测定位位置;w r1表示格点r处基于WiFi定位对应的权重值;w r2表示格点r处基于LED定位对应的权重值。 Where p denotes the final positioning position of the positioning terminal; j=1, 2; f 1 (x) denotes a predicted positioning position based on WiFi positioning at the grid point r; f 2 (x) denotes an LED based on the grid point r The predicted positioning position obtained by the positioning; w r1 represents the weight value corresponding to the WiFi positioning at the grid point r; w r2 represents the weight value corresponding to the LED positioning at the grid point r.
另一方面,本公开还提供一种存储介质,所述存储介质存储有用于获取LED定位信号的程序,所述程序包括:In another aspect, the present disclosure also provides a storage medium storing a program for acquiring an LED positioning signal, the program comprising:
利用定位终端拍摄包括LED灯的图像;Using an positioning terminal to capture an image including an LED light;
进行图像处理,获取图像中各个LED灯的闪烁频率,根据所述闪烁频率对被拍摄的LED灯识别;Performing image processing to acquire a blinking frequency of each LED light in the image, and identifying the captured LED light according to the blinking frequency;
获取识别的LED灯在图像中的坐标,以及获取定位终端的航向角、俯仰角和横滚角;Obtaining coordinates of the identified LED light in the image, and obtaining a heading angle, a pitch angle, and a roll angle of the positioning terminal;
由定位终端的航向角、俯仰角和横滚角,以及被识别的LED灯在图像中的坐标,构成定位终端再其位置格点处的定位信号。The heading angle, the pitch angle and the roll angle of the positioning terminal, and the coordinates of the identified LED lamp in the image form a positioning signal at the position and position of the positioning terminal.
在一个实施例中,进行图像处理,获取图像中各个LED灯的闪烁频率,包括:In one embodiment, image processing is performed to obtain a blinking frequency of each LED light in the image, including:
将彩色图像转换为灰度图像;Converting a color image to a grayscale image;
依次进行图像模糊处理、二值化处理;Perform image blurring and binarization processing in sequence;
分离出图像中每一个LED灯对应的图形,提取每一个图形的轮廓信息,并找出中心位置;Separating the graphics corresponding to each LED light in the image, extracting the contour information of each graphic, and finding the center position;
在每个图形轮廓内,通过radon变换,统计出黑白条纹的间距,根据所述间距计算出该图形轮廓对应的LED的闪烁频率。Within each contour of the graph, the spacing of the black and white stripes is counted by the radon transform, and the blinking frequency of the LED corresponding to the contour of the graphic is calculated according to the spacing.
再一方面,本公开还提供一种定位系统,包括布置在定位区域内的多个无线路由器、多个LED灯,以及定位终端、监控终端和服务器:In still another aspect, the present disclosure also provides a positioning system including a plurality of wireless routers disposed in a positioning area, a plurality of LED lights, and a positioning terminal, a monitoring terminal, and a server:
所述定位终端采集其位置格点的WiFi定位信号和LED定位信号,并发送给服务器;The positioning terminal collects the WiFi positioning signal and the LED positioning signal of the location grid point, and sends the positioning signal to the server;
服务器根据所述WiFi定位信号和LED定位信号,对定位终端进行定位,并将定位信息发送给监控终端;The server locates the positioning terminal according to the WiFi positioning signal and the LED positioning signal, and sends the positioning information to the monitoring terminal;
监控终端接收定位信息,显示所述定位终端的位置。The monitoring terminal receives the positioning information and displays the location of the positioning terminal.
在一个实施例中,所述服务器包括存储有用于融合定位程序的存储介质。In one embodiment, the server includes a storage medium storing a fusion locator.
在一个实施例中,所述定位终端包括上述存储有用于图像处理程序的存储介质。In one embodiment, the positioning terminal includes the storage medium stored above for an image processing program.
在一个实施例中,所述LED的灯光调制为方波信号,各个LED灯的调制频率不同。In one embodiment, the LEDs are modulated to a square wave signal, and the modulation frequencies of the individual LED lamps are different.
本公开有益效果如下:The beneficial effects of the disclosure are as follows:
本公开提出了一种基于WiFi和可见光的融合定位方法及系统,融合了两种定位方法的优点,实现不同定位方法的优势互补,从而将WiFi定位和可见光定位有效结合,提升了定位的精度和稳定性。The present disclosure proposes a fusion positioning method and system based on WiFi and visible light, which combines the advantages of the two positioning methods, and realizes the complementary advantages of different positioning methods, thereby effectively combining WiFi positioning and visible light positioning, thereby improving positioning accuracy and stability.
附图说明DRAWINGS
在附图(其不一定是按比例绘制的)中,相似的附图标记可在不同的视图中描述相似的部件。具有不同字母后缀的相似附图标记可表示相似部件的不同示例。附图以示例而非限制的方式大体示出了本文中所讨论的各个实施例。In the drawings, which are not necessarily to scale, the Like reference numerals with different letter suffixes may indicate different examples of similar components. The drawings generally illustrate the various embodiments discussed herein by way of example and not limitation.
图1是本公开实施例中实际拍摄的LED灯的效果图;1 is an effect diagram of an LED lamp actually photographed in an embodiment of the present disclosure;
图2是本公开实施例中拍摄不同频率的LED灯的效果图;2 is an effect diagram of photographing LED lamps of different frequencies in an embodiment of the present disclosure;
图3是本公开实施例中定位系统的结构示意图;3 is a schematic structural view of a positioning system in an embodiment of the present disclosure;
图4是本公开实施例中进行定位的流程图。4 is a flow chart of positioning in an embodiment of the present disclosure.
具体实施方式Detailed ways
以下结合附图以及实施例,对本公开进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本公开,并不限定本公开。The present disclosure will be further described in detail below in conjunction with the drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the disclosure and are not intended to be limiting.
实施例一Embodiment 1
本公开实施例提出了一种基于WiFi和可见光的动态指纹融合定位方法。The embodiment of the present disclosure proposes a dynamic fingerprint fusion positioning method based on WiFi and visible light.
在定位之前,要分别构建进行WiFi定位和LED定位的分类器,然后构建进行融合定位的系统,此过程,本实施例称之为“离线阶段”。利用构建的系统,进行融合定位的过 程,本过程称之为“在线阶段”。Before the positioning, a classifier for performing WiFi positioning and LED positioning is separately constructed, and then a system for performing fusion positioning is constructed. This process is referred to as an "offline phase" in this embodiment. Using the built system to perform the process of fusion positioning, this process is called the “online phase”.
因此,本实施例包括两大部分,第一部分是分别构造WiFi分类器和LED分类器,以及将两种定位方法融合一起的融合定位系统。第二部分是利用构建好的WiFi分类器和LED分类器,以及融合定位系统,进行具体的定位。Therefore, the embodiment includes two major parts, and the first part is a fusion positioning system that separately constructs a WiFi classifier and an LED classifier, and fuses the two positioning methods together. The second part is to use the built-in WiFi classifier and LED classifier, as well as the fusion positioning system for specific positioning.
首先,描述WiFi分类器的构造步骤:First, the construction steps of the WiFi classifier are described:
(1)建立WiFi指纹库(1) Establish a WiFi fingerprint library
在房间内(定位区域)部署四台无线路由器,分别放置在不同角落。在“离线阶段”,先将房间划分为不同格点,房间首先被划分为6*8=48个格点,在本例中,格点大小为1m×1m。Four wireless routers are deployed in the room (positioning area), placed in different corners. In the "offline phase", the room is first divided into different grid points, and the room is first divided into 6*8=48 grid points. In this example, the grid point size is 1m×1m.
然后在不同格点采集WiFi RSSI数据,持手机(定位终端)站在某个格点中,控制手机开始采集数据,并打上对应的标签(即格点编号:1,2,…48),保存到文件中。分别在48个格点中采集,在每个格点采集100组RSSI数据,每一组数据包含4个路由器的RSSI信息,因此获得了48*100*4的WiFi指纹库。Then collect WiFi RSSI data at different grid points, hold the mobile phone (positioning terminal) in a grid point, control the mobile phone to start collecting data, and put the corresponding label (ie grid number: 1, 2, ... 48), save Go to the file. Collected in 48 grid points, 100 sets of RSSI data are collected at each grid point, and each group of data contains RSSI information of 4 routers, thus obtaining a 48*100*4 WiFi fingerprint library.
(2)构造分类器(2) Constructing a classifier
在得到WiFi指纹库之后,就可以进行训练,构建分类器了。我们选择Python语言进行处理,以Python中强大的机器学习库Scikit-Learn为基础,先将指纹库按照9:1划分为训练集(Train set)和验证集(Validation set),以避免过拟合。由于该模型的特征不是线性可分的,因此要选择非线性分类器,此处我们选择的是支持向量机算法(SVM,Support Vector Machine)模型进行训练,得到WiFi定位的WiFi分类器。由于数据量比较小,几十秒内可以训练完成。After getting the WiFi fingerprint library, you can train and build the classifier. We choose the Python language for processing. Based on the powerful machine learning library Scikit-Learn in Python, we first divide the fingerprint database into a training set (Train set) and a validation set (Validation set) according to 9:1 to avoid overfitting. . Since the characteristics of the model are not linearly separable, we choose the nonlinear classifier. Here we choose the Support Vector Machine (SVM) model to train and get the WiFi-based WiFi classifier. Due to the small amount of data, training can be completed in tens of seconds.
得到WiFi分类器之后,将每次新采集的RSSI数据输入WiFi分类器,就可以得到该RSSI数据采集位置的一个预测定位结果,该定位结果就可以将目标位置定位到具体的格点中。After the WiFi classifier is obtained, each newly acquired RSSI data is input into the WiFi classifier, and a predicted positioning result of the RSSI data collection location is obtained, and the positioning result can locate the target location into a specific grid point.
其次,描述LED分类器的构造步骤:Second, describe the construction steps of the LED classifier:
(1)设置LED灯(1) Set the LED light
在定位区域内设置多个LED灯,并记录各个LED灯的位置;将LED灯光调制为方波信号(高于100Hz的方波,人眼觉察不到闪烁,不会造成视觉不适的影响,只是会适当降低亮度,并且方波信号容易处理,抗干扰能力强),通常调制为200Hz-4000Hz,且使各个LED灯被调制为不同的频率。Set a plurality of LED lights in the positioning area, and record the position of each LED light; modulate the LED light into a square wave signal (a square wave higher than 100 Hz, the human eye does not notice the flicker, and does not cause visual discomfort, but only The brightness will be appropriately reduced, and the square wave signal is easy to handle, and the anti-interference ability is strong), usually modulated to 200 Hz-4000 Hz, and each LED lamp is modulated to a different frequency.
需要说明的是,由于需要利用定位终端拍照来采集LED位置信息,而且拍照后还需要进行图像处理,因此LED的发光面积越大,识别效果就越好,因此本方案选择了圆形面板灯(如果是普通灯,则可通过加灯罩的方式,扩大发光面积)。It should be noted that, because the positioning position of the LED is required to collect the position information of the LED, and the image processing is required after the photographing, the larger the light-emitting area of the LED, the better the recognition effect. Therefore, the circular panel light is selected in this scheme. If it is a normal lamp, the light-emitting area can be enlarged by adding a lamp cover.
另外,为了便于图像处理,定位终端设置摄像头曝光时间(快门)(普通手机摄像头均可以调节曝光时间),使拍出的图像中LED灯呈现出明暗相间的条纹;其余物体在图像上将会呈现为黑色背景(由于曝光时间较短,天花板、家具等不发光物体在图像中形成“漆 黑一片”的效果),这就更有利于进行图像处理。如图1所示。In addition, in order to facilitate image processing, the positioning terminal sets the camera exposure time (shutter) (the normal mobile phone camera can adjust the exposure time), so that the LED lights in the captured image show light and dark stripes; the remaining objects will be presented on the image. It is a black background (due to the short exposure time, the effect of non-illuminating objects such as ceilings and furniture forming a "blackout" in the image), which is more advantageous for image processing. As shown in Figure 1.
(2)建立指纹库(2) Establish a fingerprint library
构造分类器需要先提取特征,在“WiFi定位环节中”,特征直接可得,即RSSI的值。在LED定位中,拍摄的图片数据量很大,而真正有用的信息很少,因此需要对图片就能进行预处理,提取特征,指纹库存储的是特征,而不是整张图片。The structure classifier needs to extract features first. In the "WiFi positioning link", the feature is directly available, that is, the value of RSSI. In the LED positioning, the amount of image data captured is very large, and the really useful information is very small, so it is necessary to pre-process the image, extract the feature, and the fingerprint library stores the feature instead of the entire image.
每个LED灯的频率均不同,在拍摄的图像中的表现为条纹间距(宽度对应于所调制的频率)不同,如图2所示,因此,通过图像处理,就可以识别出灯图像所对应的频率,就等于识别出了LED灯。每个LED灯的位置坐标是固定的,因此不同LED灯在图像中的成像位置,即可成为定位的特征。The frequency of each LED lamp is different, and the performance in the captured image is that the stripe pitch (width corresponds to the modulated frequency) is different, as shown in FIG. 2, therefore, by image processing, the corresponding image of the lamp can be identified. The frequency is equal to the identification of the LED light. The position coordinates of each LED lamp are fixed, so the imaging position of different LED lights in the image can be a feature of positioning.
通过图像处理,进行LED灯识别的流程如下:The process of LED lamp recognition through image processing is as follows:
1、将拍摄的彩色照片转换为灰度图像,提高处理速度的同时也可以去除干扰。1. Convert the captured color photos into grayscale images to increase the processing speed while removing interference.
2、对图像进行模糊处理(提升LED分离准确度),并进行二值化处理,以方便分离出每个LED灯;二值化处理是设定一个全局的阈值T,用T将图像的数据分成两部分:大于T的像素群和小于T的像素群。将大于T的像素群的像素值设定为白色或者黑色,小于T的像素群的像素值设定为黑色或者白色。2. Blurring the image (improving the accuracy of LED separation) and performing binarization processing to separate each LED lamp; binarization processing is to set a global threshold T, and use T to image the data. Divided into two parts: a pixel group larger than T and a pixel group smaller than T. The pixel value of the pixel group larger than T is set to white or black, and the pixel value of the pixel group smaller than T is set to black or white.
3、分离出每个LED灯,提取每个LED灯的轮廓信息,并找出每个LED的中心位置(在图像中的像素点位置)。在每个轮廓内,通过radon变换,可以统计出黑白条纹的间距,由此计算出LED的闪烁频率,根据闪烁频率进行LED灯识别。3. Separate each LED light, extract the contour information of each LED light, and find the center position of each LED (the pixel position in the image). Within each contour, the radon transform can be used to calculate the pitch of the black and white stripes, thereby calculating the blinking frequency of the LED and performing LED lamp recognition based on the blinking frequency.
由于摄像头视角有限,能拍摄到的范围有限,很难同时拍摄到多个LED,因此无法定位方向,如果不能确定方向,定位精度就会大打折扣。而手机拍摄照片时的角度也会影响LED在图像中的成像位置。为了提高定位精度,可以利用智能手机的电子罗盘和陀螺仪,得到手机的三维倾角,即航向角(Yaw)、俯仰角(Pitch)、横滚角(Roll)。将三维角度作为LED定位的另一特征,可以提高定位的精度。在智能手机(Android、IOS)中,均开放了三维倾角的API,因此,三维倾角特征很容易就能获取。Due to the limited viewing angle of the camera, the range that can be captured is limited, and it is difficult to capture multiple LEDs at the same time, so the orientation cannot be located. If the direction cannot be determined, the positioning accuracy will be greatly reduced. The angle at which the phone takes a photo also affects the imaging position of the LED in the image. In order to improve the positioning accuracy, you can use the electronic compass and gyroscope of the smartphone to get the three-dimensional tilt angle of the mobile phone, namely the heading angle (Yaw), the pitch angle (Pitch), and the roll angle (Roll). Using the three-dimensional angle as another feature of LED positioning can improve the accuracy of positioning. In smartphones (Android, IOS), the API for 3D tilt is open, so the 3D tilt feature is easy to obtain.
因此,构建LED指纹库,每一条特征包含的信息如表1所示:Therefore, to build an LED fingerprint library, the information contained in each feature is shown in Table 1:
表1Table 1
YawYaw PitchPitch RollRoll X1X1 Y1Y1 X2X2 Y2Y2 X3X3 Y3Y3 X4X4 Y4Y4
其中,前三项特征表示三维倾角,Xi和Yi分别表示标号为i的LED灯在图像中的成像位置(即在图像中的像素点坐标,均为正数),如果标号为i的LED没有出现在图像中,则令Xi=Yi=-1。Wherein, the first three features represent the three-dimensional tilt angle, and Xi and Yi respectively represent the imaging position of the LED lamp labeled i in the image (ie, the pixel coordinates in the image are positive numbers), if the LED labeled i does not Appear in the image, then let Xi = Yi = -1.
例如,当Yaw=10.0,Pitch=20.0,Roll=30.0,图像中只出现了3号LED,且3号LED在图像中的位置为(500,800)。则特征表示如表2所示:For example, when Yaw=10.0, Pitch=20.0, Roll=30.0, only the 3rd LED appears in the image, and the position of the 3rd LED in the image is (500,800). The feature representation is shown in Table 2:
表2Table 2
YawYaw PitchPitch RollRoll X1X1 Y1Y1 X2X2 Y2Y2 X3X3 Y3Y3 X4X4 Y4Y4
10.010.0 20.020.0 30.030.0 -1-1 -1-1 -1-1 -1-1 500500 800800 -1-1 -1-1
同WiFi定位一样,构建指纹库就需要在每个格点中采集数据(LED定位数据),按照上述所示的特征格式,提取图片中的信息,并获得三维倾角,存储起来,每个格点都采集完毕后,就可以构成LED指纹库。与WiFi定位不同的是,在每个位置只需要采集一次数据,因为摄像头所得到的数据比较稳定。As with WiFi positioning, building a fingerprint library requires collecting data (LED positioning data) in each grid point, extracting the information in the image according to the feature format shown above, and obtaining the three-dimensional tilt angle, storing it, and each grid point. After the collection is completed, the LED fingerprint library can be constructed. Unlike WiFi positioning, only data is collected once at each location because the data obtained by the camera is relatively stable.
(3)构造LED分类器(3) Construction of LED classifier
同WiFi定位一样,在得到指纹库之后,需要进行训练,构造分类器。方法同WiFi定位一样,LED定位同样选择SVM分类器,只不过特征维数不同(WiFi定位4维特征,LED定位11维特征)。通过机器学习中的回归(Regression)算法,求出LED定位数据与预测的位置定位之间的映射关系,即得到LED分类器。As with WiFi positioning, after obtaining the fingerprint library, training is required to construct the classifier. The method is the same as WiFi positioning. The LED positioning also selects the SVM classifier, but the feature dimension is different (WiFi positioning 4D features, LED positioning 11-dimensional features). Through the regression (regression) algorithm in machine learning, the mapping relationship between the LED positioning data and the predicted positional positioning is obtained, that is, the LED classifier is obtained.
在实际定位中,手机自动拍摄照片,按照上文所述的图像处理方法,识别LED,然后获取三维倾角,共同构成11维特征。就可以输入(3)中构造的LED分类器,会输出一个基于LED定位的预测定位结果。In the actual positioning, the mobile phone automatically takes a photo, recognizes the LED according to the image processing method described above, and then acquires the three-dimensional tilt angle to jointly form the 11-dimensional feature. It is possible to input the LED classifier constructed in (3) and output a predicted positioning result based on the LED positioning.
LED定位直接依赖于LED在图像中出现的位置,而LED有时不可见,即手机摄像头拍不到LED,而因此无法得出定位结果,此时就需要更多地依赖于WiFi定位。LED positioning is directly dependent on the position of the LED in the image, and the LED is sometimes invisible, that is, the mobile phone camera can not capture the LED, and therefore can not get the positioning result, then it needs to rely more on WiFi positioning.
最后,融合上述两种定位方法的流程如下:Finally, the process of combining the above two positioning methods is as follows:
首先,设置融合指标ε(x r(i)): First, set the fusion indicator ε(x r (i)):
ε(x r(i))=||x r(i)-x r|| 2   (1) ε(x r (i))=||x r (i)-x r || 2 (1)
ε(x r(i))代表在格点r的第i个采集样本的预测值坐标x r(i)与真实坐标x r的平方误差。其中,预测值坐标x r(i)由上述得到的分类器进行预测得到,而真实坐标x r则由实际测量得到。比如,在实际定位中系统预测出的格点坐标为(1,2),而真实的格点坐标为(1,1),那么
Figure PCTCN2018092439-appb-000007
所以,这个指标若小,即预测位置和真实位置越接近,代表系统定位精度越好。
ε(x r (i)) represents the squared error of the predicted value coordinate x r (i) of the i-th acquired sample at the lattice point r and the true coordinate x r . Wherein, the predicted value coordinate x r (i) is predicted by the classifier obtained above, and the real coordinate x r is obtained by actual measurement. For example, in the actual positioning, the grid coordinates predicted by the system are (1, 2), and the actual grid coordinates are (1, 1), then
Figure PCTCN2018092439-appb-000007
Therefore, if the index is small, that is, the closer the predicted position and the real position are, the better the positioning accuracy of the system is represented.
其次,由融合指标计算得到相应的权重w rj: Secondly, the corresponding weight w rj is calculated from the fusion index:
Figure PCTCN2018092439-appb-000008
Figure PCTCN2018092439-appb-000008
公式(2)就是权重计算公式,argmin指使上式最小取得的w rj值。其中N是在格点r采集样本个数,r代表格点位置,j代表指纹库,r=1,…,R;j=1,2;N指在格点r采集到的样本个数;i=1,2...,N。 Equation (2) is the weight calculation formula, and argmin is the w rj value obtained by the minimum of the above formula. Where N is the number of samples collected at grid point r, r represents the grid location, j represents the fingerprint library, r=1,...,R;j=1,2; N refers to the number of samples collected at grid point r; i=1, 2..., N.
根据指纹库数据,可以计算出在格点r用指纹库j的权重系数。具体的说,在线下阶段,假设我们已经采集好了WiFi定位指纹库和LED定位指纹库,现在我们把指纹库中的80%数据取出来进行分类器训练,剩余20%数据用来计算权重值。According to the fingerprint database data, the weight coefficient of the fingerprint library j at the grid point r can be calculated. Specifically, in the offline stage, assuming that we have collected the WiFi location fingerprint database and the LED location fingerprint database, we now take 80% of the data in the fingerprint library for classifier training, and the remaining 20% of the data is used to calculate the weight value. .
比如说,现在分类器已经训练完毕,剩余20%的数据中的一个样本,可以用分类器来预测它的格点,假设预测的格点坐标是x1=(1,1),但真实的格点坐标为x=(0.5,0.5),那么这时用(1)的融合指标计算出值为
Figure PCTCN2018092439-appb-000009
现在我们在用(2)式的权值公式来优化这个定 位结果。即我们希望ε(w*x1)=||w*x1-x|| 2,0≤w≤1最小。在这个例子中,w=0.5,即取这个值时,我们就能使ε(w*x1)最小,为0。
For example, now that the classifier has been trained, one of the remaining 20% of the data can be predicted by the classifier, assuming that the predicted grid coordinates are x1=(1,1), but the real grid The point coordinate is x=(0.5,0.5), then the value calculated by the fusion index of (1) is used.
Figure PCTCN2018092439-appb-000009
Now we are using the weight formula of (2) to optimize this positioning result. That is, we want ε(w*x1)=||w*x1-x|| 2 , 0≤w≤1 to be the smallest. In this example, w = 0.5, that is, when we take this value, we can make ε(w*x1) the smallest, which is 0.
依照这种思路,我们能求出一个权重矩阵。According to this idea, we can find a weight matrix.
Figure PCTCN2018092439-appb-000010
Figure PCTCN2018092439-appb-000010
w 11就是指格点1的WiFI定位的优化权重,w 12就是指格点1的LED定位的优化权重。即每个格点都能通过上面的方法算出相应的WiFi定位的优化权重和LED定位的优化权重。 w 11 refers to the optimization weight of the WiFI positioning of the grid 1 , and w 12 refers to the optimized weight of the LED positioning of the grid 1 . That is to say, each grid point can calculate the optimization weight of the corresponding WiFi positioning and the optimization weight of the LED positioning by the above method.
系统搭建完成后,进入定位服务阶段,After the system is set up, enter the location service phase.
首先,定位终端采集其所在位置的数据;First, the positioning terminal collects data of its location;
然后,根据相似性,匹配指纹库的数据;Then, according to the similarity, matching the data of the fingerprint library;
最后,根据指纹库的数据,利用公式(3)计算得到定位结果:Finally, according to the data of the fingerprint database, the positioning result is calculated by using formula (3):
Figure PCTCN2018092439-appb-000011
Figure PCTCN2018092439-appb-000011
f j(x)指线上采集到的数据匹配指纹库j所得到的最相似的格点r坐标,然后再乘上线下得到的相应位置相应指纹的权重w rj,得到最终定位位置p。 f j (x) refers to the most similar grid r coordinate obtained by the data collected on the line matching the fingerprint library j, and then multiplied by the weight w rj of the corresponding fingerprint corresponding to the corresponding position obtained under the line to obtain the final positioning position p.
例如,WiFi分类器进行定位预测的结果是(1,2),LED分类器进行定位预测的结果是(2,1),然后根据相似性匹配,找到指纹库中跟预测结果最相似的格点,在权重矩阵中查找该格点的优化权重。具体的说,比如WiFi的(1,2)跟WiFi指纹库格点1最接近,那么就取权重w 11,LED定位预测的结果跟LED指纹库中格点2最接近,那么就取权重w 22,这样最后的输出结果p=w 11×(1,2)+w 22×(2,1)。 For example, the result of the positioning prediction by the WiFi classifier is (1, 2), and the result of the positioning prediction by the LED classifier is (2, 1), and then according to the similarity matching, the grid point in the fingerprint database that is most similar to the prediction result is found. Find the optimization weight of the grid point in the weight matrix. Specifically, for example, the WiFi (1, 2) is closest to the WiFi fingerprint library point 1, then the weight w 11 is taken, and the result of the LED positioning prediction is closest to the grid point 2 in the LED fingerprint library, then the weight is taken. 22 , such a final output p = w 11 × (1, 2) + w 22 × (2, 1).
所以本实施例方案会根据定位过程中测得的数据,根据权重动态调整定位结果,从而提升了整个系统的性能表现;融合两种定位方法的优点,实现不同定位方法的优势互补,从而将WiFi定位和可见光定位有效结合,提升了定位的精度和稳定性。Therefore, according to the measured data in the positioning process, the solution in this embodiment dynamically adjusts the positioning result according to the weight, thereby improving the performance of the entire system; combining the advantages of the two positioning methods to achieve complementary advantages of different positioning methods, thereby enabling WiFi The combination of positioning and visible light positioning improves the accuracy and stability of positioning.
实施例二Embodiment 2
如图3所示,本公开实施例还涉及一种包括无线局域网和可见光通信的定位系统。定位系统包括定位端、服务器端和监控端组成,其中定位端由被监控目标携带,它用于定位目标的位置并将位置信息发送给服务器端;服务器端计算定位结果,实现定位融合,并将定位结果发送至监控端;监控端由监控者携带,它可以实时查看被监控目标的位置信息。通信系统包括无线局域网和可见光通信两部分,其中,无线局域网包括多个AP(Access Point,接入点),它们作为发送端发射出WiFi信号,而手机作为接收端利用信号强度进行无线定位。可见光通信系统包括多个不同频率的LED灯,手机通过可见光通信识别不 同的LED灯,进行定位。最后使用实施例一的定位方法将两种定位系统的结果进行融合,得到最终定位。As shown in FIG. 3, an embodiment of the present disclosure also relates to a positioning system including a wireless local area network and visible light communication. The positioning system comprises a positioning end, a server end and a monitoring end, wherein the positioning end is carried by the monitored target, which is used for locating the location of the target and transmitting the location information to the server end; the server side calculates the positioning result, realizes the positioning fusion, and The positioning result is sent to the monitoring end; the monitoring end is carried by the monitor, and it can view the position information of the monitored target in real time. The communication system includes two parts: a wireless local area network and a visible light communication. The wireless local area network includes a plurality of APs (Access Points), which transmit a WiFi signal as a transmitting end, and the mobile phone serves as a receiving end to perform wireless positioning by using signal strength. The visible light communication system includes a plurality of LED lights of different frequencies, and the mobile phone recognizes different LED lights through visible light communication for positioning. Finally, the positioning method of the first embodiment is used to fuse the results of the two positioning systems to obtain the final positioning.
本实施例的定位系统还可用于多目标定位和监控,即一个监控端手机可以监控多个不同的定位端。The positioning system of this embodiment can also be used for multi-target positioning and monitoring, that is, one monitoring terminal mobile phone can monitor a plurality of different positioning terminals.
利用该系统进行定位的流程如图4所示,包括:The process of positioning using the system is as shown in FIG. 4, including:
步骤401,定位终端首先实现WiFi RSSI和LED可见光信号的采集,LED可见光信号即摄像头所拍摄到的图像,经过图像处理后,提取出LED图像中所包含的频率、位置信息,形成LED定位信息;然后定位终端将WiFi定位信息和LED定位信息发送至服务器, Step 401, the positioning terminal firstly realizes the collection of the WiFi RSSI and the LED visible light signal, and the LED visible light signal is the image captured by the camera. After the image processing, the frequency and position information contained in the LED image are extracted to form the LED positioning information; The positioning terminal then sends the WiFi positioning information and the LED positioning information to the server.
步骤402,服务器计算最终的定位结果,根据定位终端发送的无线局域网WiFi定位信号,对所述定位终端进行预测定位,得到所述定位终端的WiFi定位位置;Step 402: The server calculates a final positioning result, and performs predictive positioning on the positioning terminal according to the wireless local area network WiFi positioning signal sent by the positioning terminal, to obtain a WiFi positioning position of the positioning terminal.
根据定位终端发送的发光二极管LED定位信号,对所述定位终端进行预测定位,得到所述定位终端的LED定位位置;Determining and positioning the positioning terminal according to the LED LED positioning signal sent by the positioning terminal, and obtaining the LED positioning position of the positioning terminal;
根据所述WiFi定位位置和LED定位位置,分别获取与上述两定位位置对应的权重值;Obtaining a weight value corresponding to the two positioning positions according to the WiFi positioning position and the LED positioning position;
根据所述WiFi定位位置、LED定位位置,以及两定位位置各自对应的权重值,得到所述定位终端最终的定位位置。The final positioning position of the positioning terminal is obtained according to the weight position corresponding to the WiFi positioning position, the LED positioning position, and the two positioning positions.
步骤403,服务器将定位结果发送至监控终端,对定位终端的位置进行显示,实现定位。Step 403: The server sends the positioning result to the monitoring terminal, and displays the location of the positioning terminal to implement positioning.
本实施例中还涉及一种设置在服务器端的存储介质,该存储介质可以为服务器,也可以为安装在服务器上的一个数据的存储、调用、处理设备,用于建立WiFi指纹库、构建WiFi分类器和进行WiFi定位,建立LED指纹库、LED分类器和进行LED定位,以及用于建立权重矩阵,并对WiFi定位和LED定位进行融合,确定最终的定位结果。The embodiment also relates to a storage medium disposed on the server side, and the storage medium may be a server, or a storage, calling, and processing device of a data installed on the server, used to establish a WiFi fingerprint database, and construct a WiFi classification. And perform WiFi positioning, establish LED fingerprint library, LED classifier and LED positioning, and use to establish weight matrix, and integrate WiFi positioning and LED positioning to determine the final positioning result.
在一个实施例中,所述存储介质存储有用于进行定位的定位程序,所述程序包括:In one embodiment, the storage medium stores a positioning program for performing positioning, the program comprising:
根据定位终端发送的无线局域网WiFi定位信号,对所述定位终端进行预测定位,得到所述定位终端的WiFi定位位置;Determining and positioning the positioning terminal according to the wireless local area network WiFi positioning signal sent by the positioning terminal, and obtaining a WiFi positioning position of the positioning terminal;
根据定位终端发送的发光二极管LED定位信号,对所述定位终端进行预测定位,得到所述定位终端的LED定位位置;Determining and positioning the positioning terminal according to the LED LED positioning signal sent by the positioning terminal, and obtaining the LED positioning position of the positioning terminal;
根据所述WiFi定位位置和LED定位位置,分别获取与上述两定位位置对应的权重值;Obtaining a weight value corresponding to the two positioning positions according to the WiFi positioning position and the LED positioning position;
根据所述WiFi定位位置、LED定位位置,以及两定位位置各自对应的权重值,得到所述定位终端最终的定位位置。The final positioning position of the positioning terminal is obtained according to the weight position corresponding to the WiFi positioning position, the LED positioning position, and the two positioning positions.
其中,在进行定位之前,预先将定位区域划分为若干个格点,获取每个格点上基于WiFi定位对应的WiFi权重值,以及获取每个格点上基于LED定位对应的LED权重值;Before performing the positioning, the positioning area is divided into a plurality of grid points in advance, the WiFi weight values corresponding to the WiFi positioning on each grid point are obtained, and the LED weight values corresponding to the LED positioning on each grid point are obtained;
在定位过程中,将与所述WiFi定位位置最接近的格点所对应的WiFi权重值,作为所述WiFi定位位置对应的权重值;将与所述LED定位位置最接近的格点所对应的LED权重值,作为所述LED定位位置对应的权重值。In the positioning process, the WiFi weight value corresponding to the grid point closest to the WiFi positioning position is used as the weight value corresponding to the WiFi positioning position; and the grid point closest to the LED positioning position is corresponding to The LED weight value is used as the weight value corresponding to the LED positioning position.
其中,获取每个格点上基于WiFi定位对应的WiFi权重值,包括:The WiFi weight value corresponding to the WiFi location on each grid point is obtained, including:
根据在每个格点上采集的设定次数的接收信号强度指示RSSI数据,得到WiFi指纹库;Obtaining a WiFi fingerprint database according to the received signal strength of the set number of times collected at each grid point indicating the RSSI data;
根据WiFi指纹库,得到利用RSSI数据进行位置预测定位的WiFi分类器;According to the WiFi fingerprint library, a WiFi classifier that uses the RSSI data for location prediction positioning is obtained;
利用公式(2)、(3)计算每个格点上基于WiFi定位对应的WiFi权重值w r1Calculating the WiFi weight value w r1 corresponding to the WiFi location on each grid point using equations (2) and (3);
Figure PCTCN2018092439-appb-000012
Figure PCTCN2018092439-appb-000012
ε(x r(i))=||x r(i)-x r|| 2  公式(3) ε(x r (i))=||x r (i)-x r || 2 Formula (3)
其中,argmin表示公式(2)最小取得的w r1值;ε(x r(i))表示在格点r的第i个采集数据的预测定位坐标x r(i)与真实位置坐标x r的平方误差;N是在格点r采集样本个数,r代表格点编号,r=1,…,R。 Where argmin represents the minimum obtained w r1 value of equation (2); ε(x r (i)) represents the predicted positioning coordinate x r (i) of the i-th collected data at grid point r and the true position coordinate x r Square error; N is the number of samples collected at grid point r, r is the grid number, r = 1, ..., R.
其中,所述方法还包括:The method further includes:
得到WiFi指纹库之后,按照设定比例将WiFi指纹库划分为训练集和验证集;After obtaining the WiFi fingerprint database, the WiFi fingerprint library is divided into a training set and a verification set according to a set ratio;
选择支持向量机算法SVM非线性分类器,利用Python语言进行训练,得到所述WiFi分类器。The support vector machine algorithm SVM nonlinear classifier is selected and trained in the Python language to obtain the WiFi classifier.
其中,根据所述WiFi分类器,对所述定位终端进行预测定位,得到所述定位终端的WiFi定位位置。According to the WiFi classifier, the positioning terminal is predicted and located, and the WiFi positioning position of the positioning terminal is obtained.
其中,获取每个格点上基于LED定位对应的LED权重值,包括:Wherein, obtaining LED weight values corresponding to LED positioning on each grid point, including:
根据在每个格点上采集的LED定位数据,得到LED指纹库;According to the LED positioning data collected at each grid point, the LED fingerprint library is obtained;
根据LED指纹库,得到利用LED定位数据进行位置预测定位的LED分类器;According to the LED fingerprint library, an LED classifier for position prediction positioning using LED positioning data is obtained;
利用公式(3)(4)计算每个格点上基于LED定位对应的LED权重值w r2Calculate the LED weight value w r2 corresponding to the LED positioning on each grid point using equations (3) and (4);
Figure PCTCN2018092439-appb-000013
Figure PCTCN2018092439-appb-000013
ε(x r(i))=||x r(i)-x r|| 2  公式(3) ε(x r (i))=||x r (i)-x r || 2 Formula (3)
其中,argmin表示公式(2)最小取得的w r2值;ε(x r(i))表示在格点r的第i个采集数据的预测定位坐标x r(i)与真实位置坐标x r的平方误差;N是在格点r采集样本个数,r代表格点编号,r=1,…,R。 Where argmin represents the minimum obtained w r2 value of equation (2); ε(x r (i)) represents the predicted positioning coordinate x r (i) of the i-th collected data at grid point r and the true position coordinate x r Square error; N is the number of samples collected at grid point r, r is the grid number, r = 1, ..., R.
其中,所述方法还包括:The method further includes:
得到LED指纹库之后,按照设定比例将LED指纹库划分为训练集和验证集;After obtaining the LED fingerprint library, the LED fingerprint library is divided into a training set and a verification set according to a set ratio;
选择支持向量机算法SVM非线性分类器,利用Python语言进行训练,得到所述LED分类器。The support vector machine algorithm SVM nonlinear classifier is selected and trained in the Python language to obtain the LED classifier.
其中,所述LED定位数据包括:采集所述LED定位数据的设备的航向角、俯仰角和横滚角,以及所述设备拍摄的一个或多个LED灯在图像上的位置坐标。The LED positioning data includes: a heading angle, a pitch angle, and a roll angle of the device that collects the LED positioning data, and position coordinates of the one or more LED lights captured by the device on the image.
其中,根据所述LED分类器,对所述定位终端进行预测定位,得到所述定位终端的LED定位位置。The predictive positioning of the positioning terminal is performed according to the LED classifier, and the LED positioning position of the positioning terminal is obtained.
其中,所述定位终端最终的定位位置通过公式(1)求得:Wherein, the final positioning position of the positioning terminal is obtained by using formula (1):
Figure PCTCN2018092439-appb-000014
Figure PCTCN2018092439-appb-000014
其中,p表示所述定位终端最终的定位位置;j=1,2;f 1(x)表示格点r处基于WiFi定位得到的预测定位位置;f 2(x)表示格点r处基于LED定位得到的预测定位位置;w r1表示格点r处基于WiFi定位对应的权重值;w r2表示格点r处基于LED定位对应的权重值。 Where p denotes the final positioning position of the positioning terminal; j=1, 2; f 1 (x) denotes a predicted positioning position based on WiFi positioning at the grid point r; f 2 (x) denotes an LED based on the grid point r The predicted positioning position obtained by the positioning; w r1 represents the weight value corresponding to the WiFi positioning at the grid point r; w r2 represents the weight value corresponding to the LED positioning at the grid point r.
本公开实施例还涉及一种存储介质,位于定位终端侧,可以是定位终端,也可以是定位终端的一个数据存储、处理的硬件设备。该存储介质存储有用于获取LED定位信号的程序,所述程序包括:The embodiment of the present disclosure further relates to a storage medium, which is located at the positioning terminal side, and may be a positioning terminal, or a hardware device for data storage and processing of the positioning terminal. The storage medium stores a program for acquiring an LED positioning signal, the program comprising:
利用定位终端拍摄包括LED灯的图像;Using an positioning terminal to capture an image including an LED light;
进行图像处理,获取图像中各个LED灯的闪烁频率,根据所述闪烁频率对被拍摄的LED灯识别;Performing image processing to acquire a blinking frequency of each LED light in the image, and identifying the captured LED light according to the blinking frequency;
获取识别的LED灯在图像中的坐标,以及获取定位终端的航向角、俯仰角和横滚角;Obtaining coordinates of the identified LED light in the image, and obtaining a heading angle, a pitch angle, and a roll angle of the positioning terminal;
由定位终端的航向角、俯仰角和横滚角,以及被识别的LED灯在图像中的坐标,构成定位终端再其位置格点处的定位信号。The heading angle, the pitch angle and the roll angle of the positioning terminal, and the coordinates of the identified LED lamp in the image form a positioning signal at the position and position of the positioning terminal.
上述步骤中,进行图像处理,获取图像中各个LED灯的闪烁频率,包括:In the above steps, image processing is performed to obtain the flicker frequency of each LED lamp in the image, including:
将彩色图像转换为灰度图像;Converting a color image to a grayscale image;
依次进行图像模糊处理、二值化处理;Perform image blurring and binarization processing in sequence;
分离出图像中每一个LED灯对应的图形,提取每一个图形的轮廓信息,并找出中心位置;Separating the graphics corresponding to each LED light in the image, extracting the contour information of each graphic, and finding the center position;
在每个图形轮廓内,通过radon变换,统计出黑白条纹的间距,根据所述间距计算出该图形轮廓对应的LED的闪烁频率。Within each contour of the graph, the spacing of the black and white stripes is counted by the radon transform, and the blinking frequency of the LED corresponding to the contour of the graphic is calculated according to the spacing.
本公开提出了一种基于WiFi和可见光的融合定位方法及系统,融合了两种定位方法的优点,实现不同定位方法的优势互补,从而将WiFi定位和可见光定位有效结合,提升了定位的精度和稳定性。The present disclosure proposes a fusion positioning method and system based on WiFi and visible light, which combines the advantages of the two positioning methods, and realizes the complementary advantages of different positioning methods, thereby effectively combining WiFi positioning and visible light positioning, thereby improving positioning accuracy and stability.
尽管为示例目的,已经公开了本公开的优选实施例,本领域的技术人员将意识到各种改进、增加和取代也是可能的,因此,本公开的范围应当不限于上述实施例。While the preferred embodiment of the present disclosure has been disclosed for purposes of illustration, those skilled in the art will recognize that various modifications, additions and substitutions are possible, and the scope of the present disclosure should not be limited to the embodiments described above.
工业实用性Industrial applicability
通过本公开提供的技术方案,融合了基于WiFi和可见光两种定位方法的优点,实现不同定位方法的优势互补,从而将WiFi定位和可见光定位有效结合,提升了定位的精度和稳定性。Through the technical solution provided by the present disclosure, the advantages of the two positioning methods based on WiFi and visible light are integrated, and the advantages of different positioning methods are complemented, thereby effectively combining the WiFi positioning and the visible light positioning, thereby improving the positioning accuracy and stability.

Claims (28)

  1. 一种定位方法,包括:A positioning method comprising:
    根据定位终端发送的无线局域网WiFi定位信号,对所述定位终端进行预测定位,得到所述定位终端的WiFi定位位置;Determining and positioning the positioning terminal according to the wireless local area network WiFi positioning signal sent by the positioning terminal, and obtaining a WiFi positioning position of the positioning terminal;
    根据定位终端发送的发光二极管LED定位信号,对所述定位终端进行预测定位,得到所述定位终端的LED定位位置;Determining and positioning the positioning terminal according to the LED LED positioning signal sent by the positioning terminal, and obtaining the LED positioning position of the positioning terminal;
    根据所述WiFi定位位置和LED定位位置,分别获取与上述两定位位置对应的权重值;Obtaining a weight value corresponding to the two positioning positions according to the WiFi positioning position and the LED positioning position;
    根据所述WiFi定位位置、LED定位位置,以及两定位位置各自对应的权重值,得到所述定位终端最终的定位位置。The final positioning position of the positioning terminal is obtained according to the weight position corresponding to the WiFi positioning position, the LED positioning position, and the two positioning positions.
  2. 如权利要求1所述的定位方法,其中,在进行定位之前,预先将定位区域划分为若干个格点,获取每个格点上基于WiFi定位对应的WiFi权重值,以及获取每个格点上基于LED定位对应的LED权重值;The positioning method according to claim 1, wherein before the positioning, the positioning area is divided into a plurality of grid points in advance, the WiFi weight values corresponding to the WiFi positioning on each grid point are obtained, and each grid point is obtained. LED weight value corresponding to LED positioning;
    在定位过程中,将与所述WiFi定位位置最接近的格点所对应的WiFi权重值,作为所述WiFi定位位置对应的权重值;将与所述LED定位位置最接近的格点所对应的LED权重值,作为所述LED定位位置对应的权重值。In the positioning process, the WiFi weight value corresponding to the grid point closest to the WiFi positioning position is used as the weight value corresponding to the WiFi positioning position; and the grid point closest to the LED positioning position is corresponding to The LED weight value is used as the weight value corresponding to the LED positioning position.
  3. 如权利要求2所述的定位方法,其中,获取每个格点上基于WiFi定位对应的WiFi权重值,包括:The positioning method of claim 2, wherein obtaining a WiFi weight value corresponding to the WiFi location on each of the grid points comprises:
    根据在每个格点上采集的设定次数的接收信号强度指示RSSI数据,得到WiFi指纹库;Obtaining a WiFi fingerprint database according to the received signal strength of the set number of times collected at each grid point indicating the RSSI data;
    根据WiFi指纹库,得到利用RSSI数据进行位置预测定位的WiFi分类器;According to the WiFi fingerprint library, a WiFi classifier that uses the RSSI data for location prediction positioning is obtained;
    利用公式(2)、(3)计算每个格点上基于WiFi定位对应的WiFi权重值w r1Calculating the WiFi weight value w r1 corresponding to the WiFi location on each grid point using equations (2) and (3);
    Figure PCTCN2018092439-appb-100001
    Figure PCTCN2018092439-appb-100001
    ε(x r(i))=||x r(i)-x r|| 2  公式(3)其中,argmin表示公式(2)最小取得的w r1值;ε(x r(i))表示在格点r的第i个采集数据的预测定位坐标x r(i)与真实位置坐标x r的平方误差;N是在格点r采集样本个数,r代表格点编号,r=1,…,R。 ε(x r (i))=||x r (i)-x r || 2 Equation (3) where argmin represents the minimum value of w r1 obtained by equation (2); ε(x r (i)) positioned in the i th prediction data collection grid coordinates X r r (i) with the real position coordinates X r squared error; N is the number of samples collected at the lattice point r, r the representative grid point number, r = 1, ..., R.
  4. 如权利要求3所述的定位方法,其中,所述方法还包括:The positioning method of claim 3, wherein the method further comprises:
    得到WiFi指纹库之后,按照设定比例将WiFi指纹库划分为训练集和验证集;After obtaining the WiFi fingerprint database, the WiFi fingerprint library is divided into a training set and a verification set according to a set ratio;
    选择支持向量机算法SVM非线性分类器,利用Python语言进行训练,得到所述WiFi分类器。The support vector machine algorithm SVM nonlinear classifier is selected and trained in the Python language to obtain the WiFi classifier.
  5. 如权利要求3或4所述的定位方法,其中,根据所述WiFi分类器,对所述定位终端进行预测定位,得到所述定位终端的WiFi定位位置。The positioning method according to claim 3 or 4, wherein the positioning terminal is predicted and located according to the WiFi classifier, and the WiFi positioning position of the positioning terminal is obtained.
  6. 如权利要求2所述的定位方法,其中,获取每个格点上基于LED定位对应的LED 权重值,包括:The positioning method according to claim 2, wherein the LED weight value corresponding to the LED positioning on each grid point is obtained, including:
    根据在每个格点上采集的LED定位数据,得到LED指纹库;According to the LED positioning data collected at each grid point, the LED fingerprint library is obtained;
    根据LED指纹库,得到利用LED定位数据进行位置预测定位的LED分类器;According to the LED fingerprint library, an LED classifier for position prediction positioning using LED positioning data is obtained;
    利用公式(3)(4)计算每个格点上基于LED定位对应的LED权重值w r2Calculate the LED weight value w r2 corresponding to the LED positioning on each grid point using equations (3) and (4);
    Figure PCTCN2018092439-appb-100002
    Figure PCTCN2018092439-appb-100002
    ε(x r(i))=||x r(i)-x r|| 2  公式(3)其中,argmin表示公式(2)最小取得的w r2值;ε(x r(i))表示在格点r的第i个采集数据的预测定位坐标x r(i)与真实位置坐标x r的平方误差;N是在格点r采集样本个数,r代表格点编号,r=1,…,R。 ε(x r (i))=||x r (i)-x r || 2 Equation (3) where argmin represents the minimum value of w r2 obtained by equation (2); ε(x r (i)) positioned in the i th prediction data collection grid coordinates X r r (i) with the real position coordinates X r squared error; N is the number of samples collected at the lattice point r, r the representative grid point number, r = 1, ..., R.
  7. 如权利要求6所述的定位方法,其中,所述方法还包括:The positioning method of claim 6, wherein the method further comprises:
    得到LED指纹库之后,按照设定比例将LED指纹库划分为训练集和验证集;After obtaining the LED fingerprint library, the LED fingerprint library is divided into a training set and a verification set according to a set ratio;
    选择支持向量机算法SVM非线性分类器,利用Python语言进行训练,得到所述LED分类器。The support vector machine algorithm SVM nonlinear classifier is selected and trained in the Python language to obtain the LED classifier.
  8. 如权利要求6所述的定位方法,其中,所述LED定位数据包括:采集所述LED定位数据的设备的航向角、俯仰角和横滚角,以及所述设备拍摄的一个或多个LED灯在图像上的位置坐标。The positioning method of claim 6, wherein the LED positioning data comprises: a heading angle, a pitch angle, and a roll angle of the device that collects the LED positioning data, and one or more LED lights captured by the device The position coordinates on the image.
  9. 如权利要求6或7或8所述的定位方法,其中,根据所述LED分类器,对所述定位终端进行预测定位,得到所述定位终端的LED定位位置。The positioning method according to claim 6 or 7 or 8, wherein the positioning terminal is predicted and positioned according to the LED classifier, and the LED positioning position of the positioning terminal is obtained.
  10. 如权利要求3或6所述的定位方法,其中,所述定位终端最终的定位位置通过公式(1)求得:The positioning method according to claim 3 or 6, wherein the final positioning position of the positioning terminal is obtained by the formula (1):
    Figure PCTCN2018092439-appb-100003
    Figure PCTCN2018092439-appb-100003
    其中,p表示所述定位终端最终的定位位置;j=1,2;f 1(x)表示格点r处基于WiFi定位得到的预测定位位置;f 2(x)表示格点r处基于LED定位得到的预测定位位置;w r1表示格点r处基于WiFi定位对应的权重值;w r2表示格点r处基于LED定位对应的权重值。 Where p denotes the final positioning position of the positioning terminal; j=1, 2; f 1 (x) denotes a predicted positioning position based on WiFi positioning at the grid point r; f 2 (x) denotes an LED based on the grid point r The predicted positioning position obtained by the positioning; w r1 represents the weight value corresponding to the WiFi positioning at the grid point r; w r2 represents the weight value corresponding to the LED positioning at the grid point r.
  11. 一种LED定位信号的获取方法,包括:A method for acquiring an LED positioning signal includes:
    利用定位终端拍摄包括LED灯的图像;Using an positioning terminal to capture an image including an LED light;
    进行图像处理,获取图像中各个LED灯的闪烁频率,根据所述闪烁频率对被拍摄的LED灯识别;Performing image processing to acquire a blinking frequency of each LED light in the image, and identifying the captured LED light according to the blinking frequency;
    获取识别的LED灯在图像中的坐标,以及获取定位终端的航向角、俯仰角和横滚角;Obtaining coordinates of the identified LED light in the image, and obtaining a heading angle, a pitch angle, and a roll angle of the positioning terminal;
    由定位终端的航向角、俯仰角和横滚角,以及被识别的LED灯在图像中的坐标,构成定位终端再其位置格点处的定位信号。The heading angle, the pitch angle and the roll angle of the positioning terminal, and the coordinates of the identified LED lamp in the image form a positioning signal at the position and position of the positioning terminal.
  12. 如权利要求11所述的LED定位信号的获取方法,其中,进行图像处理,获取图像中各个LED灯的闪烁频率,包括:The method for acquiring an LED positioning signal according to claim 11, wherein performing image processing to acquire a blinking frequency of each LED light in the image comprises:
    将彩色图像转换为灰度图像;Converting a color image to a grayscale image;
    依次进行图像模糊处理、二值化处理;Perform image blurring and binarization processing in sequence;
    分离出图像中每一个LED灯对应的图形,提取每一个图形的轮廓信息,并找出中心位置;Separating the graphics corresponding to each LED light in the image, extracting the contour information of each graphic, and finding the center position;
    在每个图形轮廓内,通过radon变换,统计出黑白条纹的间距,根据所述间距计算出该图形轮廓对应的LED的闪烁频率。Within each contour of the graph, the spacing of the black and white stripes is counted by the radon transform, and the blinking frequency of the LED corresponding to the contour of the graphic is calculated according to the spacing.
  13. 一种存储介质,所述存储介质存储有用于进行定位的定位程序,所述程序包括:A storage medium storing a positioning program for performing positioning, the program comprising:
    根据定位终端发送的无线局域网WiFi定位信号,对所述定位终端进行预测定位,得到所述定位终端的WiFi定位位置;Determining and positioning the positioning terminal according to the wireless local area network WiFi positioning signal sent by the positioning terminal, and obtaining a WiFi positioning position of the positioning terminal;
    根据定位终端发送的发光二极管LED定位信号,对所述定位终端进行预测定位,得到所述定位终端的LED定位位置;Determining and positioning the positioning terminal according to the LED LED positioning signal sent by the positioning terminal, and obtaining the LED positioning position of the positioning terminal;
    根据所述WiFi定位位置和LED定位位置,分别获取与上述两定位位置对应的权重值;Obtaining a weight value corresponding to the two positioning positions according to the WiFi positioning position and the LED positioning position;
    根据所述WiFi定位位置、LED定位位置,以及两定位位置各自对应的权重值,得到所述定位终端最终的定位位置。The final positioning position of the positioning terminal is obtained according to the weight position corresponding to the WiFi positioning position, the LED positioning position, and the two positioning positions.
  14. 如权利要求13所述的存储介质,其中,在进行定位之前,预先将定位区域划分为若干个格点,获取每个格点上基于WiFi定位对应的WiFi权重值,以及获取每个格点上基于LED定位对应的LED权重值;The storage medium of claim 13, wherein the positioning area is divided into a plurality of grid points in advance, the WiFi weight values corresponding to the WiFi positioning on each grid point are obtained, and each grid point is obtained. LED weight value corresponding to LED positioning;
    在定位过程中,将与所述WiFi定位位置最接近的格点所对应的WiFi权重值,作为所述WiFi定位位置对应的权重值;将与所述LED定位位置最接近的格点所对应的LED权重值,作为所述LED定位位置对应的权重值。In the positioning process, the WiFi weight value corresponding to the grid point closest to the WiFi positioning position is used as the weight value corresponding to the WiFi positioning position; and the grid point closest to the LED positioning position is corresponding to The LED weight value is used as the weight value corresponding to the LED positioning position.
  15. 如权利要求14所述的存储介质,其中,获取每个格点上基于WiFi定位对应的WiFi权重值,包括:The storage medium of claim 14, wherein the obtaining a WiFi weight value corresponding to the WiFi location on each of the grid points comprises:
    根据在每个格点上采集的设定次数的接收信号强度指示RSSI数据,得到WiFi指纹库;Obtaining a WiFi fingerprint database according to the received signal strength of the set number of times collected at each grid point indicating the RSSI data;
    根据WiFi指纹库,得到利用RSSI数据进行位置预测定位的WiFi分类器;According to the WiFi fingerprint library, a WiFi classifier that uses the RSSI data for location prediction positioning is obtained;
    利用公式(2)、(3)计算每个格点上基于WiFi定位对应的WiFi权重值w r1Calculating the WiFi weight value w r1 corresponding to the WiFi location on each grid point using equations (2) and (3);
    Figure PCTCN2018092439-appb-100004
    Figure PCTCN2018092439-appb-100004
    ε(x r(i))=||x r(i)-x r|| 2  公式(3)其中,argmin表示公式(2)最小取得的w r1值;ε(x r(i))表示在格点r的第i个采集数据的预测定位坐标x r(i)与真实位置坐标x r的平方误差;N是在格点r采集样本个数,r代表格点编号,r=1,…,R。 ε(x r (i))=||x r (i)-x r || 2 Equation (3) where argmin represents the minimum value of w r1 obtained by equation (2); ε(x r (i)) positioned in the i th prediction data collection grid coordinates X r r (i) with the real position coordinates X r squared error; N is the number of samples collected at the lattice point r, r the representative grid point number, r = 1, ..., R.
  16. 如权利要求15所述的存储介质,其中,所述程序包括:The storage medium of claim 15 wherein said program comprises:
    得到WiFi指纹库之后,按照设定比例将WiFi指纹库划分为训练集和验证集;After obtaining the WiFi fingerprint database, the WiFi fingerprint library is divided into a training set and a verification set according to a set ratio;
    选择支持向量机算法SVM非线性分类器,利用Python语言进行训练,得到所述WiFi 分类器。The support vector machine algorithm SVM nonlinear classifier is selected and trained in the Python language to obtain the WiFi classifier.
  17. 如权利要求15或16所述的存储介质,其中,根据所述WiFi分类器,对所述定位终端进行预测定位,得到所述定位终端的WiFi定位位置。The storage medium according to claim 15 or 16, wherein the positioning terminal is predicted and located according to the WiFi classifier, and the WiFi positioning position of the positioning terminal is obtained.
  18. 如权利要求14所述的存储介质,其中,获取每个格点上基于LED定位对应的LED权重值,包括:The storage medium of claim 14, wherein the LED weight values corresponding to the LED positioning on each grid point are obtained, including:
    根据在每个格点上采集的LED定位数据,得到LED指纹库;According to the LED positioning data collected at each grid point, the LED fingerprint library is obtained;
    根据LED指纹库,得到利用LED定位数据进行位置预测定位的LED分类器;According to the LED fingerprint library, an LED classifier for position prediction positioning using LED positioning data is obtained;
    利用公式(3)(4)计算每个格点上基于LED定位对应的LED权重值w r2Calculate the LED weight value w r2 corresponding to the LED positioning on each grid point using equations (3) and (4);
    Figure PCTCN2018092439-appb-100005
    Figure PCTCN2018092439-appb-100005
    ε(x r(i))=||x r(i)-x r|| 2  公式(3)其中,argmin表示公式(2)最小取得的w r2值;ε(x r(i))表示在格点r的第i个采集数据的预测定位坐标x r(i)与真实位置坐标x r的平方误差;N是在格点r采集样本个数,r代表格点编号,r=1,…,R。 ε(x r (i))=||x r (i)-x r || 2 Equation (3) where argmin represents the minimum value of w r2 obtained by equation (2); ε(x r (i)) positioned in the i th prediction data collection grid coordinates X r r (i) with the real position coordinates X r squared error; N is the number of samples collected at the lattice point r, r the representative grid point number, r = 1, ..., R.
  19. 如权利要求18所述的存储介质,其中,所述程序还包括:The storage medium of claim 18, wherein the program further comprises:
    得到LED指纹库之后,按照设定比例将LED指纹库划分为训练集和验证集;After obtaining the LED fingerprint library, the LED fingerprint library is divided into a training set and a verification set according to a set ratio;
    选择支持向量机算法SVM非线性分类器,利用Python语言进行训练,得到所述LED分类器。The support vector machine algorithm SVM nonlinear classifier is selected and trained in the Python language to obtain the LED classifier.
  20. 如权利要求19所述的存储介质,其中,所述LED定位数据包括:采集所述LED定位数据的设备的航向角、俯仰角和横滚角,以及所述设备拍摄的一个或多个LED灯在图像上的位置坐标。The storage medium of claim 19, wherein the LED positioning data comprises: a heading angle, a pitch angle, and a roll angle of the device that collects the LED positioning data, and one or more LED lights captured by the device The position coordinates on the image.
  21. 如权利要求18或19或20所述的存储介质,其中,根据所述LED分类器,对所述定位终端进行预测定位,得到所述定位终端的LED定位位置。The storage medium according to claim 18 or 19 or 20, wherein the positioning terminal is predicted and positioned according to the LED classifier to obtain an LED positioning position of the positioning terminal.
  22. 如权利要求15或18所述的存储介质,其中,所述定位终端最终的定位位置通过公式(1)求得:The storage medium according to claim 15 or 18, wherein the final positioning position of the positioning terminal is obtained by the formula (1):
    Figure PCTCN2018092439-appb-100006
    Figure PCTCN2018092439-appb-100006
    其中,p表示所述定位终端最终的定位位置;j=1,2;f 1(x)表示格点r处基于WiFi定位得到的预测定位位置;f 2(x)表示格点r处基于LED定位得到的预测定位位置;w r1表示格点r处基于WiFi定位对应的权重值;w r2表示格点r处基于LED定位对应的权重值。 Where p denotes the final positioning position of the positioning terminal; j=1, 2; f 1 (x) denotes a predicted positioning position based on WiFi positioning at the grid point r; f 2 (x) denotes an LED based on the grid point r The predicted positioning position obtained by the positioning; w r1 represents the weight value corresponding to the WiFi positioning at the grid point r; w r2 represents the weight value corresponding to the LED positioning at the grid point r.
  23. 一种存储介质,所述存储介质存储有用于获取LED定位信号的程序,所述程序包括:A storage medium storing a program for acquiring an LED positioning signal, the program comprising:
    利用定位终端拍摄包括LED灯的图像;Using an positioning terminal to capture an image including an LED light;
    进行图像处理,获取图像中各个LED灯的闪烁频率,根据所述闪烁频率对被拍摄的LED灯识别;Performing image processing to acquire a blinking frequency of each LED light in the image, and identifying the captured LED light according to the blinking frequency;
    获取识别的LED灯在图像中的坐标,以及获取定位终端的航向角、俯仰角和横滚角;Obtaining coordinates of the identified LED light in the image, and obtaining a heading angle, a pitch angle, and a roll angle of the positioning terminal;
    由定位终端的航向角、俯仰角和横滚角,以及被识别的LED灯在图像中的坐标,构成定位终端再其位置格点处的定位信号。The heading angle, the pitch angle and the roll angle of the positioning terminal, and the coordinates of the identified LED lamp in the image form a positioning signal at the position and position of the positioning terminal.
  24. 如权利要求23所述的存储介质,其中,进行图像处理,获取图像中各个LED灯的闪烁频率,包括:The storage medium of claim 23, wherein performing image processing to acquire a blinking frequency of each of the LED lights in the image comprises:
    将彩色图像转换为灰度图像;Converting a color image to a grayscale image;
    依次进行图像模糊处理、二值化处理;Perform image blurring and binarization processing in sequence;
    分离出图像中每一个LED灯对应的图形,提取每一个图形的轮廓信息,并找出中心位置;Separating the graphics corresponding to each LED light in the image, extracting the contour information of each graphic, and finding the center position;
    在每个图形轮廓内,通过radon变换,统计出黑白条纹的间距,根据所述间距计算出该图形轮廓对应的LED的闪烁频率。Within each contour of the graph, the spacing of the black and white stripes is counted by the radon transform, and the blinking frequency of the LED corresponding to the contour of the graphic is calculated according to the spacing.
  25. 一种定位系统,包括布置在定位区域内的多个无线路由器、多个LED灯,以及定位终端、监控终端和服务器:A positioning system includes a plurality of wireless routers disposed in a positioning area, a plurality of LED lights, and a positioning terminal, a monitoring terminal, and a server:
    所述定位终端采集其位置格点的WiFi定位信号和LED定位信号,并发送给服务器;The positioning terminal collects the WiFi positioning signal and the LED positioning signal of the location grid point, and sends the positioning signal to the server;
    服务器根据所述WiFi定位信号和LED定位信号,对定位终端进行定位,并将定位信息发送给监控终端;The server locates the positioning terminal according to the WiFi positioning signal and the LED positioning signal, and sends the positioning information to the monitoring terminal;
    监控终端接收定位信息,显示所述定位终端的位置。The monitoring terminal receives the positioning information and displays the location of the positioning terminal.
  26. 如权利要求25所述的定位系统,其中,所述服务器包括权利要求13~22任一项所述的存储介质。The positioning system according to claim 25, wherein the server comprises the storage medium according to any one of claims 13 to 22.
  27. 如权利要求25所述的定位系统,其中,所述定位终端包括权利要求23或24所述的存储介质。A positioning system according to claim 25, wherein said positioning terminal comprises the storage medium of claim 23 or 24.
  28. 如权利要求25所述的定位系统,其中,所述LED的灯光调制为方波信号,各个LED灯的调制频率不同。A positioning system according to claim 25, wherein the light modulation of said LEDs is a square wave signal, and the modulation frequencies of the respective LED lamps are different.
PCT/CN2018/092439 2017-06-22 2018-06-22 Positioning method, storage medium, and positioning system WO2018233692A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710481197.9A CN109116298B (en) 2017-06-22 2017-06-22 Positioning method, storage medium and positioning system
CN201710481197.9 2017-06-22

Publications (1)

Publication Number Publication Date
WO2018233692A1 true WO2018233692A1 (en) 2018-12-27

Family

ID=64732611

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/092439 WO2018233692A1 (en) 2017-06-22 2018-06-22 Positioning method, storage medium, and positioning system

Country Status (2)

Country Link
CN (1) CN109116298B (en)
WO (1) WO2018233692A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111356082A (en) * 2020-03-10 2020-06-30 西安电子科技大学 Indoor mobile terminal positioning method based on WIFI and visible light communication
CN111935628A (en) * 2020-07-28 2020-11-13 河南大学 Wi-Fi positioning method and device based on position fingerprint

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109889981B (en) * 2019-03-08 2020-11-06 中南大学 Positioning method and system based on binary classification technology
CN113840228B (en) * 2021-08-25 2024-04-02 北京航空航天大学杭州创新研究院 Pedestrian indoor positioning method based on positioning matching

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWM450170U (en) * 2012-05-07 2013-04-01 Jung-Tang Huang Internet of things system
CN103079269A (en) * 2013-01-25 2013-05-01 哈尔滨工业大学 LDE (Linear Discriminant Analysis) algorithm-based WiFi (Wireless Fidelity) indoor locating method
CN104198989A (en) * 2014-09-16 2014-12-10 北京邮电大学 Hybrid-mode indoor positioning system based on illumination source and WiFi signals
CN104270194A (en) * 2014-09-16 2015-01-07 南京邮电大学 Visible light indoor positioning method
CN105388456A (en) * 2015-10-21 2016-03-09 宁波大学 Visible light communication multi-element three-dimensional wireless positioning system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3163783B1 (en) * 2015-10-30 2019-12-18 Kabushiki Kaisha Toshiba Wireless communication device and wireless communication method
CN106248077A (en) * 2016-07-06 2016-12-21 北京理工大学 A kind of visible ray integrated positioning system based on particle filter and method
CN106027149B (en) * 2016-07-21 2018-09-18 长春光客科技有限公司 Using multi-user's visible light communication device and method at multiple rotatable top set ends
CN106597374B (en) * 2016-11-09 2019-05-21 北京大学 A kind of indoor visible light localization method and system based on camera shooting frame analysis
CN106646366A (en) * 2016-12-05 2017-05-10 深圳市国华光电科技有限公司 Visible light positioning method and system based on particle filter algorithm and intelligent equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWM450170U (en) * 2012-05-07 2013-04-01 Jung-Tang Huang Internet of things system
CN103079269A (en) * 2013-01-25 2013-05-01 哈尔滨工业大学 LDE (Linear Discriminant Analysis) algorithm-based WiFi (Wireless Fidelity) indoor locating method
CN104198989A (en) * 2014-09-16 2014-12-10 北京邮电大学 Hybrid-mode indoor positioning system based on illumination source and WiFi signals
CN104270194A (en) * 2014-09-16 2015-01-07 南京邮电大学 Visible light indoor positioning method
CN105388456A (en) * 2015-10-21 2016-03-09 宁波大学 Visible light communication multi-element three-dimensional wireless positioning system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111356082A (en) * 2020-03-10 2020-06-30 西安电子科技大学 Indoor mobile terminal positioning method based on WIFI and visible light communication
CN111356082B (en) * 2020-03-10 2021-06-08 西安电子科技大学 Indoor mobile terminal positioning method based on WIFI and visible light communication
CN111935628A (en) * 2020-07-28 2020-11-13 河南大学 Wi-Fi positioning method and device based on position fingerprint
CN111935628B (en) * 2020-07-28 2022-06-28 河南大学 Wi-Fi positioning method and device based on position fingerprint

Also Published As

Publication number Publication date
CN109116298A (en) 2019-01-01
CN109116298B (en) 2023-12-22

Similar Documents

Publication Publication Date Title
Maheepala et al. Light-based indoor positioning systems: A review
WO2018233692A1 (en) Positioning method, storage medium, and positioning system
CN110261823B (en) Visible light indoor communication positioning method and system based on single LED lamp
Geraldes et al. UAV-based situational awareness system using deep learning
Wang et al. Light positioning: A high-accuracy visible light indoor positioning system based on attitude identification and propagation model
US9418115B2 (en) Location-based mobile services and applications
US9842282B2 (en) Method and apparatus for classifying objects and clutter removal of some three-dimensional images of the objects in a presentation
CN102749072A (en) Indoor positioning method, indoor positioning apparatus and indoor positioning system
US20130169801A1 (en) Visual Command Processing
US11538239B2 (en) Joint modeling of object population estimation using sensor data and distributed device data
CN106462737A (en) Systems and methods for haziness detection
CN108332748B (en) Indoor visible light positioning method and device
Liu et al. DIMLOC: Enabling high-precision visible light localization under dimmable LEDs in smart buildings
US9922049B2 (en) Information processing device, method of processing information, and program for processing information
CN109655790A (en) Multi-target detection and identification system and method based on indoor LED light source
US11277591B2 (en) Surveillance system, surveillance network construction method, and program
CN106304330A (en) A kind of radio frequency tomography localization method alleviating background electromagnetic wave action
CN107356905B (en) Visible light positioning method and system based on chaotic particle swarm optimization
Wu et al. Visible light positioning system based on CMOS image sensor using particle filter tracking and detecting algorithm
Huang et al. Indoor positioning method based on metameric white light sources and subpixels on a color image sensor
Younus et al. A unilateral 3D indoor positioning system employing optical camera communications
CN105070204A (en) Miniature AMOLED optical display
Le et al. Photography trilateration indoor localization with image sensor communication
Rahman et al. Multilateration approach for wide range visible light indoor positioning system using mobile CMOS image sensor
Islam et al. Adaptive spatial-temporal resolution optical vehicular communication system using image sensor

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18821603

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 06.05.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18821603

Country of ref document: EP

Kind code of ref document: A1