CN112767875A - Flame lamp effect generating method, device, equipment and storage medium - Google Patents

Flame lamp effect generating method, device, equipment and storage medium Download PDF

Info

Publication number
CN112767875A
CN112767875A CN202110084157.7A CN202110084157A CN112767875A CN 112767875 A CN112767875 A CN 112767875A CN 202110084157 A CN202110084157 A CN 202110084157A CN 112767875 A CN112767875 A CN 112767875A
Authority
CN
China
Prior art keywords
flame
lamp beads
dimensional coordinates
rgb lamp
rgb
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110084157.7A
Other languages
Chinese (zh)
Other versions
CN112767875B (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.)
Shenzhen Zhiyan Technology Co Ltd
Original Assignee
Shenzhen Zhiyan Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Zhiyan Technology Co Ltd filed Critical Shenzhen Zhiyan Technology Co Ltd
Priority to CN202110084157.7A priority Critical patent/CN112767875B/en
Publication of CN112767875A publication Critical patent/CN112767875A/en
Application granted granted Critical
Publication of CN112767875B publication Critical patent/CN112767875B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G3/00Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
    • G09G3/20Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters
    • G09G3/22Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources
    • G09G3/30Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels
    • G09G3/32Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels semiconductive, e.g. using light-emitting diodes [LED]

Abstract

The embodiment of the invention discloses a flame lamp effect generation method, a device, equipment and a storage medium, wherein the method comprises the following steps: dividing a display array into a plurality of flame areas, wherein the display array is formed by a string of light bars according to a preset placing mode, the light bars comprise a preset number of RGB (red, green and blue) lamp beads, and each flame area comprises a plurality of RGB lamp beads; acquiring control parameters of each flame area and two-dimensional coordinates of RGB lamp beads of the flame area in a display array; converting the two-dimensional coordinates into one-dimensional coordinates of RGB lamp beads in the lamp bar; and controlling the RGB lamp beads corresponding to the flame areas to emit light or extinguish according to the one-dimensional coordinates and the control parameters of each flame area so as to enable the display array to generate a flame lamp effect. The embodiment of the invention can realize the control of the corresponding RGB lamp beads through the two-dimensional coordinates of the RGB lamp beads, so that the display array generates the flame lamp effect without excessively depending on the video decoding capability of a chip or occupying the space of a Flash memory to store data, thereby saving a large amount of resources and greatly reducing the cost.

Description

