CN110736965B - Two-dimensional coding and decoding method for visible light positioning - Google Patents

Two-dimensional coding and decoding method for visible light positioning Download PDF

Info

Publication number
CN110736965B
CN110736965B CN201910462640.7A CN201910462640A CN110736965B CN 110736965 B CN110736965 B CN 110736965B CN 201910462640 A CN201910462640 A CN 201910462640A CN 110736965 B CN110736965 B CN 110736965B
Authority
CN
China
Prior art keywords
light source
light
coding
images
positioning
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201910462640.7A
Other languages
Chinese (zh)
Other versions
CN110736965A (en
Inventor
黄浩
管自新
黄永华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Weiside Technology Co ltd
Original Assignee
Wuhan Weiside Technology Co ltd
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 Wuhan Weiside Technology Co ltd filed Critical Wuhan Weiside Technology Co ltd
Publication of CN110736965A publication Critical patent/CN110736965A/en
Application granted granted Critical
Publication of CN110736965B publication Critical patent/CN110736965B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/16Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations using electromagnetic waves other than radio waves
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B10/00Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
    • H04B10/50Transmitters
    • H04B10/516Details of coding or modulation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a two-dimensional coding and decoding method for visible light positioning, which is based on OOK visible light coding and can be used for realizing indoor visible light positioning. By encoding the light source and modulating the light source with a certain carrier frequency, the light source can display a polygon pattern with light and shade alternation on a CMOS camera with a certain scanning frequency when illuminating. The binocular camera fixed on the mobile equipment is used for collecting images, the obtained images are processed and decoded, the information carried by the images is obtained to distinguish light sources at different positions, and finally, the binocular positioning technology is used for calculating the positioning of the equipment. Based on the visible light two-dimensional coding and decoding technology, useful information contained in the image can be extracted rapidly and effectively, different light sources are identified, and positioning of equipment is achieved. The method realizes the coding and decoding of indoor visible light, and has advantages in the aspects of coding rules, accuracy, reliability, stability, universality and the like.

Description

Two-dimensional coding and decoding method for visible light positioning
Technical Field
The invention relates to a two-dimensional coding and decoding method for visible light positioning, and belongs to the technical field of image processing and visible light positioning.
Background
With the rapid development of wireless sensor networks and Internet of things technologies, indoor positioning technologies are widely applied in the fields of intelligent robots, shopping guides in large markets and the like. Although indoor positioning technologies based on Bluetooth, radio frequency, ultrasonic wave, infrared ray, ultra-bandwidth, wiFi and the like are developed, the indoor positioning technologies greatly increase indoor positioning cost due to the need of additional auxiliary positioning equipment, and the requirements on application environments are strict.
Visible light communication is an emerging indoor positioning technology capable of achieving high-speed wireless communication using visible light. At the same time, with high speed modulation of the light emitting device and a short response time, it can be used for indoor visible light localization. The principle of visible light positioning is that the positioning of the mobile equipment is realized by utilizing the rapid switching characteristic of a light emitting device and high-speed flashing light emission, wherein the light emission is expressed as 1, the light emission is expressed as 0, the light emitting device emits a light signal with certain information through coded modulation of the light emitting device, the mobile equipment receives the light signal and obtains the position coordinates of a light source through decoding, and finally the coordinates of the mobile equipment are solved according to the geometric relationship between the light source and the mobile equipment, so that the positioning of the equipment is realized. As an emerging indoor wireless positioning mode, the visible light positioning coding and decoding method has obvious advantages in the aspects of electromagnetic radiation, use environment, spectrum range, universality, safety and the like. Thus, indoor positioning using visible light is one of the most effective options.
Existing visible light positioning systems and methods using image sensors, such as: the Chinese patent invention ' an indoor visible light self-positioning system and method based on a binocular technology ' (2018107961366), an indoor illumination-based positioning navigation system ' (201210484538.5), ' a binocular non-calibrated space positioning method ' (CN 102622767B), ' an indoor visible light positioning system ' (CN 107703485A), ' an indoor visible light asynchronous positioning method using a camera ' (CN 105306141A) and the like all have the problems of singleness, difficulty in recognition and the like of one-dimensional coding, have large positioning error and low positioning efficiency, are easily influenced by indoor environment factors, and have more or less defects in the aspects of accuracy, reliability, stability, universality and the like.
Therefore, a two-dimensional coding and decoding mode is necessary to be adopted, so that the fault tolerance rate of the visible light decoding is high, and the effects of high decoding reliability and accurate result are achieved by obtaining multiple groups of data, eliminating abnormal constant values in the data and reducing errors; meanwhile, the two-dimensional coding based on the OOK is adopted to realize the light source, so that the method is beneficial to low-cost realization and can be widely popularized and applied to indoor visible light positioning.
Disclosure of Invention
Aiming at the problems in the background technology, the invention designs a two-dimensional coding and decoding method for positioning visible light, which is used for realizing indoor visible light positioning; the light source is coded and modulated by a certain carrier frequency, so that the light emitting device emits light at a higher frequency, an image is acquired by a binocular camera fixed on the device, the acquired image is processed and decoded, the light source carrying information for distinguishing different positions is obtained, and finally the positioning of the mobile device is calculated by a binocular positioning technology. Based on the visible light two-dimensional coding and decoding technology, useful information contained in the image can be extracted rapidly and effectively, different light sources are identified, and positioning of mobile equipment is achieved. The method has the characteristics of clear coding rule, high accuracy, high reliability, strong stability, strong universality and the like. In order to achieve the above purpose, the invention adopts the technical scheme that:
a two-dimensional coding and decoding method for visible light positioning is used for realizing coding of a light-emitting device, is based on OOK visible light coding, and modulates the light-emitting device with a set carrier frequency, so that the light-emitting device emits light at a higher frequency, a light source displays a polygon pattern with alternate brightness and darkness on a CMOS camera set with a certain scanning frequency while lighting, so that the emitted light carries certain information, and the brightness and darkness change of the light source cannot be perceived by human eyes in a working space of the light source; acquiring images through a binocular camera fixed on the mobile equipment, processing and decoding the acquired images to obtain light sources carrying information to distinguish different positions, and finally calculating by a binocular positioning technology to obtain the positioning of the mobile equipment;
the binocular cameras are used for acquiring images, are two CMOS (Complementary Metal-Oxide-Semiconductor) cameras fixed on a certain plane of the mobile equipment, have the same internal and external parameters, form an image on the same plane, have mutually parallel optical axes and have adjustable scanning frequency;
the mobile equipment is used for storing the mapping relation between the OOK codes of the light sources and the coordinates thereof, processing the images acquired by the binocular cameras, distinguishing different light sources on the images according to a decoding method, obtaining the space coordinates thereof according to the mapping relation, and resolving the self-positioning of the mobile equipment by a binocular positioning technology;
the decoding method is used for obtaining the coding information of the light sources from the acquired image so as to distinguish different light sources, and the combined polygon obtained after the acquired image is processed by the mobile equipment can distinguish the light sources with different coordinates and obtain the coordinates thereof by sequencing the ratio of the maximum polygon side length in the subregion pattern to the average distance between the adjacent dark bands due to the fact that the distances between the adjacent dark bands of each subregion pattern are the same and the distances between the adjacent dark bands of different subregion patterns are different.
Further, the specific implementation process of the coding method comprises the following steps:
step 1, OOK coding is carried out on the light source:
setting the scanning frequency f of the binocular camera p The resolution of the image is b 1 ×b 2 The OOK coding of each light source in one lighting period includes h×b 1 (h is a positive integer) 0-1 codes. To ensure that each light source has at least one complete pattern on the image, each OOK encodes a constituent h×b 1 All 0 codes in the two-dimensional matrix at least comprise three identical combined 6N polygons (N is a positive integer), the centroids of all 6N polygons in each combined graph are identical, and the diagonals are coincident, and then the coding of the ith light source is as follows:
Figure BDA0002078508870000031
wherein: said b 1 、b 2 The height and the width of the image resolution are respectively given in pixels; h 1 、H 2 、H 3 、M i Are all composed of 0-1 code, wherein H 1 、H 2 、H 3 Representing a matrix consisting of all 1 codes, +.>
Figure BDA0002078508870000032
A combined graph representing an ith LED; sign->
Figure BDA0002078508870000033
Representing the kronecker product.
Step 2, calculating the maximum side length:
obtaining the side length c of the corresponding largest polygon in the ith light source by combining multiple patterns in the step 1 i And distance v i Ratio gamma of (2) i . According to gamma i And respectively numbering the light sources from 1 to 3 in sequence from small to large, recording the corresponding relation between the numbers and the coordinates of the light sources, and storing the corresponding relation in the mobile equipment.
Step 3, light source modulation:
at f s =f p The carrier frequency of/(hn) (n is a positive integer) modulates the light source such that the light source emits light at a higher frequency, wherein: f (f) s Representing the carrier frequency, f p And the scanning frequency is represented, and h represents the number of lines of the LED two-dimensional code in one period.
Further, the decoding method comprises the following steps:
step 1, image processing:
the device side in motion collects light source images through the binocular camera, processes the captured images, and enhances edge characteristics by increasing contrast. Simultaneously converting the two images into gray level images, blurring the gray level images, and enabling the gray level images to pass through a single-side OTSU filter to find out the corresponding sub-area of each light source on the images and the complete closed combined image in the sub-area.
Step 2, calculating the maximum side length:
and obtaining the side lengths of the sides of the polygon in the closed graph in the mth image from the mth sub-area. Selecting any side of the largest polygon in the m-th sub-area as a reference side, and starting from the reference side in a clockwise direction, respectively marking 6N sides as 1,2. The length of the nth (1.ltoreq.n.ltoreq.6N) strip is denoted as l m,n Removing abnormal values in the side length, namely the maximum value and the minimum value, obtaining the side length value with smaller error and solving the average value a of the remaining side length m
Step 3, calculating the side length distance:
and obtaining the adjacent edge distance of two adjacent polygons in the mth image from the mth sub-area. If the mth sub-area contains Y polygons, the polygons are respectively marked as 1,2, and the numbers of adjacent sides of the y+1th polygon are the same, so that the distance d between the nth side of the Y polygon and the nth side of the y+1th polygon in the mth sub-area is obtained m,y,n . Averaging distance D for the mth sub-region m
Figure BDA0002078508870000041
Step 4, finding the corresponding light source codes:
calculating the average value a of the side lengths of the largest polygons in the mth sub-region m And distance average value D m Ratio ρ of (2) m
Figure BDA0002078508870000042
The light source is pressed according to ρ m The values are encoded as 1,2,3 in order from small to large, respectively, and the coordinate values of the light source in the image in space are found by searching the mapping between the codes and the coordinates stored in the device in advance.
Compared with the existing indoor visible light coding technology, the OOK-based visible light coding and decoding technology disclosed by the invention has the following beneficial effects:
the method has the advantages that the two-dimensional coding of the light source is realized based on OOK, the cost is low, the implementation is easy, and the method can be widely applied to indoor visible light positioning;
the two-dimensional coding is adopted, so that the fault tolerance rate of the visible light decoding is high, the error is reduced by obtaining multiple groups of data and eliminating abnormal constant values in the data, the decoding reliability is high, and the result is accurate;
the method solves the problems that the visible light positioning using the image sensor is difficult to identify due to the singleness of one-dimensional coding, has large error, is easily influenced by indoor environment factors and the like, and has advantages in the aspects of accuracy, reliability, stability, universality and the like.
Drawings
FIG. 1 is a flow chart showing a method for realizing indoor visible light positioning in the invention;
FIG. 2 is a flow chart of an OOK-based LED two-dimensional encoding method according to the present invention;
FIG. 3 is a flow chart showing an OOK-based LED decoding method according to the present invention;
FIG. 4 shows an LED in embodiment #1 of the present invention 1 Partial coding;
FIG. 5 shows an LED in embodiment #1 of the present invention 2 Partial coding;
FIG. 6 shows an LED in embodiment #1 of the present invention 3 Partial coding;
FIG. 7 shows an LED in embodiment #2 of the present invention 1 Partial coding;
FIG. 8 shows an LED in embodiment #2 of the present invention 2 Partial coding;
FIG. 9 shows an LED in embodiment #2 of the present invention 3 Partial coding.
Detailed Description
Other advantages and effects of the present invention will become apparent to those skilled in the art from the following disclosure, which describes the embodiments of the present invention with reference to specific examples. The invention may be practiced or carried out in other embodiments that depart from the specific details, and the details of the present description may be modified or varied from the spirit and scope of the present invention.
FIG. 1 is a flow chart of an indoor visible light positioning method in the invention, which is used for realizing the coding of a light emitting device, is based on OOK visible light coding, and adopts a set carrier frequency to modulate the light emitting device so that the light emitting device emits light at a higher frequency, a light source is enabled to display a polygon pattern with alternate brightness and darkness on a CMOS camera set with a certain scanning frequency while lighting, so that the emitted light carries certain information, and the brightness change of the light source cannot be perceived by human eyes in a working space of the light source; and acquiring an image by a binocular camera fixed on the mobile equipment, processing and decoding the acquired image to obtain light sources carrying information to distinguish different positions, and finally calculating by a binocular positioning technology to obtain the positioning of the mobile equipment.
The binocular cameras are used for acquiring images, are two CMOS (Complementary Metal-Oxide-Semiconductor) cameras fixed on a certain plane of the mobile equipment, have the same internal and external parameters, form an image on the coplanar, have mutually parallel optical axes and have adjustable scanning frequency.
The mobile equipment is used for storing the mapping relation between the OOK codes of the light sources and the coordinates thereof, processing the images acquired by the binocular cameras, distinguishing different light sources on the images according to the decoding method, obtaining the space coordinates thereof according to the mapping relation, and resolving the self-positioning of the mobile equipment by the binocular positioning technology.
The decoding method is used for obtaining the coding information of the light sources from the acquired image so as to distinguish different light sources, and the combined polygon obtained after the acquired image is processed by the mobile equipment can distinguish the light sources with different coordinates and obtain the coordinates thereof by sequencing the ratio of the maximum polygon side length in the subregion pattern to the average distance between the adjacent dark bands due to the fact that the distances between the adjacent dark bands of each subregion pattern are the same and the distances between the adjacent dark bands of different subregion patterns are different.
The invention discloses a two-dimensional coding and decoding method for visible light positioning, which has the core technical idea of realizing novel visible light coding and decoding. In order to make the technical scheme of the invention clearer, the invention is further described in detail below with reference to the attached drawings.
Fig. 2 is a flowchart of a two-dimensional encoding and decoding method for positioning visible light in the present invention, which implements the binary encoding function of the light emitting device shown in fig. 1. The visible light code based on OOK makes the light source display a polygon pattern with light and shade alternating on the CMOS camera with a certain scanning frequency while illuminating, so that the emitted light carries certain information. Specifically, the specific implementation process of the coding method comprises the following steps:
step 1, OOK coding is carried out on the light source:
setting the scanning frequency f of the binocular camera p The resolution of the image is b 1 ×b 2 The OOK coding of each light source in one lighting period includes h×b 1 (h is a positive integer) 0-1 codes. To ensure that each light source has at least one complete pattern on the image, each OOK encodes a constituent h×b 1 All 0 codes in the two-dimensional matrix at least comprise three identical combined 6N polygons (N is a positive integer), the centroids of all 6N polygons in each combined graph are identical, and the diagonals are coincident, and then the coding of the ith light source is as follows:
Figure BDA0002078508870000061
wherein: said b 1 、b 2 The height and the width of the image resolution are respectively given in pixels; h 1 、H 2 、H 3 、M i Are all composed of 0-1 code, wherein H 1 、H 2 、H 3 Representing a matrix of all 1 codes,
Figure BDA0002078508870000062
a combined graph representing an ith LED; sign->
Figure BDA0002078508870000063
Representing the kronecker product.
Step 2, calculating the maximum side length:
obtaining the side length c of the corresponding largest polygon in the ith light source by combining multiple patterns in the step 1 i And distance v i Ratio gamma of (2) i . According to gamma i And respectively numbering the light sources from 1 to 3 in sequence from small to large, recording the corresponding relation between the LED numbers and the coordinates thereof, and storing the corresponding relation in the equipment.
Step 3, light source modulation:
at f s =f p The carrier frequency of/(hn) (n is a positive integer) modulates the light source such that the light source emits light at a higher frequency, wherein: f (f) s Representing the carrier frequency, f p Representing a sweepFrequency is described, and h represents the number of lines of the LED two-dimensional code in one period.
Fig. 3 is a flow chart of a two-dimensional coding and decoding method for positioning visible light in the present invention, which realizes the binary decoding function of the light source shown in fig. 1. The method is used for obtaining the coding information of the light sources from the acquired images so as to distinguish different light sources. The combined polygon obtained after the acquired image is processed by the mobile equipment calculates the ratio of the average distance between the adjacent dark bands of the subregion patterns to the maximum polygon side length because the distance between the adjacent dark bands of each subregion pattern is the same and the distances between the adjacent dark bands of different subregion patterns are different, and the light sources with different coordinates can be distinguished by sequencing the ratio.
Specifically, the specific implementation process of the decoding method comprises the following steps:
step 1, image processing:
the mobile equipment end in motion collects light source images through the binocular camera, processes the captured images and enhances the edge characteristics by increasing the contrast ratio of the captured images. Simultaneously converting the two images into gray level images, blurring the gray level images, and enabling the gray level images to pass through a single-side OTSU filter to find out the corresponding sub-area of each light source on the images and the complete closed combined image in the sub-area.
Step 2, calculating the maximum side length:
and obtaining the side lengths of the sides of the polygon in the closed graph in the mth image from the mth sub-area. Selecting any side of the largest polygon in the m-th sub-area as a reference side, starting from the reference side in a clockwise direction, respectively marking 6N sides as 1,2, and N, 6N sides, and marking the side length of the N (1 is less than or equal to N is less than or equal to 6N) as l m,n Removing abnormal values in the side length, namely the maximum value and the minimum value, obtaining the side length value with smaller error and solving the average value a of the remaining side length m
Step 3, calculating the side length distance:
and obtaining the adjacent edge distance of two adjacent polygons in the mth image from the mth sub-area. If the mth sub-area contains Y polygons, the polygons are respectively marked as 1,2,.., Y, the y+1th polygon is the same as the number of the adjacent sides of the Y-th polygon, and the distance d between the nth side of the Y-th polygon and the nth side of the y+1th polygon in the m-th sub-area is obtained m,y,n . Averaging distance D for the mth sub-region m
Figure BDA0002078508870000071
Step 4, finding the corresponding light source codes:
calculating the average value a of the side lengths of the largest polygons in the mth sub-region m And distance average value D m Ratio ρ of (2) m
Figure BDA0002078508870000072
The light source is pressed according to ρ m The values are encoded as 1,2,3 in order from small to large, respectively, and the coordinate values of the light source in the image in space are found by searching the mapping between the codes and the coordinates stored in the device in advance.
The two-dimensional coding and decoding method for visible light positioning of the present invention is described in further detail below by means of two specific embodiments.
Example #1:
setting the scanning frequency f of the binocular camera p =15.6 kHz, lens focal length f d =4mm, image resolution is 1280×960, OOK coding for each light source in one lighting period contains 312×1280 0-1 codes. As shown in FIG. 4, in the embodiment of the present invention, M is specified 1 、M 2 、M 3 In this embodiment #1, M is set as each matrix composed of a plurality of 0-1 codes 1 Matrix of 39×40 0-1 codes, the ith light source is denoted as L i Then by
Figure BDA0002078508870000073
The matrix obtained is L 1 OOK coding in one period, where H 1 156× representing all elements as 180 matrix, H 2 156X 480 matrix representing all elements 1, H 3 4X 4 matrix representing all elements 1, symbol +.>
Figure BDA0002078508870000074
Representing the kronecker product.
As shown in FIG. 5, set M 2 =39×40, and M 1 Identical, then
Figure BDA0002078508870000075
The matrix obtained is L 2 OOK encoding of (c).
As shown in FIG. 6, set M 3 =39×40, also with M 1 Identical, then
Figure BDA0002078508870000081
The matrix obtained is L 3 OOK encoding of (c). All 0 codes in the two-dimensional matrix formed by each OOK code comprise three identical combined positive 6 polygons, all positive 6 polygons in each combined graph have the same centroid, and the diagonals are coincident.
From a matrix
Figure BDA0002078508870000082
A pattern composed of 0 codes in the sequence to obtain L 1 、L 2 、L 3 Corresponds to the maximum hexagonal side length in the two-dimensional encoding of (a): c 1 =c 2 =c 3 Distance between adjacent sides =68: v 1 =8,v 2 =16,v 3 Ratio of side length to distance =24: gamma ray 1 =17/2,γ 2 =17/4,γ 3 =17/6. According to gamma i And (3) numbering the light sources again from 1 to 3 in sequence from small to large, recording the corresponding relation between the numbers and the coordinates of the light sources, and storing the corresponding relation in the mobile equipment.
The carrier frequency f is derived from h=312, n=1 1 =50 Hz. By OOK coding the light source and using the carrier frequency f s The light source is modulated by =110 Hz such that the light source emits light at a higher frequency. The equipment end in motion collects the image of the light source through the binocular camera, and captures the imageThe image is processed to enhance the edge characteristics by increasing its contrast. Simultaneously converting the two images into gray level images, blurring the gray level images, and enabling the gray level images to pass through a single-side OTSU filter to find out the corresponding subarea of each light source on the images and the closed graph in the subarea.
Selecting any edge of the largest polygon in the m-th sub-area as a reference edge, starting from the reference edge in a clockwise direction, respectively marking 6 edges as 1 st, 2 nd, 3 rd, 4 th, 5 th and 6 th edges, and marking the length of the n (n is more than or equal to 1 and less than or equal to 6) th edge as l m,n
l 1,1 =68,l 1,2 =67,l 1,3 =69,l 1,4 =68,l 1,5 =67,l 1,6 =68,
l 2,1 =68,l 2,2 =66,l 2,3 =70,l 2,4 =68,l 2,5 =67,l 2,6 =67,
l 3,1 =67,l 3,2 =68,l 3,3 =70,l 3,4 =68,l 3,5 =68,l 3,6 =68。
Reject outlier l in side length 1,2 ,l 1,3 ,l 2,2 ,l 2,3 ,l 3,1 ,l 3,3 I.e. the maximum and minimum of the values, obtaining the side length value with smaller error and obtaining the average value a of the residual side length m ,
a 1 =68,a 2 =68,a 3 =68
And obtaining the adjacent edge distance of two adjacent polygons in the mth image from the mth sub-area. The 1 st sub-area contains 3 polygons, the polygons are respectively designated as 1,2,3 in the order from large to small, the 2 nd sub-area contains 5 polygons, the polygons are respectively designated as 1,2 in the order from large to small, the 3 rd sub-area contains 2 polygons, and the polygons are respectively designated as 1,2 in the order from large to small. The number of the (y+1) th polygon is the same as the number of the adjacent edge of the (y) th polygon, and the distance d between the (n) th edge of the (y) th polygon and the (n) th edge of the (y+1) th polygon in the (m) th sub-area is obtained m,y,n
In the first sub-region:
d 1,1,1 =15,d 1,1,2 =15,d 1,1,3 =17,d 1,1,4 =16,d 1,1,5 =16,d 1,1,6 =17,
d 1,2,1 =17,d 1,2,2 =16,d 1,2,3 =17,d 1,2,4 =16,d 1,2,5 =18,d 1,2,6 =17,
in the second sub-region:
d 2,1,1 =8,d 2,1,2 =9,d 2,1,3 =8,d 2,1,4 =9,d 2,1,5 =9,d 2,1,6 =8,
d 2,2,1 =9,d 2,2,2 =9,d 2,2,3 =7,d 2,2,4 =7,d 2,2,5 =9,d 2,2,6 =7,
d 2,3,1 =7,d 2,3,2 =8,d 2,3,3 =9,d 2,3,4 =9,d 2,3,5 =7,d 2,3,6 =8,
d 2,4,1 =8,d 2,4,2 =9,d 2,4,3 =7,d 2,4,4 =9,d 2,4,5 =9,d 2,4,6 =8,
in the third sub-region:
d 3,1,1 =25,d 3,1,2 =23,d 3,1,3 =24,d 3,1,4 =24,d 3,1,5 =24,d 3,1,6 =25,
averaging distance D for the mth sub-region m
Figure BDA0002078508870000091
D 1 =17,D 2 =8,D 3 =24
Calculating the average value a of the side lengths of the largest polygons in the mth sub-region m And distance average value D m Ratio of (3):
Figure BDA0002078508870000092
ρ 1 =4,ρ 2 =17/2,ρ 3 =17/6
will L i According to ρ m The order of the values from small to large is to L 3 、L 1 、L 2 The codes are 1,2 and 3 respectively, and coordinate values of the light source in the image in space are found by searching a mapping between codes and coordinates which are stored in the mobile device in advance.
Example #2:
setting the scanning frequency f of the binocular camera p =15.6 kHz, lens focal length f d =4mm, image resolution is 1280×960, OOK coding for each light source in one lighting period contains 608×1280 0-1 codes.
As shown in fig. 7, the embodiment of the present invention designates T 1 、T 2 、T 3 In this embodiment #2, T is set for each matrix composed of a plurality of 0-1 codes 1 Matrix of 76×76 0-1 codes, the ith light source is denoted as L i Then by
Figure BDA0002078508870000093
The matrix obtained is L 1 OOK coding in one period, wherein W 1 A304×152 matrix representing 1 for all elements, W 2 A304X 336 matrix representing all elements 1, W 3 4X 4 matrix representing all elements 1, symbol +.>
Figure BDA0002078508870000101
Representing the kronecker product.
As shown in fig. 8, T is set 2 =76×76, and T 1 Identical, then
Figure BDA0002078508870000102
The matrix obtained is L 2 OOK encoding of (c).
As shown in fig. 9, T is set 3 =76×76, also with T 1 Identical, then
Figure BDA0002078508870000103
The matrix obtained is L 3 OOK encoding of (c). All 0 codes in the two-dimensional matrix formed by each OOK code comprise 3 identical combined positive 12 polygons, all positive 12 polygons in each combined graph have the same centroid, and the diagonals are coincident.
From a matrix
Figure BDA0002078508870000104
A pattern composed of 0 codes in the sequence to obtain L 1 、L 2 、L 3 Corresponding to a maximum dodecagon side length in the two-dimensional encoding of (a): c 1 =c 2 =c 3 Distance between adjacent sides =80: v 1 =16,v 2 =32,v 3 Ratio of side length to distance =48: gamma ray 1 =5,γ 2 =5/2,γ 3 =5/3. According to gamma i And (3) numbering the light sources again from 1 to 3 in sequence from small to large, recording the corresponding relation between the numbers and the coordinates of the light sources, and storing the corresponding relation in the mobile equipment.
By OOK coding the light source and using the carrier frequency f 1 The light source is modulated by =50hz such that the light source emits light at a higher frequency. The device side in motion collects light source images through the binocular camera, processes the captured images, and enhances edge characteristics by increasing contrast. Simultaneously converting the two images into gray level images, blurring the gray level images, and enabling the gray level images to pass through a single-side OTSU filter to find out the corresponding subarea of each light source on the images and the closed graph in the subarea.
Selecting any edge of the largest polygon in the m-th sub-area as a reference edge, starting from the reference edge in a clockwise direction, respectively marking 12 edges as 1,2,3,4,5,6,7,8,9, 10, 11 and 12 edges, and marking the edge length of the n (1 is less than or equal to n is less than or equal to 12) as l m,n
l 1,1 =83,l 1,2 =77,l 1,3 =82,l 1,4 =82,l 1,5 =81,l 1,6 =79,
l 1,7 =80,l 1,8 =78,l 1,9 =80,l 1,10 =79,l 1,11 =79,l 1,12 =79,
l 2,1 =81,l 2,2 =79,l 2,3 =80,l 2,4 =81,l 2,5 =83,l 2,6 =82,
l 2,7 =79,l 2,8 =79,l 2,9 =77,l 2,10 =79,l 2,11 =81,l 2,12 =79,
l 3,1 =80,l 3,2 =76,l 3,3 =79,l 3,4 =79,l 3,5 =79,l 3,6 =79,
l 3,7 =80,l 3,8 =78,l 3,9 =82,l 3,10 =83,l 3,11 =80,l 3,12 =80,
Reject outlier l in side length 1,1 ,l 1,2 ,l 2,5 ,l 2,9 ,l 3,2 ,l 3,10 I.e. the maximum and minimum of the values, obtaining the side length value with smaller error and obtaining the average value a of the residual side length m
a 1 =80,a 2 =80,a 3 =80
And obtaining the adjacent edge distance of two adjacent polygons in the mth image from the mth sub-area. The 1 st sub-area contains 3 polygons, the polygons are respectively designated as 1,2,3 in the order from large to small, the 2 nd sub-area contains 5 polygons, the polygons are respectively designated as 1,2 in the order from large to small, the 3 rd sub-area contains 2 polygons, and the polygons are respectively designated as 1,2 in the order from large to small. The number of the (y+1) th polygon is the same as the number of the adjacent edge of the (y) th polygon, and the distance d between the (n) th edge of the (y) th polygon and the (n) th edge of the (y+1) th polygon in the (m) th sub-area is obtained m,y,n
In the first sub-region:
d 1,1,1 =48,d 1,1,2 =46,d 1,1,3 =47,d 1,1,4 =47,d 1,1,5 =49,d 1,1,6 =46,
d 1,1,7 =46,d 1,1,8 =47,d 1,1,9 =49,d 1,1,10 =49,d 1,1,11 =49,d 1,1,12 =48,
in the second sub-region:
d 2,1,1 =32,d 2,1,2 =31,d 2,1,3 =32,d 2,1,4 =32,d 2,1,5 =33,d 2,1,6 =32,
d 2,1,7 =31,d 2,1,8 =34,d 2,1,9 =30,d 2,1,10 =34,d 2,1,11 =34,d 2,1,12 =33,
d 2,2,1 =30,d 2,2,2 =31,d 2,2,3 =31,d 2,2,4 =33,d 2,2,5 =31,d 2,2,6 =33,
d 2,2,7 =30,d 2,2,8 =33,d 2,2,9 =32,d 2,2,10 =33,d 2,2,11 =33,d 2,2,12 =34。
in the third sub-region:
d 3,1,1 =17,d 3,1,2 =16,d 3,1,3 =15,d 3,1,4 =15,d 3,1,5 =18,d 3,1,6 =14,
d 3,1,7 =16,d 3,1,8 =15,d 3,1,9 =18,d 3,1,10 =17,d 3,1,11 =16,d 3,1,12 =16,
d 3,2,1 =14,d 3,2,2 =17,d 3,2,3 =14,d 3,2,4 =14,d 3,2,5 =16,d 3,2,6 =14,
d 3,2,7 =17,d 3,2,8 =17,d 3,2,9 =17,d 3,2,10 =15,d 3,2,11 =17,d 3,2,12 =16,
d 3,3,1 =18,d 3,3,2 =17,d 3,3,3 =17,d 3,3,4 =16,d 3,3,5 =16,d 3,3,6 =17,
d 3,3,7 =14,d 3,3,8 =15,d 3,3,9 =15,d 3,3,10 =16,d 3,3,11 =17,d 3,3,12 =17,
d 3,4,1 =14,d 3,4,2 =16,d 3,4,3 =16,d 3,4,4 =16,d 3,4,5 =17,d 3,4,6 =17,
d 3,4,7 =15,d 3,4,8 =16,d 3,4,9 =14,d 3,4,10 =18,d 3,4,11 =15,d 3,4,12 =14。
averaging distance D for the mth sub-region m
Figure BDA0002078508870000121
D 1 =47,D 2 =32,D 3 =16
Calculating the average value a of the side lengths of the largest polygons in the mth sub-region m And distance average value D m Ratio ρ of (2) m
Figure BDA0002078508870000122
ρ 1 =4,ρ 2 =17/2,ρ 3 =17/6
Will L i According to ρ m The order of the values from small to large is to L 3 、L 2 、L 1 The codes are 1,2 and 3 respectively, and coordinate values of the light source in the image in space are found by searching a mapping between codes and coordinates which are stored in the mobile device in advance.
From the above obtained results, it can be seen that the two-dimensional encoding and decoding method for positioning visible light in this embodiment #1 and #2 can both achieve encoding and decoding of the light source, and the obtained results have high efficiency, reliability and accuracy.
In summary, the two-dimensional coding and decoding method for visible light positioning provided by the invention utilizes the rapid switching characteristic of the light emitting device, realizes communication by high-speed flashing and lighting, and effectively solves the problem of unreliable communication in indoor visible light positioning. This technique has advantages in terms of versatility, accuracy, and the like. Therefore, the invention effectively overcomes various defects in the prior art and has high industrial utilization value.
The above embodiments are merely illustrative of the principles of the present invention and its effectiveness, and are not intended to limit the invention. Modifications and variations may be made to the above-described embodiments by those skilled in the art without departing from the spirit and scope of the invention. Accordingly, it is intended that all equivalent modifications and variations of the invention be covered by the claims, which are within the ordinary skill of the art, be within the spirit and scope of the present disclosure.

Claims (1)

1. A two-dimensional coding and decoding method for visible light positioning is used for realizing coding of a light emitting device; the visible light coding based on OOK is modulated by using a set carrier frequency, so that a light emitting device emits light at a higher frequency, a light source displays a polygon pattern with light and shade alternation on a CMOS camera set with a certain scanning frequency while illuminating, so that the emitted light carries certain information, and the brightness change of the light source cannot be perceived in a space where the light source works by human eyes; acquiring images through a binocular camera fixed on the mobile equipment, processing and decoding the acquired images to obtain light sources carrying information to distinguish different positions, and finally calculating by a binocular positioning technology to obtain the positioning of the mobile equipment; the binocular camera is used for gathering the image, includes: the two CMOS cameras are fixed on a certain plane of the mobile equipment, the internal and external parameters of the cameras are the same, the imaging is coplanar, the optical axes are parallel, and the scanning frequency is adjustable; the mobile equipment is used for storing the mapping relation between the OOK codes of the light sources and the coordinates thereof, processing the images acquired by the binocular cameras, distinguishing different light sources on the images according to a decoding method, obtaining the space coordinates thereof according to the mapping relation, and resolving the self-positioning of the mobile equipment by a binocular positioning technology; the decoding method is used for obtaining coding information of light sources from acquired images so as to distinguish different light sources, and the combined polygons obtained after the acquired images are processed through mobile equipment can distinguish light sources with different coordinates and obtain coordinates because the distances between adjacent dark bands of each subregion pattern are the same and the distances between adjacent dark bands of different subregion patterns are different; the method is characterized in that:
the two-dimensional coding method comprises the following steps of:
step 1, OOK coding is carried out on the light source:
setting the scanning frequency f of the binocular camera p The resolution of the image is b 1 ×b 2 The OOK coding of each light source in one lighting period includes h×b 1 0-1 codes, wherein h is any positive integer; to ensure that each light source has at least one complete pattern on the image, each OOK encodes a constituent h×b 1 All 0 codes in the two-dimensional matrix at least comprise three identical combined 6N polygons, wherein N is a positive integer, the centroids of all 6N polygons in each combined graph are identical, and the diagonals are coincident, and then the coding of the ith light source is as follows:
Figure FDA0004238939120000011
said b 1 、b 2 The height and the width of the image resolution are respectively given in pixels; h 1 、H 2 、H 3 、M i Are all composed of 0-1 code, wherein H 1 、H 2 、H 3 A matrix consisting of all 1 codes is represented,
Figure FDA0004238939120000012
a combined graph representing an ith LED; sign->
Figure FDA0004238939120000013
Represents the kronecker product;
step 2, calculating the maximum side length:
obtaining the corresponding light source in the ith light source by combining multiple patterns in the step 1Side length c of maximum polygon i And distance v i Ratio gamma of (2) i The method comprises the steps of carrying out a first treatment on the surface of the According to gamma i Respectively numbering the light sources from 1 to 3 in sequence from small to large, recording the corresponding relation between the numbers and the coordinates of the light sources, and storing the corresponding relation in the mobile equipment;
step 3, light source modulation:
at f s =f p The carrier frequency of/(hn) modulates the light source, where n is a positive integer, such that the light source emits light at a higher frequency, where: f (f) s Representing the carrier frequency, f p The scanning frequency is represented, and h represents the number of lines of the LED two-dimensional codes in one period;
the decoding method comprises the following steps:
step 1, image processing:
acquiring a light source image through a binocular camera at a moving equipment end, processing the acquired image, and enhancing edge characteristics by increasing contrast; simultaneously converting the two images into gray level images, carrying out fuzzification treatment on the gray level images, and then enabling the gray level images to pass through a single-side OTSU filter to find out the corresponding subareas of each light source on the images and complete closed combined patterns in the subareas;
step 2, calculating the maximum side length:
obtaining the side lengths of the sides of the polygon in the closed graph in the mth image from the mth sub-area; selecting any side of the largest polygon in the m-th sub-area as a reference side, and starting from the reference side in a clockwise direction, respectively marking 6N sides as 1,2. The nth edge length is denoted as l m,n Wherein N is more than or equal to 1 and less than or equal to 6N, eliminating abnormal values in the side length, namely the maximum value and the minimum value thereof, obtaining the side length value with smaller error and obtaining the average value a of the remaining side length m
Step 3, calculating the side length distance:
obtaining the adjacent edge distance of two adjacent polygons in the mth image from the mth sub-area; if the m-th sub-area contains Y polygons, the polygons are respectively named as 1,2, Y, y+1th and Y-th polygons in order from large to smallThe adjacent edges are the same in number, and the distance d between the nth edge of the nth polygon and the nth edge of the (y+1) th polygon in the mth sub-area is obtained m,y,n The method comprises the steps of carrying out a first treatment on the surface of the Averaging distance D for the mth sub-region m
Figure FDA0004238939120000021
Step 4, finding the corresponding light source codes:
calculating the average value a of the side lengths of the largest polygons in the mth sub-region m And distance average value D m Ratio ρ of (2) m
Figure FDA0004238939120000022
The light source is pressed according to ρ m The values are encoded as 1,2,3 in order from small to large, respectively, and the coordinate values of the light source in the image in space are found by searching the mapping between the codes and the coordinates stored in the device in advance.
CN201910462640.7A 2018-10-18 2019-05-30 Two-dimensional coding and decoding method for visible light positioning Active CN110736965B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2018112141206 2018-10-18
CN201811214120 2018-10-18

Publications (2)

Publication Number Publication Date
CN110736965A CN110736965A (en) 2020-01-31
CN110736965B true CN110736965B (en) 2023-06-30

Family

ID=69236705

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910462640.7A Active CN110736965B (en) 2018-10-18 2019-05-30 Two-dimensional coding and decoding method for visible light positioning

Country Status (1)

Country Link
CN (1) CN110736965B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113820661B (en) * 2021-09-03 2023-07-28 暨南大学 Visible light positioning method and system based on binary and double pointer stripe search

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017192122A (en) * 2016-04-11 2017-10-19 大学共同利用機関法人情報・システム研究機構 Information transmitter, information receiver, information transmission system and program, positioning system, lighting fixture and illumination system

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1138233C (en) * 2000-05-26 2004-02-11 清华大学 Computerized three-dimensional contour reconstruction method based on space coding
AU2002313729A1 (en) * 2001-08-07 2003-02-24 Pacific Holographics, Inc. System and method for encoding and decoding an image or document and document encoded thereby
US8848059B2 (en) * 2009-12-02 2014-09-30 Apple Inc. Systems and methods for receiving infrared data with a camera designed to detect images based on visible light
US9287976B2 (en) * 2011-07-26 2016-03-15 Abl Ip Holding Llc Independent beacon based light position system
CN104506838B (en) * 2014-12-23 2016-06-29 宁波盈芯信息科技有限公司 A kind of depth perception method of character array area-structure light, Apparatus and system
CN105260694B (en) * 2015-10-22 2017-12-01 佛山科学技术学院 A kind of two-dimension code area localization method based on multistage key extraction with analysis
CN106597374B (en) * 2016-11-09 2019-05-21 北京大学 A kind of indoor visible light localization method and system based on camera shooting frame analysis
CN108572348A (en) * 2018-06-06 2018-09-25 华南理工大学 A kind of indoor visible light vision positioning method and its hardware system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017192122A (en) * 2016-04-11 2017-10-19 大学共同利用機関法人情報・システム研究機構 Information transmitter, information receiver, information transmission system and program, positioning system, lighting fixture and illumination system

Also Published As

Publication number Publication date
CN110736965A (en) 2020-01-31

Similar Documents

Publication Publication Date Title
CN110261823B (en) Visible light indoor communication positioning method and system based on single LED lamp
US7957007B2 (en) Apparatus and method for illuminating a scene with multiplexed illumination for motion capture
WO2019020200A1 (en) Method and apparatus for accurate real-time visible light positioning
US20070268366A1 (en) System and method for sensing geometric and photometric attributes of a scene with multiplexed illumination and solid state optical devices
US11361466B2 (en) Position information acquisition device, position information acquisition method, recording medium, and position information acquisition system
CN106372556A (en) Optical label identification method
US20070268481A1 (en) System and method for measuring scene reflectance using optical sensors
CN107255524B (en) Method for detecting frequency of LED light source based on mobile equipment camera
US8921752B2 (en) Information acquisition device, information acquisition method, recording medium, and information acquisition system
US8009192B2 (en) System and method for sensing geometric and photometric attributes of a scene with multiplexed illumination and solid states optical devices
CN107835050A (en) A kind of localization method and system based on visible light communication
CN110736965B (en) Two-dimensional coding and decoding method for visible light positioning
CN108288289A (en) A kind of LED visible detection methods and its system for visible light-seeking
JP6466684B2 (en) Visible light transmitter, visible light receiver, visible light communication system, visible light communication method and program
US20180006724A1 (en) Multi-transmitter vlc positioning system for rolling-shutter receivers
Naimark et al. Encoded LED system for optical trackers
KR102024163B1 (en) Method and apparatus for configuring region of interest in an optical camera communication
CN110989579B (en) Method and device for guiding indoor AGV, computer equipment and storage medium thereof
CN105095824A (en) Identification control method and apparatus for information code
CN109586791B (en) Visible light communication method and device
CN109756667B (en) Position acquisition system, position acquisition device, position acquisition method, and recording medium
CN114389694B (en) Easily-identified light source waveform design method in visible light navigation communication integration
Chen et al. Two-dimensional indoor visible light positioning using smartphone image sensor
JP2021183990A (en) Position information acquisition system, position information acquisition device, position information acquisition method, and program
US10110865B2 (en) Lighting device, lighting system, and program

Legal Events

Date Code Title Description
DD01 Delivery of document by public notice
DD01 Delivery of document by public notice

Addressee: WUHAN WEISIDE TECHNOLOGY Co.,Ltd. Person in charge of patentsThe principal of patent

Document name: Notification to Make Rectification

Addressee: WUHAN WEISIDE TECHNOLOGY Co.,Ltd. Person in charge of patentsThe principal of patent

Document name: Notice of deemed not to entrust patent agency (individual)

PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant