CN110736965A - 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
CN110736965A
CN110736965A CN201910462640.7A CN201910462640A CN110736965A CN 110736965 A CN110736965 A CN 110736965A CN 201910462640 A CN201910462640 A CN 201910462640A CN 110736965 A CN110736965 A CN 110736965A
Authority
CN
China
Prior art keywords
light source
light
images
coding
ook
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.)
Granted
Application number
CN201910462640.7A
Other languages
Chinese (zh)
Other versions
CN110736965B (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 visible light positioning two-dimensional coding and decoding methods, which are OOK-based visible light coding and can be used for realizing indoor visible light positioning.A light source is coded and modulated by carrier frequency, so that the light source displays a bright-dark alternating polygonal pattern on a CMOS camera with fixed scanning frequency while illuminating.

Description

two-dimensional coding and decoding method for visible light positioning
Technical Field
The invention relates to two-dimensional coding and decoding methods for visible light positioning, belonging 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, is widely applied to the fields of intelligent robots, shopping guide in large shopping malls and the like, although indoor positioning technologies based on Bluetooth, radio frequency, ultrasonic waves, infrared rays, ultra-wide bandwidth, WiFi and the like are developed, the indoor positioning technologies need additional auxiliary positioning equipment, the indoor positioning cost is greatly increased, and the requirements on application environments are strict.
The principle of visible light positioning is that the high-speed flicker of the light emitting device is utilized to realize the positioning of the mobile equipment, the light emitting is represented as 1, the light is represented as 0, the light emitting device is modulated and encoded to emit a light signal with fixed information, the mobile equipment receives the light signal and obtains the position coordinate of the light source through decoding, and finally the coordinate of the mobile equipment is solved according to the geometric relationship between the light source and the mobile equipment, so that the positioning of the equipment is realized.
The existing visible light positioning system and method using an image sensor, such as ' indoor visible light self-positioning systems and methods based on binocular technology' (2018107961366) and 'positioning navigation system based on indoor lighting' (201210484538.5), 'binocular non-calibration space positioning method' (CN102622767B), ' indoor visible light positioning system' (CN107703485A) and ' indoor visible light asynchronous positioning method using a camera' (CN105306141A) all have the problems of single property of -dimensional coding, difficult identification and the like, are large in positioning error, low in positioning efficiency and easy to be influenced by indoor environmental 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 needed to be adopted, so that the fault tolerance rate of visible light decoding is high, the effects of high decoding reliability and accurate result are achieved by obtaining multiple groups of data and eliminating abnormal numerical values in the data, meanwhile, the two-dimensional coding of the light source based on OOK is adopted, the realization of low cost is facilitated, and the method can be widely applied to indoor visible light positioning by pushing through .
Disclosure of Invention
The invention relates to a two-dimensional coding and decoding method for positioning visible light, which aims at the problems of the background technology, designs two-dimensional coding and decoding methods for positioning visible light, is used for realizing indoor visible light positioning, enables a light-emitting device to emit light at higher frequency by coding a light source and modulating the light source by determined carrier frequency, acquires images by a binocular camera fixed on equipment, processes and decodes the acquired images to obtain information carried by the images so as to distinguish the light source at different positions, and finally obtains the positioning of mobile equipment by calculating the binocular positioning technology.
two-dimensional coding and decoding method of visible light positioning, which is used to realize the coding of the light emitting device, is OOK-based visible light coding and modulates the visible light coding with the set carrier frequency, so that the light emitting device emits light with higher frequency, and the light source displays alternating bright and dark polygon patterns on the CMOS camera with fixed scanning frequency while illuminating, thereby the emitted light carries fixed information, and the bright and dark changes of the light source can not be perceived by human eyes in the working space of the light source;
the binocular camera is used for collecting images, and is two CMOS (Complementary Metal-Oxide-Semiconductor) cameras fixed on a certain plane of the mobile equipment, wherein the internal and external parameters of the cameras are the same, the imaging co-plane is formed, the optical axes are parallel to each other, 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 of the OOK codes, processing the images acquired by the binocular camera, distinguishing different light sources on the images according to a decoding method, obtaining the space coordinates of the light sources according to the mapping relation, and resolving the self-positioning of the mobile equipment by using a binocular positioning technology;
the decoding method is used for obtaining the coding information of the light source from the collected image so as to distinguish different light sources, the combined polygon is obtained after the collected image is processed by the mobile equipment, because the distance between the adjacent dark bands of each sub-area pattern is the same, the distance between the adjacent dark bands of different sub-area patterns is different, the ratio of the maximum polygon side length in the sub-area pattern to the average distance between the adjacent dark bands is calculated, and the light sources with different coordinates can be distinguished and the coordinates of the light sources can be obtained by sequencing the light sources according to the ratio.
, the specific implementation process of the encoding method includes the following steps:
step 1, OOK coding is carried out on a light source:
setting the scanning frequency of the binocular camera to be fpResolution of the image being b1×b2OOK coding of each light source in lighting periods comprises hxb1(h is a positive integer) 0-1 codes to ensure that there are at least complete patterns on the image for each light source, eachHxb formed by OOK coding1All the 0 codes in the two-dimensional matrix at least comprise three same combined 6N polygons (N is a positive integer), all the centroids of the 6N polygons in each combined graph are the same, and the diagonals coincide, so that the code of the ith light source is as follows:wherein: b is1、b2Respectively the height and width of the image resolution, and the unit is pixel; h1、H2、H3、MiAre all composed of 0-1 code, wherein H1、H2、H3A matrix consisting of all 1 codes is represented,a combination pattern representing the ith LED; symbol
Figure BDA0002078508870000033
Representing the kronecker product.
Step 2, calculating the maximum side length:
obtaining the side length c of the corresponding maximum polygon in the ith light source by combining multiple graphs in the step 1iAnd a distance viRatio of (gamma)i. According to gammaiAnd numbering the light sources from 1 to 3 in sequence from small to large, recording the corresponding relation between the number of the light sources and the coordinates of the light sources, and storing the corresponding relation into the mobile equipment.
And 3, light source modulation:
with fs=fp(hn) (n is a positive integer) such that the light source emits light at a higher frequency, wherein: f. ofsRepresenting the carrier frequency, fpRepresenting the scan frequency, h represents the number of rows of the LED two-dimensional code in cycles.
Further , the specific implementation process of the decoding method includes the following steps:
step 1, image processing:
and simultaneously converting the two images into gray images, performing fuzzification processing on the gray images, and then enabling the gray images to pass through unilateral OTSU filters to find out the corresponding subarea of each light source on the images and the complete closed combined graph in the subarea.
Step 2, calculating the maximum side length:
and obtaining the side length of each side of a large polygon in the closed graph in the mth image according to the mth sub-area. Selecting any edge of the maximum polygon in the mth sub-region as a reference edge, and respectively recording 6N edges as the 1 st, 2 nd, N. The length of the N (N is more than or equal to 1 and less than or equal to 6N) th strip is marked as lm,nRemoving 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 residual side lengthm
And 3, calculating the side length distance:
and obtaining the adjacent side distance of two adjacent polygons in the mth image according to the mth sub-area. If the mth sub-region contains Y polygons, respectively recording the polygons as 1, 2, am,y,n. Averaging the distance D of the mth sub-regionm
Figure BDA0002078508870000041
And 4, finding a corresponding light source code:
calculating the average value a of the side lengths of the maximum polygons in the mth sub-regionmAnd the distance mean value DmRatio of (p)m
Figure BDA0002078508870000042
Pressing the light source at rhomThe values are coded as 1, 2, 3 in descending order, respectively, by searching for codes previously stored in the deviceAnd mapping between the coordinate and the coordinate, and finding the coordinate value of the light source in the space in the image.
Compared with the existing indoor visible light coding technology, the OOK-based visible light coding and decoding technology has the following beneficial effects:
⑴ two-dimensional coding of the light source is realized based on OOK, the cost is low, the realization is easy, and the method can be widely used for indoor visible light positioning by ;
⑵, the two-dimensional coding is adopted, so that the visible light decoding fault-tolerant rate is high, errors are reduced by acquiring a plurality of groups of data and eliminating abnormal values therein, the decoding reliability is high, and the result is accurate;
⑶ the invention solves the problems of difficult recognition, large error and easy influence of indoor environment factors due to single of dimension code in visible light positioning using an image sensor, and has advantages in accuracy, reliability, stability and universality.
Drawings
FIG. 1 is a flow chart illustrating methods for implementing visible light positioning in a room according to the present invention;
FIG. 2 is a flow chart of OOK-based LED two-dimensional encoding methods according to the present invention;
FIG. 3 is a flow chart illustrating an OOK-based LED decoding method according to the present invention;
FIG. 4 shows an LED in the embodiment #1 of the present invention1Partial coding;
FIG. 5 shows an LED in the embodiment #1 of the present invention2Partial coding;
FIG. 6 shows an LED in the embodiment #1 of the present invention3Partial coding;
FIG. 7 shows an LED in the embodiment #2 of the present invention1Partial coding;
FIG. 8 shows an LED in the embodiment #2 of the present invention2Partial coding;
FIG. 9 shows an LED in the embodiment #2 of the present invention3And (4) partial coding.
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention.
FIG. 1 is a flow chart of a method for realizing indoor visible light positioning according to the present invention, which is functionally used for realizing encoding of a light emitting device, and is OOK-based visible light encoding, and the OOK-based visible light encoding is modulated by a set carrier frequency, so that the light emitting device emits light at a higher frequency, and a light source displays a light and dark alternating polygon pattern on a CMOS camera with a set scanning frequency of while illuminating, so that the emitted light carries set information, and human eyes cannot perceive the light and dark changes of the light source in a working space of the light source, and images are collected by a binocular camera fixed on a mobile device, and the obtained images are processed and decoded to obtain information carrying the light source to distinguish different positions, and finally the positioning of the mobile device is calculated by a binocular positioning technology.
The binocular camera is used for collecting images, and is two CMOS (Complementary Metal-Oxide-Semiconductor) cameras fixed on a certain plane of the mobile equipment, wherein the internal and external parameters of the cameras are the same, the imaging co-plane is formed, the optical axes are parallel to each other, 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 of the OOK codes, processing the images collected by the binocular camera, distinguishing different light sources on the images according to a decoding method, obtaining the space coordinates of the light sources according to the mapping relation, and resolving the self-positioning of the mobile equipment by using a binocular positioning technology.
The decoding method is used for obtaining the coding information of the light source from the collected image so as to distinguish different light sources, the combined polygon is obtained after the collected image is processed by the mobile equipment, because the distance between the adjacent dark bands of each sub-area pattern is the same, the distance between the adjacent dark bands of different sub-area patterns is different, the ratio of the maximum polygon side length in the sub-area pattern to the average distance between the adjacent dark bands is calculated, and the light sources with different coordinates can be distinguished and the coordinates of the light sources can be obtained by sequencing the light sources according to the ratio.
The core technical idea of the visible light positioning two-dimensional coding and decoding method is to realize new visible light coding and decoding, and in order to make the technical scheme of the invention clearer, the invention is described in detail in with reference to the attached drawings.
Fig. 2 is a flow chart of visible light positioning two-dimensional encoding and decoding methods in the present invention, implementing binary encoding function for light emitting devices as shown in fig. 1, which is OOK-based visible light encoding, so that a light source displays alternating bright and dark polygon patterns on a CMOS camera set with fixed scanning frequency while illuminating, so that the emitted light carries fixed information.
Step 1, OOK coding is carried out on a light source:
setting the scanning frequency of the binocular camera to be fpResolution of the image being b1×b2OOK coding of each light source in lighting periods comprises hxb1(h is a positive integer) 0-1 codes, each OOK code constitutes hxb to ensure that at least complete patterns exist on the image for each light source1All the 0 codes in the two-dimensional matrix at least comprise three same combined 6N polygons (N is a positive integer), all the centroids of the 6N polygons in each combined graph are the same, and the diagonals coincide, so that the code of the ith light source is as follows:
Figure BDA0002078508870000061
wherein: b is1、b2Respectively the height and width of the image resolution, and the unit is pixel; h1、H2、H3、MiAre all composed of 0-1 code, wherein H1、H2、H3A matrix representing the composition of all 1 codes,
Figure BDA0002078508870000062
a combination pattern representing the ith LED; symbol
Figure BDA0002078508870000063
Representing the kronecker product.
Step 2, calculating the maximum side length:
obtaining the side length c of the corresponding maximum polygon in the ith light source by combining multiple graphs in the step 1iAnd a distance viRatio of (gamma)i. According to gammaiAnd 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 of the LED numbers and storing the LED numbers and the coordinates into equipment.
And 3, light source modulation:
with fs=fp(hn) (n is a positive integer) such that the light source emits light at a higher frequency, wherein: f. ofsRepresenting the carrier frequency, fpRepresenting the scan frequency, h represents the number of rows of the LED two-dimensional code in cycles.
FIG. 3 is a flow chart of a two-dimensional encoding and decoding method for visible light positioning according to the present invention, which implements the binary decoding function of the light source shown in FIG. 1, for obtaining the encoded information of the light source from the collected image to distinguish different light sources.
Specifically, the specific implementation process of the decoding method comprises the following steps:
step 1, image processing:
and simultaneously converting the two images into gray images, performing fuzzification processing on the gray images, and then enabling the gray images to pass through unilateral OTSU filters to find out the corresponding subarea of each light source on the images and the complete closed combined graph in the subarea.
Step 2, calculating the maximum side length:
and obtaining the side length of each side of a large polygon in the closed graph in the mth image according to the mth sub-area. Selecting any edge of the maximum polygon in the mth sub-region as a reference edge, starting from the reference edge in the clockwise direction, respectively recording 6N edges as 1, 2,.. multidot.n,.. multidot.6N edges, and recording the N (N is more than or equal to 1 and less than or equal to 6N) edge as lm,nRemoving 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 residual side lengthm
And 3, calculating the side length distance:
and obtaining the adjacent side distance of two adjacent polygons in the mth image according to the mth sub-area. If the mth sub-region contains Y polygons, respectively recording the polygons as 1, 2, am,y,n. Averaging the distance D of the mth sub-regionm
Figure BDA0002078508870000071
And 4, finding a corresponding light source code:
calculating the average value a of the side lengths of the maximum polygons in the mth sub-regionmAnd the distance mean value DmRatio of (p)m
Figure BDA0002078508870000072
Pressing the light source at rhomThe values are respectively coded as 1, 2 and 3 from small to large, and coordinate values of the light source in the image in the space are found by searching mapping between codes and coordinates which are stored in the device in advance.
The two-dimensional encoding and decoding methods for visible light positioning according to the present invention are further described in by two specific embodiments.
Example # 1:
setting scanning frequency f of binocular camerap15.6kHz, lens focal length fd4mm, the image resolution is 1280 × 960, and OOK encoding of lighting periods for each luminaire comprises 312 × 1280 0-1 codes, as shown in fig. 4, M is specified in the embodiment of the present invention1、M2、M3Each of which is a matrix composed of a plurality of 0-1 codes, and in this embodiment #1, M is set1The ith light source is denoted as L, where 39 × 40 matrices are composed of 0-1 codesiThen is obtained by
Figure BDA0002078508870000073
The resulting matrix is L1OOK encoding over cycles, where H1156X 80 matrix, H, representing all elements 12156X 480 matrix, H, representing all elements 134 x 4 matrix, symbol, representing all elements 1
Figure BDA0002078508870000074
Representing the kronecker product.
As shown in FIG. 5, setting M239 × 40, with M1Same, then
Figure BDA0002078508870000075
The resulting matrix is L2OOK encoding.
As shown in FIG. 6, setting M339 × 40, also with M1Same, then
Figure BDA0002078508870000081
The resulting matrix is L3OOK encoding. All the 0 codes in the two-dimensional matrix formed by each OOK code comprise three same combined positive 6-sided polygons, all the positive 6-sided polygons in each combined graph have the same centroids, and the diagonals are superposed.
By a matrixThe graph composed of the middle 0 code obtains L1、L2、L3The length of the side of the maximum hexagon in the two-dimensional code is as follows: c. C1=c2=c3Distance between adjacent sides, 68: v. of1=8,v2=16,v324, side length to distance ratio: gamma ray1=17/2,γ2=17/4,γ317/6. According to gammaiAnd respectively numbering the light sources from 1 to 3 again from small to large, recording the corresponding relation between the numbers and the coordinates of the light sources and storing the numbers and the coordinates into the mobile equipment.
The carrier frequency f is obtained by h 312 and n1150 Hz. By OOK-encoding the light source and using the carrier frequency fsThe method comprises the steps of modulating a light source at 110Hz to enable the light source to emit light at a high frequency, collecting images of the light source through a binocular camera at a moving equipment end, processing the captured images, increasing the contrast of the captured images to enhance the edge characteristic, simultaneously converting the two images into gray-scale images, performing fuzzification processing on the gray-scale images, enabling the gray-scale images to pass through single-side OTSU filters, and finding corresponding sub-areas of each light source on the images and closed graphs in the sub-areas.
Selecting any side of the maximum polygon in the mth sub-region as a reference side, starting from the reference side in the clockwise direction, respectively marking 6 sides as 1, 2, 3, 4, 5 and 6 sides, and marking the side length of the nth (n is not less than 1 and not more than 6) as lm,n
l1,1=68,l1,2=67,l1,3=69,l1,4=68,l1,5=67,l1,6=68,
l2,1=68,l2,2=66,l2,3=70,l2,4=68,l2,5=67,l2,6=67,
l3,1=67,l3,2=68,l3,3=70,l3,4=68,l3,5=68,l3,6=68。
Eliminating abnormal value l in side length1,2,l1,3,l2,2,l2,3,l3,1,l3,3I.e. the maximum value and the minimum value, obtaining the edge length value with smaller error and solvingMean value of remaining edge length am,
a1=68,a2=68,a3=68
And obtaining the adjacent side distance of two adjacent polygons in the mth image according to the mth sub-area. The 1 st sub-area contains 3 polygons, the polygons are respectively marked as 1, 2 and 3 according to the sequence from large to small, the 2 nd sub-area contains 5 polygons, the polygons are respectively marked as 1, 2, 5 according to the sequence from large to small, the 3 rd sub-area contains 2 polygons, and the polygons are respectively marked as 1 and 2 according to the sequence from large to small. The numbers of adjacent sides of the (y + 1) th polygon and the (y + 1) th polygon are the same, and the distance d between the nth side of the (y) th polygon and the nth side of the (y + 1) th polygon in the (m) th sub-region is obtainedm,y,n
th subregion:
d1,1,1=15,d1,1,2=15,d1,1,3=17,d1,1,4=16,d1,1,5=16,d1,1,6=17,
d1,2,1=17,d1,2,2=16,d1,2,3=17,d1,2,4=16,d1,2,5=18,d1,2,6=17,
in the second subregion:
d2,1,1=8,d2,1,2=9,d2,1,3=8,d2,1,4=9,d2,1,5=9,d2,1,6=8,
d2,2,1=9,d2,2,2=9,d2,2,3=7,d2,2,4=7,d2,2,5=9,d2,2,6=7,
d2,3,1=7,d2,3,2=8,d2,3,3=9,d2,3,4=9,d2,3,5=7,d2,3,6=8,
d2,4,1=8,d2,4,2=9,d2,4,3=7,d2,4,4=9,d2,4,5=9,d2,4,6=8,
in the third subregion:
d3,1,1=25,d3,1,2=23,d3,1,3=24,d3,1,4=24,d3,1,5=24,d3,1,6=25,
averaging the distance D of the mth sub-regionm
D1=17,D2=8,D3=24
Calculating the average value a of the side lengths of the maximum polygons in the mth sub-regionmAnd the distance mean value DmThe ratio of (A) to (B):
Figure BDA0002078508870000092
ρ1=4,ρ2=17/2,ρ3=17/6
mixing L withiAccording to rhomSequence pairs L with values from small to large3、L1、L2The codes are 1, 2 and 3 respectively, and coordinate values of the light source in the image in the space are found by searching mapping between the codes and the coordinates which are stored in the mobile device in advance.
Example # 2:
setting scanning frequency f of binocular camerap15.6kHz, lens focal length fdThe image resolution is 1280 × 960 at 4mm, and OOK encoding of each light source over lighting periods comprises 608 × 1280 0-1 codes.
As shown in FIG. 7, T is specified in the embodiment of the present invention1、T2、T3Each of which is a matrix composed of a plurality of 0-1 codes, and in this embodiment #2, T is set1The ith light source is denoted as L, where 76 × 76 matrices of 0-1 codes are formediThen is obtained byThe resulting matrix is L1OOK encoding over cycles, where W1304 x 152 matrix representing all elements as 1,W2304 x 336 matrix, W, representing all elements 134 x 4 matrix, symbol, representing all elements 1
Figure BDA0002078508870000101
Representing the kronecker product.
As shown in FIG. 8, T is set276 × 76, and T1Same, then
Figure BDA0002078508870000102
The resulting matrix is L2OOK encoding.
As shown in FIG. 9, T is set376 × 76, also with T1Same, then
Figure BDA0002078508870000103
The resulting matrix is L3OOK encoding. All the 0 codes in the two-dimensional matrix formed by each OOK code comprise 3 same combined positive 12-sided polygons, all the positive 12-sided polygons in each combined graph have the same centroids and the diagonals are superposed.
By a matrix
Figure BDA0002078508870000104
The graph composed of the middle 0 code obtains L1、L2、L3The two-dimensional codes of (2) correspond to the maximum dodecagon side length: c. C1=c2=c380, distance between adjacent sides: v. of1=16,v2=32,v348, side length to distance ratio: gamma ray1=5,γ2=5/2,γ35/3. According to gammaiAnd respectively numbering the light sources from 1 to 3 again from small to large, recording the corresponding relation between the numbers and the coordinates of the light sources and storing the numbers and the coordinates into the mobile equipment.
By OOK-encoding the light source and using the carrier frequency f1The light source is modulated at 50Hz so that the light source emits light at a higher frequency. The moving equipment end collects light source images through a binocular camera, processes the captured images, and enhances the edge characteristics by increasing the contrast of the captured images. Simultaneously combine twoAnd converting the image into a gray-scale image, performing fuzzification processing on the gray-scale image, and then enabling the gray-scale image to pass through unilateral OTSU filters to find out a corresponding sub-area of each light source on the image and a closed graph in the sub-area.
Selecting any side of the maximum polygon in the mth sub-region as a reference side, starting from the reference side in the clockwise direction, respectively marking 12 sides as 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 and 12 sides, and marking the side length of the nth (n is more than or equal to 1 and less than or equal to 12) as lm,n
l1,1=83,l1,2=77,l1,3=82,l1,4=82,l1,5=81,l1,6=79,
l1,7=80,l1,8=78,l1,9=80,l1,10=79,l1,11=79,l1,12=79,
l2,1=81,l2,2=79,l2,3=80,l2,4=81,l2,5=83,l2,6=82,
l2,7=79,l2,8=79,l2,9=77,l2,10=79,l2,11=81,l2,12=79,
l3,1=80,l3,2=76,l3,3=79,l3,4=79,l3,5=79,l3,6=79,
l3,7=80,l3,8=78,l3,9=82,l3,10=83,l3,11=80,l3,12=80,
Eliminating abnormal value l in side length1,1,l1,2,l2,5,l2,9,l3,2,l3,10I.e. the maximum value and the minimum value, obtaining the edge length value with smaller error and solving the average value a of the residual edge lengthm
a1=80,a2=80,a3=80
And obtaining the adjacent side distance of two adjacent polygons in the mth image according to the mth sub-area. The 1 st sub-region contains 3 polygons, i.e., a polygonThe shapes are respectively marked as 1, 2 and 3 from large to small, the 2 nd sub-area comprises 5 polygons, the polygons are respectively marked as 1, 2, 5 from large to small, the 3 rd sub-area comprises 2 polygons, and the polygons are respectively marked as 1 and 2 from large to small. The numbers of adjacent sides of the (y + 1) th polygon and the (y + 1) th polygon are the same, and the distance d between the nth side of the (y) th polygon and the nth side of the (y + 1) th polygon in the (m) th sub-region is obtainedm,y,n
th subregion:
d1,1,1=48,d1,1,2=46,d1,1,3=47,d1,1,4=47,d1,1,5=49,d1,1,6=46,
d1,1,7=46,d1,1,8=47,d1,1,9=49,d1,1,10=49,d1,1,11=49,d1,1,12=48,
in the second subregion:
d2,1,1=32,d2,1,2=31,d2,1,3=32,d2,1,4=32,d2,1,5=33,d2,1,6=32,
d2,1,7=31,d2,1,8=34,d2,1,9=30,d2,1,10=34,d2,1,11=34,d2,1,12=33,
d2,2,1=30,d2,2,2=31,d2,2,3=31,d2,2,4=33,d2,2,5=31,d2,2,6=33,
d2,2,7=30,d2,2,8=33,d2,2,9=32,d2,2,10=33,d2,2,11=33,d2,2,12=34。
in the third subregion:
d3,1,1=17,d3,1,2=16,d3,1,3=15,d3,1,4=15,d3,1,5=18,d3,1,6=14,
d3,1,7=16,d3,1,8=15,d3,1,9=18,d3,1,10=17,d3,1,11=16,d3,1,12=16,
d3,2,1=14,d3,2,2=17,d3,2,3=14,d3,2,4=14,d3,2,5=16,d3,2,6=14,
d3,2,7=17,d3,2,8=17,d3,2,9=17,d3,2,10=15,d3,2,11=17,d3,2,12=16,
d3,3,1=18,d3,3,2=17,d3,3,3=17,d3,3,4=16,d3,3,5=16,d3,3,6=17,
d3,3,7=14,d3,3,8=15,d3,3,9=15,d3,3,10=16,d3,3,11=17,d3,3,12=17,
d3,4,1=14,d3,4,2=16,d3,4,3=16,d3,4,4=16,d3,4,5=17,d3,4,6=17,
d3,4,7=15,d3,4,8=16,d3,4,9=14,d3,4,10=18,d3,4,11=15,d3,4,12=14。
averaging the distance D of the mth sub-regionm
Figure BDA0002078508870000121
D1=47,D2=32,D3=16
Calculating the average value a of the side lengths of the maximum polygons in the mth sub-regionmAnd the distance mean value DmRatio of (p)m
ρ1=4,ρ2=17/2,ρ3=17/6
Mixing L withiAccording to rhomSequence pairs L with values from small to large3、L2、L1The codes are 1, 2 and 3 respectively, and coordinate values of the light source in the image in the space are found by searching mapping between the codes and the coordinates which are stored in the mobile device in advance.
From the above results, it can be seen that the visible light positioning two-dimensional encoding and decoding methods in embodiments #1 and #2 can 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 methods for visible light positioning of the present invention utilize the fast switching characteristic of the light emitting device to realize communication by the high-speed flashing light thereof, thereby effectively solving the problem of unreliable communication in indoor visible light positioning.
It will be appreciated by those skilled in the art that modifications and variations can be made to the disclosed embodiments without departing from the spirit and scope of the invention, and therefore, is equivalent to modifications and variations that would be apparent to those skilled in the art without departing from the spirit and scope of the invention as disclosed in the appended claims.

Claims (3)

  1. The method is characterized in that OOK-based visible light coding is performed, the OOK-based visible light coding is modulated by set carrier frequency, so that the light emitting device emits light at higher frequency, a light source displays a polygonal pattern with alternating light and shade on a CMOS camera with fixed scanning frequency while illuminating, the emitted light carries fixed information, human eyes cannot perceive the light and shade change of the light source in a working space of the light source, images are collected through a binocular camera fixed on mobile equipment, the obtained images are processed and decoded, information carried by the images is obtained to distinguish the light sources at different positions, and finally the positioning of the mobile equipment is obtained through calculation of a binocular positioning technology;
    the binocular camera is used for collecting images, the images are two CMOS cameras fixed on a certain plane of the mobile equipment, the internal and external parameters of the cameras are the same, the images are coplanar, the optical axes are parallel to each other, 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 of the OOK codes, processing the images acquired by the binocular camera, distinguishing different light sources on the images according to a decoding method, obtaining the space coordinates of the light sources according to the mapping relation, and resolving the self-positioning of the mobile equipment by using a binocular positioning technology;
    the decoding method is used for obtaining the coding information of the light source from the collected image so as to distinguish different light sources, the combined polygon is obtained after the collected image is processed by the mobile equipment, because the distance between the adjacent dark bands of each sub-area pattern is the same, the distance between the adjacent dark bands of different sub-area patterns is different, the ratio of the maximum polygon side length in the sub-area pattern to the average distance between the adjacent dark bands is calculated, and the light sources with different coordinates can be distinguished and the coordinates of the light sources can be obtained by sequencing the light sources according to the ratio.
  2. 2. The two-dimensional coding and decoding method for visible light positioning according to claim 1, wherein the two-dimensional coding method includes the following steps:
    step 1, OOK coding is carried out on a light source:
    setting the scanning frequency of the binocular camera to be fpResolution of the image being b1×b2OOK coding of each light source in lighting periods comprises hxb10-1 code (h is positive integer), and h × b coded by OOK to ensure that each light source has at least complete patterns on the image1All the 0 codes in the two-dimensional matrix at least comprise three same combined 6N polygons (N is a positive integer), all the centroids of the 6N polygons in each combined graph are the same, and the diagonals coincide, so that the code of the ith light source is as follows:
    b is1、b2Respectively the height and width of the image resolution, and the unit is pixel; h1、H2、H3、MiAre all composed of 0-1 code, wherein H1、H2、H3A matrix consisting of all 1 codes is represented,
    Figure FDA0002078508860000012
    a combination pattern representing the ith LED; symbol
    Figure FDA0002078508860000013
    Represents the kronecker product;
    step 2, calculating the maximum side length:
    obtaining the side length c of the corresponding maximum polygon in the ith light source by combining multiple graphs in the step 1iAnd a distance viRatio of (gamma)i(ii) a According to gammaiNumbering the light sources from 1 to 3 in sequence from small to large, recording the corresponding relation between the numbers of the light sources and the coordinates of the light sources, and storing the numbers into the mobile equipment;
    and 3, light source modulation:
    with fs=fp(hn) (where n is a positive integer) such that the light source emits light at a higher frequency, wherein: f. ofsRepresenting the carrier frequency, fpRepresenting the scan frequency, h represents the number of rows of the LED two-dimensional code in cycles.
  3. 3. The two-dimensional coding and decoding method for visible light positioning as claimed in claim 1, wherein the decoding method comprises the following steps:
    step 1, image processing:
    simultaneously converting the two images into gray images, performing fuzzification processing on the gray images, and then enabling the gray images to pass through unilateral OTSU filters to find out corresponding subregions of each light source on the images and complete closed combined graphs in the subregions;
    step 2, calculating the maximum side length:
    obtaining the side length of each side of a large polygon in a closed graph in the mth image according to the mth sub-area; selecting any edge of the maximum polygon in the mth sub-region as a reference edge, and respectively recording 6N edges as the 1 st, 2 nd, N. The nth side (N is more than or equal to 1 and less than or equal to 6N) is recorded as lm,nRemoving 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 residual side lengthm
    And 3, calculating the side length distance:
    obtaining the adjacent side distance of two adjacent polygons in the mth image according to the mth sub-area; if the mth sub-region contains Y polygons, respectively recording the polygons as 1, 2, am,y,n(ii) a Averaging the distance D of the mth sub-regionm
    Figure FDA0002078508860000021
    And 4, finding a corresponding light source code:
    calculating the average value a of the side lengths of the maximum polygons in the mth sub-regionmAnd the distance mean value DmRatio of (p)m
    Figure FDA0002078508860000031
    Pressing the light source at rhomThe values are coded as 1, 2 and 3 in descending order, and the mapping between the codes and the coordinates stored in the equipment in advance is searched to find outTo the coordinate values of the light source in space in the image.
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
CN201811214120 2018-10-18
CN2018112141206 2018-10-18

Publications (2)

Publication Number Publication Date
CN110736965A true CN110736965A (en) 2020-01-31
CN110736965B 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)