Flame lamp effect generating method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the field of lamps, in particular to a flame lamp effect generating method, device, equipment and storage medium.
Background
The lamp is an essential part of modern life, and along with the improvement of the living standard of people, the function of the lamp is not only limited to illumination, but also used for decoration of different occasions to adjust the environment atmosphere and the mood and add aesthetic feeling to life.
In order to set off the atmosphere, a lamp is needed to simulate the flame effect in many scenes. At present, the two-dimensional dynamic flame effect is realized by two methods through RGB lamps in the market: firstly, transmitting a video with a flame effect to a display array chip in real time, decoding the video through the chip and displaying through an RGB lamp; and secondly, storing each frame of data of the flame effect to be displayed in a Flash memory in advance, and acquiring the data from the data to display when needed. The first method requires the chip to have video decoding capability and has high requirements on chip computing power. The second method requires a large amount of Flash space to store data, and the data cannot be adjusted. Either method has a high manufacturing cost.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, a device and a storage medium for generating a flame lighting effect to reduce the cost of a display array having a flame lighting effect.
In a first aspect, an embodiment of the present invention provides a method for generating a flame lamp effect, including:
dividing a display array into a plurality of flame regions, wherein the display array is formed by a string of light bars according to a preset placing mode, the light bars comprise a preset number of RGB (red, green and blue) lamp beads, and each flame region comprises a plurality of RGB lamp beads;
acquiring control parameters of each flame area and two-dimensional coordinates of RGB lamp beads of the flame area in the display array;
converting the two-dimensional coordinates into one-dimensional coordinates of the RGB lamp beads in the lamp strip;
and controlling the RGB lamp beads corresponding to the flame areas to emit light or extinguish according to the one-dimensional coordinates and the control parameters of each flame area, so that the display array generates a flame lamp effect.
Further, dividing the display array into a plurality of flame regions includes:
dividing the display array in the column direction to enable one column of the display array to form a flame area.
Further, the control parameters include a target change state and a target change value of each flame region, and controlling the RGB lamp beads of the corresponding flame regions to emit light or extinguish according to the one-dimensional coordinates and the control parameters of each flame region includes:
controlling the plurality of RGB lamp beads in the flame area to emit light or extinguish according to the target change state and the one-dimensional coordinates of the RGB lamp beads in the flame area;
when the luminous height of the flame area reaches a target change value, acquiring an expected change state and an expected change value of the flame area;
and taking the expected change state as the target change state, taking the expected change value as the target change value, and returning to the step of controlling the plurality of RGB lamp beads in the flame area to emit light or extinguish according to the target change state and the one-dimensional coordinates of the RGB lamp beads in the flame area.
Further, the target change state includes a target rise state, and controlling the plurality of RGB lamp beads of the flame region to emit light or extinguish according to the target change state and the one-dimensional coordinates of the RGB lamp beads of the flame region includes:
and controlling the RGB lamp beads in the flame area to emit light from bottom to top according to the ascending state and the one-dimensional coordinates of the RGB lamp beads in the flame area.
Further, the target change state further includes a target descending state, and controlling the plurality of RGB lamp beads of the flame region to emit light or extinguish according to the target change state and the one-dimensional coordinates of the RGB lamp beads of the flame region further includes:
and controlling the RGB lamp beads in the flame area to be extinguished from top to bottom according to the descending state and the one-dimensional coordinates of the RGB lamp beads in the flame area.
Further, the target variation value includes a target maximum value, and when the light emitting height of the flame region reaches the target variation value, acquiring the expected variation state and the expected variation value of the flame region includes:
when the light emitting height of the flame area reaches a target maximum value, setting an expected change state of the flame area as a descending state;
the expected minimum is obtained by the meisen rotation random algorithm.
Further, the obtaining the expected change state and the expected change value of the flame region when the light emitting height of the flame region reaches the target change value further includes:
when the light emitting height of the flame area reaches a target minimum value, setting an expected change state of the flame area as a rising state;
the expected maximum is obtained by the meisen rotation random algorithm.
In a second aspect, embodiments of the present invention provide a flame light effect generating device, including:
the display array is composed of a string of light bars according to a preset placing mode, each light bar comprises a preset number of RGB (red, green and blue) light beads, and each flame area comprises a plurality of RGB light beads;
the parameter acquisition module is used for acquiring control parameters of each flame area and two-dimensional coordinates of RGB lamp beads of the flame areas in the display array;
the coordinate conversion module is used for converting the two-dimensional coordinates into one-dimensional coordinates of the RGB lamp beads in the lamp strip;
and the flame light effect generation module is used for controlling the RGB lamp beads corresponding to the flame areas to emit light or extinguish according to the one-dimensional coordinates and the control parameters of each flame area so as to enable the display array to generate the flame light effect.
In a third aspect, an embodiment of the present invention provides an electronic device, including:
one or more processors;
a storage device for storing one or more programs,
when the one or at least one program is executed by the one or more processors, the one or more processors are caused to implement the flame light effect generation method provided by any embodiment of the invention.
In a fourth aspect, embodiments of the present invention provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements the flame lamp effect generation method provided by any of the embodiments of the present invention.
According to the flame light effect generation method provided by the embodiment of the invention, the control of the corresponding RGB lamp beads can be realized through the two-dimensional coordinates of the RGB lamp beads, so that the display array generates the flame light effect without excessively depending on the video decoding capability of a chip or occupying the space of a Flash memory to store data, a large amount of resources are saved, and the cost is greatly reduced.
Drawings
FIG. 1 is a schematic flow chart illustrating a method for generating a flame effect according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating a method for generating a flame effect according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a flame lamp effect generating device according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. A process may be terminated when its operations are completed, but may have additional steps not included in the figure. A process may correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
Furthermore, the terms "first," "second," and the like may be used herein to describe various orientations, actions, steps, elements, or the like, but the orientations, actions, steps, or elements are not limited by these terms. These terms are only used to distinguish one direction, action, step or element from another direction, action, step or element. The terms "first", "second", etc. are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "plurality", "batch" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Example one
Fig. 1 is a schematic flow chart of a method for generating a flame effect according to an embodiment of the present invention. As shown in fig. 1, a method for generating a flame effect according to an embodiment of the present invention includes:
s110, dividing a display array into a plurality of flame regions, wherein the display array is formed by a string of lamp bars according to a preset placing mode, each lamp bar comprises a preset number of RGB lamp beads, and each flame region comprises a plurality of RGB lamp beads.
Specifically, the display array is formed by a string of light bars (also called RGB light bars) in a preset placing manner, and the light bars include a preset number of RGB light beads. Illustratively, a string of light bars includes 132 RGB light beads, and 11 light beads are arranged as a column in an "S" shape, and the string of light bars may form a matrix having 12 rows and 11 columns, i.e., a 12 × 11 display array. The display array can be directly used as an RGB lamp, and two ends of the display array can be bonded to form a cylindrical RGB lamp.
Divide the display array, divide it into a plurality of flame regions, every flame region includes a plurality of RGB lamp pearls. Further, the method for dividing the display array comprises the following steps: dividing the display array in the column direction to enable one column of the display array to form a flame area. When a flame region is considered to be a flame cluster, a column of the display array is a flame cluster. If the display array has n rows, the flame regions are designated as L1 and L2 … Ln.
It will be appreciated that multiple columns of the display array may also be used as a flame region, and that embodiments of the invention are not limited.
S120, obtaining control parameters of each flame area and two-dimensional coordinates of RGB lamp beads of the flame areas in the display array.
Specifically, the control parameters of the flame area include the flame display color, the change state, the change speed, the flame height difference of different flame areas and other data. The control parameters can be input by a user or can be preset and stored as initialization parameters, and the control parameters of different flame areas can be the same or different. The two-dimensional coordinates of the RGB lamp beads are the positions of the RGB lamp beads in the display array, and are represented by the row serial numbers and the column serial numbers of the RGB lamp beads in the display array, and are marked as (i, j), wherein i represents the row where the RGB lamp beads are located, and j represents the column where the RGB lamp beads are located. For example, the two-dimensional coordinates of the RGB lamp beads of the first flame region L1 include (1, 1), (2, 1). (11, 1).
Generally, the default acquired two-dimensional coordinates are the two-dimensional coordinates of all RGB lamp beads in the display array, and when a part of the flame region needs to be controlled, the two-dimensional coordinates of the RGB lamp beads can be input by a user. When the RGB lamp beads in a row need to be controlled, a user can input row coordinates of the row of RGB lamp beads, and the system automatically acquires two-dimensional coordinates of all the row of RGB lamp beads according to the row coordinates. So, the user can convenient and fast control required RGB lamp pearl.
S130, converting the two-dimensional coordinates into one-dimensional coordinates of the RGB lamp beads in the lamp strip.
Specifically, in the RGB lamp, the RGB lamp beads in the lamp strip have unique numbers, the RGB driving circuit provides driving signals to the corresponding RGB lamp beads according to the numbers of the RGB lamp beads, so that the RGB lamp beads emit light or are extinguished, and the unique numbers are the one-dimensional coordinates of the RGB lamp beads in the lamp strip. Therefore, after the two-dimensional coordinates of the RGB lamp beads in the display array are determined, the two-dimensional coordinates need to be converted into corresponding one-dimensional coordinates, so that the RGB driving circuit can correctly drive the corresponding RGB lamp beads to work. The correspondence between the two-dimensional coordinates and the one-dimensional coordinates is stored in advance.
For example, the number of 132 RGB beads in the display array is 1 to 132, the one-dimensional coordinates of the RGB beads of the first flame region L1 are 1 and 2 … 11 from top to bottom, the one-dimensional coordinates of the RGB beads of the second flame region L2 are 22 and 21 … 12 from top to bottom, and the one-dimensional coordinates of the RGB beads of the third flame region L3 are 23 and 24 … 33 from top to bottom. If the two-dimensional coordinates of the RGB lamp bead are (2, 2), the corresponding one-bit coordinate is 21.
S140, controlling the RGB lamp beads of the corresponding flame regions to emit light or be extinguished according to the one-dimensional coordinates and the control parameters of each flame region, so that the display array generates a flame lamp effect.
Specifically, the RGB lamp beads for receiving the driving signals are determined according to the one-dimensional coordinates, and the plurality of RGB lamp beads are enabled to emit light and extinguish according to set colors and speeds by combining control parameters. Since one flame region can be viewed as a cluster of flames, the simultaneous variation of multiple flame regions can cause the display array to produce a flame effect.
According to the flame light effect generation method provided by the embodiment of the invention, the control corresponding to the RGB lamp beads can be realized through the two-dimensional coordinates of the RGB lamp beads, so that the display array generates the flame light effect without excessively depending on the video decoding capability of a chip or occupying the space of a Flash memory to store data, a large amount of resources are saved, and the cost is greatly reduced.
Example two
Fig. 2 is a schematic flow chart of a flame lamp effect generating method according to a second embodiment of the present invention, which is a further refinement of the first embodiment. As shown in fig. 2, a method for generating a flame lamp effect according to a second embodiment of the present invention includes:
s210, a display array is divided into a plurality of flame areas, the display array is formed by a string of lamp bars according to a preset placing mode, the lamp bars comprise a preset number of RGB lamp beads, and each flame area comprises a plurality of RGB lamp beads.
In this embodiment, the display array is divided in the column direction so that one column of the display array forms one flame region.
S220, obtaining control parameters of each flame area and two-dimensional coordinates of RGB lamp beads of the flame areas in the display array, wherein the control parameters comprise a target change state and a target change value of each flame area.
Specifically, the target change state refers to a change tendency, such as rising and falling, of the "flame" formed by the flame region. The target variation value refers to the height of the "flame" formed by the flame area, and is usually expressed by the number of RGB lamp beads.
And S230, converting the two-dimensional coordinates into one-dimensional coordinates of the RGB lamp beads in the lamp strip.
S240, controlling the plurality of RGB lamp beads in the flame area to emit light or extinguish according to the target change state and the one-dimensional coordinates of the RGB lamp beads in the flame area.
Specifically, when the target change state is ascending, the RGB lamp beads corresponding to the flame area emit light from bottom to top, and the effect of flame height ascending is generated. When the target change state is descending, the RGB lamp beads corresponding to the flame area are extinguished from top to bottom, and the effect of descending the flame height is achieved.
Further, the target change state comprises a target ascending state and a target descending state, and the method for controlling the RGB lamp beads to emit light or extinguish according to the target change state comprises the following steps: controlling the RGB lamp beads in the flame area to emit light from bottom to top according to the ascending state and the one-dimensional coordinates of the RGB lamp beads in the flame area; or controlling the plurality of RGB lamp beads in the flame area to be extinguished from top to bottom according to the descending state and the one-dimensional coordinates of the RGB lamp beads in the flame area.
In this embodiment, a flame region is a row in the display array, namely a row of RGB lamp beads. When the target change state of the flame area is a target ascending state, a driving signal is provided for the corresponding RGB lamp bead according to the one-dimensional coordinates of the row of RGB lamp beads, so that the row of RGB lamp beads can emit light from bottom to top, and the flame ascending effect is generated. When the target change state of the flame area is a target descending state, a driving signal is provided for the corresponding RGB lamp beads according to the one-dimensional coordinates of the row of RGB lamp beads, so that the row of RGB lamp beads are extinguished from top to bottom, and the flame descending effect is generated. Parameters such as the luminous color, the speed and the like of the RGB lamp beads can be determined according to user input or preset control parameters.
And S250, when the luminous height of the flame area reaches a target change value, acquiring an expected change state and an expected change value of the flame area.
S260, taking the expected change state as the target change state, taking the expected change value as the target change value, and returning to step S240.
Specifically, when RGB lamp pearl in flame region is luminous, the flame region forms certain luminous height, and luminous height expresses through luminous RGB lamp pearl quantity. When the light emitting height of the flame area reaches the target change value, which indicates that the flame area completes one state change, the next change state and change value of the flame area, namely the expected change state and expected change value of the flame area, are obtained. And (5) taking the expected change state as a target change state and the expected change value as a target change value, returning to the step (S240), and continuously changing the flame area according to the new change state and the new change value, so that the flame area generates a continuously changed flame effect, and the display array generates a flame lamp effect.
Further, the target variation value includes a target maximum value and a target minimum value, and one target variation state corresponds to one target variation value. When the target change state is the target rising state, the corresponding target change value is the target maximum value; and when the target change state is the target descending state, the corresponding target change value is the target minimum value. That is, when RGB lamp beads in the flame area emit light from bottom to top according to the target rising state, the state change is completed once when the light emitting height reaches the target maximum value. When RGB lamp beads in the flame area are extinguished from top to bottom according to the target descending state, when the light emitting height reaches the target minimum value, one state change is completed.
Further, the setting mode of the changing state of the flame area comprises the following steps: when the light emitting height of the flame area reaches a target maximum value, setting an expected change state of the flame area as a descending state; obtaining an expected minimum value through a Meisen rotation random algorithm; or, when the light emitting height of the flame area reaches a target minimum value, setting the expected change state of the flame area as a rising state; the expected maximum is obtained by the meisen rotation random algorithm.
Specifically, when the light emitting height of the flame region reaches the target variation value, the variation state of the flame region is reversed, that is, the expected variation state is set to a variation state opposite to the current target variation state, for example, if the current target variation state is an ascending state, the expected variation state is a descending state; if the current target change state is a descending state, the expected change state is an ascending state.
When the light emitting height of the flame area reaches the target maximum value, the flame area finishes one change according to the target rising state at the moment, the expected change state is set to be a falling state at the moment, a random value is generated through a Meisen rotation random algorithm, the random value is used as the expected minimum value of the flame area, and the flame area is enabled to continuously change according to the expected falling change state and the expected minimum value. When the light emitting height of the flame area reaches the target minimum value, the flame area finishes one change according to the target descending state at the moment, the expected change state is set to be the ascending state at the moment, a random value is generated through a Meisen rotation random algorithm, the random value is used as the expected maximum value of the flame area, and the flame area is enabled to continuously change according to the expected ascending change state and the expected maximum value. Thus, the plurality of flame regions cyclically change, so that the display array generates a flame lighting effect.
Furthermore, when a user needs to change parameters such as flame color, change speed and the like in the display array, the two-dimensional coordinates of the corresponding RGB lamp beads in the display array and the corresponding control parameters are directly input, the one-dimensional coordinates of each RGB lamp bead do not need to be determined, and the user operation is very visual and convenient.
In the method for generating the flame light effect provided by the embodiment of the invention, the control corresponding to the RGB lamp beads can be realized through the two-dimensional coordinates of the RGB lamp beads, so that the display array generates the flame light effect without excessively depending on the video decoding capability of a chip or occupying the space of a Flash memory to store data, a large amount of resources are saved, and the cost is greatly reduced.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a flame lamp effect generating device according to a third embodiment of the present invention. The flame lamp effect generating device provided by the embodiment can realize the flame lamp effect generating method provided by any embodiment of the invention, has corresponding functional structures and beneficial effects of the realization method, and the content which is not described in detail in the embodiment can refer to the description of any method embodiment of the invention.
As shown in fig. 3, a flame lamp effect generating device according to a third embodiment of the present invention includes: a flame region division module 310, a parameter acquisition module 320, a coordinate conversion module 330, and a flame light effect generation module 340, wherein:
the flame region dividing module 310 is configured to divide a display array into a plurality of flame regions, where the display array is formed by a string of light bars according to a preset placement manner, each light bar includes a preset number of RGB light beads, and each flame region includes a plurality of RGB light beads;
the parameter obtaining module 320 is configured to obtain a control parameter of each flame region and a two-dimensional coordinate of an RGB lamp bead of the flame region in the display array;
the coordinate conversion module 330 is configured to convert the two-dimensional coordinates into one-dimensional coordinates of the RGB lamp beads in the lamp strip;
the flame light effect generation module 340 is configured to control the RGB lamp beads corresponding to the flame regions to emit light or extinguish according to the one-dimensional coordinates and the control parameters of each flame region, so that the display array generates the flame light effect.
Further, the flame zone division module 310 is specifically configured to:
dividing the display array in the column direction to enable one column of the display array to form a flame area.
Further, the control parameters include a target variation state and a target variation value of each flame region, and the flame effect generation module 340 includes:
the RGB lamp bead control unit is used for controlling the plurality of RGB lamp beads in the flame area to emit light or extinguish according to the target change state and the one-dimensional coordinates of the RGB lamp beads in the flame area;
the expected parameter acquiring unit is used for acquiring an expected change state and an expected change value of the flame area when the luminous height of the flame area reaches a target change value;
and the circulating unit is used for taking the expected change state as the target change state, taking the expected change value as the target change value, and returning to the step of controlling the plurality of RGB lamp beads in the flame area to emit light or extinguish according to the target change state and the one-dimensional coordinates of the RGB lamp beads in the flame area.
Further, the target change state includes a target ascending state, and the RGB lamp bead control unit is specifically configured to:
and controlling the RGB lamp beads in the flame area to emit light from bottom to top according to the ascending state and the one-dimensional coordinates of the RGB lamp beads in the flame area.
Further, the target change state further includes a target descending state, and the RGB lamp bead control unit is further configured to:
and controlling the RGB lamp beads in the flame area to be extinguished from top to bottom according to the descending state and the one-dimensional coordinates of the RGB lamp beads in the flame area.
Further, the target variation value includes a target maximum value, and the expected parameter obtaining unit is specifically configured to:
when the light emitting height of the flame area reaches a target maximum value, setting an expected change state of the flame area as a descending state;
the expected minimum is obtained by the meisen rotation random algorithm.
Further, the target variation value further includes a target minimum value, and the expected parameter obtaining unit is further configured to:
when the light emitting height of the flame area reaches a target minimum value, setting an expected change state of the flame area as a rising state;
the expected maximum is obtained by the meisen rotation random algorithm.
The flame light effect generating device provided by the third embodiment of the invention can realize the control of the corresponding RGB lamp beads through the two-dimensional coordinates of the RGB lamp beads, so that the display array generates the flame light effect without excessively depending on the video decoding capability of a chip or occupying the space of a Flash memory to store data, a large amount of resources are saved, and the cost is greatly reduced.
Example four
Fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention. FIG. 4 illustrates a block diagram of an exemplary electronic device 412 suitable for use in implementing embodiments of the present invention. The electronic device 412 shown in fig. 4 is only an example and should not bring any limitations to the functionality and scope of use of the embodiments of the present invention.
As shown in fig. 4, the electronic device 412 is in the form of a general purpose electronic device. The components of the electronic device 412 may include, but are not limited to: one or more processors 416, a storage device 428, and a bus 418 that couples the various system components including the storage device 428 and the processors 416.
Bus 418 represents one or more of any of several types of bus structures, including a memory device bus or memory device controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 412 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 412 and includes both volatile and nonvolatile media, removable and non-removable media.
Storage 428 may include computer system readable media in the form of volatile Memory, such as Random Access Memory (RAM) 430 and/or cache Memory 432. The electronic device 412 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 434 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk such as a Compact disk Read-Only Memory (CD-ROM), Digital Video disk Read-Only Memory (DVD-ROM) or other optical media may be provided. In these cases, each drive may be connected to bus 418 by one or more data media interfaces. Storage 428 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 440 having a set (at least one) of program modules 442 may be stored, for instance, in storage 428, such program modules 442 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. The program modules 442 generally perform the functions and/or methodologies of the described embodiments of the invention.
The electronic device 412 may also communicate with one or more external devices 414 (e.g., keyboard, pointing terminal, display 424, etc.), with one or more terminals that enable a user to interact with the electronic device 412, and/or with any terminals (e.g., network card, modem, etc.) that enable the electronic device 412 to communicate with one or more other computing terminals. Such communication may occur via input/output (I/O) interfaces 422. Also, the electronic device 412 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public Network, such as the internet) via the Network adapter 420. As shown in FIG. 4, network adapter 420 communicates with the other modules of electronic device 412 over bus 418. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 412, including but not limited to: microcode, end drives, Redundant processors, external disk drive Arrays, RAID (Redundant Arrays of Independent Disks) systems, tape drives, and data backup storage systems, among others.
The processor 416 executes programs stored in the storage device 428 to perform various functional applications and data processing, such as implementing a flame light effect generation method provided by any embodiment of the present invention, which may include:
dividing a display array into a plurality of flame regions, wherein the display array is formed by a string of light bars according to a preset placing mode, the light bars comprise a preset number of RGB (red, green and blue) lamp beads, and each flame region comprises a plurality of RGB lamp beads;
acquiring control parameters of each flame area and two-dimensional coordinates of RGB lamp beads of the flame area in the display array;
converting the two-dimensional coordinates into one-dimensional coordinates of the RGB lamp beads in the lamp strip;
and controlling the RGB lamp beads corresponding to the flame areas to emit light or extinguish according to the one-dimensional coordinates and the control parameters of each flame area, so that the display array generates a flame lamp effect.
EXAMPLE five
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a flame lamp effect generating method according to any embodiment of the present invention, and the method may include:
dividing a display array into a plurality of flame regions, wherein the display array is formed by a string of light bars according to a preset placing mode, the light bars comprise a preset number of RGB (red, green and blue) lamp beads, and each flame region comprises a plurality of RGB lamp beads;
acquiring control parameters of each flame area and two-dimensional coordinates of RGB lamp beads of the flame area in the display array;
converting the two-dimensional coordinates into one-dimensional coordinates of the RGB lamp beads in the lamp strip;
and controlling the RGB lamp beads corresponding to the flame areas to emit light or extinguish according to the one-dimensional coordinates and the control parameters of each flame area, so that the display array generates a flame lamp effect.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or terminal. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method of generating a flame light effect, comprising:
dividing a display array into a plurality of flame regions, wherein the display array is formed by a string of light bars according to a preset placing mode, the light bars comprise a preset number of RGB (red, green and blue) lamp beads, and each flame region comprises a plurality of RGB lamp beads;
acquiring control parameters of each flame area and two-dimensional coordinates of RGB lamp beads of the flame area in the display array;
converting the two-dimensional coordinates into one-dimensional coordinates of the RGB lamp beads in the lamp strip;
and controlling the RGB lamp beads corresponding to the flame areas to emit light or extinguish according to the one-dimensional coordinates and the control parameters of each flame area, so that the display array generates a flame lamp effect.
2. The method of claim 1, wherein dividing the display array into a plurality of flame regions comprises:
dividing the display array in the column direction to enable one column of the display array to form a flame area.
3. The method of claim 1, wherein the control parameters include a target variation state and a target variation value of each flame zone, and controlling the RGB lamp beads of the corresponding flame zones to emit light or extinguish according to the one-dimensional coordinates and the control parameters of each flame zone comprises:
controlling the plurality of RGB lamp beads in the flame area to emit light or extinguish according to the target change state and the one-dimensional coordinates of the RGB lamp beads in the flame area;
when the luminous height of the flame area reaches a target change value, acquiring an expected change state and an expected change value of the flame area;
and taking the expected change state as the target change state, taking the expected change value as the target change value, and returning to the step of controlling the plurality of RGB lamp beads in the flame area to emit light or extinguish according to the target change state and the one-dimensional coordinates of the RGB lamp beads in the flame area.
4. The method of claim 3, wherein the target change status comprises a target rise status, and wherein controlling the plurality of RGB lamp beads of the flame zone to illuminate or extinguish according to the target change status and the one-dimensional coordinates of the RGB lamp beads of the flame zone comprises:
and controlling the RGB lamp beads in the flame area to emit light from bottom to top according to the ascending state and the one-dimensional coordinates of the RGB lamp beads in the flame area.
5. The method of claim 3, wherein the target change status further comprises a target drop status, and wherein controlling the plurality of RGB lamp beads of the flame zone to illuminate or extinguish based on the target change status and the one-dimensional coordinates of the RGB lamp beads of the flame zone further comprises:
and controlling the RGB lamp beads in the flame area to be extinguished from top to bottom according to the descending state and the one-dimensional coordinates of the RGB lamp beads in the flame area.
6. The method of claim 4, wherein the target change value comprises a target maximum value, and when the luminous height of the flame region reaches the target change value, obtaining the expected change state and the expected change value for the flame region comprises:
when the light emitting height of the flame area reaches a target maximum value, setting an expected change state of the flame area as a descending state;
the expected minimum is obtained by the meisen rotation random algorithm.
7. The method of claim 5, wherein the target change value further comprises a target minimum value, and when the luminous height of the flame region reaches the target change value, obtaining the expected change state and the expected change value for the flame region further comprises:
when the light emitting height of the flame area reaches a target minimum value, setting an expected change state of the flame area as a rising state;
the expected maximum is obtained by the meisen rotation random algorithm.
8. A flame light effect generating device, comprising:
the display array is composed of a string of light bars according to a preset placing mode, each light bar comprises a preset number of RGB (red, green and blue) light beads, and each flame area comprises a plurality of RGB light beads;
the parameter acquisition module is used for acquiring control parameters of each flame area and two-dimensional coordinates of RGB lamp beads of the flame areas in the display array;
the coordinate conversion module is used for converting the two-dimensional coordinates into one-dimensional coordinates of the RGB lamp beads in the lamp strip;
and the flame light effect generation module is used for controlling the RGB lamp beads corresponding to the flame areas to emit light or extinguish according to the one-dimensional coordinates and the control parameters of each flame area so as to enable the display array to generate the flame light effect.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the flame light effect generation method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out a method for generating a flame light effect as claimed in any one of claims 1 to 7.
CN202110084157.7A 2021-01-21 2021-01-21 Flame lamp effect generating method, device, equipment and storage medium Active CN112767875B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110084157.7A CN112767875B (en) 2021-01-21 2021-01-21 Flame lamp effect generating method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110084157.7A CN112767875B (en) 2021-01-21 2021-01-21 Flame lamp effect generating method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112767875A true CN112767875A (en) 2021-05-07
CN112767875B CN112767875B (en) 2022-01-18

