CN107944326B - Data acquisition method, data processing method and system - Google Patents

Data acquisition method, data processing method and system Download PDF

Info

Publication number
CN107944326B
CN107944326B CN201711319851.2A CN201711319851A CN107944326B CN 107944326 B CN107944326 B CN 107944326B CN 201711319851 A CN201711319851 A CN 201711319851A CN 107944326 B CN107944326 B CN 107944326B
Authority
CN
China
Prior art keywords
image
binary data
visible light
binary
data sequence
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.)
Expired - Fee Related
Application number
CN201711319851.2A
Other languages
Chinese (zh)
Other versions
CN107944326A (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.)
Liphy Communications Ltd
Original Assignee
Liphy Communications 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 Liphy Communications Ltd filed Critical Liphy Communications Ltd
Priority to CN201711319851.2A priority Critical patent/CN107944326B/en
Publication of CN107944326A publication Critical patent/CN107944326A/en
Application granted granted Critical
Publication of CN107944326B publication Critical patent/CN107944326B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14172D bar codes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/146Methods for optical code recognition the method including quality enhancement steps

Abstract

The embodiment of the invention provides a data acquisition method and a system, wherein the method comprises the steps that a visible light emitting device emits visible light and controls the brightness of the visible light according to a binary data sequence; the visible light receiving device scans the light emitting areas of the visible light line by line to acquire a rolling shutter image; performing image processing on the rolling shutter image to obtain a binary data sequence; and acquiring corresponding application data according to the binary data sequence. In the invention, the acquired rolling shutter image is difficult to copy or replace, thereby improving the safety when acquiring related application data; further, since the human eye does not see any image, there is no influence on the appearance of the information display device. Meanwhile, the embodiment of the invention also provides a data processing method and a data processing system based on the data acquisition method, and the data acquisition method is combined with the two-dimensional code acquisition method and is used for data processing, so that the two-dimensional code has wider application occasions.

Description

