CN109784119B - Optical code generating device, decoding device, encoding method, decoding method, and system - Google Patents

Optical code generating device, decoding device, encoding method, decoding method, and system Download PDF

Info

Publication number
CN109784119B
CN109784119B CN201811509506.XA CN201811509506A CN109784119B CN 109784119 B CN109784119 B CN 109784119B CN 201811509506 A CN201811509506 A CN 201811509506A CN 109784119 B CN109784119 B CN 109784119B
Authority
CN
China
Prior art keywords
image
light
optical code
coding rule
stripes
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
CN201811509506.XA
Other languages
Chinese (zh)
Other versions
CN109784119A (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.)
Beijing tianlixiu Technology Co., Ltd
Original Assignee
Beijing Tianlixiu 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 Beijing Tianlixiu Technology Co ltd filed Critical Beijing Tianlixiu Technology Co ltd
Priority to CN201811509506.XA priority Critical patent/CN109784119B/en
Publication of CN109784119A publication Critical patent/CN109784119A/en
Application granted granted Critical
Publication of CN109784119B publication Critical patent/CN109784119B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Optical Communication System (AREA)
  • Studio Devices (AREA)

Abstract

The invention provides an optical code generating device, an optical code decoding device, a coding method using a light emitting lamp set, an optical code decoding method, an optical code interaction system and a storage medium. Wherein the optical code generating device includes: a light emitting lamp group; the light homogenizing piece is arranged in the light emitting direction of the light emitting lamp group; the encoder is connected with the light-emitting lamp group and used for receiving the pulse signals, compiling the pulse signals according to a preset encoding rule and generating control signals so as to control the light-emitting lamp group to form an optical code image on the light-equalizing piece according to the control signals, so that when an image acquisition device with a roller shutter exposure function receives the optical code image, the pulse signals are obtained through optical code image analysis; wherein the optical code image comprises a time-domain sequential identification image and a data image.

Description