Family

ID=75702508

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110084157.7A Active CN112767875B (en) 2021-01-21 2021-01-21 Flame lamp effect generating method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112767875B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115460732A (en) * 2022-11-11 2022-12-09 深圳市爱图仕影像器材有限公司 Light equipment control method and device, terminal equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020017996A (en) * 2000-08-31 2002-03-07 구자홍 Method for processing gray scale of a plasma display panel
CN2769684Y (en) * 2005-02-20 2006-04-05 樊邦弘 Flame decorative lamp
CN101162078A (en) * 2006-10-12 2008-04-16 王志潮 Method and device for simulating flame image
CN201209807Y (en) * 2008-04-03 2009-03-18 王列卡 Apparatus for simulating stereo flare with LED
CN104654191A (en) * 2015-01-08 2015-05-27 威立达数码科技(深圳)有限公司 Electronic candle lamp and light-emitting diode lamp
CN107740987A (en) * 2017-10-30 2018-02-27 江门市翰腾盛曦光电科技有限公司 A kind of LED of simulated flame effect
CN109684982A (en) * 2018-12-19 2019-04-26 哈尔滨工业大学(深圳) The flame detecting method based on video analysis excluded in conjunction with easy mixed target
WO2019153559A1 (en) * 2018-02-07 2019-08-15 刘志军 Led flame lamp
CN110397856A (en) * 2018-04-19 2019-11-01 江苏厚睦莱照明科技有限公司 A kind of LED flame lamp
CN112118653A (en) * 2020-04-07 2020-12-22 珈伟新能源股份有限公司 Flame lamp control circuit, flame lamp control method and flame lamp

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020017996A (en) * 2000-08-31 2002-03-07 구자홍 Method for processing gray scale of a plasma display panel
CN2769684Y (en) * 2005-02-20 2006-04-05 樊邦弘 Flame decorative lamp
CN101162078A (en) * 2006-10-12 2008-04-16 王志潮 Method and device for simulating flame image
CN201209807Y (en) * 2008-04-03 2009-03-18 王列卡 Apparatus for simulating stereo flare with LED
CN104654191A (en) * 2015-01-08 2015-05-27 威立达数码科技(深圳)有限公司 Electronic candle lamp and light-emitting diode lamp
CN107740987A (en) * 2017-10-30 2018-02-27 江门市翰腾盛曦光电科技有限公司 A kind of LED of simulated flame effect
WO2019153559A1 (en) * 2018-02-07 2019-08-15 刘志军 Led flame lamp
CN110397856A (en) * 2018-04-19 2019-11-01 江苏厚睦莱照明科技有限公司 A kind of LED flame lamp
CN109684982A (en) * 2018-12-19 2019-04-26 哈尔滨工业大学(深圳) The flame detecting method based on video analysis excluded in conjunction with easy mixed target
CN112118653A (en) * 2020-04-07 2020-12-22 珈伟新能源股份有限公司 Flame lamp control circuit, flame lamp control method and flame lamp

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115460732A (en) * 2022-11-11 2022-12-09 深圳市爱图仕影像器材有限公司 Light equipment control method and device, terminal equipment and storage medium