Cited By (1)

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

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1271144A (en) * 2000-05-26 2000-10-25 清华大学 Computerized three-dimensional contour reconstruction method based on space coding
US20030039195A1 (en) * 2001-08-07 2003-02-27 Long Michael D. System and method for encoding and decoding an image or document and document encoded thereby
US20110128384A1 (en) * 2009-12-02 2011-06-02 Apple Inc. Systems and methods for receiving infrared data with a camera designed to detect images based on visible light
US20130141555A1 (en) * 2011-07-26 2013-06-06 Aaron Ganick Content delivery based on a light positioning system
CN105260694A (en) * 2015-10-22 2016-01-20 佛山科学技术学院 Two-dimension code area locating method based on multistage backbone extraction and analysis
US20160178355A1 (en) * 2014-12-23 2016-06-23 RGBDsense Information Technology Ltd. Depth sensing method, device and system based on symbols array plane structured light
CN106597374A (en) * 2016-11-09 2017-04-26 北京大学 Indoor visible positioning method and system based on camera shooting frame analysis
JP2017192122A (en) * 2016-04-11 2017-10-19 大学共同利用機関法人情報・システム研究機構 Information transmitter, information receiver, information transmission system and program, positioning system, lighting fixture and illumination system
CN108572348A (en) * 2018-06-06 2018-09-25 华南理工大学 A kind of indoor visible light vision positioning method and its hardware system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1271144A (en) * 2000-05-26 2000-10-25 清华大学 Computerized three-dimensional contour reconstruction method based on space coding
US20030039195A1 (en) * 2001-08-07 2003-02-27 Long Michael D. System and method for encoding and decoding an image or document and document encoded thereby
US20110128384A1 (en) * 2009-12-02 2011-06-02 Apple Inc. Systems and methods for receiving infrared data with a camera designed to detect images based on visible light
US20130141555A1 (en) * 2011-07-26 2013-06-06 Aaron Ganick Content delivery based on a light positioning system
US20160178355A1 (en) * 2014-12-23 2016-06-23 RGBDsense Information Technology Ltd. Depth sensing method, device and system based on symbols array plane structured light
CN105260694A (en) * 2015-10-22 2016-01-20 佛山科学技术学院 Two-dimension code area locating method based on multistage backbone extraction and analysis
JP2017192122A (en) * 2016-04-11 2017-10-19 大学共同利用機関法人情報・システム研究機構 Information transmitter, information receiver, information transmission system and program, positioning system, lighting fixture and illumination system
CN106597374A (en) * 2016-11-09 2017-04-26 北京大学 Indoor visible positioning 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

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
江运力: "室内可见光通信定位技术研究", pages 20 - 40 *
陈道钱: "一种测距辅助的室内可见光指纹定位方法", vol. 56, no. 56, pages 1 - 7 *

