Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Fig. 1 is a schematic flow chart of an implementation of an addressing method based on an LED lamp according to an embodiment of the present invention, and as shown in the drawing, the method may include the following steps:
and S101, sending an addressing instruction to the LED lamp, wherein the addressing instruction is used for indicating the lamp points on the LED lamp to be displayed according to a preset rule.
In practical applications, the preset rule may be preset manually. Illustratively, each lamp point on the LED lamp is controlled by one chip, the controller sends an addressing instruction to each chip of the LED lamp, and each chip controls the corresponding lamp point to display according to a preset rule after receiving the addressing instruction. It should be noted that each chip controls at least one lamp.
And step S102, capturing an image displayed by the lamp points according to a preset rule through a camera device.
In practical applications, an image pickup apparatus includes: a camera, a mobile phone. The present invention is not limited to the above embodiments, and may be applied to any type of imaging device.
Step S103, analyzing the address of the lamp point according to the preset rule and the captured image of the lamp point.
Illustratively, the light points are displayed according to a preset rule under the control of the chip, the camera device captures images of the light points, and the application software analyzes the addresses of the light points according to the preset rule and the captured images of the light points.
Optionally, after sending the addressing instruction to the LED lamp, the method further includes:
and capturing the position of the lamp point on the LED lamp through the camera device.
After resolving the address of the lamp point, the method further comprises the following steps:
and associating the position of the lamp point on the LED lamp with the analyzed address of the lamp point.
Illustratively, all chips of the LED lamp have a universal address, the controller sends an instruction through the universal address, all chips can receive the instruction, and each chip controls the corresponding lamp after receiving the instruction, so that all the lamps on the LED lamp are all lighted. The camera device captures images of the lamp points, and the application software can determine the outline of the LED lamp and the position of each lamp point on the LED lamp according to the captured images of the lamp points. After the address of the lamp point is resolved, the position of the lamp point on the LED lamp is associated with the resolved address of the lamp point. Therefore, the controller can drive each chip of the LED lamp according to the position of the lamp point on the LED lamp and the address of the lamp point so as to control the LED lamp to display a required picture.
According to the embodiment of the invention, an addressing instruction is sent to the LED lamp, and the addressing instruction is used for indicating the lamp points on the LED lamp to be displayed according to a preset rule; capturing an image displayed by the lamp points according to a preset rule through a camera device; analyzing the address of the lamp point according to the preset rule and the captured image of the lamp point; the self-contained address of the lamp point on the LED lamp can be quickly and accurately determined.
Fig. 2 is a schematic flow chart of an implementation of an addressing method based on an LED lamp according to another embodiment of the present invention, as shown in the figure, the method may further include the following steps:
step S201, sending an addressing instruction to the LED lamp, wherein the addressing instruction is used for indicating the lamp points on the LED lamp to be displayed according to a preset rule.
Step S202, capturing the image displayed by the lamp points according to the preset rule through the camera device.
In practical applications, steps S201 to S202 are the same as steps S101 to S102, and specific contents can be referred to steps S101 to S102, which are not described herein again.
Optionally, the preset rule includes:
and if the address code is 1, displaying the lamp point according to a first preset mode within preset time.
And if the address code is 0, displaying the lamp point according to a second preset mode within preset time.
The preset time may be preset manually. The first preset mode and the second preset mode may also be preset manually, the preset mode may be a number of times of flashing, may be continuously lit up within a preset time, and may also be displaying a certain color, as long as the first preset mode and the second preset mode are different, which is not limited specifically herein. Illustratively, assuming that the preset time is 1ms, the preset mode is the number of flickers, wherein the first preset mode is 4 flickers, and the second preset mode is 1 flicker. If the address code is 1, the lamp point flickers for 4 times within 1 ms; if the address code is 0, the lamp blinks 1 time within 1 ms.
Step S203, if the light point is displayed according to the first preset mode within the nth preset time after the light point starts to flash for the first time in the image of the light point, the address code of the nth address bit of the light point is 1.
Step S204, if the lamp point is displayed according to a second preset mode within the Nth preset time after the lamp point starts to flicker for the first time in the image of the lamp point, the address code of the Nth address position of the lamp point is 0.
And the N is used for indicating the Nth address bit of the lamp point, and is a natural number which is greater than or equal to 1.
It should be noted that steps S203-S204 are specific implementation processes of "analyzing the address of the light point according to the preset rule and the captured image of the light point" in step S103 in fig. 1.
Illustratively, the preset time is 1ms, the first preset mode is flashing 4 times, the second preset mode is flashing 1 time, the number of digits of the address of the lamp point is 2, and the address of the lamp point is 10. The controller sends an addressing instruction, the camera device captures an image of the lamp point, in the image of the lamp point, the lamp point flickers for 4 times in the first 1ms and flickers for 1 time in the second 1ms, and then the address code on the first bit of the address of the lamp point is analyzed to be 1, the address code on the second bit is analyzed to be 0, namely the address of the lamp point is 10. The above is only an example, and the preset time, the first preset mode, and the second preset mode are not specifically limited.
According to the embodiment of the invention, the addressing instruction is sent to the LED lamp, the number of times of the lamp point flickering in the preset time is captured through the camera device, and the address of the lamp point is analyzed according to the preset rule and the captured number of times of the lamp point flickering in the preset time, so that the address of the lamp point on the LED lamp can be determined quickly and accurately.
Fig. 3 is a schematic flow chart of an implementation of an LED lamp-based addressing method according to another embodiment of the present invention, and as shown in the drawing, the method may include the following steps:
step S301, sending an addressing instruction to the LED lamp, wherein the addressing instruction is used for indicating the lamp points on the LED lamp to be displayed according to a preset rule.
Step S302, capturing the image displayed by the lamp points according to the preset rule through the camera device.
In practical applications, steps S301 to S302 are the same as steps S101 to S102, and specific contents can be referred to steps S101 to S102, which are not described herein again.
Optionally, the addressing instruction includes: addressing address, display rule;
the preset rules include:
and if the address of the lamp point is the same as the address code on the same address bit in the addressing address, the lamp point displays according to the display rule in the addressing instruction.
Wherein, the display rule can be preset manually. And if the address code on the same address bit in the address and the addressing address of the lamp point is different, the lamp point is not displayed according to the preset display rule. For example, it is assumed that the display rule is that the color displayed by the lamp is red. If the address code on the first bit of the address of the lamp point is the same as the address code on the first bit of the addressing address, the color displayed by the lamp point is red; if the address code on the second bit of the address of the light point is different from the address code on the second bit of the addressed address, the light point is not displayed, or is displayed in green. It should be noted that the above is only an example, and the content of the display rule is not specifically limited, and when the address of the lamp point is different from the address code on the same address bit in the address, the lamp point is not displayed according to the preset display rule, and how to display the lamp point is not specifically limited.
Step S303, determining the number of times of the currently sent addressing instruction, and recording the number of times as M.
Step S304, if the lamp point is displayed according to the display rule, the address code of the Mth address bit of the lamp point is the same as the address code of the Mth address bit in the current addressing address.
Step S305, if the light point is not displayed according to the display rule, the address code of the mth address bit of the light point is opposite to the address code of the mth address bit in the current address.
Wherein M is a natural number greater than or equal to 1.
It should be noted that steps S304-S305 are specific implementation processes of "analyzing the address of the light point according to the preset rule and the captured image of the light point" in step S103 in fig. 1.
For example, suppose that the number of bits of the address of the light point is 2, the address of the chip one is 10, and the address of the chip two is 01, the display rule is that the color displayed by the light point is red. The controller sends an addressing instruction of A +01+ M (A is an addressing identification bit, M is a display rule) for the first time, the lamp point corresponding to the chip I is not displayed, the lamp point corresponding to the chip II is displayed in red, the image of each lamp point is captured by the image capturing device, the number of times of the currently sent addressing instruction is 1, the application software analyzes that the address code on the 1 st bit of the address of the lamp point corresponding to the chip I is 0 and the address code on the 1 st bit of the address of the lamp point corresponding to the chip II is 1 according to the preset rule and the captured image of the lamp point; the controller sends an addressing instruction A +10+ M for the second time, the lamp point corresponding to the chip I displays red, the lamp point corresponding to the chip II does not display, the image of each lamp point is captured by the image capturing device, the number of times of the sent addressing instruction is 2, the application software analyzes that the address code on the 2 nd bit of the address of the lamp point corresponding to the chip I is 1 and the address code on the 2 nd bit of the address of the lamp point corresponding to the chip II is 0 according to the preset rule and the captured image of the lamp point. Therefore, the controller only needs to send the addressing instruction for 2 times, the addresses of the lamp points corresponding to the chip I and the chip II can be determined completely, the address of the lamp point corresponding to the chip I is 10, and the address of the lamp point corresponding to the chip II is 01. It should be noted that the above is only an example, and the number of bits of the lamp point address and the display rule are not specifically limited.
According to the embodiment of the invention, the addressing instruction is sent to the LED lamp, the image of the lamp point is captured through the camera device, and whether the lamp point is displayed according to the display rule in the addressing instruction is analyzed according to the preset rule and the captured image of the lamp point, so that the address of the lamp point on the LED lamp can be determined quickly and accurately.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 4 is a schematic diagram of an LED lamp-based addressing device provided by an embodiment of the present invention, and for convenience of explanation, only the parts related to the embodiment of the present invention are shown.
And the sending unit 41 is configured to send an addressing instruction to the LED lamp, where the addressing instruction is used to instruct a lamp point on the LED lamp to display according to a preset rule.
And a first capturing unit 42 for capturing the image displayed by the lamp points according to the preset rule through the camera device.
The analyzing unit 43 is configured to analyze the address of the light point according to the preset rule and the captured image of the light point.
Optionally, the preset rule includes:
and if the address code is 1, displaying the lamp point according to a first preset mode within preset time.
And if the address code is 0, displaying the lamp point according to a second preset mode within preset time.
Further, the analysis unit 43 includes:
the first analysis module is used for displaying the lamp point according to a first preset mode within the Nth preset time after the lamp point starts to flicker for the first time in the image of the lamp point, and the address code of the Nth address bit of the lamp point is 1.
And the second analysis module is used for displaying the lamp point according to a second preset mode within the Nth preset time after the lamp point starts to flicker for the first time in the image of the lamp point, and then the address code of the Nth address bit of the lamp point is 0.
And the N is used for indicating the Nth address bit of the lamp point, and is a natural number which is greater than or equal to 1.
Optionally, the addressing instruction includes: addressing addresses, display rules.
The preset rules include:
and if the address of the lamp point is the same as the address code on the same address bit in the addressing address, the lamp point displays according to the display rule in the addressing instruction.
Further, the apparatus 4 further includes:
and the confirming unit is used for confirming the number of times of the currently sent addressing instruction before the address of the lamp point is analyzed, and recording the number of times as M.
Further, the analysis unit 43 includes:
and the third analysis module is used for enabling the address code of the Mth address bit of the lamp point to be the same as the address code of the Mth address bit in the current addressing address if the lamp point is displayed according to the display rule.
And the fourth analysis module is used for determining that the address code of the Mth address bit of the lamp point is opposite to the address code of the Mth address bit in the current addressing address if the lamp point is not displayed according to the display rule.
Wherein M is a natural number greater than or equal to 1.
Optionally, the apparatus 4 further includes:
and a second capturing unit 44, configured to capture, by the image capturing device, a position of the lamp spot on the LED lamp after sending the addressing instruction to the LED lamp.
Further, the apparatus 4 further includes:
and the associating unit 45 is configured to associate the position of the lamp spot on the LED lamp with the address of the lamp spot after the address of the lamp spot is resolved.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Fig. 5 is a schematic diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 5, the terminal device 5 of this embodiment includes: a processor 50, a memory 51 and a computer program 52 stored in said memory 51 and executable on said processor 50. The processor 50, when executing the computer program 52, implements the steps in the various LED lamp-based addressing method embodiments described above, such as steps S101 to S103 shown in fig. 1. Alternatively, the processor 50, when executing the computer program 52, implements the functions of the modules/units in the above-mentioned device embodiments, such as the functions of the modules 41 to 45 shown in fig. 4.
Illustratively, the computer program 52 may be partitioned into one or more modules/units that are stored in the memory 51 and executed by the processor 50 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 52 in the terminal device 5. For example, the computer program 52 may be divided into a transmitting unit, a first capturing unit, and an analyzing unit, and the specific functions of each unit are as follows:
and the sending unit is used for sending an addressing instruction to the LED lamp, and the addressing instruction is used for indicating the lamp points on the LED lamp to be displayed according to a preset rule.
And the first capturing unit is used for capturing the image displayed by the lamp point according to the preset rule through the camera device.
And the analysis unit is used for analyzing the address of the lamp point according to the preset rule and the captured image of the lamp point.
Optionally, the preset rule includes:
and if the address code is 1, displaying the lamp point according to a first preset mode within preset time.
And if the address code is 0, displaying the lamp point according to a second preset mode within preset time.
Further, the parsing unit includes:
the first analysis module is used for displaying the lamp point according to a first preset mode within the Nth preset time after the lamp point starts to flicker for the first time in the image of the lamp point, and the address code of the Nth address bit of the lamp point is 1.
And the second analysis module is used for displaying the lamp point according to a second preset mode within the Nth preset time after the lamp point starts to flicker for the first time in the image of the lamp point, and then the address code of the Nth address bit of the lamp point is 0.
And the N is used for indicating the Nth address bit of the lamp point, and is a natural number which is greater than or equal to 1.
Optionally, the addressing instruction includes: addressing addresses, display rules.
The preset rules include:
and if the address of the lamp point is the same as the address code on the same address bit in the addressing address, the lamp point displays according to the display rule in the addressing instruction.
Further, the apparatus further comprises:
and the confirming unit is used for confirming the number of times of the currently sent addressing instruction before the address of the lamp point is analyzed, and recording the number of times as M.
Further, the parsing unit includes:
and the third analysis module is used for enabling the address code of the Mth address bit of the lamp point to be the same as the address code of the Mth address bit in the current addressing address if the lamp point is displayed according to the display rule.
And the fourth analysis module is used for determining that the address code of the Mth address bit of the lamp point is opposite to the address code of the Mth address bit in the current addressing address if the lamp point is not displayed according to the display rule.
Wherein M is a natural number greater than or equal to 1.
Optionally, the apparatus further comprises:
and the second capturing unit is used for capturing the position of the lamp point on the LED lamp through the camera device after sending an addressing instruction to the LED lamp.
Further, the apparatus further comprises:
and the association unit is used for associating the position of the lamp point on the LED lamp with the analyzed address of the lamp point after the address of the lamp point is analyzed.
The terminal device 5 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 50, a memory 51. Those skilled in the art will appreciate that fig. 5 is merely an example of a terminal device 5 and does not constitute a limitation of terminal device 5 and may include more or fewer components than shown, or some components may be combined, or different components, e.g., the terminal device may also include input-output devices, network access devices, buses, etc.
The Processor 50 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 51 may be an internal storage unit of the terminal device 5, such as a hard disk or a memory of the terminal device 5. The memory 51 may also be an external storage device of the terminal device 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 5. Further, the memory 51 may also include both an internal storage unit and an external storage device of the terminal device 5. The memory 51 is used for storing the computer program and other programs and data required by the terminal device. The memory 51 may also be used to temporarily store data that has been output or is to be output.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media which may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.