Also Published As

Publication number Publication date
CN112767875B (en) 2022-01-18

Similar Documents

Publication Publication Date Title
EP2124508A1 (en) Audio visual environment control device, audio visual environment control system and audio visual environment control method
US10395605B2 (en) Display device and displaying method
US20200022238A1 (en) Lighting script control
CN112767875B (en) Flame lamp effect generating method, device, equipment and storage medium
CN111080806B (en) Mapping processing method and device, electronic equipment and storage medium
JP2017538254A (en) Lighting device, lighting device configuration method, computer program product, calculation processing device, and lighting system
KR102585233B1 (en) Display apparatus and method of manufacturing display apparatus
US11665802B2 (en) Lighting system
US20120091918A1 (en) Picture selection method for modular lighting system
CN113851090A (en) Display device, control method thereof and related equipment
CN109842971B (en) Control device, lighting device, and lighting system
US20210232301A1 (en) A method and a lighting control device for controlling a plurality of lighting devices
JP7113302B2 (en) Spatial production system
JP7442093B2 (en) Lighting control device, lighting system, terminal device, lighting control method and program
CN110136641B (en) Level converter, data processing method and display device
CN113766699A (en) Lamp control system and control method thereof
CN115861502A (en) Weather rendering method and device in virtual environment, storage medium and electronic equipment
CN113966055A (en) Method for controlling lamp string by power carrier, electronic billboard and device
WO2023236632A1 (en) Driving method for display device and display device
CN105141855A (en) Image processing method and electronic devices
CN109587896A (en) LED gray level control unit and LED array driving system
US11003390B2 (en) Data storage device with a lighting module and control method for the lighting module
JP2006259668A (en) Emission element bundle lighting point bundle control system
TW201320820A (en) Multicolor light source system controlled by graphical interface and the adjustment method thereof
CN114038440B (en) Display device and control method thereof

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