Data acquisition method, data processing method and system
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data acquisition method, a data processing method, and a data processing system.
Background
With the increase in the number of users of mobile phones and the wide application of mobile phones in fields including, for example, advertisement, product marking and tracking, access control, and mobile payment, the application of quick response codes (QR codes, one kind of two-dimensional codes) has been drastically increased. However, as a static image, the QR code can be easily copied or changed, which easily poses a security challenge when used in sensitive applications such as payment and access control. For example, in one common QR code-based payment method, the consumer must scan the vendor's QR code. For this case, the vendor presents the QR code to the customer using a static image, and the customer scans the QR code with a cell phone to make payment. However, since the difference in appearance between different QR codes is small, if someone can replace the static image of the QR code with a QR code that looks similar and transfer money to a wrong account, this will certainly cause significant property damage to the consumer. In addition, the QR code requires printing of different patterns on an information display (e.g., a billboard), which may affect the aesthetic appearance.
It can be seen that the existing method for acquiring application data (such as payment information) by using a QR code has at least the following two disadvantages: 1. the security is low, and the QR code is used for being copied or replaced; 2. the QR code is displayed in the form of a static image, which affects the aesthetics of the original information display.
Disclosure of Invention
A first object of the present invention is to provide a data acquisition method and system, which can acquire application data by visible light, and can improve the security of acquiring the application data without affecting the appearance of an information display.
A second object of the present invention is to provide a data processing system, which combines application data acquired by visible light and application data acquired by a two-dimensional code, so that the two-dimensional code can have a wider application range.
In order to achieve the first object, a first aspect of an embodiment of the present invention provides a data acquisition method, including:
the visible light emitting device emits visible light through the light emitting unit and periodically controls the brightness of the visible light within a preset time interval to be a first brightness or a second brightness according to each bit of binary data in a pre-stored binary data sequence; wherein the first brightness is greater than the second brightness;
the visible light receiving device controls an image pickup unit to scan the luminous regions of the visible light line by line so as to acquire a rolling shutter image corresponding to the binary data sequence; wherein the shutter of the camera unit is a rolling shutter;
the visible light receiving device carries out image processing on the rolling shutter image to obtain the binary data sequence;
and the visible light receiving device acquires application data corresponding to the binary data sequence according to the binary data sequence.
In order to achieve the first object, a second aspect of embodiments of the present invention provides a data acquisition system, including a visible light emitting device and a visible light receiving device;
the visible light emitting device comprises a visible light emitting module; the visible light emitting module is used for emitting visible light through the emitting unit and periodically controlling the brightness of the visible light within a preset time interval to be a first brightness or a second brightness according to each bit of binary data in a pre-stored binary data sequence; wherein the first brightness is greater than the second brightness;
the visible light receiving device includes:
the rolling image acquisition module is used for controlling the camera shooting unit to scan the luminous regions of the visible light line by line so as to acquire a rolling shutter image corresponding to the binary data sequence; wherein the shutter of the camera unit is a rolling shutter;
the data sequence acquisition module is used for carrying out image processing on the rolling shutter image so as to acquire the binary data sequence;
and the application data acquisition module is used for acquiring the application data corresponding to the binary data sequence according to the binary data sequence.
In order to achieve the second object, a third aspect of the embodiments of the present invention provides a data processing method, including:
the visible light emitting device emits visible light through the light emitting unit and periodically controls the brightness of the visible light within a preset time interval to be a first brightness or a second brightness according to each bit of binary data in a pre-stored binary data sequence; wherein the first brightness is greater than the second brightness;
the mobile terminal controls a camera shooting unit to shoot a two-dimensional code arranged on the visible light emitting device or separately arranged from the visible light emitting device to obtain an image of the two-dimensional code, and controls the camera shooting unit to scan light emitting areas of the visible light line by line to obtain a rolling shutter image corresponding to the binary data sequence; wherein the shutter of the camera unit is a rolling shutter;
the mobile terminal performs image processing on the rolling shutter image to acquire the binary data sequence;
the mobile terminal identifies the image of the two-dimension code and acquires first application data from the cloud server according to the two-dimension code;
the mobile terminal acquires second application data corresponding to the binary data sequence from the cloud server according to the binary data sequence;
and the mobile terminal performs data processing according to the first application data and the second application data.
In order to achieve the second object, a fourth aspect of the embodiments of the present invention provides a data processing system, including a visible light emitting apparatus, a mobile terminal, and a cloud server;
the visible light emitting device comprises a visible light emitting module; the visible light emitting module is used for emitting visible light through the light emitting unit and periodically controlling the brightness of the visible light within a preset time interval to be a first brightness or a second brightness according to each bit of binary data in a pre-stored binary data sequence; wherein the first brightness is greater than the second brightness;
the mobile terminal includes:
the camera shooting control module is used for controlling a camera shooting unit to shoot a two-dimensional code arranged on the visible light emitting device or separately arranged from the visible light emitting device so as to obtain an image of the two-dimensional code, and controlling the camera shooting unit to scan light emitting areas of the visible light line by line so as to obtain a rolling shutter image corresponding to the binary data sequence; wherein the shutter of the camera unit is a rolling shutter;
the data sequence acquisition module is used for carrying out image processing on the rolling shutter image so as to acquire the binary data sequence;
the first application data acquisition module is used for acquiring an image for identifying the two-dimensional code and acquiring first application data from a cloud server according to the two-dimensional code;
the second application data acquisition module is used for acquiring second application data corresponding to the binary data sequence from the cloud server according to the binary data sequence;
and the data processing module is used for processing data according to the first application data and the second application data.
Compared with the prior art, the embodiment of the invention has the beneficial effects that: the embodiment of the invention provides a data acquisition method and a system, wherein the method comprises the steps that a visible light emitting device emits visible light through a light emitting unit and periodically controls the brightness of the visible light within a preset time interval to be a first brightness or a second brightness according to each bit of binary data in a pre-stored binary data sequence; wherein the first brightness is greater than the second brightness; the visible light receiving device controls an image pickup unit to scan the luminous regions of the visible light line by line so as to acquire a rolling shutter image corresponding to the binary data sequence; the visible light receiving device carries out image processing on the rolling shutter image to obtain the binary data sequence; and the visible light receiving device acquires application data corresponding to the binary data sequence according to the binary data sequence. In the invention, the visible light emitting device transmits information to the visible light receiving device by controlling the on/off of the light emitting unit within a period of time, the shooting by adopting a global shutter (high exposure) mode cannot acquire any image related to the binary data sequence, and the rolling shutter image related to the binary data sequence can be acquired only when the shooting by adopting a rolling shutter mode is carried out, so that the authenticity of the acquired rolling shutter image is ensured, and the safety in acquiring related application data is improved; in addition, when the frequency of the change in the brightness of the visible light is high enough and most of the visible light is in a state of being on, the light emitting region is a white light by human eyes, and there is no difference from normal illumination, so that the method can be applied to devices with illumination function, such as advertising boards. When applied to a billboard, the human eye cannot see any image, so that the appearance of the billboard is not affected. Meanwhile, the embodiment of the invention also provides a data processing method and a data processing system based on the data acquisition method, which combine the application data acquired by visible light and the application data acquired by the two-dimensional code, improve the usability of the two-dimensional code and enable the two-dimensional code to have wider application occasions.
Drawings
Fig. 1 is a schematic flow chart of a data acquisition method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of acquiring a rolling shutter image corresponding to the binary data sequence by a rolling shutter scanning method according to an embodiment of the present invention;
fig. 3 is a detailed flowchart of step S13 in fig. 1;
fig. 4 is a grayscale image obtained after the processing of step S131;
fig. 5 is a region-of-interest image obtained after the processing of step S132;
fig. 6 is a binary image obtained after the processing of step S133;
fig. 7 is a distribution diagram of the sum of the intensity values of the line pixels obtained after the processing of step S134;
fig. 8 is a distribution diagram of binary data obtained after the processing of step S135;
fig. 9 is a schematic structural diagram of a data acquisition system based on visible light communication according to an embodiment of the present invention;
FIG. 10 is a flow chart illustrating a data processing method according to an embodiment of the present invention;
fig. 11 is a block diagram of a data processing system according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a schematic flow chart of a data acquisition method provided in an embodiment of the present invention is shown, where the method includes the following steps:
s11, the visible light emitting device emits visible light through the light emitting unit and periodically controls the brightness of the visible light to be a first brightness or a second brightness within a preset time interval according to each bit of binary data in a pre-stored binary data sequence; wherein the first brightness is greater than the second brightness;
s12, the visible light receiving device controls the camera shooting unit to scan the light emitting areas of the visible light line by line to acquire a rolling shutter image corresponding to the binary data sequence; wherein the shutter of the camera unit is a rolling shutter;
s13, the visible light receiving device carries out image processing on the rolling shutter image to acquire the binary data sequence;
and S14, the visible light receiving device acquires application data corresponding to the binary data sequence according to the binary data sequence.
Wherein the visible light emitting device may be mounted on a light emitting panel, and the light emitting unit is used for backlighting the light emitting panel.
In an alternative embodiment, the first brightness is a maximum brightness of the visible light emitting device, and the second brightness is 0.
In an alternative embodiment, the light emitting unit is an LED array. The LED array is adopted as the light-emitting unit, so that high light brightness can be achieved, and the identification accuracy is improved. Alternatively, the power supply state of the LED array may be controlled by controlling an LED driver electrically connected to the LED array, thereby controlling the brightness of the visible light. It should be noted that whether the light emitting unit employs a single LED or an LED array, the light emitting unit is controlled as a whole.
The binary data sequence is sequence data composed of "1" and "0", and in the embodiment of the present invention, when the binary data is "1", the brightness of the visible light in the preset time interval is controlled to be a first brightness, and when the binary data is "0", the brightness of the visible light in the preset time interval is controlled to be a second brightness.
The camera shutter is classified into a Global shutter (Global shutter) and a rolling shutter (rolling shutter) according to the exposure manner. The global shutter is implemented by exposing the entire scene at the same time. All pixel points of the sensor collect light rays at the same time and are exposed at the same time. Namely, when the exposure is started, the sensor starts to collect light; at the end of the exposure, the light collection circuit is switched off. The sensor value is then read out as a picture. The CCD sensor is the working mode of the global shutter, and all pixel points are exposed at the same time. And the rolling shutter is a shutter of the CMOS sensor and is realized by exposing the sensor line by line. When exposure starts, the sensor scans line by line and exposes line by line until all pixel points are exposed. The present invention is realized by utilizing the above-described characteristics of the rolling shutter.
Please refer to fig. 2, which is a schematic diagram illustrating a rolling shutter image corresponding to the binary data sequence obtained by a rolling shutter scanning method according to an embodiment of the present invention.
For the sake of brief explanation, the binary data sequence is "1010", in which the state (LED status) of the light-emitting unit is in the light-on state (on) when the data is "1", and the state (LED status) of the light-emitting unit is in the light-off state (off) when the data is "0". In the first frame, the Image sensor starts scanning, and the light-emitting unit is in a light-emitting state, the brightness of the visible light is a first brightness, so that a first behavior of the Image is scanned to be in a high-intensity state (white); in a second frame, the camera unit scans a second line, the light-emitting unit is in an off state, the brightness of the visible light is a second brightness, and therefore the second line of the scanned image is in a low-intensity state (black); in the third frame, the image pickup unit scans to a third row, the light emitting unit is in a light emitting state, the brightness of the visible light is the first brightness, and therefore a third row of the scanned image is in a high intensity state (white); at the fourth frame, the image pickup unit scans to the fourth row, the light emitting unit is in an off state, the brightness of the visible light is the second brightness, and therefore the fourth row of the scanned image is in a low intensity state (black).
Assuming that the scanning has stopped by the fourth frame, the binary data sequence can be restored from the intensities of the first to fourth rows of pixels in the image.
The above is only a simple example, in actual operation, the visible light receiving device may sweep more rows in one scan, and the resulting binary data sequence may be more complex.
In step S14, there are many ways to obtain the application data corresponding to the binary data sequence according to the binary data sequence. For example, the binary data sequence is converted into a URI (Uniform Resource Identifier, a character string for locating any Resource), and the kind of Resource data is acquired through the URI. E.g. link to a certain website or make a payment etc.
The embodiment of the invention provides a data acquisition method based on visible light communication, which is characterized in that a rolling shutter image corresponding to original information (binary data sequence) is acquired by combining brightness control of visible light with a shooting mode of a rolling shutter, the binary data sequence is restored according to the rolling shutter image, and finally corresponding application data is acquired according to the binary data sequence. Different from a static image, the visible light emitting device transmits information to the visible light receiving device by controlling the brightness of visible light within a period of time, the shooting by adopting a global shutter mode cannot acquire any image related to the binary data sequence, and the rolling shutter image related to the binary data sequence can be acquired only when the shooting by adopting a rolling shutter mode, so that the authenticity of the acquired rolling shutter image is ensured, and the safety in acquiring related application data is improved; in addition, when the frequency of the change in the brightness of the visible light is high enough and most of the visible light is in a state of being on, the light emitting region is a white light by human eyes, and there is no difference from normal illumination, so that the method can be applied to devices with illumination function, such as advertising boards. When applied to a billboard, the human eye cannot see any image, so that the appearance of the billboard is not affected.
Further, the method may further include: and a step of receiving an ID setting command by the visible light emitting device and setting the binary data sequence according to the ID setting command. That is, the corresponding binary data sequence is changed according to the ID setting command, and the user can modify the binary data sequence as desired.
In an alternative embodiment, the frequency of the brightness variation of the visible light is higher than the human eye refresh frequency and lower than or equal to the line scanning frequency of the visible light receiving device.
When the change frequency of the brightness of the visible light is higher than the refreshing frequency of human eyes, the flickering caused by the change of the brightness of the visible light can be ensured not to be seen by human eyes, and the bad visual effect is avoided.
When the brightness change frequency of the visible light is equal to or lower than the line scanning frequency of the visible light receiving device, it can be ensured that the control of the light emitting unit by each bit of data in the binary data sequence can be recognized by the visible light receiving device. It is most preferable that the frequency of the change in the brightness of the visible light is equal to the line scanning frequency of the visible light receiving device, i.e. the control time of the light emitting unit for each bit of data in the binary data sequence is exactly equal to the time required for the visible light receiving device to scan a line.
Hereinafter, the operation of controlling the brightness of the visible light according to the pre-stored binary data sequence is referred to as a brightness control operation. In the embodiment of the present invention, the brightness control operation is performed periodically, once every period, that is, the visible light emitting device is always transmitting the light information related to the binary data sequence, so that the binary data sequence can be accurately acquired at any time when the visible light receiving device scans. Wherein the time consumed by the brightness control operation may occupy the entire period, i.e., the brightness control operation is continuously performed; it is also possible to occupy a part of the period, and to keep the light emitting unit in the light emitting state for the other part of the period.
In an alternative embodiment, the scanning time of the light emitting region by the visible light receiving device is greater than or equal to T1; t1 is the maximum time interval in the process of controlling the brightness of the visible light with the binary data sequence two times in a row. By the above mode, no matter when the visible light receiving device starts scanning, it can be ensured that at least one complete frame of the binary data sequence can be acquired in the scanning process.
Please refer to fig. 3-8, wherein fig. 3 is a schematic flowchart illustrating the step S13 in fig. 1. The step S13 includes:
s131, the visible light receiving device converts the rolling shutter image into a grayscale image; as shown in fig. 4, it is a grayscale image obtained after the processing of step S131.
S132, the visible light receiving device carries out edge detection processing on the gray level image to obtain an interested area in the rolling shutter image, and the interested area is cut out from the gray level image to obtain an interested area image; as shown in fig. 5, it is the region-of-interest image obtained after the processing of step S132.
S133, the visible light receiving device performs automatic threshold filtering processing on the region-of-interest image to obtain a binary image corresponding to the region-of-interest image; as shown in fig. 6, it is a binary image obtained after the processing of step S133. In a binary image, the intensity value of each pixel is either 1 (white) or 0 (black).
S134, the visible light receiving device sums up the intensity values of the pixels in the same row in the binary image to obtain a sum of the intensity values of the pixels in each row; as shown in fig. 7, it is a distribution diagram of the sum of the line pixel intensity values obtained after the processing in step S134. In fig. 7, the abscissa represents the number of rows, and the ordinate represents the sum of intensity values of pixels of each row.
And S135, the visible light receiving device respectively converts the sum of the intensity values of the pixels of each line in the binary image into binary data, and splices the binary data corresponding to each line to obtain the binary data sequence. As shown in fig. 8, it is a binary data distribution diagram obtained after the processing of step S135. In fig. 8, the abscissa represents the number of rows, and the ordinate represents binary data corresponding to the sum of intensity values of pixels of each row.
In an alternative embodiment, step S135 includes:
the visible light receiving device compares the sum of the intensity values of the pixels of each line in the binary image with a pixel threshold value respectively to obtain a comparison result of each line; the pixel threshold is the median of the sum of the intensity values of the pixels of each row in the binary image;
and the visible light receiving device converts the sum of the intensity values of the pixels of each line in the binary image into binary data according to the comparison result of each line, and splices the binary data corresponding to each line to obtain the binary data sequence.
In an alternative embodiment, the binary data sequence comprises a preamble and a payload concatenated after the preamble;
the visible light receiving device acquires application data corresponding to the binary data sequence according to the binary data sequence, and the application data comprises:
the visible light receiving device determines a lead code in the binary data sequence according to a preset sequence format;
the visible light receiving device determines the payload in the binary data sequence according to the lead code in the binary data sequence;
and the visible light receiving device acquires application data corresponding to the binary data sequence according to the payload in the binary data sequence.
In another optional embodiment, the binary data sequence comprises a preamble, a payload concatenated after the preamble, and a cyclic redundancy check code;
the step S14 includes:
the visible light receiving device determines a lead code and a cyclic redundancy check code in the binary data sequence according to a preset sequence format;
the visible light receiving device determines the effective load in the binary data sequence according to the lead code and the cyclic redundancy check code in the binary data sequence;
and the visible light receiving device acquires application data corresponding to the binary data sequence according to the payload in the binary data sequence.
Since other signal interference may occur during the scanning process of the visible light receiving device and it is difficult to determine the start bit of the payload, the start bit of the payload is determined by setting the preamble, and the validity of the payload can be verified by the cyclic redundancy check code.
Fig. 9 is a schematic structural diagram of a data acquisition system according to an embodiment of the present invention. The system comprises a visible light emitting device 11 and a visible light receiving device 12;
the visible light emitting device 11 includes a visible light emitting module 111; the visible light emitting module 111 is configured to emit visible light through an emitting unit and periodically control the brightness of the visible light within a preset time interval to be a first brightness or a second brightness according to each bit of binary data in a pre-stored binary data sequence; wherein the first brightness is greater than the second brightness;
the visible light receiving device 12 includes:
a rolling image obtaining module 121, configured to control an image capturing unit to scan the light emitting areas of the visible light line by line to obtain a rolling shutter image corresponding to the binary data sequence; wherein the shutter of the camera unit is a rolling shutter;
a data sequence acquiring module 122, configured to perform image processing on the rolling shutter image to acquire the binary data sequence;
an application data obtaining module 123, configured to obtain, according to the binary data sequence, application data corresponding to the binary data sequence.
In an alternative embodiment, the frequency of the brightness variation of the visible light is higher than the human eye refresh frequency and lower than or equal to the line scanning frequency of the visible light receiving device 12.
In an alternative embodiment, the single scanning time of the light-emitting region by the visible light receiving device 12 is greater than or equal to T1; t1 is the maximum time interval in the process of controlling the brightness of the visible light with the binary data sequence two times in a row.
In an alternative embodiment, the data obtaining module 122 includes:
a grayscale image conversion unit for converting the rolling shutter image into a grayscale image;
the area image extraction unit is used for carrying out edge detection processing on the gray level image to obtain an interested area in the rolling shutter image and cutting the interested area from the gray level image to obtain an interested area image;
the filtering processing unit is used for carrying out automatic threshold filtering processing on the interested region image to obtain a binary image corresponding to the interested region image;
the row pixel summation unit is used for summing the intensity values of the pixels in the same row in the binary image to obtain the sum of the intensity values of the pixels in each row;
and the data conversion unit is used for respectively converting the sum of the intensity values of the pixels of each line in the binary image into binary data and splicing the binary data corresponding to each line to obtain the binary data sequence.
In an optional implementation manner, the data conversion unit is specifically configured to:
comparing the sum of the intensity values of the pixels of each line in the binary image with a pixel threshold value respectively to obtain a comparison result of each line; the pixel threshold is the median of the sum of the intensity values of the pixels of each row in the binary image;
and respectively converting the sum of the intensity values of the pixels of each line in the binary image into binary data according to the comparison result of each line, and splicing the binary data corresponding to each line to obtain the binary data sequence.
In an alternative embodiment, the binary data sequence comprises a preamble, a payload concatenated after the preamble;
the application data acquisition module comprises:
the first data determining unit is used for determining a lead code in the binary data sequence according to a preset sequence format;
a second data determination unit, configured to determine a payload in the binary data sequence according to a preamble in the binary data sequence;
and the application data acquisition unit is used for acquiring the application data corresponding to the binary data sequence according to the payload in the binary data sequence.
In another optional embodiment, the binary data sequence comprises a preamble, a payload concatenated after the preamble, and a cyclic redundancy check code;
the application data acquisition module comprises:
the first data determining unit is used for determining a lead code and a cyclic redundancy check code in the binary data sequence according to a preset sequence format;
a second data determining unit, configured to determine a payload in the binary data sequence according to a preamble and a cyclic redundancy check code in the binary data sequence;
and the application data acquisition unit is used for acquiring the application data corresponding to the binary data sequence according to the payload in the binary data sequence.
It should be noted that, in the data acquisition system based on visible light communication according to the embodiment of the present invention, all the method flows of the data acquisition method based on visible light communication are executed, and the working principles and beneficial effects of the two methods are in one-to-one correspondence, so that no further description is provided.
Referring to fig. 10, a schematic flow chart of a data processing method according to an embodiment of the present invention is shown, where the method includes the following steps:
s21, the visible light emitting device emits visible light through the light emitting unit and periodically controls the brightness of the visible light to be a first brightness or a second brightness within a preset time interval according to each bit of binary data in a pre-stored binary data sequence; wherein the first brightness is greater than the second brightness;
s22, the mobile terminal controls the camera shooting unit to shoot the two-dimensional code arranged on the visible light emitting device or separately arranged from the visible light emitting device to obtain the image of the two-dimensional code, and controls the camera shooting unit to scan the light emitting areas of the visible light line by line to obtain the rolling shutter image corresponding to the binary data sequence; wherein the shutter of the camera unit is a rolling shutter;
s23, the mobile terminal performs image processing on the rolling shutter image to acquire the binary data sequence;
s24, the mobile terminal identifies the image of the two-dimensional code and acquires first application data from the cloud server according to the two-dimensional code;
s25, the mobile terminal acquires second application data corresponding to the binary data sequence from the cloud server according to the binary data sequence;
and S26, the mobile terminal performs data processing according to the first application data and the second application data.
In an alternative embodiment, the light emitting unit is an LED array. The LED array is adopted as the light-emitting unit, so that high light brightness can be achieved, and the identification accuracy is improved. Alternatively, the power supply state of the LED array may be controlled by controlling an LED driver electrically connected to the LED array, thereby controlling the brightness of the visible light. It should be noted that, regardless of whether the light emitting unit employs a single LED or an LED array, the light emitting unit as a whole changes the brightness.
The binary data sequence is sequence data composed of "1" and "0", and in the embodiment of the present invention, when the binary data is "1", the brightness of the visible light in the preset time interval is controlled to be a first brightness, and when the binary data is "0", the brightness of the visible light in the preset time interval is controlled to be a second brightness.
The principle of acquiring a rolling shutter image corresponding to the binary data sequence by using a rolling shutter and the difference between the global shutter and the rolling shutter have been described in the above embodiments of the data acquisition method based on optical communication, and thus are not described again.
The data processing method of the embodiment of the invention is actually an application of the data acquisition method combined with a static two-dimensional code. The specific realization principle is as follows: scanning a two-dimensional code (the two-dimensional code is static and is the same as the prior art) on the visible light emitting device through the camera shooting unit, and scanning a light emitting area on the visible light emitting device through the camera shooting unit to obtain a binary data sequence; the two-dimensional code can acquire first application data from a cloud server, and the binary data sequence can acquire second application data from the cloud server, so that data processing can be performed according to the first application data and the second application data, and the two-dimensional code can have wider application occasions by combining the two application data and the second application data.
In an alternative embodiment, the second application data is additional information of the first application data; the second application data is one or more of position information, decryption information, authentication information and verification information.
Three examples are given below to illustrate the data processing method of the present invention.
Example one: the second application data is position information of the two-dimensional code; the data processing performed by the mobile terminal according to the first application data and the second application data specifically comprises: and the mobile terminal obtains useful information related to the position information according to the position information of the two-dimensional code and the first application data. For example, the visible light emitting device is a billboard, a map of the city (first application data) can be obtained by scanning a two-dimensional code on the billboard, a specific position of the billboard (second application data) can be obtained by scanning the light emitting region, and the first application data and the second application data are combined to determine the current position of the billboard and recommend a nearby place for enjoying (useful information).
Example two: the first application data comprises encrypted useful information; the second application data is decryption information for decrypting the first application data; the data processing performed by the mobile terminal according to the first application data and the second application data specifically comprises: and the mobile terminal decrypts the encrypted useful information in the first application data according to the decryption information to obtain the useful information.
Example three: the first application data includes payment information; the second application data is verification information; the mobile terminal performs data processing according to the first application data and the second application data specifically as follows: and the mobile terminal verifies the payment information in the first application data according to the verification information, and pays according to the payment information when the verification is successful. When the verification is unsuccessful, since the binary data sequence is difficult to replace, it is highly likely that the two-dimensional code is replaced, and no payment operation is performed. Therefore, the authenticity of the two-dimensional code for payment can be verified through the example, and the payment safety is greatly improved.
It should be noted that the above three examples are only three application occasions that the application data acquired by the visible light and the application data acquired by the two-dimensional code are combined, the two are combined to improve the usability of the two-dimensional code, so that the two-dimensional code can have a wider application occasion, and other data processing methods that combine the two are all within the protection scope of the embodiment of the present invention.
In an optional embodiment, the image capturing unit adopts a first exposure level when acquiring the image of the two-dimensional code, and the image capturing unit adopts a second exposure level when acquiring the rolling shutter image; the second exposure level is lower than the first exposure level. Since the shutters on the mobile terminal are fixed (rolling shutters are adopted in the invention), high exposure is needed for shooting static two-dimensional code images, and low exposure is needed for obtaining rolling shutter images. For example, a normal exposure is used to capture a still two-dimensional code image, and the lowest exposure is used to capture a rolling shutter image.
In an alternative embodiment, the camera unit comprises a first camera and a second camera;
the mobile terminal controls the camera unit to shoot the two-dimensional code on the display screen to obtain an image of the two-dimensional code, and controls the camera unit to scan the light emitting areas of the visible light line by line to obtain a rolling shutter image corresponding to the binary data sequence, specifically:
and the mobile terminal controls the first camera to shoot the two-dimensional code on the display screen with a first exposure degree so as to obtain an image of the two-dimensional code, and the second camera scans the light emitting areas of the visible light line by line with a second exposure degree so as to obtain a rolling shutter image corresponding to the binary data sequence.
Namely, the mobile terminal is provided with two cameras which respectively use different exposure levels for shooting and respectively obtain the image of the two-dimensional code and the rolling shutter image.
In another embodiment, the mobile terminal may use only one camera to perform time-sharing shooting with different exposure levels, so as to obtain an image of the two-dimensional code and a rolling shutter image respectively.
In an alternative embodiment, the frequency of the brightness variation of the visible light is higher than the human eye refresh frequency and lower than or equal to the line scanning frequency of the mobile terminal.
When the change frequency of the brightness of the visible light is higher than the refreshing frequency of human eyes, the flickering caused by the change of the brightness of the visible light can be ensured not to be seen by human eyes, and the bad visual effect is avoided.
When the brightness change frequency of the visible light is equal to or lower than the line scanning frequency of the visible light receiving device, it can be ensured that the control of the light emitting unit by each bit of data in the binary data sequence can be recognized by the visible light receiving device. It is most preferable that the frequency of the change in the brightness of the visible light is equal to the line scanning frequency of the visible light receiving device, i.e. the control time of the light emitting unit for each bit of data in the binary data sequence is exactly equal to the time required for the visible light receiving device to scan a line.
In an alternative embodiment, the scanning time of the light-emitting area by the mobile terminal in a single time is greater than or equal to T1; t1 is the maximum time interval in the process of controlling the brightness of the visible light with the binary data sequence two times in a row. By the above method, no matter when the mobile terminal starts scanning, it can be ensured that at least one complete frame of the binary data sequence can be obtained in the scanning process.
In an alternative embodiment, the image processing of the rolling shutter image by the mobile terminal to obtain the binary data sequence includes:
the mobile terminal converts the rolling shutter image into a gray image;
the mobile terminal carries out edge detection processing on the gray level image to obtain an interested area in the rolling shutter image, and cuts the interested area from the gray level image to obtain an interested area image;
the mobile terminal performs automatic threshold filtering on the region-of-interest image to obtain a binary image corresponding to the region-of-interest image;
the mobile terminal sums the intensity values of the pixels in the same line in the binary image to obtain the sum of the intensity values of the pixels in each line;
and the mobile terminal respectively converts the sum of the intensity values of the pixels of each line in the binary image into binary data, and splices the binary data corresponding to each line to obtain the binary data sequence.
In an optional implementation manner, the mobile terminal converts the sum of intensity values of pixels in each row of the binary image into binary data, and concatenates the binary data corresponding to each row to obtain the binary data sequence, including:
the mobile terminal compares the sum of the intensity values of the pixels of each line in the binary image with a pixel threshold value respectively to obtain a comparison result of each line; the pixel threshold is the median of the sum of the intensity values of the pixels of each row in the binary image;
and the mobile terminal converts the sum of the intensity values of the pixels of each line in the binary image into binary data respectively according to the comparison result of each line, and splices the binary data corresponding to each line to obtain the binary data sequence.
In an optional embodiment, the binary data sequence comprises a preamble, a payload concatenated after the preamble, and a cyclic redundancy check code concatenated after the payload;
the mobile terminal acquires verification information corresponding to the binary data sequence from the cloud server according to the binary data sequence, and the verification information comprises:
the mobile terminal determines a lead code and a cyclic redundancy check code in the binary data sequence according to a preset sequence format;
the mobile terminal determines the effective load in the binary data sequence according to the lead code and the cyclic redundancy check code in the binary data sequence;
and the mobile terminal is linked to the cloud server according to the payload in the binary data sequence and acquires second application data corresponding to the binary data sequence from the cloud server.
The above structure of the binary data sequence and its specific application have been described above, and thus are not described again.
Correspondingly, the embodiment of the invention also provides a data processing system. Fig. 11 is a block diagram of a data processing system according to an embodiment of the present invention. The system comprises a visible light emitting device 21, a mobile terminal 22 and a cloud server 23;
the visible light emitting device 21 includes a visible light emitting module 211; the visible light emitting module 211 is configured to emit visible light through the light emitting unit and periodically control the brightness of the visible light within a preset time interval to be a first brightness or a second brightness according to each bit of binary data in a pre-stored binary data sequence; wherein the first brightness is greater than the second brightness;
the mobile terminal 22 includes:
the camera shooting control module 221 is configured to control a camera shooting unit to shoot a two-dimensional code arranged on the visible light emitting device 21 or separately arranged from the visible light emitting device 21 to obtain an image of the two-dimensional code, and control the camera shooting unit to scan light emitting areas of the visible light line by line to obtain a rolling shutter image corresponding to the binary data sequence; wherein the shutter of the camera unit is a rolling shutter;
a data sequence acquisition module 222, configured to perform image processing on the rolling shutter image to acquire the binary data sequence;
the first application data acquisition module 223 is configured to acquire an image identifying the two-dimensional code and acquire first application data from a cloud server according to the two-dimensional code;
a second application data obtaining module 224, configured to obtain, from the cloud server according to the binary data sequence, second application data corresponding to the binary data sequence;
a data processing module 225, configured to perform data processing according to the first application data and the second application data.
In an alternative embodiment, the second application data is additional information of the first application data; the second application data is one or more of position information, decryption information, authentication information and verification information.
In an alternative embodiment of the method according to the invention,
the second application data is position information of the two-dimensional code;
the data processing module is specifically configured to obtain useful information related to the position information according to the position information of the two-dimensional code and the second application data.
In an alternative embodiment of the method according to the invention,
the first application data comprises encrypted useful information; the second application data is decryption information for decrypting the first application data;
the data processing module is specifically configured to decrypt the encrypted useful information in the first application data according to the decryption information to obtain the useful information.
In an alternative embodiment of the method according to the invention,
the first application data includes payment information; the second application data is verification information;
the data processing module is specifically used for verifying the payment information in the first application data according to the verification information, and when the verification is successful, payment is carried out according to the payment information.
In an alternative embodiment of the method according to the invention,
the camera shooting unit adopts a first exposure when acquiring the image of the two-dimensional code, and the camera shooting unit adopts a second exposure when acquiring the rolling shutter image; the second exposure level is lower than the first exposure level.
In an alternative embodiment of the method according to the invention,
the camera shooting unit comprises a first camera and a second camera;
the camera control module is specifically configured to control the first camera to shoot the two-dimensional code on the display screen at a first exposure level to obtain an image of the two-dimensional code, and the second camera scans the light emitting areas of the visible light line by line at a second exposure level to obtain a rolling shutter image corresponding to the binary data sequence.
In an alternative embodiment, the frequency of the brightness variation of the visible light is higher than the human eye refresh frequency and lower than or equal to the line scan frequency of the mobile terminal 22.
In an alternative embodiment, the single scan time of the light emitting area by the mobile terminal 22 is greater than or equal to T1; t1 is the maximum time interval in the process of controlling the brightness of the visible light with the binary data sequence two times in a row.
In an alternative embodiment, the data sequence acquiring module 222 includes:
a grayscale image conversion unit for converting the rolling shutter image into a grayscale image;
the area image extraction unit is used for carrying out edge detection processing on the gray level image to obtain an interested area in the rolling shutter image and cutting the interested area from the gray level image to obtain an interested area image;
the filtering processing unit is used for carrying out automatic threshold filtering processing on the interested region image to obtain a binary image corresponding to the interested region image;
the row pixel summation unit is used for summing the intensity values of the pixels in the same row in the binary image to obtain the sum of the intensity values of the pixels in each row;
and the data conversion unit is used for respectively converting the sum of the intensity values of the pixels of each line in the binary image into binary data and splicing the binary data corresponding to each line to obtain the binary data sequence.
In an optional implementation manner, the data conversion unit is specifically configured to:
comparing the sum of the intensity values of the pixels of each line in the binary image with a pixel threshold value respectively to obtain a comparison result of each line; the pixel threshold is the median of the sum of the intensity values of the pixels of each row in the binary image;
and respectively converting the sum of the intensity values of the pixels of each line in the binary image into binary data according to the comparison result of each line, and splicing the binary data corresponding to each line to obtain the binary data sequence.
In an optional embodiment, the binary data sequence comprises a preamble, a payload concatenated after the preamble, and a cyclic redundancy check code concatenated after the payload;
the second application data obtaining module 224 includes:
the first data determining unit is used for determining a lead code and a cyclic redundancy check code in the binary data sequence according to a preset sequence format;
a second data determining unit, configured to determine a payload in the binary data sequence according to a preamble and a cyclic redundancy check code in the binary data sequence;
and an application data obtaining unit, configured to link to the cloud server 23 according to the payload in the binary data sequence, and obtain, from the cloud server 23, verification information corresponding to the binary data sequence.
It should be noted that, the data processing system provided in the embodiment of the present invention is configured to execute all the method flows of the data processing method, and the working principles and beneficial effects of the two methods are in one-to-one correspondence, and thus are not described again.
Compared with the prior art, the embodiment of the invention has the beneficial effects that: the embodiment of the invention provides a data acquisition method and a system, wherein the method comprises the steps that a visible light emitting device emits visible light through a light emitting unit and periodically controls the brightness of the visible light within a preset time interval to be a first brightness or a second brightness according to each bit of binary data in a pre-stored binary data sequence; wherein the first brightness is greater than the second brightness; the visible light receiving device controls an image pickup unit to scan the luminous regions of the visible light line by line so as to acquire a rolling shutter image corresponding to the binary data sequence; the visible light receiving device carries out image processing on the rolling shutter image to obtain the binary data sequence; and the visible light receiving device acquires application data corresponding to the binary data sequence according to the binary data sequence. In the invention, the visible light emitting device transmits information to the visible light receiving device by controlling the brightness of the light emitting unit within a period of time, the shooting by adopting a global shutter (high exposure) mode cannot acquire any image related to the binary data sequence, and the rolling shutter image related to the binary data sequence can be acquired only when the shooting by adopting a rolling shutter mode, so that the authenticity of the acquired rolling shutter image is ensured, and the safety of acquiring related application data is improved; in addition, when the frequency of the change in the brightness of the visible light is high enough and most of the visible light is in a state of being on, the light emitting region is a white light by human eyes, and there is no difference from normal illumination, so that the method can be applied to devices with illumination function, such as advertising boards. When applied to a billboard, the human eye cannot see any image, so that the appearance of the billboard is not affected. Meanwhile, the embodiment of the invention also provides a data processing method and a data processing system based on the data acquisition method, which combine the application data acquired by visible light and the application data acquired by the two-dimensional code, improve the usability of the two-dimensional code and enable the two-dimensional code to have wider application occasions.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (28)