Optical code generating device, decoding device, encoding method, decoding method, and system
Technical Field
The present invention relates to the field of information transmission, and in particular, to an optical code generating device, an optical code decoding device, an encoding method using a light emitting lamp group, an optical code decoding method, an optical code interaction system, and a computer-readable storage medium.
Background
In the prior art, a barcode (one-dimensional barcode or two-dimensional barcode) and a Radio Frequency Identification (RFID) barcode are commonly used in the internet of things sensing technology. However, the barcode has fixed information, i.e. the content of the barcode cannot be changed, such as the implementation cost of the RFID barcode is high, and low-cost investment cannot be realized, and the barcode is mostly used to carry information by using the gray scale of light, a rolling shutter camera is used to perform visible light communication with a light emitting diode, and OOK (On-Off Keying) is used to perform modulation, i.e. information is modulated onto the gray scale (brightness) of the light emitted by the light emitting diode, because the gray scale contains information, the camera must avoid overexposure when receiving the light emitted by the light emitting diode, and information is lost once overexposure occurs. Underexposure can cause too much noise and loss of information. When the camera enters the illumination area of the light-emitting diode, the distance is far or near, the brightness of the light-emitting diode lamp is strong or weak, and in order to obtain accurate exposure, the parameters of the camera need to be adjusted to obtain a stripe image with proper brightness. However, only two parameters determining the brightness of the image captured by the camera, one being the shutter and one being the gain (ISO value), are adjustable, so that to obtain a striped image, the shutter is almost set to the head and cannot be used to adjust the brightness of the image. The adjustable range of the gain is in fact limited. And the adjustment of the image brightness takes time, the process of capturing a proper image by the camera is slow. Therefore, the method cannot rapidly read the information emitted by the light emitting diode.
Therefore, a new method for encoding optical information is needed to solve the above problems.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art or the related art.
To this end, a first aspect of the present invention provides an optical code generating apparatus.
In a second aspect of the present invention, there is provided an optical code decoding apparatus.
In a third aspect of the present invention, there is provided a coding method using a group of light emitting lamps.
A fourth aspect of the present invention is to provide a method for decoding an optical code.
A fifth aspect of the present invention is to provide an optical code interaction system.
A sixth aspect of the present invention is to provide a computer-readable storage medium.
In view of the above, according to a first aspect of the present invention, there is provided an optical code generating apparatus comprising: a light emitting lamp group; the light homogenizing piece is arranged in the light emitting direction of the light emitting lamp group; the encoder is connected with the light-emitting lamp group and used for receiving the pulse signals, compiling the pulse signals according to a preset encoding rule and generating control signals so as to control the light-emitting lamp group to form an optical code image on the light-equalizing piece according to the control signals, so that when an image acquisition device with a roller shutter exposure function receives the optical code image, the pulse signals are obtained through optical code image analysis; wherein the optical code image comprises a time-domain sequential identification image and a data image.
The invention provides an optical code generating device, which specifically comprises: the device comprises a light emitting lamp group, a light homogenizing piece and an encoder. This application is through compiling the control signal of control light bank work with pulse signal, with control light bank is luminous and form optics code image on even light, so that the image acquisition device who has the curtain exposure function of rolling up can obtain pulse signal according to optics code image analysis, and then realized the dynamic change of optics code, in addition, the image acquisition device who has the curtain exposure function of rolling up can obtain the information according to the optics code image that the even light of scanning formed, need not to adjust luminance and the gain of optics code image, therefore, the speed of discerning and reading has been improved.
In addition, the optical code generating apparatus according to the above embodiment of the present invention may further include the following additional features:
in the above technical solution, further, when the encoding rule is a pulse position encoding rule, the light emitting lamp set is controlled to emit light of a single color; the identification image is a first preset number of continuous dark stripes, the data image at least comprises a starting image, and the starting image is a second preset number of continuous dark stripes and combined stripes of bright stripes when light-emitting diodes of the light-emitting lamp group emit light simultaneously.
In the technical scheme, when the coding rule is a pulse position coding rule, the light-emitting lamp set is controlled to emit light of a single color, an optical code image with one light-emitting color is further formed on the light homogenizing piece, the identification image in the optical code image is determined by scanning the optical code image, a data image continuous with the identification image in time domain is further positioned, and the pulse signal is obtained by analyzing the data image. According to the technical scheme, the light-emitting lamp set is controlled to emit a single color, and then the optical code image containing the color is formed on the light homogenizing piece, so that the image acquisition device with the rolling exposure function can obtain the pulse signal according to the optical code image analysis, and further the conversion from the pulse signal to the optical code is realized.
In any of the above technical solutions, further, when the coding rule is a binary coding rule or a ternary coding rule, the light emitting lamp set is controlled to emit two different colors of emitted light; when the coding rule is a binary coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises a starting image, and the starting image is a combination stripe of a second preset number of continuous dark stripes and bright stripes when the light-emitting diodes of the light-emitting lamp group emit light simultaneously; when the coding rule is a ternary coding rule, the identification image is a first preset number of continuous dark stripes; the data image includes at least a second preset number of consecutive dark stripes.
In the technical scheme, when the coding rule is a binary coding rule or a ternary coding rule, the light-emitting lamp group is controlled to emit light with two different colors. Specifically, when the coding rule is a binary coding rule, the light-emitting lamp group is controlled to emit light with two colors, wherein the identification image is a first preset number of continuous dark stripes; the data image at least comprises a starting image, and the starting image is a combination stripe of a second preset number of continuous dark stripes and bright stripes when the light-emitting diodes of the light-emitting lamp group emit light simultaneously. When the coding rule is a ternary coding rule, the light-emitting lamp group is controlled to emit light with two colors, and the identification image is a first preset number of continuous dark stripes; the data image includes at least a second preset number of consecutive dark stripes. The light-emitting lamp set can emit light with two different colors, the formed optical code image is a color stripe image, the color is used for representing information, and the interval (dark stripe) between the stripes is used for distinguishing different bright stripes. The different colors of light to carry information increases the amount of information transmitted and the amount of information carried in a unit optical code image over the same illumination time as compared to a transmission using a bright-dark scheme.
In any of the above technical solutions, further, when the coding rule is any one of a six-system coding rule, a seven-system coding rule and a twenty-four-system coding rule, the light-emitting lamp set is controlled to emit three different colors of emitted light; when the coding rule is a six-system coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises a starting image, and the starting image is a combination stripe of a second preset number of continuous dark stripes and bright stripes when the light-emitting diodes of the light-emitting lamp group emit light simultaneously; when the coding rule is a seven-system coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises a second preset number of continuous dark stripes; when the coding rule is a twenty-four system coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises an initial image, and the initial image is a combined stripe of a bright stripe when the light-emitting diodes of the light-emitting lamp group emit light at the same time according to the first light-emitting intensity and a bright stripe when the light-emitting diodes of the light-emitting lamp group emit light at the same time according to the second light-emitting intensity.
In the technical scheme, when the coding rule is a six-system coding rule or a seven-system coding rule, the light-emitting lamp group is controlled to emit three different colors of emitted light. Specifically, when the coding rule is a six-system coding rule, the light-emitting lamp group is controlled to emit light of three colors, wherein the identification image is a first preset number of continuous dark stripes; the data image at least comprises a starting image, and the starting image is a combination stripe of a second preset number of continuous dark stripes and bright stripes when the light-emitting diodes of the light-emitting lamp group emit light simultaneously. When the coding rule is a seven-system coding rule, the light-emitting lamp group is controlled to emit light with three colors, and the identification image is a first preset number of continuous dark stripes; the data image includes at least a second preset number of consecutive dark stripes. The light-emitting lamp set can emit light with three different colors, the formed optical code image is a color stripe image, the color is used for representing information, and the interval (dark stripe) between the stripes is used for distinguishing different bright stripes. Further, compared with the transmission method only using the light and shade method, the combined use of the light with different colors for carrying information and different luminous intensities increases the number of information transmission and the amount of information carried in the unit optical code image within the same luminous time, and the more the number of the types of the luminous colors is, the more information can be carried, wherein the first luminous intensity can be that the luminous lamp group emits light according to the maximum luminous intensity, and the second luminous intensity is that the luminous lamp group emits light according to the half value of the maximum luminous intensity.
According to a second aspect of the present invention, there is provided an optical code decoding apparatus comprising: an image pickup device having a shutter exposure function for picking up an optical code image formed on the light equalizing member in any of the optical code generating devices; and the decoder is connected with the image acquisition device and is used for scanning the optical code image, determining the identification image contained in the optical code image, determining the data image in the optical code image according to the identification image, and analyzing the data image according to a pre-stored coding rule to obtain the pulse signal corresponding to the data image.
The invention provides an optical code decoding device, which specifically comprises: image acquisition device and decoder that possess roll curtain exposure function. The optical code image formed on the light homogenizing piece is acquired by the image acquisition device with the rolling shutter exposure function, the decoder scans the optical code image acquired by the image acquisition device, the identification image contained in the optical code image is determined, the data image corresponding to the identification image is determined according to the time domain relation between the identification image and the data image, the data image is analyzed by using a pre-stored coding rule, the pulse signal corresponding to the data image is obtained, and then the acquisition of the pulse signal is realized. After the optical code image is acquired, the pulse signal contained in the optical code image can be directly obtained by scanning, identifying and decoding the optical code image. The optical code image can be dynamically acquired, and the optical code image can be acquired only by hardware of an image acquisition device with a roller shutter exposure function, so that the implementation cost of pulse information is low, the acquisition speed of the optical code image is high, and the acquisition failure probability is reduced.
In addition, the optical code decoding apparatus in the above embodiment of the present invention may further have the following additional technical features:
in the above technical solution, the decoder is specifically configured to: scanning the optical code image to obtain comb-shaped alternate light stripes and dark stripes; determining the distance between any two adjacent bright stripes; and comparing the distance between any two adjacent bright stripes, and taking the dark stripe between the two bright stripes corresponding to the maximum distance value as an identification image.
In the technical scheme, after the decoder scans the optical code image, comb-shaped alternate light stripes and dark stripes are obtained, the distance between any two adjacent light stripes is determined, the two light stripes corresponding to the maximum distance value are obtained by comparing the distance between any two adjacent light stripes, and the dark stripe before the two light stripes corresponding to the maximum distance value is used as the identification image. The identification image is determined so as to determine a data image continuous with the time domain of the identification image, and then after the data image is determined, a pulse signal is obtained according to the data image analysis. According to the method and the device, the data image can be rapidly determined by comparing the distance between any two adjacent bright stripes, one-step scanning and comparison of the image acquired by the image acquisition device are avoided, so that the data image is determined, the number of required image decoding is reduced, the power consumption is reduced, and the determination time of the data image is reduced.
In the above technical solution, the stripe between two adjacent identification images is used as the data image in the optical code image.
In the above technical solution, the decoder is specifically configured to: and decoding the data image by using a pre-stored coding rule by taking the first bright stripe of the data image as a start bit to obtain a pulse signal corresponding to the data image.
In the technical scheme, after the data image is determined, a first bright stripe in the data image is used as a start bit, the data image is decoded by using a pre-stored coding rule, specifically, distances of other bright stripes in the data image are determined according to a distance between the bright stripes in the start bit, and the stripes are decoded by using the pre-stored coding rule, so that a pulse signal contained in the data image is obtained. And after the start bit is determined, the data image is decoded by using a pre-stored coding rule, so that the situation of error analysis of the image data and the like is avoided.
According to a third aspect of the present invention, there is provided a coding method using a light emitting lamp set for an optical code generation device, the optical code generation device including the light emitting lamp set and a light equalizing member, the method including: receiving the pulse signal, and compiling the pulse signal according to a preset coding rule to generate a control signal of the light-emitting lamp group; controlling the light-emitting lamp group to form an optical code image on the light homogenizing piece according to the control signal so that when an image acquisition device with a roller shutter exposure function receives the optical code image, a pulse signal is obtained through optical code image analysis; wherein the optical code image comprises a time-domain sequential identification image and a data image.
The invention provides a coding method using a light-emitting lamp group, which is characterized in that when a pulse signal is received, the pulse signal is compiled according to a pre-stored coding rule so as to generate a control signal for controlling the light-emitting lamp group to emit light, an optical code image formed on a light homogenizing piece when the light-emitting lamp group emits light is generated, and when an image acquisition device with a rolling shutter exposure function receives the optical code image, the image acquisition device analyzes the optical code image to obtain the pulse signal, wherein the optical code image comprises a mark image and a data image which are continuous in time domain. This application is through compiling the control signal of control light bank work with pulse signal, with control light bank is luminous and form optics code image on even light, so that the image acquisition device who has the curtain exposure function of rolling up can obtain pulse signal according to optics code image analysis, and then realized the dynamic change of optics code, in addition, the image acquisition device who has the curtain exposure function of rolling up can obtain the information according to the optics code image that the even light of scanning formed, need not to adjust luminance and the gain of optics code image, therefore, the speed of discerning and reading has been improved.
In addition, the encoding method using the light emitting lamp set in the above embodiment provided by the present invention may further have the following additional technical features:
in the above technical solution, further, when the encoding rule is a pulse position encoding rule, the light emitting lamp set is controlled to emit light of a single color; the identification image is a first preset number of continuous dark stripes, the data image at least comprises a starting image, and the starting image is a second preset number of continuous dark stripes and combined stripes of bright stripes when light-emitting diodes of the light-emitting lamp group emit light simultaneously.
In the technical scheme, when the coding rule is a pulse position coding rule, the light-emitting lamp set is controlled to emit light of a single color, an optical code image with one light-emitting color is further formed on the light homogenizing piece, the identification image in the optical code image is determined by scanning the optical code image, a data image continuous with the identification image in time domain is further positioned, and the pulse signal is obtained by analyzing the data image. According to the technical scheme, the light-emitting lamp set is controlled to emit a single color, and then the optical code image containing the color is formed on the light homogenizing piece, so that the image acquisition device with the rolling exposure function can obtain the pulse signal according to the optical code image analysis, and further the conversion from the pulse signal to the optical code is realized.
In the above technical solution, further, when the coding rule is a binary coding rule or a ternary coding rule, the light emitting lamp set is controlled to emit two different colors of emitted light; when the coding rule is a binary coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises a starting image, and the starting image is a combination stripe of a second preset number of continuous dark stripes and bright stripes when the light-emitting diodes of the light-emitting lamp group emit light simultaneously; when the coding rule is a ternary coding rule, the identification image is a first preset number of continuous dark stripes; the data image includes at least a second preset number of consecutive dark stripes.
In the technical scheme, when the coding rule is a binary coding rule or a ternary coding rule, the light-emitting lamp group is controlled to emit light with two different colors. Specifically, when the coding rule is a binary coding rule, the light-emitting lamp group is controlled to emit light with two colors, wherein the identification image is a first preset number of continuous dark stripes; the data image at least comprises a starting image, and the starting image is a combination stripe of a second preset number of continuous dark stripes and bright stripes when the light-emitting diodes of the light-emitting lamp group emit light simultaneously. When the coding rule is a ternary coding rule, the light-emitting lamp group is controlled to emit light with two colors, and the identification image is a first preset number of continuous dark stripes; the data image includes at least a second preset number of consecutive dark stripes. The light-emitting lamp set can emit light with two different colors, the formed optical code image is a color stripe image, the color is used for representing information, and the interval (dark stripe) between the stripes is used for distinguishing different bright stripes. The different colors of light to carry information increases the amount of information transmitted and the amount of information carried in a unit optical code image over the same illumination time as compared to a transmission using a bright-dark scheme.
In the above technical solution, further, when the coding rule is any one of a six-system coding rule, a seven-system coding rule and a twenty-four-system coding rule, the light emitting lamp set is controlled to emit three different colors of emitted light; when the coding rule is a six-system coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises a starting image, and the starting image is a combination stripe of a second preset number of continuous dark stripes and bright stripes when the light-emitting diodes of the light-emitting lamp group emit light simultaneously; when the coding rule is a seven-system coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises a second preset number of continuous dark stripes; when the coding rule is a twenty-four system coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises an initial image, and the initial image is a combined stripe of a bright stripe when the light-emitting diodes of the light-emitting lamp group emit light at the same time according to the first light-emitting intensity and a bright stripe when the light-emitting diodes of the light-emitting lamp group emit light at the same time according to the second light-emitting intensity.
In the technical scheme, when the coding rule is a six-system coding rule or a seven-system coding rule, the light-emitting lamp group is controlled to emit three different colors of emitted light. Specifically, when the coding rule is a six-system coding rule, the light-emitting lamp group is controlled to emit light of three colors, wherein the identification image is a first preset number of continuous dark stripes; the data image at least comprises a starting image, and the starting image is a combination stripe of a second preset number of continuous dark stripes and bright stripes when the light-emitting diodes of the light-emitting lamp group emit light simultaneously. When the coding rule is a seven-system coding rule, the light-emitting lamp group is controlled to emit light with three colors, and the identification image is a first preset number of continuous dark stripes; the data image includes at least a second preset number of consecutive dark stripes. The light-emitting lamp set can emit light with three different colors, the formed optical code image is a color stripe image, the color is used for representing information, and the interval (dark stripe) between the stripes is used for distinguishing different bright stripes. Further, compared with the transmission method only using the light and shade method, the combined use of the light with different colors for carrying information and different luminous intensities increases the number of information transmission and the amount of information carried in the unit optical code image within the same luminous time, and the more the number of the types of the luminous colors is, the more information can be carried, wherein the first luminous intensity can be that the luminous lamp group emits light according to the maximum luminous intensity, and the second luminous intensity is that the luminous lamp group emits light according to the half value of the maximum luminous intensity.
According to a fourth aspect of the present invention, there is provided an optical code decoding method for a terminal including an image pickup device having a rolling exposure function, the method comprising: acquiring an optical code image formed on the light homogenizing element in any one of the encoding methods using the light emitting lamp group by using an image acquisition device with a roller shutter exposure function; scanning the optical code image to determine a mark image contained in the optical code image; determining a data image in the optical code image from the identification image; and analyzing the data image according to a pre-stored coding rule to obtain a pulse signal corresponding to the data image.
The invention provides an optical code decoding method, which specifically comprises the following steps: image acquisition device and decoder that possess roll curtain exposure function. The image acquisition device with the rolling shutter exposure function scans an optical code image acquired by the image acquisition device after acquiring the optical code image formed on the light homogenizing piece, determines an identification image contained in the optical code image, determines a data image corresponding to the identification image according to a time domain relation between the identification image and the data image, analyzes the data image by using a pre-stored coding rule, obtains a pulse signal corresponding to the data image, and further realizes acquisition of the pulse signal. After the optical code image is acquired, the pulse signal contained in the optical code image can be directly obtained by scanning, identifying and decoding the optical code image. The optical code image can be dynamically acquired, and the optical code image can be acquired only by hardware of an image acquisition device with a roller shutter exposure function, so that the implementation cost of pulse information is low, the acquisition speed of the optical code image is high, and the acquisition failure probability is reduced.
In addition, the optical code decoding method in the above embodiment of the present invention may further have the following additional technical features:
in the above technical solution, further, the step of scanning the optical code image and determining the identification image included in the optical code image specifically includes: scanning the optical code image to obtain comb-shaped alternate light stripes and dark stripes; determining the distance between any two adjacent bright stripes; and comparing the distance between any two adjacent bright stripes, and taking the dark stripe between the two bright stripes corresponding to the maximum distance value as an identification image.
In the technical scheme, after the optical code image is scanned, comb-shaped alternate bright stripes and dark stripes are obtained, the distance between any two adjacent bright stripes is determined, the two bright stripes corresponding to the maximum distance value are obtained by comparing the distance between any two adjacent bright stripes, and the dark stripe before the two bright stripes corresponding to the maximum distance value is used as the identification image. The identification image is determined so as to determine a data image continuous with the time domain of the identification image, and then after the data image is determined, a pulse signal is obtained according to the data image analysis. According to the method and the device, the data image can be rapidly determined by comparing the distance between any two adjacent bright stripes, one-step scanning and comparison of the image acquired by the image acquisition device are avoided, so that the data image is determined, the number of required image decoding is reduced, the power consumption is reduced, and the determination time of the data image is reduced.
In the above technical solution, further, the step of determining the data image in the optical code image according to the identification image specifically includes: the stripes between two adjacent identification images are used as data images in the optical code image.
In the above technical solution, further, the step of analyzing the data image according to a pre-stored encoding rule to obtain a pulse signal corresponding to the data image specifically includes: and decoding the data image by using a pre-stored coding rule by taking the first bright stripe of the data image as a start bit to obtain a pulse signal corresponding to the data image.
In the technical scheme, after the data image is determined, a first bright stripe in the data image is used as a start bit, the data image is decoded by using a pre-stored coding rule, specifically, distances of other bright stripes in the data image are determined according to a distance between the bright stripes in the start bit, and the stripes are decoded by using the pre-stored coding rule, so that a pulse signal contained in the data image is obtained. And after the start bit is determined, the data image is decoded by using a pre-stored coding rule, so that the situation of error analysis of the image data and the like is avoided.
According to a fifth aspect of the present invention, there is provided an optical code interaction system comprising: an optical code generation device and a terminal; the optical code generation device includes: the light-emitting lamp group is provided with a light-homogenizing piece, and the light-homogenizing piece is arranged in the light-emitting direction of the light-emitting lamp group; the encoder is connected with the light-emitting lamp group and used for receiving the pulse signals, compiling the pulse signals according to a preset encoding rule and generating control signals so as to control the light-emitting lamp group to form an optical code image on the light homogenizing piece according to the control signals; the terminal includes: the image acquisition device with the roller shutter exposure function is used for acquiring an optical code image; the decoder is connected with the image acquisition device and used for scanning the optical code image, determining the identification image contained in the optical code image, determining the data image in the optical code image according to the identification image and analyzing the data image according to the coding rule to obtain a pulse signal corresponding to the data image; wherein the optical code image comprises a time-domain sequential identification image and a data image.
The invention provides an optical code interaction system, wherein when a pulse signal is received, an encoder compiles the pulse signal according to a pre-stored encoding rule to further generate a control signal for controlling light emitting of a light emitting lamp group, the light emitting lamp group can form an optical code image on a light homogenizing piece when emitting light, and after an image acquisition device with a rolling shutter exposure function receives the optical code image, a decoder can analyze the optical code image to obtain the pulse signal, wherein the optical code image comprises a mark image and a data image which are continuous in time domain. This application is through compiling the control signal of control light bank work with pulse signal, with control light bank is luminous and form optics code image on even light, so that the image acquisition device who has the curtain exposure function of rolling up can obtain pulse signal according to optics code image analysis, and then realized the dynamic change of optics code, in addition, the image acquisition device who has the curtain exposure function of rolling up can obtain the information according to the optics code image that the even light of scanning formed, need not to adjust luminance and the gain of optics code image, therefore, the speed of discerning and reading has been improved.
In addition, the optical code interaction system in the above embodiment provided by the present invention may further have the following additional technical features:
in the above technical solution, further, when the encoding rule is a pulse position encoding rule, the light emitting lamp set is controlled to emit light of a single color; the identification image is a first preset number of continuous dark stripes, the data image at least comprises a starting image, and the starting image is a second preset number of continuous dark stripes and combined stripes of bright stripes when light-emitting diodes of the light-emitting lamp group emit light simultaneously.
In the technical scheme, when the coding rule is a pulse position coding rule, the light-emitting lamp set is controlled to emit light of a single color, an optical code image with one light-emitting color is further formed on the light homogenizing piece, the identification image in the optical code image is determined by scanning the optical code image, a data image continuous with the identification image in time domain is further positioned, and the pulse signal is obtained by analyzing the data image. According to the technical scheme, the light-emitting lamp set is controlled to emit a single color, and then the optical code image containing the color is formed on the light homogenizing piece, so that the image acquisition device with the rolling exposure function can obtain the pulse signal according to the optical code image analysis, and further the conversion from the pulse signal to the optical code is realized.
In the above technical solution, further, when the coding rule is a binary coding rule or a ternary coding rule, the light emitting lamp set is controlled to emit two different colors of emitted light; when the coding rule is a binary coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises a starting image, and the starting image is a combination stripe of a second preset number of continuous dark stripes and bright stripes when the light-emitting diodes of the light-emitting lamp group emit light simultaneously; when the coding rule is a ternary coding rule, the identification image is a first preset number of continuous dark stripes; the data image includes at least a second preset number of consecutive dark stripes.
In the technical scheme, when the coding rule is a binary coding rule or a ternary coding rule, the light-emitting lamp group is controlled to emit light with two different colors. Specifically, when the coding rule is a binary coding rule, the light-emitting lamp group is controlled to emit light with two colors, wherein the identification image is a first preset number of continuous dark stripes; the data image at least comprises a starting image, and the starting image is a combination stripe of a second preset number of continuous dark stripes and bright stripes when the light-emitting diodes of the light-emitting lamp group emit light simultaneously. When the coding rule is a ternary coding rule, the light-emitting lamp group is controlled to emit light with two colors, and the identification image is a first preset number of continuous dark stripes; the data image includes at least a second preset number of consecutive dark stripes. The light-emitting lamp set can emit light with two different colors, the formed optical code image is a color stripe image, the color is used for representing information, and the interval (dark stripe) between the stripes is used for distinguishing different bright stripes. The different colors of light to carry information increases the amount of information transmitted and the amount of information carried in a unit optical code image over the same illumination time as compared to a transmission using a bright-dark scheme.
In the above technical solution, further, when the coding rule is any one of a six-system coding rule, a seven-system coding rule and a twenty-four-system coding rule, the light emitting lamp set is controlled to emit three different colors of emitted light; when the coding rule is a six-system coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises a starting image, and the starting image is a combination stripe of a second preset number of continuous dark stripes and bright stripes when the light-emitting diodes of the light-emitting lamp group emit light simultaneously; when the coding rule is a seven-system coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises a second preset number of continuous dark stripes; when the coding rule is a twenty-four system coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises an initial image, and the initial image is a combined stripe of a bright stripe when the light-emitting diodes of the light-emitting lamp group emit light at the same time according to the first light-emitting intensity and a bright stripe when the light-emitting diodes of the light-emitting lamp group emit light at the same time according to the second light-emitting intensity.
In the technical scheme, when the coding rule is a six-system coding rule or a seven-system coding rule, the light-emitting lamp group is controlled to emit three different colors of emitted light. Specifically, when the coding rule is a six-system coding rule, the light-emitting lamp group is controlled to emit light of three colors, wherein the identification image is a first preset number of continuous dark stripes; the data image at least comprises a starting image, and the starting image is a combination stripe of a second preset number of continuous dark stripes and bright stripes when the light-emitting diodes of the light-emitting lamp group emit light simultaneously. When the coding rule is a seven-system coding rule, the light-emitting lamp group is controlled to emit light with three colors, and the identification image is a first preset number of continuous dark stripes; the data image includes at least a second preset number of consecutive dark stripes. The light-emitting lamp set can emit light with three different colors, the formed optical code image is a color stripe image, the color is used for representing information, and the interval (dark stripe) between the stripes is used for distinguishing different bright stripes. Further, compared with the transmission method only using the light and shade method, the combined use of the light with different colors for carrying information and different luminous intensities increases the number of information transmission and the amount of information carried in the unit optical code image within the same luminous time, and the more the number of the types of the luminous colors is, the more information can be carried, wherein the first luminous intensity can be that the luminous lamp group emits light according to the maximum luminous intensity, and the second luminous intensity is that the luminous lamp group emits light according to the half value of the maximum luminous intensity.
In the foregoing technical solution, further, the decoder is specifically configured to: scanning the optical code image to obtain comb-shaped alternate bright stripes and dark stripes, and determining the distance between any two adjacent bright stripes; and comparing the distance between any two adjacent bright stripes, and taking the dark stripe between the two bright stripes corresponding to the maximum distance value as an identification image.
In the technical scheme, after the decoder scans the optical code image, comb-shaped alternate light stripes and dark stripes are obtained, the distance between any two adjacent light stripes is determined, the two light stripes corresponding to the maximum distance value are obtained by comparing the distance between any two adjacent light stripes, and the dark stripe before the two light stripes corresponding to the maximum distance value is used as the identification image. The identification image is determined so as to determine a data image continuous with the time domain of the identification image, and then after the data image is determined, a pulse signal is obtained according to the data image analysis. According to the method and the device, the data image can be rapidly determined by comparing the distance between any two adjacent bright stripes, one-step scanning and comparison of the image acquired by the image acquisition device are avoided, so that the data image is determined, the number of required image decoding is reduced, the power consumption is reduced, and the determination time of the data image is reduced.
In the foregoing technical solution, further, the decoder is specifically configured to: the stripes between two adjacent identification images are used as data images in the optical code image.
In the foregoing technical solution, further, the decoder is specifically configured to: and decoding the data image by using a pre-stored coding rule by taking the first bright stripe of the data image as a start bit to obtain a pulse signal corresponding to the data image.
In the technical scheme, after the data image is determined, a first bright stripe in the data image is used as a start bit, the data image is decoded by using a pre-stored coding rule, specifically, distances of other bright stripes in the data image are determined according to a distance between the bright stripes in the start bit, and the stripes are decoded by using the pre-stored coding rule, so that a pulse signal contained in the data image is obtained. And after the start bit is determined, the data image is decoded by using a pre-stored coding rule, so that the situation of error analysis of the image data and the like is avoided.
According to a sixth aspect of the present invention, there is provided a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to perform any one of the above-mentioned encoding method using a group of light emitting lamps and/or the above-mentioned decoding method.
The present invention provides a computer-readable storage medium, on which a computer program is stored, wherein the computer program, when being executed by a processor, implements any one of the above encoding methods using a light emitting lamp set and/or any one of the above decoding methods, so that the present invention has all the technical effects of any one of the above encoding methods using a light emitting lamp set and/or any one of the above decoding methods, and is not described herein again.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 shows a schematic block diagram of an optical code generation apparatus of one embodiment of the present invention;
FIG. 2 shows a schematic block diagram of an optical code decoding apparatus of one embodiment of the present invention;
FIG. 3 is a flow chart illustrating an encoding method using a group of light emitting lamps according to an embodiment of the present invention;
FIG. 4 shows a schematic flow diagram of a method for decoding an optical code according to one embodiment of the invention;
FIG. 5 shows a schematic flow diagram of a method for decoding an optical code according to another embodiment of the present invention;
FIG. 6 shows a schematic flow diagram of a method for decoding an optical code according to yet another embodiment of the present invention;
fig. 7 shows a schematic flow chart of a method for decoding an optical code according to yet another embodiment of the present invention;
fig. 8 shows a schematic block diagram of an optical code interaction system of yet another embodiment of the present invention;
FIG. 9 shows a schematic diagram of an application scenario of an embodiment of the present invention;
FIG. 10 shows a theoretical optical code image of one embodiment of the present invention;
FIG. 11 shows an actual optical code image of one embodiment of the present invention;
FIG. 12 is a schematic diagram of the connection of the light bank to the encoder according to one embodiment of the present invention;
FIG. 13 is a diagram illustrating the repeated transmission of data packets in one embodiment of the present invention;
FIG. 14 shows an image of an optical code taken at close range in one embodiment of the invention;
FIG. 15 shows an image of an optical code acquired remotely in one embodiment of the invention;
FIG. 16 is a code diagram illustrating a pulse position coding rule according to an embodiment of the present invention;
FIG. 17 is a set of packet pictures of PPE code with white LEDs taken in real time;
FIG. 18 is a portion of a coded waveform to which a binary coding rule is applied;
FIG. 19 is a live image with binary encoding rules applied;
FIG. 20 is a portion of a coded waveform to which a ternary coding rule is applied;
FIG. 21 is a live image with the ternary encoding rule applied;
FIG. 22 is a portion of a coded waveform to which a hex coding rule is applied;
fig. 23 is a live image to which a six-system coding rule is applied;
FIG. 24 is a portion of a coded waveform to which the heptad coding rule is applied;
fig. 25 is a live image to which a heptad coding rule is applied;
FIG. 26 is a schematic view showing the flow of identification of an optical code decoding apparatus according to an embodiment of the present invention;
FIG. 27 shows a schematic diagram of a twenty-four binary coded optical code according to one embodiment of the invention;
fig. 28 shows a schematic structural diagram of an optical code generating apparatus according to another embodiment of the invention.
Detailed Description
So that the manner in which the above recited aspects, features and advantages of the present invention can be understood in detail, a more particular description of the invention, briefly summarized above, may be had by reference to the embodiments thereof which are illustrated in the appended drawings. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, however, the present invention may be practiced in other ways than those specifically described herein, and therefore the scope of the present invention is not limited by the specific embodiments disclosed below.
Embodiments of the first aspect of the present invention provide an optical code generation apparatus, and fig. 1 shows a schematic block diagram of an optical code generation apparatus according to an embodiment of the present invention. As shown in fig. 1, the optical code generating apparatus 100 includes: a light emitting lamp group 102; the light equalizing piece 104 is arranged in the light emitting direction of the light emitting lamp group; the encoder 106 is connected with the light emitting lamp set and used for receiving the pulse signal, compiling the pulse signal according to a preset encoding rule and generating a control signal so as to control the light emitting lamp set 102 to form an optical code image on the light equalizing member 104 according to the control signal, so that when an image acquisition device with a roller shutter exposure function receives the optical code image, the pulse signal is obtained through optical code image analysis; wherein the optical code image comprises a time-domain sequential identification image and a data image.
The invention provides an optical code generating device 100, which specifically comprises: a light emitting lamp set 102, a light homogenizing element 104 and an encoder. The pulse signal is compiled into a control signal for controlling the light-emitting lamp set 102 to work, so as to control the light-emitting lamp set 102 to emit light and form an optical code image on the light equalizing piece 104, so that the image acquisition device with the rolling exposure function can analyze the pulse signal according to the optical code image, thereby realizing the dynamic change of the optical code.
In one embodiment of the present invention, when the encoding rule is a pulse position encoding rule, the light-emitting lamp set 102 is controlled to emit light of a single color; the identification image is a first preset number of continuous dark stripes, the data image at least includes a starting image, and the starting image is a combination of a second preset number of continuous dark stripes and bright stripes generated when the light-emitting diodes of the light-emitting lamp group 102 emit light simultaneously.
In this embodiment, when the encoding rule is a pulse position encoding rule, the light-emitting lamp set 102 is controlled to emit light of a single color, so as to form an optical code image with one light-emitting color on the light-equalizing member 104, the optical code image is scanned to determine an identification image in the optical code image, so as to locate a data image that is continuous with the identification image in time domain, and the data image is parsed to obtain a pulse signal. According to the technical scheme, the light-emitting lamp set 102 is controlled to emit a single color, and an optical code image containing the color is formed on the light-equalizing piece 104, so that the image acquisition device with the rolling exposure function can analyze the optical code image to obtain a pulse signal, and further the conversion from the pulse signal to the optical code is realized.
In one embodiment of the present invention, when the coding rule is a binary coding rule or a ternary coding rule, the light emitting lamp set 102 is controlled to emit two different colors of emitted light; when the coding rule is a binary coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises a starting image, and the starting image is a combination stripe of a second preset number of continuous dark stripes and bright stripes when the light-emitting diodes of the light-emitting lamp group 102 emit light simultaneously; when the coding rule is a ternary coding rule, the identification image is a first preset number of continuous dark stripes; the data image includes at least a second preset number of consecutive dark stripes.
In this embodiment, when the coding rule is a binary coding rule or a ternary coding rule, the light emitting lamp set 102 is controlled to emit two different colors of emitted light. Specifically, when the encoding rule is a binary encoding rule, the light-emitting lamp set 102 is controlled to emit light of two colors, wherein the identification image is a first preset number of continuous dark stripes; the data image includes at least a starting image, which is a combination of a second preset number of continuous dark stripes and bright stripes when the leds of the light bank 102 emit light simultaneously. When the coding rule is a ternary coding rule, the light-emitting lamp group 102 is controlled to emit light with two colors, and the identification image is a first preset number of continuous dark stripes; the data image includes at least a second preset number of consecutive dark stripes. The light-emitting lamp set 102 can emit light of two different colors, the formed optical code image is a color stripe image, the color is used for representing information, and the interval (dark stripe) between stripes is used for distinguishing different bright stripes. The different colors of light to carry information increases the amount of information transmitted and the amount of information carried in a unit optical code image over the same illumination time as compared to a transmission using a bright-dark scheme.
In one embodiment of the present invention, when the encoding rule is any one of a six-system encoding rule, a seven-system encoding rule and a twenty-four-system encoding rule, the light-emitting lamp set 102 is controlled to emit three different colors of emitted light; when the coding rule is a six-system coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises a starting image, and the starting image is a combination stripe of a second preset number of continuous dark stripes and bright stripes when the light-emitting diodes of the light-emitting lamp group 102 emit light simultaneously; when the coding rule is a seven-system coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises a second preset number of continuous dark stripes; when the coding rule is a twenty-four system coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises an initial image, and the initial image is a combined stripe of a bright stripe when the light-emitting diodes of the light-emitting lamp group emit light at the same time according to the first light-emitting intensity and a bright stripe when the light-emitting diodes of the light-emitting lamp group emit light at the same time according to the second light-emitting intensity.
In this embodiment, when the coding rule is a six-system coding rule or a seven-system coding rule, the light emitting lamp set 102 is controlled to emit three different colors of emitted light. Specifically, when the encoding rule is a six-system encoding rule, the light-emitting lamp set 102 is controlled to emit three colors of emitted light, wherein the identification image is a first preset number of continuous dark stripes; the data image includes at least a starting image, which is a combination of a second preset number of continuous dark stripes and bright stripes when the leds of the light bank 102 emit light simultaneously. When the coding rule is a seven-system coding rule, the light-emitting lamp group 102 is controlled to emit light of three colors, and the identification image is a first preset number of continuous dark stripes; the data image includes at least a second preset number of consecutive dark stripes. The light-emitting lamp set 102 can emit light of three different colors, the formed optical code image is a color stripe image, the color is used for representing information, and the interval (dark stripe) between stripes is used for distinguishing different bright stripes. Further, compared with the transmission method only using the light and shade method, the combined use of the light with different colors for carrying information and different luminous intensities increases the number of information transmission and the amount of information carried in the unit optical code image within the same luminous time, and the more the number of the types of the luminous colors is, the more information can be carried, wherein the first luminous intensity can be that the luminous lamp group emits light according to the maximum luminous intensity, and the second luminous intensity is that the luminous lamp group emits light according to the half value of the maximum luminous intensity.
In a second aspect of the present invention, an optical code decoding apparatus is provided, and fig. 2 shows a schematic block diagram of the optical code decoding apparatus according to an embodiment of the present invention. As shown in fig. 2, includes: an image pickup device 202 having a shutter exposure function for picking up an optical code image formed on the light equalizing member in any of the optical code generating devices; and the decoder 204 is connected with the image acquisition device and is used for scanning the optical code image, determining the identification image contained in the optical code image, determining the data image in the optical code image according to the identification image, and analyzing the data image according to a pre-stored coding rule to obtain the pulse signal corresponding to the data image.
The invention provides an optical code decoding device 200, which specifically comprises: an image acquisition device 202 with a rolling shutter exposure function and a decoder 204. The optical code image formed on the light equalizing piece is acquired by the image acquisition device 202 with the rolling shutter exposure function, the optical code image acquired by the image acquisition device is scanned by the decoder 204, the identification image contained in the optical code image is determined, the data image corresponding to the identification image is determined according to the time domain relation between the identification image and the data image, the data image is analyzed by using a pre-stored coding rule, the pulse signal corresponding to the data image is obtained, and then the acquisition of the pulse signal is realized. After the optical code image is acquired, the pulse signal contained in the optical code image can be directly obtained by scanning, identifying and decoding the optical code image. The optical code image can be dynamically acquired, and the optical code image acquisition can be realized only by the hardware of the image acquisition device 202 with the rolling shutter exposure function, so that the implementation cost of the pulse information is low, the acquisition speed of the optical code image is high, and the acquisition failure probability is reduced.
In an embodiment of the present invention, further, the decoder 204 is specifically configured to: scanning the optical code image to obtain comb-shaped alternate light stripes and dark stripes; determining the distance between any two adjacent bright stripes; and comparing the distance between any two adjacent bright stripes, and taking the dark stripe between the two bright stripes corresponding to the maximum distance value as an identification image.
In this embodiment, the decoder 204 obtains comb-shaped alternating light stripes and dark stripes after scanning the optical code image, obtains two light stripes corresponding to the maximum distance value by determining the distance between any two adjacent light stripes, and obtains the dark stripe before the two light stripes corresponding to the maximum distance value as the identification image. The identification image is determined so as to determine a data image continuous with the time domain of the identification image, and then after the data image is determined, a pulse signal is obtained according to the data image analysis. According to the method and the device, the data image can be rapidly determined by comparing the distance between any two adjacent bright stripes, one-step scanning and comparison of the image acquired by the image acquisition device are avoided, so that the data image is determined, the number of required image decoding is reduced, the power consumption is reduced, and the determination time of the data image is reduced.
Preferably, the fringes between two adjacent identification images are taken as the data image in the optical code image.
In an embodiment of the present invention, further, the decoder 204 is specifically configured to: and decoding the data image by using a pre-stored coding rule by taking the first bright stripe of the data image as a start bit to obtain a pulse signal corresponding to the data image.
In this embodiment, after the data image is determined, the first bright stripe in the data image is used as a start bit, the data image is decoded by using a pre-stored coding rule, specifically, the distance of other bright stripes in the data image is determined according to the distance between the bright stripes in the start bit, and the stripe is decoded by using the pre-stored coding rule, so as to obtain the pulse signal included in the data image. And after the start bit is determined, the data image is decoded by using a pre-stored coding rule, so that the situation of error analysis of the image data and the like is avoided.
In an embodiment of the third aspect of the present invention, a coding method using a light emitting lamp set is provided for an optical code generating apparatus, and fig. 3 is a flow chart illustrating the coding method using the light emitting lamp set according to an embodiment of the present invention. The optical code generating device comprises a light emitting lamp group and a light homogenizing piece, and as shown in fig. 3, the method comprises the following steps:
s302, receiving the pulse signal, and compiling the pulse signal according to a preset coding rule to generate a control signal of the light emitting lamp group;
s304, controlling the light-emitting lamp group to form an optical code image on the light equalizing piece according to the control signal, so that when an image acquisition device with a roller shutter exposure function receives the optical code image, a pulse signal is obtained through optical code image analysis;
wherein the optical code image comprises a time-domain sequential identification image and a data image.
The invention provides a coding method using a light-emitting lamp group, which is characterized in that when a pulse signal is received, the pulse signal is compiled according to a pre-stored coding rule so as to generate a control signal for controlling the light-emitting lamp group to emit light, an optical code image formed on a light homogenizing piece when the light-emitting lamp group emits light is generated, and when an image acquisition device with a rolling shutter exposure function receives the optical code image, the image acquisition device analyzes the optical code image to obtain the pulse signal, wherein the optical code image comprises a mark image and a data image which are continuous in time domain. This application is through compiling the control signal of control light bank work with pulse signal, with control light bank is luminous and form optics code image on even light, so that the image acquisition device who has the curtain exposure function of rolling up can obtain pulse signal according to optics code image analysis, and then realized the dynamic change of optics code, in addition, the image acquisition device who has the curtain exposure function of rolling up can obtain the information according to the optics code image that the even light of scanning formed, need not to adjust luminance and the gain of optics code image, therefore, the speed of discerning and reading has been improved.
In one embodiment of the invention, when the coding rule is a pulse position coding rule, the light-emitting lamp set is controlled to emit light with a single color; the identification image is a first preset number of continuous dark stripes, the data image at least comprises a starting image, and the starting image is a second preset number of continuous dark stripes and combined stripes of bright stripes when light-emitting diodes of the light-emitting lamp group emit light simultaneously.
In this embodiment, when the encoding rule is a pulse position encoding rule, the light-emitting lamp set is controlled to emit light of a single color, so as to form an optical code image with one light-emitting color on the light-equalizing member, the optical code image is scanned to determine an identification image in the optical code image, so as to locate a data image that is continuous with the identification image in time domain, and the data image is parsed to obtain a pulse signal. According to the technical scheme, the light-emitting lamp set is controlled to emit a single color, and then the optical code image containing the color is formed on the light homogenizing piece, so that the image acquisition device with the rolling exposure function can obtain the pulse signal according to the optical code image analysis, and further the conversion from the pulse signal to the optical code is realized.
In one embodiment of the invention, when the coding rule is a binary coding rule or a ternary coding rule, the light-emitting lamp group is controlled to emit light with two different colors; when the coding rule is a binary coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises a starting image, and the starting image is a combination stripe of a second preset number of continuous dark stripes and bright stripes when the light-emitting diodes of the light-emitting lamp group emit light simultaneously; when the coding rule is a ternary coding rule, the identification image is a first preset number of continuous dark stripes; the data image includes at least a second preset number of consecutive dark stripes.
In this embodiment, when the coding rule is a binary coding rule or a ternary coding rule, the group of light-emitting lamps is controlled to emit light of two different colors. Specifically, when the coding rule is a binary coding rule, the light-emitting lamp group is controlled to emit light with two colors, wherein the identification image is a first preset number of continuous dark stripes; the data image at least comprises a starting image, and the starting image is a combination stripe of a second preset number of continuous dark stripes and bright stripes when the light-emitting diodes of the light-emitting lamp group emit light simultaneously. When the coding rule is a ternary coding rule, the light-emitting lamp group is controlled to emit light with two colors, and the identification image is a first preset number of continuous dark stripes; the data image includes at least a second preset number of consecutive dark stripes. The light-emitting lamp set can emit light with two different colors, the formed optical code image is a color stripe image, the color is used for representing information, and the interval (dark stripe) between the stripes is used for distinguishing different bright stripes. The different colors of light to carry information increases the amount of information transmitted and the amount of information carried in a unit optical code image over the same illumination time as compared to a transmission using a bright-dark scheme.
In one embodiment of the invention, when the coding rule is any one of a six-system coding rule, a seven-system coding rule and a twenty-four-system coding rule, the light-emitting lamp group is controlled to emit three different colors of emitted light; when the coding rule is a six-system coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises a starting image, and the starting image is a combination stripe of a second preset number of continuous dark stripes and bright stripes when the light-emitting diodes of the light-emitting lamp group emit light simultaneously; when the coding rule is a seven-system coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises a second preset number of continuous dark stripes; when the coding rule is a twenty-four system coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises an initial image, and the initial image is a combined stripe of a bright stripe when the light-emitting diodes of the light-emitting lamp group emit light at the same time according to the first light-emitting intensity and a bright stripe when the light-emitting diodes of the light-emitting lamp group emit light at the same time according to the second light-emitting intensity.
In this embodiment, when the coding rule is a six-system coding rule or a seven-system coding rule, the light emitting lamp set is controlled to emit three different colors of emitted light. Specifically, when the coding rule is a six-system coding rule, the light-emitting lamp group is controlled to emit light of three colors, wherein the identification image is a first preset number of continuous dark stripes; the data image at least comprises a starting image, and the starting image is a combination stripe of a second preset number of continuous dark stripes and bright stripes when the light-emitting diodes of the light-emitting lamp group emit light simultaneously. When the coding rule is a seven-system coding rule, the light-emitting lamp group is controlled to emit light with three colors, and the identification image is a first preset number of continuous dark stripes; the data image includes at least a second preset number of consecutive dark stripes. The light-emitting lamp set can emit light with three different colors, the formed optical code image is a color stripe image, the color is used for representing information, and the interval (dark stripe) between the stripes is used for distinguishing different bright stripes. Further, compared with the transmission method only using the light and shade method, the combined use of the light with different colors for carrying information and different luminous intensities increases the number of information transmission and the amount of information carried in the unit optical code image within the same luminous time, and the more the number of the types of the luminous colors is, the more information can be carried, wherein the first luminous intensity can be that the luminous lamp group emits light according to the maximum luminous intensity, and the second luminous intensity is that the luminous lamp group emits light according to the half value of the maximum luminous intensity.
In an embodiment of the fourth aspect of the present invention, an optical code decoding method is provided for a terminal, and fig. 4 shows a flowchart of the optical code decoding method according to an embodiment of the present invention. The terminal comprises an image acquisition device with a roller shutter exposure function, as shown in fig. 4, the method comprises the following steps:
s402, collecting the optical code image formed on the light homogenizing device in any one of the coding methods using the light-emitting lamp group through an image collecting device with a rolling shutter exposure function;
s404, scanning the optical code image to determine a mark image contained in the optical code image;
s406, determining a data image in the optical code image according to the identification image;
s408, analyzing the data image according to a pre-stored coding rule to obtain a pulse signal corresponding to the data image.
The invention provides an optical code decoding method, which specifically comprises the following steps: image acquisition device and decoder that possess roll curtain exposure function. The image acquisition device with the rolling shutter exposure function scans an optical code image acquired by the image acquisition device after acquiring the optical code image formed on the light homogenizing piece, determines an identification image contained in the optical code image, determines a data image corresponding to the identification image according to a time domain relation between the identification image and the data image, analyzes the data image by using a pre-stored coding rule, obtains a pulse signal corresponding to the data image, and further realizes acquisition of the pulse signal. After the optical code image is acquired, the pulse signal contained in the optical code image can be directly obtained by scanning, identifying and decoding the optical code image. The optical code image can be dynamically acquired, and the optical code image can be acquired only by hardware of an image acquisition device with a roller shutter exposure function, so that the implementation cost of pulse information is low, the acquisition speed of the optical code image is high, and the acquisition failure probability is reduced.
In one embodiment of the present invention, fig. 5 shows a flow chart of an optical code decoding method according to another embodiment of the present invention. As shown in fig. 5, the optical code decoding method includes:
s502, collecting an optical code image formed on the light homogenizing device in any one coding method using the light-emitting lamp group through an image collecting device with a rolling shutter exposure function;
s504, scanning the optical code image to obtain comb-shaped alternate light stripes and dark stripes;
s506, determining the distance between any two adjacent bright stripes;
s508, comparing the distance between any two adjacent bright stripes, and taking the dark stripe between the two bright stripes corresponding to the maximum distance value as an identification image;
s510, determining a data image in the optical code image according to the identification image;
s512, analyzing the data image according to a pre-stored coding rule to obtain a pulse signal corresponding to the data image.
In this embodiment, after scanning the optical code image, comb-shaped alternating light stripes and dark stripes are obtained, the distance between any two adjacent light stripes is determined, the distance between any two adjacent light stripes is compared to obtain two light stripes with the maximum distance, and the dark stripe before the two light stripes with the maximum distance is used as the identification image. The identification image is determined so as to determine a data image continuous with the time domain of the identification image, and then after the data image is determined, a pulse signal is obtained according to the data image analysis. According to the method and the device, the data image can be rapidly determined by comparing the distance between any two adjacent bright stripes, one-step scanning and comparison of the image acquired by the image acquisition device are avoided, so that the data image is determined, the number of required image decoding is reduced, the power consumption is reduced, and the determination time of the data image is reduced.
In one embodiment of the present invention, fig. 6 shows a flow chart of an optical code decoding method according to still another embodiment of the present invention. As shown in fig. 6, the optical code decoding method includes:
s602, collecting the optical code image formed on the light homogenizing device in any one of the coding methods using the light-emitting lamp group through an image collecting device with a rolling shutter exposure function;
s604, scanning the optical code image to obtain comb-shaped alternate light stripes and dark stripes;
s606, determining the distance between any two adjacent bright stripes;
s608, comparing the distance between any two adjacent bright stripes, and taking the dark stripe between the two bright stripes corresponding to the maximum distance value as an identification image;
s610, taking the stripe between two adjacent identification images as a data image in the optical code image;
and S612, analyzing the data image according to a pre-stored coding rule to obtain a pulse signal corresponding to the data image.
In one embodiment of the present invention, fig. 7 shows a flow chart of an optical code decoding method according to another embodiment of the present invention. As shown in fig. 7, the optical code decoding method includes:
s702, collecting an optical code image formed on the light homogenizing device in any one of the coding methods using the light emitting lamp group through an image collecting device with a rolling shutter exposure function;
s704, scanning the optical code image to obtain comb-shaped alternate light stripes and dark stripes;
s706, determining the distance between any two adjacent bright stripes;
s708, comparing the distance between any two adjacent bright stripes, and taking the dark stripe between the two bright stripes corresponding to the maximum distance value as an identification image;
s710, taking the stripe between two adjacent identification images as a data image in the optical code image;
and S712, decoding the data image by using a pre-stored coding rule with the first bright stripe of the data image as a start bit to obtain a pulse signal corresponding to the data image.
In this embodiment, after the data image is determined, the first bright stripe in the data image is used as a start bit, the data image is decoded by using a pre-stored coding rule, specifically, the distance of other bright stripes in the data image is determined according to the distance between the bright stripes in the start bit, and the stripe is decoded by using the pre-stored coding rule, so as to obtain the pulse signal included in the data image. And after the start bit is determined, the data image is decoded by using a pre-stored coding rule, so that the situation of error analysis of the image data and the like is avoided.
In an embodiment of the fifth aspect of the present invention, an optical code interaction system 1 is provided, and fig. 8 shows a schematic block diagram of an optical code interaction system 1 according to yet another embodiment of the present invention. As shown in fig. 8, includes: optical code generating device 12 and terminal 14; optical code generation apparatus 12 includes: the light-emitting lamp group 122 and the light-homogenizing piece 124 are arranged in the light-emitting direction of the light-emitting lamp group; the encoder 126 is connected with the light-emitting lamp set and used for receiving the pulse signals, compiling the pulse signals according to a preset encoding rule and generating control signals so as to control the light-emitting lamp set to form an optical code image on the light homogenizing piece according to the control signals; the terminal 14 includes: an image pickup device 142 having a shutter exposure function for picking up an optical code image; the decoder 144 is connected to the image acquisition device 142, and is configured to scan the optical code image, determine an identification image included in the optical code image, extract a data image in the optical code image according to the identification image, and parse the data image according to a coding rule to obtain a pulse signal corresponding to the data image; wherein the optical code image comprises a time-domain sequential identification image and a data image.
The invention provides an optical code interaction system 1, when receiving a pulse signal, an encoder 126 compiles the pulse signal according to a pre-stored encoding rule to further generate a control signal for controlling light emission of a light-emitting lamp group 122, an optical code image is formed on a light-homogenizing piece 124 when the light-emitting lamp group 122 emits light, and after receiving the optical code image, an image acquisition device 142 with a rolling exposure function and a decoder 144 analyze the optical code image to obtain the pulse signal, wherein the optical code image comprises a mark image and a data image which are continuous in time domain. The control signal for controlling the light-emitting lamp set 122 to work is compiled from the pulse signal, so that the light-emitting lamp set 122 is controlled to emit light and an optical code image is formed on the light-equalizing member 124, and the image acquisition device 142 with the rolling exposure function can analyze the optical code image to obtain the pulse signal, thereby realizing the dynamic change of the optical code.
In one embodiment of the present invention, when the encoding rule is a pulse position encoding rule, the light-emitting lamp set 122 is controlled to emit light of a single color; the identification image is a first preset number of continuous dark stripes, the data image at least includes a starting image, and the starting image is a combination of a second preset number of continuous dark stripes and bright stripes generated when the light-emitting diodes of the light-emitting lamp group 122 emit light simultaneously.
In this embodiment, when the encoding rule is a pulse position encoding rule, the light-emitting lamp set 122 is controlled to emit light of a single color, so as to form an optical code image with one light-emitting color on the light-equalizing member 124, the optical code image is scanned to determine an identification image in the optical code image, so as to locate a data image that is continuous with the identification image in time domain, and the data image is parsed to obtain a pulse signal. According to the technical scheme, the light-emitting lamp set 122 is controlled to emit a single color, and an optical code image containing the color is formed on the light-homogenizing piece 124, so that the image acquisition device 142 with the rolling exposure function can analyze the optical code image to obtain a pulse signal, and further the conversion from the pulse signal to the optical code is realized.
In one embodiment of the present invention, when the coding rule is a binary coding rule or a ternary coding rule, the light-emitting lamp set 122 is controlled to emit two different colors of emitted light; when the coding rule is a binary coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises a starting image, and the starting image is a combination stripe of a second preset number of continuous dark stripes and bright stripes when the light-emitting diodes of the light-emitting lamp group 122 emit light simultaneously; when the coding rule is a ternary coding rule, the identification image is a first preset number of continuous dark stripes; the data image includes at least a second preset number of consecutive dark stripes.
In this embodiment, when the coding rule is a binary coding rule or a ternary coding rule, the light emitting lamp set 122 is controlled to emit two different colors of emitted light. Specifically, when the encoding rule is a binary encoding rule, the light-emitting lamp set 122 is controlled to emit two colors of emitted light, wherein the identification image is a first preset number of continuous dark stripes; the data image includes at least a starting image which is a combination of a second preset number of consecutive dark stripes and bright stripes when the leds of the light bank 122 are simultaneously emitting light. When the coding rule is a ternary coding rule, the light-emitting lamp group 122 is controlled to emit light with two colors, and the identification image is a first preset number of continuous dark stripes; the data image includes at least a second preset number of consecutive dark stripes. Because the light-emitting lamp group 122 can emit light of two different colors, the formed optical code image is a color stripe image, the color is used to represent information, and the interval (dark stripe) between stripes is used to distinguish different bright stripes, the image acquisition device 142 with the rolling exposure function scans the optical code image generated on the light uniformizing element 124, then scans the optical code image, determines the identification image in the optical code image, further locates the data image continuous with the identification image time domain, and obtains the pulse signal by analyzing the data image. The different colors of light to carry information increases the amount of information transmitted and the amount of information carried in a unit optical code image over the same illumination time as compared to a transmission using a bright-dark scheme.
In one embodiment of the present invention, when the encoding rule is a six-system encoding rule or a seven-system encoding rule, the light emitting lamp set 122 is controlled to emit three different colors of emitted light; when the coding rule is a six-system coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises a starting image, and the starting image is a combination stripe of a second preset number of continuous dark stripes and bright stripes when the light-emitting diodes of the light-emitting lamp group 122 emit light simultaneously; when the coding rule is a seven-system coding rule, the identification image is a first preset number of continuous dark stripes; the data image includes at least a second preset number of consecutive dark stripes.
In this embodiment, when the encoding rule is a six-system encoding rule or a seven-system encoding rule, the light emitting lamp group 122 is controlled to emit three different colors of emitted light. Specifically, when the encoding rule is the six-system encoding rule, the light-emitting lamp set 122 is controlled to emit three colors of emitted light, wherein the identification image is a first preset number of continuous dark stripes; the data image includes at least a starting image which is a combination of a second preset number of consecutive dark stripes and bright stripes when the leds of the light bank 122 are simultaneously emitting light. When the coding rule is a seven-system coding rule, the light-emitting lamp group 122 is controlled to emit light of three colors, and the identification image is a first preset number of continuous dark stripes; the data image includes at least a second preset number of consecutive dark stripes. The light-emitting lamp group 122 can emit light of three different colors, the formed optical code image is a color stripe image, the color is used to represent information, and the interval (dark stripe) between stripes is used to distinguish different bright stripes, the image acquisition device 142 with the rolling shutter exposure function scans the optical code image generated on the light uniformizing element 124, then scans the optical code image, determines the identification image in the optical code image, further locates the data image continuous with the identification image time domain, and obtains the pulse signal by analyzing the data image. Compared with the transmission method using the light and shade method, the method using the light with different colors to carry information improves the number of information transmission and the information amount carried in the unit optical code image in the same light-emitting time, and the more the types of the light-emitting colors are, the more information can be carried.
In an embodiment of the present invention, the decoder 144 is specifically configured to: scanning the optical code image to obtain comb-shaped alternate bright stripes and dark stripes, and determining the distance between any two adjacent bright stripes; and comparing the distance between any two adjacent bright stripes, and taking the dark stripe between the two bright stripes corresponding to the maximum distance value as an identification image.
In this embodiment, the decoder 144 obtains comb-shaped alternating light stripes and dark stripes after scanning the optical code image, obtains two light stripes corresponding to the maximum distance value by determining the distance between any two adjacent light stripes, and obtains the dark stripe before the two light stripes corresponding to the maximum distance value as the identification image. The identification image is determined so as to determine a data image continuous with the time domain of the identification image, and then after the data image is determined, a pulse signal is obtained according to the data image analysis. According to the method and the device, the data image can be rapidly determined by comparing the distance between any two adjacent bright stripes, the one-step scanning and comparison of the image acquired by the image acquisition device 142 are avoided, the data image is determined, the number of required image decoding is reduced, the power consumption is reduced, and the determination time of the data image is reduced.
In an embodiment of the present invention, the decoder 144 is specifically configured to: the stripes between two adjacent identification images are used as data images in the optical code image.
In an embodiment of the present invention, the decoder 144 is specifically configured to: and decoding the data image by using a pre-stored coding rule by taking the first bright stripe of the data image as a start bit to obtain a pulse signal corresponding to the data image.
In this embodiment, after the data image is determined, the first bright stripe in the data image is used as a start bit, the data image is decoded by using a pre-stored coding rule, specifically, the distance of other bright stripes in the data image is determined according to the distance between the bright stripes in the start bit, and the stripe is decoded by using the pre-stored coding rule, so as to obtain the pulse signal included in the data image. And after the start bit is determined, the data image is decoded by using a pre-stored coding rule, so that the situation of error analysis of the image data and the like is avoided.
In an embodiment of the present invention, fig. 9 is a schematic diagram illustrating an application scenario of an embodiment of the present invention. Fig. 10 shows a theoretical optical code image of one embodiment of the present invention. Fig. 11 shows an actual optical code image of one embodiment of the present invention. Fig. 12 shows a schematic connection diagram of the light emitting lamp set and the encoder according to the embodiment of the invention. As shown in fig. 9 to 12, the upper computer sends the pulse signal to the value control unit (encoder), and the control unit generates control signals of different light emitting colors in the light emitting lamp group to drive the lamps of corresponding colors to emit light, where fig. 10 and 11 are the theoretical optical code image and the actual optical code image of the rolling shutter exposure, and as shown in fig. 12, the light emitting lamp group is a planar array LED (light emitting Diode) lamp composed of a plurality of LEDs. The LEDs may be monochromatic or bi-or tri-chromatic. Fig. 12 is a schematic diagram of a three-color LED array. The three-color LED employs commonly used three-color LEDs such as red, green, and blue. A plurality of LEDs form a planar light emitting array, and a piece of frosted glass or frosted organic glass is covered on the planar light emitting array to serve as a diffusion plate (light homogenizing part), so that LED light is uniformly distributed on the diffusion plate to form a planar light source. The control unit receives the information sent by the upper computer, converts the information into LED pulse codes and controls the LEDs of all colors to send corresponding pulses. The control unit may be a typical one-chip system. Driving the LEDs may be typical MOS switching transistors.
Specifically, the method for generating the stripes provided by the invention sets the shutter time of the camera to satisfy the following conditions: the light pulse width < the shutter time of the camera < the light pulse width + the interval time of the pulses, the pulsed light emitted by the LED will always leave an image of bright and dark stripes on the image sensor exposed by the roller shutter.
The cameras of the smart phones on the market are all CMOS roller shutter exposed, with a frame rate of 50 frames/s, so the time per image scanned is 20 ms.
If the shutter exposure time is set to 1/10000, i.e., 0.1 ms; the pulse width of the LED light is <0.05ms, and the interval of the light pulse is set to be >0.15ms (twice the shutter time), so that the light pulse emitted by the LED can be shot by the rolling shutter camera to form distinguishable light and dark stripes.
One currently popular cell phone camera with 1200 ten thousand pixels has 4032 x 3024 pixels and scans the short edge, i.e., 3024 lines of pixels. The 100 light and dark stripes occupy 3024/100 ≈ 30 pixels. This is a very satisfactory solution to the resolution requirements of computer image recognition. Then, under the condition that the shutter is 0.1ms, the number of the most dense stripes that can appear on the entire image is about 20ms/0.2ms — 100 (stripes).
If the light-emitting lamp group emits light of a single color, 2-system stripe codes can be generated, and one image can bear 2 maximum information100(ii) a The light emitting lamp set emits light of two colors, and 3-system stripe codes can be generated, and one image can bear 3 maximum information100(ii) a The light emitting lamp set emits three colors of emitted light, 6-system stripe codes can be generated, and one image can bear the maximum information quantity of 6100(ii) a The light emitting lamp set emits three colors of emitted light, and can generate 7-system stripe codes, and one image can bear the maximum information amount of 7100(ii) a Color emittedThe more information that can be carried.
Fig. 13 is a diagram showing a repetitive transmission of a packet in one embodiment of the present invention. As shown in fig. 13, in order to ensure that the image capturing device can capture the completed pulse information, the control signal is used to repeatedly control the light-emitting lamp set to emit light, and further, the time for the image sensor of the camera to scan one frame is set to be T, so long as the time length of the data packet is less than T/2, the camera can always capture a complete and continuous data packet. If T/2< the time length of the data packet < T, all stripes of the data packet fall in one image of the camera, but may not be consistent, and the data stripes need to be subjected to end-to-end butt joint processing during image identification to be reconstructed into a complete data packet. Fig. 14 shows an image of an optical code taken at close range in one embodiment of the invention. Fig. 15 shows an image of an optical code acquired remotely in one embodiment of the invention. As shown in fig. 14 and 15, the spacing of the light and dark fringes in the optical code image is independent of the distance between the image capture device and the light homogenizer.
FIG. 16 shows a code diagram of the pulse position coding rule in one embodiment of the present invention, and FIG. 17 is a set of packet pictures of PPE code using white light LEDs photographed in real time. As shown in fig. 16 and 17:
pulse position coding, also known as PPE code, in which a group of light emitting lamps emits light of a single color, such as a single color diode, emitting light of, for example, white, red, green or blue. The PPE code takes advantage of the relative spacing variation of the light and dark stripes in the image to carry "0", "1" information. Belonging to binary coding. The encoding scheme is shown in fig. 7. Of the 4 clock cycles in a data bit time, the first 1/4 cycles are on, and the rest are off representing '1'; the 3 rd 1/4 cycle is on, with the remainder on representing a "0". A packet consists of two synchronization start bits followed by n-bit data bits (Bn-B0). The synchronization start bit is at least left 8 clock cycles ahead, and the two synchronization start bits are equivalent to two 1 pulses, and the two synchronization start bits will play a role in identification decoding.
The pulse position code has no absolute relation with the width of each pulse and can be adjusted within a certain range. The invention provides an adaptive method for identifying pulse position information, which comprises the following steps: in one fringe image, the widest gap is identified first. The stripe between the two widest gaps is a data packet, wherein the first stripe bit and the second stripe bit are starting bits; extracting stripes in each data packet according to the gaps among the pulses; after finding the initial positions of the two stripes, extracting the interval value of the two stripes; and judging the relative interval between the stripes by taking the interval value parameter of the start bit as a basis so as to analyze the information value represented by the bar code position. The pulse position coding does not need strict requirements on the pulse clock of each light-emitting diode, and even if a certain deviation exists, the identification software can automatically adapt.
Table 1 shows an encoding table of the binary encoding rule. As shown in table 1:
TABLE 1
Figure BDA0001900332600000311
Wherein a stripe of one color (red) represents "0"; another color (green) stripe represents a "1"; the mixture of the two colors (the two colored LEDs are simultaneously lit) after a blank represents the start bit.
Fig. 18 is a part of a coding waveform to which a binary coding rule is applied, and fig. 19 is a live image to which the binary coding rule is applied.
The identification method specifically comprises the following steps: the widest gap is identified first from fig. 19. The stripe between the two widest gaps is a data packet, wherein the first stripe is a start bit; the stripes in each packet are extracted based on the gaps between pulses. After finding the start bit, two primary color luminance values are obtained from this pulse, since it is composed of two primary colors of LED light. And judging the primary color contained in each stripe by taking the brightness value parameters of the two primary colors as the basis, thereby judging the information value of the primary color. By determining the primary color of the stripe of the start position and taking the primary color as a reference value, the primary color of each LED lamp does not need to be strictly controlled, and even if a certain deviation exists, the identification software can automatically adapt.
Table 2 shows an encoding table of the ternary encoding rule. As shown in table 2:
TABLE 2
Figure BDA0001900332600000321
Fig. 20 is a part of a coded waveform to which a ternary coding rule is applied, and fig. 21 is a live image to which the ternary coding rule is applied.
Table 3 shows an encoding table of the six-ary encoding rule. As shown in table 3:
TABLE 3
Figure BDA0001900332600000322
Fig. 22 is a part of a coded waveform to which a hex coding rule is applied, and fig. 23 is a live image to which the hex coding rule is applied.
Table 4 shows an encoding table of the six-ary encoding rule. As shown in table 4:
TABLE 4
Figure BDA0001900332600000331
Fig. 24 is a part of a coding waveform to which the heptad coding rule is applied, and fig. 25 is a live image to which the heptad coding rule is applied.
In an embodiment of the present invention, fig. 26 is a schematic diagram illustrating an optical code decoding device identification process in an embodiment of the present invention, and as shown in fig. 26, the optical code decoding device identification process includes:
step 1, initializing an image acquisition device, and setting a shutter as follows: 1/10000s, Brightness ISO: 500, a step of;
step 2, controlling an image acquisition device to shoot an image of the light equalizing piece;
step 3, judging whether the shot light-homogenizing piece image contains an optical code image, if so, executing step 4, otherwise, executing step 2;
step 4, filtering the optical code image to eliminate noise;
step 5, finding the start bit of the data image;
step 6, intercepting a data image from the adjacent identification image;
step 7, extracting a ternary color stripe threshold value from the initial position;
and 8, judging the data information carried in the data image according to the threshold value.
Table 5 shows an encoding table of the six-ary encoding rule. As shown in table 5:
TABLE 5
Figure BDA0001900332600000332
Continuation table
Figure BDA0001900332600000341
In one embodiment of the present invention, as shown in table 5, the light emitting lamp set emits light of three colors, which are most commonly red R, green G, and blue B, and their light emission combinations form a 24-ary code.
In one embodiment of the invention, fig. 27 shows a schematic diagram of a twenty-four binary coded optical code according to one embodiment of the invention; as shown in fig. 27, the light emitting lamp sets are controlled to emit light of different colors by different drivers, and in order to control the light emitting intensity of the light of different colors, the control of the light emitting intensity is realized by connecting current limiting resistors in series between the drivers and the light emitting lamp sets.
In one embodiment of the present invention, the adjustment of the light emission intensity is achieved by adjusting the duty ratio for controlling the light emission time of the light emitting lamp group, such as the light emission time is T1 when the light emitting lamp group emits light at the maximum light emission intensity, and the light emission time is half of T1 when the light emitting lamp group emits light at half the maximum light emission intensity, thereby achieving the control of the light emission intensity.
In the above technical solution, further, the first light-emitting intensity and the second light-emitting intensity may be determined according to an ambient light intensity, fig. 28 shows a schematic structural diagram of an optical code generating device according to another embodiment of the invention, as shown in fig. 28, the ambient light is detected by additionally providing a photosensitive element, and then the light-emitting intensity of the light-emitting lamp set is controlled according to the ambient light intensity, specifically, an output value of the photosensitive element is determined by a photodetector and sent to a control unit, the control unit adjusts a resistance value of an adjustable resistor according to the light intensity of the photodetector, so as to change an output voltage of the adjustable power supply, the first light-emitting intensity and the second light-emitting intensity are determined by setting the ambient light detection, when the ambient is bright, the brightness of the light-emitting lamp set is improved, the interference of the ambient light is suppressed, and when the ambient is dark, the brightness of the light-emitting lamp set is automatically reduced, the purpose of no glare can be achieved. For example, under sunlight, interference of sunlight can be suppressed, and at night, the purpose of being not dazzling can be achieved.
In an embodiment of the sixth aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, and the computer program, when being executed by a processor, implements any one of the above encoding methods using light emitting lamp groups and/or any one of the above decoding methods, so as to achieve all the technical effects of any one of the above encoding methods using light emitting lamp groups and/or any one of the above decoding methods, and therefore, the description thereof is omitted here.
In the description of the present invention, the description of the terms "one embodiment," "some embodiments," "specific embodiments," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In the present invention, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes will occur to those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (21)