Cited By (2)

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

Also Published As

Publication number Publication date
CN110736965B (en) 2023-06-30

Similar Documents

Publication Publication Date Title
US20190273908A1 (en) Methods Circuits Devices Assemblies Systems and Functionally Associated Computer Executable Code for Image Acquisition With Depth Estimation
US7957007B2 (en) Apparatus and method for illuminating a scene with multiplexed illumination for motion capture
US8638988B2 (en) Movement analysis and/or tracking system
CN106372701B (en) A kind of coding of optical label and recognition methods
CN106372556A (en) Optical label identification method
WO2019020200A1 (en) Method and apparatus for accurate real-time visible light positioning
US20070268481A1 (en) System and method for measuring scene reflectance using optical sensors
CN107835050B (en) A kind of localization method and system based on visible light communication
CN104361353A (en) Application of area-of-interest positioning method to instrument monitoring identification
CN107255524B (en) Method for detecting frequency of LED light source based on mobile equipment camera
CN104636779B (en) Ring code identifies identifying system
CN107222258B (en) Data acquisition method, data sending device and data transmission system
CN108288289A (en) A kind of LED visible detection methods and its system for visible light-seeking
CN110736965A (en) two-dimensional coding and decoding method for visible light positioning
JP6897389B2 (en) Discrimination computer program, discriminating device and discriminating method, and communication system
US20180006724A1 (en) Multi-transmitter vlc positioning system for rolling-shutter receivers
CN109784119B (en) Optical code generating device, decoding device, encoding method, decoding method, and system
WO2019054204A1 (en) Image processing device and method
CN110531318B (en) Method for indoor positioning extension of light-emitting unit ID (identity) in visible light imaging
CN107564064A (en) A kind of anchor point, its coding method, localization method and its system
CN114389694B (en) Easily-identified light source waveform design method in visible light navigation communication integration
CN109671121A (en) A kind of controller and its visible light-seeking visible detection method
CN113613189B (en) Pseudo light source identification method based on mark in visible light positioning
CN111931614B (en) Active light rigid body identification method, device, equipment and storage medium
CN109597030B (en) Method and device for positioning objects in storage room based on visible light signals

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