1. A data acquisition method, characterized in that,
the visible light emitting device emits visible light through the light emitting unit and periodically controls the brightness of the visible light within a preset time interval to be a first brightness or a second brightness according to each bit of binary data in a pre-stored binary data sequence; wherein the first brightness is greater than the second brightness;
the visible light receiving device controls an image pickup unit to scan the luminous regions of the visible light line by line so as to acquire a rolling shutter image corresponding to the binary data sequence; wherein the shutter of the camera unit is a rolling shutter;
the visible light receiving device carries out image processing on the rolling shutter image to obtain the binary data sequence;
the visible light receiving device acquires application data corresponding to the binary data sequence according to the binary data sequence;
wherein the binary data sequence comprises a preamble and a payload concatenated after the preamble;
the visible light receiving device acquires application data corresponding to the binary data sequence according to the binary data sequence, and the application data comprises:
the visible light receiving device determines a lead code in the binary data sequence according to a preset sequence format;
the visible light receiving device determines the payload in the binary data sequence according to the lead code in the binary data sequence;
the visible light receiving device acquires application data corresponding to the binary data sequence according to the effective load in the binary data sequence;
the visible light receiving device performs image processing on the rolling shutter image to acquire the binary data sequence, and includes:
the visible light receiving device converts the rolling shutter image into a gray scale image;
the visible light receiving device carries out edge detection processing on the gray level image to obtain an interested area in the rolling shutter image, and cuts the interested area from the gray level image to obtain an interested area image;
the visible light receiving device carries out automatic threshold filtering processing on the region-of-interest image to obtain a binary image corresponding to the region-of-interest image;
the visible light receiving device sums up the intensity values of the pixels in the same line in the binary image to obtain the sum of the intensity values of the pixels in each line;
the visible light receiving device respectively converts the sum of the intensity values of the pixels of each line in the binary image into binary data, and splices the binary data corresponding to each line to obtain the binary data sequence;
the visible light receiving device converts the sum of the intensity values of the pixels in each row of the binary image into binary data respectively, and splices the binary data corresponding to each row to obtain the binary data sequence, and the method includes:
the visible light receiving device compares the sum of the intensity values of the pixels of each line in the binary image with a pixel threshold value respectively to obtain a comparison result of each line; the pixel threshold is the median of the sum of the intensity values of the pixels of each row in the binary image;
and the visible light receiving device converts the sum of the intensity values of the pixels of each line in the binary image into binary data according to the comparison result of each line, and splices the binary data corresponding to each line to obtain the binary data sequence.
2. A data acquisition method, characterized in that,
the visible light emitting device emits visible light through the light emitting unit and periodically controls the brightness of the visible light within a preset time interval to be a first brightness or a second brightness according to each bit of binary data in a pre-stored binary data sequence; wherein the first brightness is greater than the second brightness;
the visible light receiving device controls an image pickup unit to scan the luminous regions of the visible light line by line so as to acquire a rolling shutter image corresponding to the binary data sequence; wherein the shutter of the camera unit is a rolling shutter;
the visible light receiving device carries out image processing on the rolling shutter image to obtain the binary data sequence;
the visible light receiving device acquires application data corresponding to the binary data sequence according to the binary data sequence;
wherein the binary data sequence comprises a preamble, a payload concatenated after the preamble, and a cyclic redundancy check code;
the visible light receiving device acquires application data corresponding to the binary data sequence according to the binary data sequence, and the application data comprises:
the visible light receiving device determines a lead code and a cyclic redundancy check code in the binary data sequence according to a preset sequence format;
the visible light receiving device determines the effective load in the binary data sequence according to the lead code and the cyclic redundancy check code in the binary data sequence;
the visible light receiving device acquires application data corresponding to the binary data sequence according to the effective load in the binary data sequence;
the visible light receiving device performs image processing on the rolling shutter image to acquire the binary data sequence, and includes:
the visible light receiving device converts the rolling shutter image into a gray scale image;
the visible light receiving device carries out edge detection processing on the gray level image to obtain an interested area in the rolling shutter image, and cuts the interested area from the gray level image to obtain an interested area image;
the visible light receiving device carries out automatic threshold filtering processing on the region-of-interest image to obtain a binary image corresponding to the region-of-interest image;
the visible light receiving device sums up the intensity values of the pixels in the same line in the binary image to obtain the sum of the intensity values of the pixels in each line;
the visible light receiving device respectively converts the sum of the intensity values of the pixels of each line in the binary image into binary data, and splices the binary data corresponding to each line to obtain the binary data sequence;
the visible light receiving device converts the sum of the intensity values of the pixels in each row of the binary image into binary data respectively, and splices the binary data corresponding to each row to obtain the binary data sequence, and the method includes:
the visible light receiving device compares the sum of the intensity values of the pixels of each line in the binary image with a pixel threshold value respectively to obtain a comparison result of each line; the pixel threshold is the median of the sum of the intensity values of the pixels of each row in the binary image;
and the visible light receiving device converts the sum of the intensity values of the pixels of each line in the binary image into binary data according to the comparison result of each line, and splices the binary data corresponding to each line to obtain the binary data sequence.
3. The data acquisition method as claimed in claim 1 or 2, wherein the frequency of the change in the brightness of the visible light is higher than the human eye refresh frequency and lower than or equal to the line scan frequency of the visible light receiving means.
4. The data acquisition method as claimed in claim 1 or 2, wherein the scanning time of the light emitting region by the visible light receiving means is greater than or equal to T1; t1 is the maximum time interval in the process of controlling the brightness of the visible light with the binary data sequence two times in a row.
5. A data acquisition system, comprising a visible light emitting device and a visible light receiving device;
the visible light emitting device comprises a visible light emitting module; the visible light emitting module is used for emitting visible light through the emitting unit and periodically controlling the brightness of the visible light within a preset time interval to be a first brightness or a second brightness according to each bit of binary data in a pre-stored binary data sequence; wherein the first brightness is greater than the second brightness;
the visible light receiving device includes:
the rolling image acquisition module is used for controlling the camera shooting unit to scan the luminous regions of the visible light line by line so as to acquire a rolling shutter image corresponding to the binary data sequence; wherein the shutter of the camera unit is a rolling shutter;
the data sequence acquisition module is used for carrying out image processing on the rolling shutter image so as to acquire the binary data sequence;
the application data acquisition module is used for acquiring application data corresponding to the binary data sequence according to the binary data sequence;
wherein the binary data sequence comprises a preamble and a payload concatenated after the preamble;
the application data acquisition module comprises:
a first data determining unit, configured to determine a preamble in the binary data sequence according to a preset sequence format;
a second data determination unit, configured to determine a payload in the binary data sequence according to a preamble in the binary data sequence;
the application data acquisition unit is used for acquiring application data corresponding to the binary data sequence according to the payload in the binary data sequence;
the data sequence acquisition module comprises:
a grayscale image conversion unit for converting the rolling shutter image into a grayscale image;
the area image extraction unit is used for carrying out edge detection processing on the gray level image to obtain an interested area in the rolling shutter image and cutting the interested area from the gray level image to obtain an interested area image;
the filtering processing unit is used for carrying out automatic threshold filtering processing on the interested region image to obtain a binary image corresponding to the interested region image;
the row pixel summation unit is used for summing the intensity values of the pixels in the same row in the binary image to obtain the sum of the intensity values of the pixels in each row;
the data conversion unit is used for respectively converting the sum of the intensity values of the pixels of each line in the binary image into binary data and splicing the binary data corresponding to each line to obtain the binary data sequence;
wherein the data conversion unit is specifically configured to:
comparing the sum of the intensity values of the pixels of each line in the binary image with a pixel threshold value respectively to obtain a comparison result of each line; the pixel threshold is the median of the sum of the intensity values of the pixels of each row in the binary image;
and respectively converting the sum of the intensity values of the pixels of each line in the binary image into binary data according to the comparison result of each line, and splicing the binary data corresponding to each line to obtain the binary data sequence.
6. A data acquisition system, comprising a visible light emitting device and a visible light receiving device;
the visible light emitting device comprises a visible light emitting module; the visible light emitting module is used for emitting visible light through the emitting unit and periodically controlling the brightness of the visible light within a preset time interval to be a first brightness or a second brightness according to each bit of binary data in a pre-stored binary data sequence; wherein the first brightness is greater than the second brightness;
the visible light receiving device includes:
the rolling image acquisition module is used for controlling the camera shooting unit to scan the luminous regions of the visible light line by line so as to acquire a rolling shutter image corresponding to the binary data sequence; wherein the shutter of the camera unit is a rolling shutter;
the data sequence acquisition module is used for carrying out image processing on the rolling shutter image so as to acquire the binary data sequence;
the application data acquisition module is used for acquiring application data corresponding to the binary data sequence according to the binary data sequence;
wherein the binary data sequence comprises a preamble, a payload concatenated after the preamble, and a cyclic redundancy check code;
the application data acquisition module comprises:
the first data determining unit is used for determining a lead code and a cyclic redundancy check code in the binary data sequence according to a preset sequence format;
a second data determining unit, configured to determine a payload in the binary data sequence according to a preamble and a cyclic redundancy check code in the binary data sequence;
the application data acquisition unit is used for acquiring application data corresponding to the binary data sequence according to the payload in the binary data sequence;
the data sequence acquisition module comprises:
a grayscale image conversion unit for converting the rolling shutter image into a grayscale image;
the area image extraction unit is used for carrying out edge detection processing on the gray level image to obtain an interested area in the rolling shutter image and cutting the interested area from the gray level image to obtain an interested area image;
the filtering processing unit is used for carrying out automatic threshold filtering processing on the interested region image to obtain a binary image corresponding to the interested region image;
the row pixel summation unit is used for summing the intensity values of the pixels in the same row in the binary image to obtain the sum of the intensity values of the pixels in each row;
the data conversion unit is used for respectively converting the sum of the intensity values of the pixels of each line in the binary image into binary data and splicing the binary data corresponding to each line to obtain the binary data sequence;
wherein the data conversion unit is specifically configured to:
comparing the sum of the intensity values of the pixels of each line in the binary image with a pixel threshold value respectively to obtain a comparison result of each line; the pixel threshold is the median of the sum of the intensity values of the pixels of each row in the binary image;
and respectively converting the sum of the intensity values of the pixels of each line in the binary image into binary data according to the comparison result of each line, and splicing the binary data corresponding to each line to obtain the binary data sequence.
7. The data acquisition system as in claim 5 or 6, wherein the frequency of the change in brightness of the visible light is higher than the human eye refresh frequency and lower than or equal to the line scan frequency of the visible light receiving device.
8. The data acquisition system as claimed in claim 5 or 6, wherein the single scanning time of the light emitting region by the visible light receiving means is greater than or equal to T1; t1 is the maximum time interval in the process of controlling the brightness of the visible light with the binary data sequence two times in a row.
9. A method of data processing, the method comprising:
the visible light emitting device emits visible light through the light emitting unit and periodically controls the brightness of the visible light within a preset time interval to be a first brightness or a second brightness according to each bit of binary data in a pre-stored binary data sequence; wherein the first brightness is greater than the second brightness;
the mobile terminal controls a camera shooting unit to shoot a two-dimensional code arranged on the visible light emitting device or separately arranged from the visible light emitting device to obtain an image of the two-dimensional code, and controls the camera shooting unit to scan light emitting areas of the visible light line by line to obtain a rolling shutter image corresponding to the binary data sequence; wherein the shutter of the camera unit is a rolling shutter;
the mobile terminal performs image processing on the rolling shutter image to acquire the binary data sequence;
the mobile terminal identifies the image of the two-dimension code and acquires first application data from the cloud server according to the two-dimension code;
the mobile terminal acquires second application data corresponding to the binary data sequence from the cloud server according to the binary data sequence;
the mobile terminal performs data processing according to the first application data and the second application data;
wherein the binary data sequence comprises a preamble and a payload concatenated after the preamble;
the mobile terminal acquires second application data corresponding to the binary data sequence from the cloud server according to the binary data sequence, and the method comprises the following steps:
the mobile terminal determines a lead code in the binary data sequence according to a preset sequence format;
the mobile terminal determines the effective load in the binary data sequence according to the lead code in the binary data sequence;
the mobile terminal is linked to the cloud server according to the payload in the binary data sequence, and second application data corresponding to the binary data sequence are acquired from the cloud server;
the mobile terminal performs image processing on the rolling shutter image to acquire the binary data sequence, and the image processing method includes:
the mobile terminal converts the rolling shutter image into a gray image;
the mobile terminal carries out edge detection processing on the gray level image to obtain an interested area in the rolling shutter image, and cuts the interested area from the gray level image to obtain an interested area image;
the mobile terminal performs automatic threshold filtering on the region-of-interest image to obtain a binary image corresponding to the region-of-interest image;
the mobile terminal sums the intensity values of the pixels in the same line in the binary image to obtain the sum of the intensity values of the pixels in each line;
the mobile terminal respectively converts the sum of the intensity values of the pixels of each line in the binary image into binary data, and splices the binary data corresponding to each line to obtain the binary data sequence;
the mobile terminal respectively converts the sum of the intensity values of the pixels in each row in the binary image into binary data, and splices the binary data corresponding to each row to obtain the binary data sequence, and the method includes:
the mobile terminal compares the sum of the intensity values of the pixels of each line in the binary image with a pixel threshold value respectively to obtain a comparison result of each line; the pixel threshold is the median of the sum of the intensity values of the pixels of each row in the binary image;
and the mobile terminal converts the sum of the intensity values of the pixels of each line in the binary image into binary data respectively according to the comparison result of each line, and splices the binary data corresponding to each line to obtain the binary data sequence.
10. A method of data processing, the method comprising:
the visible light emitting device emits visible light through the light emitting unit and periodically controls the brightness of the visible light within a preset time interval to be a first brightness or a second brightness according to each bit of binary data in a pre-stored binary data sequence; wherein the first brightness is greater than the second brightness;
the mobile terminal controls a camera shooting unit to shoot a two-dimensional code arranged on the visible light emitting device or separately arranged from the visible light emitting device to obtain an image of the two-dimensional code, and controls the camera shooting unit to scan light emitting areas of the visible light line by line to obtain a rolling shutter image corresponding to the binary data sequence; wherein the shutter of the camera unit is a rolling shutter;
the mobile terminal performs image processing on the rolling shutter image to acquire the binary data sequence;
the mobile terminal identifies the image of the two-dimension code and acquires first application data from the cloud server according to the two-dimension code;
the mobile terminal acquires second application data corresponding to the binary data sequence from the cloud server according to the binary data sequence;
the mobile terminal performs data processing according to the first application data and the second application data;
wherein the binary data sequence comprises a preamble, a payload concatenated after the preamble, and a cyclic redundancy check code;
the mobile terminal acquires second application data corresponding to the binary data sequence from the cloud server according to the binary data sequence, and the method comprises the following steps:
the mobile terminal determines a lead code and a cyclic redundancy check code in the binary data sequence according to a preset sequence format;
the mobile terminal determines the effective load in the binary data sequence according to the lead code and the cyclic redundancy check code in the binary data sequence;
the mobile terminal is linked to the cloud server according to the payload in the binary data sequence, and second application data corresponding to the binary data sequence are acquired from the cloud server;
the mobile terminal performs image processing on the rolling shutter image to acquire the binary data sequence, and the image processing method includes:
the mobile terminal converts the rolling shutter image into a gray image;
the mobile terminal carries out edge detection processing on the gray level image to obtain an interested area in the rolling shutter image, and cuts the interested area from the gray level image to obtain an interested area image;
the mobile terminal performs automatic threshold filtering on the region-of-interest image to obtain a binary image corresponding to the region-of-interest image;
the mobile terminal sums the intensity values of the pixels in the same line in the binary image to obtain the sum of the intensity values of the pixels in each line;
the mobile terminal respectively converts the sum of the intensity values of the pixels of each line in the binary image into binary data, and splices the binary data corresponding to each line to obtain the binary data sequence;
the mobile terminal respectively converts the sum of the intensity values of the pixels in each row in the binary image into binary data, and splices the binary data corresponding to each row to obtain the binary data sequence, and the method includes:
the mobile terminal compares the sum of the intensity values of the pixels of each line in the binary image with a pixel threshold value respectively to obtain a comparison result of each line; the pixel threshold is the median of the sum of the intensity values of the pixels of each row in the binary image;
and the mobile terminal converts the sum of the intensity values of the pixels of each line in the binary image into binary data respectively according to the comparison result of each line, and splices the binary data corresponding to each line to obtain the binary data sequence.
11. The data processing method according to claim 9 or 10, wherein the second application data is additional information of the first application data; the second application data is one or more of position information, decryption information, authentication information and verification information.
12. The data processing method according to claim 11, wherein the second application data is position information of the two-dimensional code;
the data processing performed by the mobile terminal according to the first application data and the second application data specifically comprises: and the mobile terminal obtains useful information related to the position information according to the position information of the two-dimensional code and the first application data.
13. The data processing method according to claim 11, wherein the first application data contains encrypted useful information; the second application data is decryption information for decrypting the first application data;
the data processing performed by the mobile terminal according to the first application data and the second application data specifically comprises: and the mobile terminal decrypts the encrypted useful information in the first application data according to the decryption information to obtain the useful information.
14. The data processing method of claim 11, wherein the first application data includes payment information; the second application data is verification information;
the mobile terminal performs data processing according to the first application data and the second application data specifically as follows: and the mobile terminal verifies the payment information in the first application data according to the verification information, and pays according to the payment information when the verification is successful.
15. The data processing method according to claim 9 or 10, wherein the image pickup unit employs a first exposure level when acquiring the image of the two-dimensional code, and the image pickup unit employs a second exposure level when acquiring the rolling shutter image; the second exposure level is lower than the first exposure level.
16. The data processing method of claim 15, wherein the camera unit comprises a first camera and a second camera;
the mobile terminal controls a camera shooting unit to shoot a two-dimensional code arranged on the visible light emitting device or separately arranged from the visible light emitting device so as to obtain an image of the two-dimensional code, and controls the camera shooting unit to scan light emitting areas of the visible light line by line so as to obtain a rolling shutter image corresponding to the binary data sequence, specifically:
and the mobile terminal controls the first camera to shoot the two-dimensional code arranged on the visible light emitting device or separately arranged from the visible light emitting device with a first exposure degree so as to obtain an image of the two-dimensional code, and controls the second camera to scan the light emitting areas of the visible light line by line with a second exposure degree so as to obtain a rolling shutter image corresponding to the binary data sequence.
17. The data processing method according to claim 9 or 10, wherein the frequency of the brightness variation of the visible light is higher than the human eye refresh frequency and lower than or equal to the row scan frequency of the mobile terminal.
18. The data processing method according to claim 9 or 10, wherein the scanning time of the light emitting area by the mobile terminal in a single time is greater than or equal to T1; t1 is the maximum time interval in the process of controlling the brightness of the visible light with the binary data sequence two times in a row.
19. A data processing system is characterized by comprising a visible light emitting device, a mobile terminal and a cloud server;
the visible light emitting device comprises a visible light emitting module; the visible light emitting module is used for emitting visible light through the light emitting unit and periodically controlling the brightness of the visible light within a preset time interval to be a first brightness or a second brightness according to each bit of binary data in a pre-stored binary data sequence; wherein the first brightness is greater than the second brightness;
the mobile terminal includes:
the camera shooting control module is used for controlling a camera shooting unit to shoot a two-dimensional code arranged on the visible light emitting device or separately arranged from the visible light emitting device so as to obtain an image of the two-dimensional code, and controlling the camera shooting unit to scan light emitting areas of the visible light line by line so as to obtain a rolling shutter image corresponding to the binary data sequence; wherein the shutter of the camera unit is a rolling shutter;
the data sequence acquisition module is used for carrying out image processing on the rolling shutter image so as to acquire the binary data sequence;
the first application data acquisition module is used for acquiring an image for identifying the two-dimensional code and acquiring first application data from a cloud server according to the two-dimensional code;
the second application data acquisition module is used for acquiring second application data corresponding to the binary data sequence from the cloud server according to the binary data sequence;
the data processing module is used for processing data according to the first application data and the second application data;
wherein the binary data sequence comprises a preamble and a payload concatenated after the preamble;
the second application data acquisition module includes:
the first data determining unit is used for determining a lead code in the binary data sequence according to a preset sequence format;
a second data determination unit, configured to determine a payload in the binary data sequence according to a preamble in the binary data sequence;
the application data acquisition unit is used for linking to the cloud server according to the payload in the binary data sequence and acquiring verification information corresponding to the binary data sequence from the cloud server;
the data sequence acquisition module comprises:
a grayscale image conversion unit for converting the rolling shutter image into a grayscale image;
the area image extraction unit is used for carrying out edge detection processing on the gray level image to obtain an interested area in the rolling shutter image and cutting the interested area from the gray level image to obtain an interested area image;
the filtering processing unit is used for carrying out automatic threshold filtering processing on the interested region image to obtain a binary image corresponding to the interested region image;
the row pixel summation unit is used for summing the intensity values of the pixels in the same row in the binary image to obtain the sum of the intensity values of the pixels in each row;
the data conversion unit is used for respectively converting the sum of the intensity values of the pixels of each line in the binary image into binary data and splicing the binary data corresponding to each line to obtain the binary data sequence;
wherein the data conversion unit is specifically configured to:
comparing the sum of the intensity values of the pixels of each line in the binary image with a pixel threshold value respectively to obtain a comparison result of each line; the pixel threshold is the median of the sum of the intensity values of the pixels of each row in the binary image;
and respectively converting the sum of the intensity values of the pixels of each line in the binary image into binary data according to the comparison result of each line, and splicing the binary data corresponding to each line to obtain the binary data sequence.
20. A data processing system is characterized by comprising a visible light emitting device, a mobile terminal and a cloud server;
the visible light emitting device comprises a visible light emitting module; the visible light emitting module is used for emitting visible light through the light emitting unit and periodically controlling the brightness of the visible light within a preset time interval to be a first brightness or a second brightness according to each bit of binary data in a pre-stored binary data sequence; wherein the first brightness is greater than the second brightness;
the mobile terminal includes:
the camera shooting control module is used for controlling a camera shooting unit to shoot a two-dimensional code arranged on the visible light emitting device or separately arranged from the visible light emitting device so as to obtain an image of the two-dimensional code, and controlling the camera shooting unit to scan light emitting areas of the visible light line by line so as to obtain a rolling shutter image corresponding to the binary data sequence; wherein the shutter of the camera unit is a rolling shutter;
the data sequence acquisition module is used for carrying out image processing on the rolling shutter image so as to acquire the binary data sequence;
the first application data acquisition module is used for acquiring an image for identifying the two-dimensional code and acquiring first application data from a cloud server according to the two-dimensional code;
the second application data acquisition module is used for acquiring second application data corresponding to the binary data sequence from the cloud server according to the binary data sequence;
the data processing module is used for processing data according to the first application data and the second application data;
wherein the binary data sequence comprises a preamble, a payload concatenated after the preamble, and a cyclic redundancy check code;
the second application data acquisition module includes:
the first data determining unit is used for determining a lead code and a cyclic redundancy check code in the binary data sequence according to a preset sequence format;
a second data determining unit, configured to determine a payload in the binary data sequence according to a preamble and a cyclic redundancy check code in the binary data sequence;
the application data acquisition unit is used for linking to the cloud server according to the payload in the binary data sequence and acquiring verification information corresponding to the binary data sequence from the cloud server;
the data sequence acquisition module comprises:
a grayscale image conversion unit for converting the rolling shutter image into a grayscale image;
the area image extraction unit is used for carrying out edge detection processing on the gray level image to obtain an interested area in the rolling shutter image and cutting the interested area from the gray level image to obtain an interested area image;
the filtering processing unit is used for carrying out automatic threshold filtering processing on the interested region image to obtain a binary image corresponding to the interested region image;
the row pixel summation unit is used for summing the intensity values of the pixels in the same row in the binary image to obtain the sum of the intensity values of the pixels in each row;
the data conversion unit is used for respectively converting the sum of the intensity values of the pixels of each line in the binary image into binary data and splicing the binary data corresponding to each line to obtain the binary data sequence;
wherein the data conversion unit is specifically configured to:
comparing the sum of the intensity values of the pixels of each line in the binary image with a pixel threshold value respectively to obtain a comparison result of each line; the pixel threshold is the median of the sum of the intensity values of the pixels of each row in the binary image;
and respectively converting the sum of the intensity values of the pixels of each line in the binary image into binary data according to the comparison result of each line, and splicing the binary data corresponding to each line to obtain the binary data sequence.
21. The data processing system according to claim 19 or 20, wherein the second application data is additional information of the first application data; the second application data is one or more of position information, decryption information, authentication information and verification information.
22. The data processing system of claim 21, wherein the second application data is position information of the two-dimensional code;
the data processing module is specifically used for obtaining useful information related to the position information according to the position information of the two-dimensional code and the first application data.
23. The data processing system of claim 21, wherein the first application data includes encrypted useful information; the second application data is decryption information for decrypting the first application data;
the data processing module is specifically configured to decrypt the encrypted useful information in the first application data according to the decryption information to obtain the useful information.
24. The data processing system of claim 21, wherein the first application data comprises payment information; the second application data is verification information;
the data processing module is specifically used for verifying the payment information in the first application data according to the verification information, and when the verification is successful, payment is carried out according to the payment information.
25. The data processing system according to claim 19 or 20, wherein the image pickup unit employs a first exposure level when acquiring the image of the two-dimensional code, and the image pickup unit employs a second exposure level when acquiring the rolling shutter image; the second exposure level is lower than the first exposure level.
26. The data processing system of claim 25, wherein the camera unit comprises a first camera and a second camera;
the camera shooting control module is specifically configured to control the first camera to shoot a two-dimensional code arranged on the visible light emitting device or separately arranged from the visible light emitting device with a first exposure to obtain an image of the two-dimensional code, and the second camera scans light emitting areas of the visible light line by line with a second exposure to obtain a rolling shutter image corresponding to the binary data sequence.
27. The data processing system according to claim 19 or 20, wherein the frequency of the brightness variation of the visible light is higher than the human eye refresh frequency and lower than or equal to the row scan frequency of the mobile terminal.
28. The data processing system according to claim 19 or 20, wherein the time for a single scan of the light emitting area by the mobile terminal is greater than or equal to T1; t1 is the maximum time interval in the process of controlling the brightness of the visible light with the binary data sequence two times in a row.
CN201711319851.2A 2017-12-12 2017-12-12 Data acquisition method, data processing method and system Expired - Fee Related CN107944326B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711319851.2A CN107944326B (en) 2017-12-12 2017-12-12 Data acquisition method, data processing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711319851.2A CN107944326B (en) 2017-12-12 2017-12-12 Data acquisition method, data processing method and system