1. An optical code generating apparatus, comprising:
a light emitting lamp group;
the light homogenizing piece is arranged in the light emitting direction of the light emitting lamp group;
the encoder is connected with the light-emitting lamp group and used for receiving pulse signals, compiling the pulse signals according to a preset encoding rule and generating control signals so as to control the light-emitting lamp group to form an optical code image on the light homogenizing piece according to the control signals, so that when an image acquisition device with a roller shutter exposure function receives the optical code image, the pulse signals are obtained through the optical code image analysis;
wherein the optical code image comprises a temporally contiguous identification image and a data image;
when the coding rule is a pulse position coding rule, the light-emitting lamp set is controlled to emit light with a single color;
the identification image is a first preset number of continuous dark stripes, the data image at least comprises a starting image, and the starting image is a combined stripe of a second preset number of continuous dark stripes and bright stripes when the light-emitting diodes of the light-emitting lamp group emit light simultaneously.
2. The optical code generating device according to claim 1,
when the coding rule is a binary coding rule or a ternary coding rule, the light-emitting lamp set is controlled to emit light with two different colors;
when the coding rule is a binary coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises a starting image, and the starting image is a combined stripe of a second preset number of continuous dark stripes and bright stripes when the light-emitting diodes of the light-emitting lamp group emit light simultaneously; when the coding rule is a ternary coding rule, the identification image is a first preset number of continuous dark stripes; the data image includes at least a second preset number of consecutive dark stripes.
3. The optical code generating device according to claim 1,
when the coding rule is any one of a six-system coding rule, a seven-system coding rule and a twenty-four-system coding rule, the light-emitting lamp group is controlled to emit three different colors of emitted light;
when the coding rule is a six-system coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises a starting image, and the starting image is a combined stripe of a second preset number of continuous dark stripes and bright stripes when the light-emitting diodes of the light-emitting lamp group emit light simultaneously; when the coding rule is a seven-system coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises a second preset number of continuous dark stripes; when the coding rule is a twenty-four system coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises an initial image, and the initial image is a combined stripe of a bright stripe when the light-emitting diodes of the light-emitting lamp group emit light at the same time according to a first light-emitting intensity and a bright stripe when the light-emitting diodes of the light-emitting lamp group emit light at the same time according to a second light-emitting intensity.
4. An optical code decoding apparatus, comprising:
an image pickup device having a shutter exposure function for picking up an optical code image formed on the light equalizing member according to any one of claims 1 to 3;
a decoder coupled to the image capture device for scanning the optical code image, determining an identification image contained in the optical code image, and determining a data image in the optical code image based on the identification image, an
And analyzing the data image according to a pre-stored coding rule to obtain a pulse signal corresponding to the data image.
5. The optical code decoding device of claim 4, wherein the decoder is specifically configured to: scanning the optical code image to obtain comb-shaped alternate light stripes and dark stripes;
determining the distance between any two adjacent bright stripes;
and comparing the distance between any two adjacent bright stripes, and taking the dark stripe between the two bright stripes corresponding to the maximum distance value as the identification image.
6. The optical code decoding device of claim 5, wherein the decoder is specifically configured to: and taking the stripes between two adjacent identification images as data images in the optical code image.
7. The optical code decoding device of claim 6, wherein the decoder is specifically configured to:
and decoding the data image by using a pre-stored coding rule by taking the first bright stripe of the data image as a start bit to obtain a pulse signal corresponding to the data image.
8. A coding method using a light bank for an optical code generating device, the optical code generating device including a light bank and a light equalizer, the method comprising:
receiving a pulse signal, and compiling the pulse signal according to a preset coding rule to generate a control signal of the light-emitting lamp group;
controlling the light-emitting lamp group to form an optical code image on the light equalizing piece according to the control signal, so that when an image acquisition device with a roller shutter exposure function receives the optical code image, the pulse signal is obtained through the optical code image analysis;
wherein the optical code image comprises a temporally contiguous identification image and a data image;
when the coding rule is a pulse position coding rule, the light-emitting lamp set is controlled to emit light with a single color;
the identification image is a first preset number of continuous dark stripes, the data image at least comprises a starting image, and the starting image is a combined stripe of a second preset number of continuous dark stripes and bright stripes when the light-emitting diodes of the light-emitting lamp group emit light simultaneously.
9. The encoding method using light emitting lamp set according to claim 8,
when the coding rule is a binary coding rule or a ternary coding rule, the light-emitting lamp set is controlled to emit light with two different colors;
when the coding rule is a binary coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises a starting image, and the starting image is a combined stripe of a second preset number of continuous dark stripes and bright stripes when the light-emitting diodes of the light-emitting lamp group emit light simultaneously; when the coding rule is a ternary coding rule, the identification image is a first preset number of continuous dark stripes; the data image includes at least a second preset number of consecutive dark stripes.
10. The encoding method using light emitting lamp set according to claim 8,
when the coding rule is any one of a six-system coding rule, a seven-system coding rule and a twenty-four-system coding rule, the light-emitting lamp group is controlled to emit three different colors of emitted light;
when the coding rule is a six-system coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises a starting image, and the starting image is a combined stripe of a second preset number of continuous dark stripes and bright stripes when the light-emitting diodes of the light-emitting lamp group emit light simultaneously; when the coding rule is a seven-system coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises a second preset number of continuous dark stripes; when the coding rule is a twenty-four system coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises an initial image, and the initial image is a combined stripe of a bright stripe when the light-emitting diodes of the light-emitting lamp group emit light at the same time according to a first light-emitting intensity and a bright stripe when the light-emitting diodes of the light-emitting lamp group emit light at the same time according to a second light-emitting intensity.
11. A method for decoding an optical code, wherein the optical code is used for a terminal, the terminal comprises an image acquisition device with a rolling shutter exposure function, and the method comprises the following steps:
acquiring an optical code image formed on the light homogenizing element according to any one of claims 8 to 10 by an image acquiring device having a roller shutter exposure function;
scanning the optical code image to determine an identification image contained in the optical code image;
determining a data image in the optical code image from the identification image;
and analyzing the data image according to a pre-stored coding rule to obtain a pulse signal corresponding to the data image.
12. The method for decoding an optical code according to claim 11, wherein the step of scanning the optical code image to determine the identification image contained in the optical code image comprises:
scanning the optical code image to obtain comb-shaped alternate light stripes and dark stripes;
determining the distance between any two adjacent bright stripes;
and comparing the distance between any two adjacent bright stripes, and taking the dark stripe between the two bright stripes corresponding to the maximum distance value as the identification image.
13. The method for decoding an optical code according to claim 12, wherein the step of determining the data image in the optical code image from the identification image specifically comprises:
and taking the stripes between two adjacent identification images as data images in the optical code image.
14. The optical code decoding method of claim 13, wherein the step of analyzing the data image according to a pre-stored coding rule to obtain the pulse signal corresponding to the data image comprises:
and decoding the data image by using a pre-stored coding rule by taking the first bright stripe of the data image as a start bit to obtain a pulse signal corresponding to the data image.
15. An optical code interaction system, comprising: an optical code generation device and a terminal;
the optical code generation apparatus includes: a group of light-emitting lamps is provided,
the light homogenizing piece is arranged in the light emitting direction of the light emitting lamp group;
the encoder is connected with the light-emitting lamp group and used for receiving pulse signals, compiling the pulse signals according to a preset encoding rule and generating control signals so as to control the light-emitting lamp group to form an optical code image on the light homogenizing piece according to the control signals;
the terminal includes: the image acquisition device with the roller shutter exposure function is used for acquiring the optical code image;
a decoder coupled to the image capture device for scanning the optical code image, determining an identification image contained in the optical code image, and determining a data image in the optical code image based on the identification image, an
Analyzing the data image according to the coding rule to obtain a pulse signal corresponding to the data image;
wherein the optical code image comprises a temporally contiguous identification image and a data image;
when the coding rule is a pulse position coding rule, the light-emitting lamp set is controlled to emit light with a single color;
the identification image is a first preset number of continuous dark stripes, the data image at least comprises a starting image, and the starting image is a combined stripe of a second preset number of continuous dark stripes and bright stripes when the light-emitting diodes of the light-emitting lamp group emit light simultaneously.
16. The optical code interaction system of claim 15, wherein when the coding rule is a binary coding rule or a ternary coding rule, the light emitting lamp set is controlled to emit two different colors of emitted light;
when the coding rule is a binary coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises a starting image, and the starting image is a combined stripe of a second preset number of continuous dark stripes and bright stripes when the light-emitting diodes of the light-emitting lamp group emit light simultaneously; when the coding rule is a ternary coding rule, the identification image is a first preset number of continuous dark stripes; the data image includes at least a second preset number of consecutive dark stripes.
17. The optical code interaction system of claim 15, wherein when the code rule is any one of a six-code rule, a seven-code rule and a twenty-four-code rule, the light emitting lamp set is controlled to emit three different colors of emitted light;
when the coding rule is a six-system coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises a starting image, and the starting image is a combined stripe of a second preset number of continuous dark stripes and bright stripes when the light-emitting diodes of the light-emitting lamp group emit light simultaneously; when the coding rule is a seven-system coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises a second preset number of continuous dark stripes; when the coding rule is a twenty-four system coding rule, the identification image is a first preset number of continuous dark stripes; the data image at least comprises an initial image, and the initial image is a combined stripe of a bright stripe when the light-emitting diodes of the light-emitting lamp group emit light at the same time according to a first light-emitting intensity and a bright stripe when the light-emitting diodes of the light-emitting lamp group emit light at the same time according to a second light-emitting intensity.
18. The optical code interaction system of any one of claims 15 to 17, wherein the decoder is specifically configured to:
scanning the optical code image to obtain comb-shaped alternate bright stripes and dark stripes, and determining the distance between any two adjacent bright stripes;
and comparing the distance between any two adjacent bright stripes, and taking the dark stripe between the two bright stripes corresponding to the maximum distance value as the identification image.
19. The optical code interaction system of claim 18, wherein the decoder is specifically configured to:
and taking the stripes between two adjacent identification images as data images in the optical code image.
20. The optical code interaction system of claim 19, wherein the decoder is specifically configured to:
and decoding the data image by using a pre-stored coding rule by taking the first bright stripe of the data image as a start bit to obtain a pulse signal corresponding to the data image.
21. A computer-readable storage medium, on which a computer program is stored, which is characterized in that the computer program is executed by a processor for an encoding method using a group of light-emitting lamps according to any one of claims 8 to 10 and/or a decoding method according to any one of claims 11 to 14.
CN201811509506.XA 2018-12-11 2018-12-11 Optical code generating device, decoding device, encoding method, decoding method, and system Active CN109784119B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811509506.XA CN109784119B (en) 2018-12-11 2018-12-11 Optical code generating device, decoding device, encoding method, decoding method, and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811509506.XA CN109784119B (en) 2018-12-11 2018-12-11 Optical code generating device, decoding device, encoding method, decoding method, and system