Publications (2)

Publication Number Publication Date
CN107944326A CN107944326A (en) 2018-04-20
CN107944326B true CN107944326B (en) 2021-03-30

Family

ID=61942767

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711319851.2A Expired - Fee Related CN107944326B (en) 2017-12-12 2017-12-12 Data acquisition method, data processing method and system

Country Status (1)

Country Link
CN (1) CN107944326B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108650026A (en) * 2018-05-08 2018-10-12 深圳清创新科技有限公司 Visible light positioning device and system suitable for a wide range of visible light-seeking
CN109586791B (en) * 2018-12-21 2021-08-17 国网吉林省电力有限公司信息通信公司 Visible light communication method and device
CN115295021B (en) * 2022-09-29 2022-12-30 杭州兆华电子股份有限公司 Method for positioning effective signal in recording

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015179392A (en) * 2014-03-19 2015-10-08 カシオ計算機株式会社 Code symbol display device, information processor, and program

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8770484B2 (en) * 2012-09-21 2014-07-08 Alcatel Lucent Data exchange using streamed barcodes
CN103383446B (en) * 2013-04-09 2017-07-07 北京半导体照明科技促进中心 Indoor orientation method, device and system and light source based on visible ray
JP5962680B2 (en) * 2014-01-20 2016-08-03 カシオ計算機株式会社 Information acquisition apparatus, information acquisition method, and information acquisition program
CN103812561A (en) * 2014-02-27 2014-05-21 刘鹏 Transmission device based on LiFi lamplight and two-dimensional code, and communication method
CN103996116A (en) * 2014-04-21 2014-08-20 北京邮电大学 Mobile payment system and method based on visible light communication technology
CN105740936B (en) * 2014-12-12 2019-03-08 方俊 A kind of method and apparatus of optical label and identification optical label
CN105515657B (en) * 2015-11-19 2018-01-02 广东顺德中山大学卡内基梅隆大学国际联合研究院 A kind of visible light camera communication system using LED lamp MIMO array framework
CN106372700B (en) * 2016-08-30 2019-05-03 西安小光子网络科技有限公司 Cursor label apparatus and its recognition methods of a kind of combination visible light and black light

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015179392A (en) * 2014-03-19 2015-10-08 カシオ計算機株式会社 Code symbol display device, information processor, and program