Publications (2)

Publication Number Publication Date
CN109784119A CN109784119A (en) 2019-05-21
CN109784119B true CN109784119B (en) 2021-10-26

Family

ID=66496716

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811509506.XA Active CN109784119B (en) 2018-12-11 2018-12-11 Optical code generating device, decoding device, encoding method, decoding method, and system

Country Status (1)

Country Link
CN (1) CN109784119B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112306259B (en) * 2020-10-30 2023-06-02 维沃移动通信有限公司 Input device, input system and input method
CN112738325B (en) * 2020-12-25 2021-11-23 浙江工业大学 Intelligent LED identification method based on Android mobile phone
TR2022014689A2 (en) * 2022-09-23 2022-10-21 Yildiz Teknik Ueniversitesi Doener Sermaye Isletme Mued VISUAL BASED ROBOT LANGUAGE FOR INDUSTRY 4.0 APPLICATIONS

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103916185A (en) * 2013-04-09 2014-07-09 珠海横琴华策光通信科技有限公司 Optical signal decoding method, device and system
CN106951837A (en) * 2017-03-06 2017-07-14 北京航空航天大学 A kind of zebra stripes towards flight check detect localization method
CN107249868A (en) * 2015-02-09 2017-10-13 微软技术许可有限责任公司 Molding process and device for moulding optical module and optical module
CN107454351A (en) * 2017-09-22 2017-12-08 深圳市光域物联科技有限公司 Imaging communication system and method based on multicolor visible light technology

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9984268B2 (en) * 2016-08-31 2018-05-29 Vium, Inc. Code for animal ID marking

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103916185A (en) * 2013-04-09 2014-07-09 珠海横琴华策光通信科技有限公司 Optical signal decoding method, device and system
CN107249868A (en) * 2015-02-09 2017-10-13 微软技术许可有限责任公司 Molding process and device for moulding optical module and optical module
CN106951837A (en) * 2017-03-06 2017-07-14 北京航空航天大学 A kind of zebra stripes towards flight check detect localization method
CN107454351A (en) * 2017-09-22 2017-12-08 深圳市光域物联科技有限公司 Imaging communication system and method based on multicolor visible light technology