Also Published As

Publication number Publication date
CN107944326A (en) 2018-04-20

Similar Documents

Publication Publication Date Title
Woo et al. Vrcodes: Unobtrusive and active visual codes for interaction by exploiting rolling shutter
CN106529512B (en) Living body faces verification method and device
CN107944326B (en) Data acquisition method, data processing method and system
EP3627377B1 (en) Method for reading indicia off a display of a mobile device
KR102566998B1 (en) Apparatus and method for determining image sharpness
CN106031057B (en) Transmitter and sending method
CN104216117A (en) Display device
US20140152786A1 (en) Verification of playout of signage
CN107644623B (en) Backlight module, display device and anti-candid camera system
CN104008361A (en) Two-dimensional code scanning, locating and prompting method and system
Gao et al. The invisible QR code
CN106464365B (en) Sending device, reception device, communication system and sending method and method of reseptance
CN102077218A (en) Imaging system and method with aiming pattern of enhanced visibility
WO2016001339A1 (en) Communicating barcode data
CN107222258A (en) A kind of data capture method, data transmission method for uplink, device and data transmission system
US10523365B2 (en) Discrimination method and communication system
US11889083B2 (en) Image display method and device, image recognition method and device, storage medium, electronic apparatus, and image system
CN109644187B (en) Optical label anti-counterfeiting method and system based on active response
CN109792387B (en) Anti-counterfeiting method and system for optical communication device
CN107203731B (en) Method and device for generating label set and method and device for scanning label set
Zhou et al. Invisible QR code hijacking using smart LED
Yuan et al. Spatially varying radiometric calibration for camera-display messaging
US20140105450A1 (en) System and method for targeting and reading coded content
US11449699B2 (en) Information code reading system
JP6827598B1 (en) Device for image-based services

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
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210330

CF01 Termination of patent right due to non-payment of annual fee