Also Published As

Publication number Publication date
CN109784119A (en) 2019-05-21

Similar Documents

Publication Publication Date Title
CN109784119B (en) Optical code generating device, decoding device, encoding method, decoding method, and system
CN104041190B (en) Lighting device and Lighting System using plurality of different modulation periods
CN109784120B (en) Optical code generation device, light sensation data interaction method and image acquisition device
US7092563B2 (en) Three-dimensional information acquisition apparatus and three-dimensional information acquisition method
WO2018041136A1 (en) Optical communication device and system and corresponding information transferring and receiving method
CN102165849B (en) System and method for the debugging automatically of multiple light sources
JP7090233B2 (en) Visible light communication system
CN109684887B (en) Scanning device, and light supplement lamp control system and control method thereof
JP5384355B2 (en) Light source with controlled color and method for controlling color generation in a light source
JP2009088704A (en) Optical transmitting device, optical receiving device, and optical communication system
US20100296141A1 (en) Image reading apparatus
CN106372701B (en) A kind of coding of optical label and recognition methods
EP3435557B1 (en) Discrimination method and communication system
CN109936713B (en) Method and apparatus for decoding information conveyed by a light source
JP2016063347A (en) Signal transmitter, signal transmission method and signal transmission program
CN109586791B (en) Visible light communication method and device
CN106209230A (en) A kind of visible light communication system identifying striations code based on APP
CN205883246U (en) Visible light communication system based on adjust luminance and add up
CN111226400B (en) Decoding light-based communication signals captured with a rolling shutter image capture device
CN115577726A (en) Image forming apparatus and image forming method
CN107682692A (en) The self-adapting detecting system and method for photoimaging communication
KR102593590B1 (en) Apparatus and method for optical wireless receiving based on multi-amplitude color on-off keying and grayscale image
EP3582410B1 (en) Transmission device, transmission control device, communication system, transmission method and computer program for transmission
CN108449138B (en) M sequence visual detection method and system for visible light communication
KR102612533B1 (en) Apparatus and method for optical wireless transmission based on multi-amplitude color on-off keying and grayscale image

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200528

Address after: 100162 903, floor 9, building 8, yard 9, Hongye Road, Xihongmen Town, Daxing District, Beijing

Applicant after: Beijing tianlixiu Technology Co., Ltd

Address before: 650233 Bailongsi Village, Bailong Road, Panlong District, Kunming City, Yunnan Province

Applicant before: Tian Feng

GR01 Patent grant
GR01 Patent grant