CN117202447A - Atmosphere lamp equipment, corner color taking method thereof, corresponding device and medium - Google Patents
Atmosphere lamp equipment, corner color taking method thereof, corresponding device and medium Download PDFInfo
- Publication number
- CN117202447A CN117202447A CN202311472363.0A CN202311472363A CN117202447A CN 117202447 A CN117202447 A CN 117202447A CN 202311472363 A CN202311472363 A CN 202311472363A CN 117202447 A CN117202447 A CN 117202447A
- Authority
- CN
- China
- Prior art keywords
- color
- image
- taking
- picture
- original
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 45
- 230000036961 partial effect Effects 0.000 claims abstract description 65
- 238000005192 partition Methods 0.000 claims abstract description 29
- 230000011218 segmentation Effects 0.000 claims abstract description 14
- 238000000605 extraction Methods 0.000 claims description 25
- 238000004590 computer program Methods 0.000 claims description 14
- 238000003709 image segmentation Methods 0.000 claims description 10
- 238000013507 mapping Methods 0.000 claims description 8
- 238000003860 storage Methods 0.000 claims description 8
- 238000001914 filtration Methods 0.000 claims description 4
- 238000005520 cutting process Methods 0.000 claims description 3
- 238000007654 immersion Methods 0.000 abstract description 5
- 230000000694 effects Effects 0.000 description 50
- 239000011324 bead Substances 0.000 description 41
- 230000001795 light effect Effects 0.000 description 15
- 238000004891 communication Methods 0.000 description 13
- 238000010586 diagram Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 8
- 239000003086 colorant Substances 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 238000012545 processing Methods 0.000 description 6
- 238000000638 solvent extraction Methods 0.000 description 6
- 239000002131 composite material Substances 0.000 description 5
- 230000003247 decreasing effect Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 239000011159 matrix material Substances 0.000 description 4
- 238000004458 analytical method Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 3
- 238000012935 Averaging Methods 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 2
- 238000009826 distribution Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000002829 reductive effect Effects 0.000 description 2
- 241001465382 Physalis alkekengi Species 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000002301 combined effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000004069 differentiation Effects 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 230000003631 expected effect Effects 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 230000000670 limiting effect Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000036651 mood Effects 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000004806 packaging method and process Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000005855 radiation Effects 0.000 description 1
- 230000003014 reinforcing effect Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- 230000003313 weakening effect Effects 0.000 description 1
Landscapes
- Control Of Indicators Other Than Cathode Ray Tubes (AREA)
Abstract
The application relates to atmosphere lamp equipment, a corner color taking method thereof, a corresponding device and a medium, wherein the method comprises the following steps: according to layout configuration information for representing the picture partition layout, carrying out region segmentation on the target picture according to the picture partition layout to obtain a plurality of color-taking images distributed around the outer side edges of the original pictures of the target picture; grouping the plurality of light emitting units according to the picture frame partition layout according to the layout configuration information, and independently setting corresponding lamp groups for the outer side edge of each original picture of each color-taking image; and taking the color-taking image positioned at any target corner position of the target picture as an exceptional color-taking image, and setting the luminous color value of the luminous unit in the corresponding lamp group according to the partial image covering the outer side edge of any original picture of the exceptional color-taking image. When the luminous color values of the lamp groups corresponding to the corner positions of the target picture are determined, the method is more accurate and fine, and the atmosphere lamp equipment can render the lamplight atmosphere with more immersion.
Description
Technical Field
The application relates to the field of illumination control, in particular to atmosphere lamp equipment, a corner color taking method thereof, a corresponding device and a medium.
Background
The atmosphere lamp equipment is used as one of intelligent lamps and lanterns, can play the effect of decorating indoor space effect, show information. With the rise of people's economic level, atmosphere lamp equipment is becoming more popular. One of the functions of the atmosphere lamp device is to generate a light effect corresponding to the light effect according to the light effect of the appointed environment, so as to play a role in reinforcing the environment atmosphere.
An exemplary atmosphere lamp device encloses a lamp band around a display, performs color extraction according to an interface image displayed in a graphical user interface of the display, generally performs color extraction on a boundary area, close to the outer side edge of a desktop, in the interface image to obtain color values of images at each outer side edge, determines luminous color values of each lamp bead corresponding to a frame arranged on four sides of the display according to the color values, and controls each lamp bead to play a corresponding lamp effect, so that on the lamp beads outside the display, the light atmosphere of the boundary area of the interface image is simulated, and the light effect of the boundary area of the interface image is expanded into a physical space, so that a user can sense the light atmosphere of the interface image in a larger range, and a more immersed use environment is created, and the atmosphere lamp device is particularly suitable for users to watch videos or play games.
When the interface image is colored, the conventional color-taking mode is to take the color of the interface image in a partitioning mode, the color average value of the pixels of each area after the partitioning is used as the luminous color value of the corresponding lamp bead, wherein the lamp beads on two sides need to be used for determining the luminous color value of the same partitioned image at the corner position of the image, the mode cannot adapt to the characteristic of the color distribution of the image, and accordingly the played lamp effect is not fine enough. Specifically, according to the image making characteristics, as shown in fig. 1, the main color content of the image is generally concentrated in the middle of the image, as shown by the circle range in the figure, and is characterized by weakening the outward radiation to a certain extent, when the pixels in the corner region in the figure are used for determining the luminous color values of the lamp beads at two sides, on one hand, the pixels are interfered by the color of the centripetal part of the corner region and difficult to accurately correspond to the boundary color, and on the other hand, the lamp beads at two sides at the corner part cannot be made to present color differentiation.
In summary, in the color taking scheme of the existing atmosphere lamp device, when the corner part of the image is colored and the corresponding lamp effect is played, the color taking is rough and inaccurate, so that the corresponding lamplight atmosphere is hard and needs to be further optimized.
Disclosure of Invention
The application aims to provide atmosphere lamp equipment, a corner color taking method thereof, a corresponding device and a medium.
According to one aspect of the application, there is provided a corner color extraction method of an atmosphere lamp device, comprising:
according to layout configuration information for representing the picture partition layout, carrying out region segmentation on a target picture according to the picture partition layout to obtain a plurality of color-taking images distributed around the outer side edges of all original pictures of the target picture;
according to the layout configuration information, grouping a plurality of light emitting units in the atmosphere lamp equipment according to the picture partition layout, and independently setting corresponding lamp groups for the outer side of each original picture obtained by dividing each color-taking image;
and taking the color-taking image positioned at any target corner position of the target picture as an exceptional color-taking image, and setting the luminous color value of the luminous unit in the lamp group corresponding to the external side of any original picture according to the partial image covering the external side of the original picture obtained by dividing the exceptional color-taking image.
According to another aspect of the present application, there is provided an ambient light device corner color extraction apparatus, comprising:
the image segmentation module is used for carrying out region segmentation on the target picture according to the layout configuration information for representing the picture partition layout to obtain a plurality of color taking images distributed around the outer side of each original picture of the target picture;
The grouping mapping module is used for grouping the plurality of light emitting units in the atmosphere lamp equipment according to the layout configuration information and the frame partition layout, and independently setting corresponding lamp groups for the outer side of each original picture obtained by dividing each color-taking image;
the corner color taking module is used for taking a color taking image positioned at any target corner position of the target picture as an exceptional color taking image, and setting the luminous color value of the luminous unit in the lamp group corresponding to the external side of any original picture according to the partial image covering the external side of the original picture obtained by dividing the exceptional color taking image.
According to another aspect of the present application, there is provided an ambient light device comprising a central processor and a memory, the central processor being adapted to invoke the steps of running a computer program stored in the memory to perform the ambient light device corner color extraction method.
According to another aspect of the present application, there is provided a non-volatile readable storage medium storing in the form of computer readable instructions a computer program implemented according to the corner color extraction method of an ambient light device, the computer program executing the steps comprised in the method when being invoked by a computer.
Compared with the prior art, the application firstly carries out region segmentation on the target picture according to the layout configuration information representing the picture partition layout to obtain each color taking image distributed around the external side of each original picture on the target picture, and then groups a plurality of light emitting units in the atmosphere lamp equipment according to the layout configuration information to obtain a plurality of lamp groups, then, based on the corresponding relation between the external side of the original picture and the color taking image, the corresponding relation is established between the external side of the original picture and the corresponding lamp group according to the corresponding relation of each color taking image segmentation, the lamp group can be a light emitting unit which is arranged on the picture of the lamp effect and belongs to the external side segment of the original picture corresponding to the color taking image, namely a lamp bead set, thus, for the color taking image positioned at the corner position of the target picture, the two external side edges are correspondingly obtained, the two original picture external side edges can be used as exceptional color taking images, the color emitting color values of the corresponding light emitting units in the two original picture external side edges can be used for determining, when the corresponding color taking color values of the corresponding light emitting units in the lamp group in the original picture external side are determined, the corresponding color values of the corresponding lamp group are not used for the color taking image of the corresponding to each other, the color taking image can be more fully reflected at the corner positions of the corresponding position of the corresponding lamp groups, and the color taking image can be more different in the fact positioned at the corner positions of the corresponding position of the corresponding picture, the method is more accurate and fine, the lamp effect played by the atmosphere lamp device is enabled to be more approximate to the real effect of the target picture, and the lamp atmosphere with more immersion is created.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is an exemplary image color distribution relationship diagram, in which a dashed rectangular box indicates the frame of an image and a circled portion indicates an area embodying the main color content of the image;
fig. 2 is a schematic diagram of an electrical structure of an atmosphere lamp device in an embodiment of the present application;
fig. 3 is a schematic diagram of a display frame of an atmosphere lamp device according to an embodiment of the present application, in which atmosphere lamps are laid out around a display of a terminal device to form a frame lamp;
fig. 4 is a flow chart of a method for color extraction of corners of an atmosphere lamp device in an embodiment of the application;
fig. 5 is a schematic view of the region segmentation effect of the target picture according to the present application, showing the effect of dividing the target image into 12 regions according to a layout of 3×4;
FIG. 6 is a schematic flow chart of a method for producing a target picture according to an interface image according to an embodiment of the application;
FIG. 7 is a flow chart of determining the luminous color values of two corresponding lamp groups according to an exceptional color-taking image according to an embodiment of the application;
FIG. 8 is a flow chart of determining the corresponding comprehensive color values of the outer side edges of the original images after equally dividing the exceptional color-taking images according to the embodiment of the application;
FIG. 9 is a schematic diagram showing the effect of equally dividing an exceptional color-taking image according to an embodiment of the application;
FIG. 10 is a flow chart of determining the luminous color values of the corresponding lamp groups according to the conventional color-picking image in the embodiment of the application;
fig. 11 is a schematic structural diagram of a corner color-taking device of an atmosphere lamp device in an embodiment of the application;
fig. 12 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
Referring to fig. 2, it can be seen from a schematic structural diagram of an atmosphere lamp device according to an embodiment of the present application that the atmosphere lamp device includes a controller 1, an atmosphere lamp 2, and an image acquisition interface, where the atmosphere lamp 2 is electrically connected to the controller 1 so as to receive a computer program running in the controller 1 to control and cooperate with each other to realize lamp-effect playing.
The controller 1 of the atmosphere lamp device is used for realizing the work control of the whole atmosphere lamp device and is responsible for communication inside and outside the whole atmosphere lamp device, wherein the controller 1 is also responsible for driving the image acquisition interface to work, the environment reference images are acquired frame by frame through the image acquisition interface, the environment reference images can be interface images of the terminal device, then the lamp effect playing instruction of the corresponding frames is generated according to the environment reference images of each frame, and the lamp effect of the corresponding frames is played by the atmosphere lamp 2 under the control of the lamp effect playing instruction.
The controller 1 typically includes a control chip, communication components, and bus connectors, and in some embodiments, the controller 1 may also configure power adapters, control panels, display screens, etc. as desired.
The power adapter is mainly used for converting commercial power into direct current so as to supply power for the whole atmosphere lamp equipment. The control Chip may be implemented by various embedded chips, such as a bluetooth SoC (System on Chip), a WiFi SoC, an MCU (Micro Controller Unit, a microcontroller), a DSP (Digital Signal Processing ), and the like, and generally includes a central processor and a memory, where the memory and the central processor are respectively used to store and execute program instructions to implement corresponding functions. The control chips of the above types can be used for communication components from the outside, and can be additionally configured according to the requirement. The communication component may be used for communication with an external device, for example, may be used for communication with a terminal device such as a personal computer or various smartphones, so that after a user issues various configuration instructions through its terminal device, the control chip of the controller 1 may receive the configuration instructions through the communication component to complete the basic configuration, so as to control the atmosphere lamp to work. In addition, the controller 1 can also acquire an interface image of the terminal device through the communication component, or acquire a real-time preview image acquired by the camera. The bus connector is mainly used for connecting the atmosphere lamp 2 connected to the bus with a power supply and providing a lamp effect playing instruction, so that pins corresponding to the power bus and the signal bus are correspondingly provided, and therefore, when the atmosphere lamp 2 needs to be connected to the controller 1, the atmosphere lamp is connected with the bus connector through the corresponding connector of the atmosphere lamp. The control panel typically provides one or more keys for performing on-off control of the controller 1, selecting various preset light effect control modes, etc. The display screen can be used for displaying various control information so as to be matched with keys in the control panel and support the realization of man-machine interaction functions. In some embodiments, the control panel and the display screen may be integrated into the same touch display screen.
Referring to fig. 3, the atmosphere lamp in fig. 3 may be laid out around the display of the terminal device to form a frame lamp, and the frame lamp may be surrounded by a single or multiple light-emitting lamp strips connected to the bus. As for the luminous lamp strip adopted by the frame lamp and the luminous units in the luminous lamp strip, the luminous units can be arranged at equal intervals so as to be convenient for being grouped at equal intervals or equal amounts.
Each light-emitting strip 21 may be formed by connecting a plurality of light-emitting unit light-emitting beads 210 in series, each light-emitting bead 210 in the same light-emitting strip 21 transmits working current by the same group of cables connected to the bus, and the light-emitting beads 210 in the same light-emitting strip 21 may be connected in parallel in terms of electrical connection. When the frame lamp is arranged, all the lamp beads are arranged around the display, but the display picture 4 formed on the basis of the lamp bead matrix structure can be regarded as a whole, the lamp beads are not arranged at the frame inner part of the display picture 4, only the lamp beads are arranged at four sides, and when the lamp effect is played, a certain light atmosphere effect can be scattered inside and outside the range of the display picture 4.
Each of the light beads 210 of the light-emitting strip 21 of the atmosphere lamp 2 is also provided with a corresponding control chip, and the control chip can select the type according to the disclosure, or select other more economical control chips, which mainly has the function of being able to extract the light-emitting color value corresponding to the light bead 210 from the light effect playing instruction, and control the light-emitting element in the light bead 210 to emit the corresponding color light, and in some embodiments, the light-emitting element can be each LED lamp corresponding to the three primary colors.
The image acquisition interface may be either a hardware interface or a software interface implemented in the controller 1. When the camera is aimed at a target environment object, for example, a display desktop of a terminal device, images are collected according to a certain frame rate, and then the images of each frame interface can be continuously collected. In the case of a software interface, the image acquisition interface may be an image acquisition program implemented on the controller 1 side by using a graphics infrastructure technology provided by an operating system of the terminal device, where the controller 1 is connected to the terminal device through various cables, such as HDMI, type-C connection lines, so that the interface image of the terminal device can be continuously obtained under the support of the graphics infrastructure technology; of course, if the controller 1 and the terminal device pre-establish a wireless screen-throwing protocol, the controller 1 may also acquire the interface image of the screen-throwing transmission of the terminal device by using a wireless communication mode. The graphics infrastructure technology of the operating system varies according to the type of the operating system, and in an example, in the Windows operating system, a corresponding technology is provided, namely: microsoft DirectX Graphics Infrastructure, DXGI for short, may implement this function.
When the atmosphere lamp equipment is powered on, the control chip of the controller can call and execute the computer program from the memory, and the atmosphere lamp is powered on and initialized through the default initialization flow of the computer program, so that the driving configuration of the atmosphere lamp and other hardware equipment is completed.
In one embodiment, when the atmosphere lamp is started, the controller can firstly send a self-checking instruction to the atmosphere lamp, and drive each lamp bead in each light-emitting lamp strip of the atmosphere lamp to return the position information of the lamp bead in the light-emitting lamp strip. Each lamp bead is provided with a corresponding control chip for carrying out data communication with the control chip in the controller, so that the characteristic information of the lamp bead and the characteristic information of other lamp beads can be serially connected in sequence according to a serial communication protocol, and the representation of the position information of the lamp bead is realized. The serial communication protocol executed between the controller and the lamp beads can be any one of IIC (Inter-Integrated Circuit, integrated circuit bus), SPI (serial peripheral interface ), UART (Universal Asynchronous Receiver-Transmitter, universal asynchronous receiver/Transmitter). After the controller obtains the result data returned by the self-inspection of each lamp bead from the bus, the result data are analyzed, the positions of each lamp bead in the display frame 4 presented by the whole atmosphere lamp can be determined according to the sequence of the characteristic information of each lamp bead in the result data, therefore, each lamp bead can be used as a light-emitting unit and can be understood as a basic pixel, and when a subsequent controller constructs a lamp effect playing instruction, the corresponding light-emitting color value of each basic pixel can be set according to the actual requirement according to the position information of each lamp bead.
After the initialization is completed, the controller can continuously acquire the environment reference image as a target picture through the image acquisition interface, and color taking is carried out on the target picture so as to determine the luminous color value of each luminous unit in the display picture presented by the atmosphere lamp. Therefore, the display frame of the atmosphere lamp can be divided into a plurality of unit frames, the target picture is divided into a plurality of color taking images, the color taking images are in one-to-one correspondence with the unit frames, corresponding color values are determined according to the dominant tone of each color taking image, and then the luminous color values of all luminous units in the unit frames corresponding to the color taking images are generated according to the color values.
Accordingly, in one embodiment, the atmosphere lamp device may preset layout configuration information corresponding to the atmosphere lamp, where the layout configuration information is used to describe how to perform the layout of the frame partition corresponding to the display frame presented by the atmosphere lamp. In the layout configuration information, the granularity of the subdivision of the entire display frame 4 in the plane may be defined in any form, so that the entire display frame 4 may be divided into a plurality of unit frames 40 in accordance with the constraint of the layout configuration information. Typically, as shown in FIG. 3, each unit frame 40 may be correspondingly covered across multiple beads by dividing. The granularity of dividing the display frame 4 in the layout configuration information may be flexibly set, for example, the unit frames 40 may be specified to be divided according to a nine-square grid, a sixteen-square grid, etc. in the layout configuration information, and the total number of the unit frames may be expressed as a numerical value of, for example, 9, 16, etc. so that the unit frames 40 are divided for the whole display frame 4 according to the total number of all the lamp beads in the atmosphere lamp according to the set numerical value; the number of the lamp beads spanned by each unit picture can be specified in the layout configuration information, and then the lamp beads in the luminous lamp strip are equally divided according to the number; it is also possible to set the total number of unit frames 40 to be generated only in the layout configuration information. And so on, as long as the frame partition layout can be established.
The layout configuration information can be set through a man-machine interaction function realized on the controller, can also be set through terminal equipment which establishes data communication connection with the controller and is transmitted to the controller, and the controller stores the layout configuration information in a memory of a control chip of the controller and calls the layout configuration information according to requirements.
Considering that the light-emitting strip of the atmosphere lamp can be flexibly configured to be increased or decreased as required, in one embodiment, the controller can detect the total number of the lamp beads of the whole atmosphere lamp first, and by detecting the total number n of the lamp beads, according to the numerical value set in the layout configuration information, for example, the numerical value of 10, the controller is understood to be that every n/10 lamp beads are divided into a lamp group, the lamp group is used for corresponding to the unit picture frame to which the lamp beads belong, and naturally, for the unit picture frame corresponding to the corner position in the display picture frame, the controller corresponds to the lamp groups corresponding to the two outer side edges of the corner position. According to the mode, the display frames are divided, the method is efficient and quick, the quantity change of the luminous lamp strips and the lamp beads can be adapted, the pixel density of each unit frame can be flexibly adjusted, the controller can adaptively set the pixel density of the unit frames according to the increase and decrease of the luminous lamp strips in the atmosphere lamp, the playing logic of the lamp effect is kept unchanged, and the lamp effect of the atmosphere lamp can be normally played even after the luminous lamp strips are increased or decreased.
Of course, the layout configuration information may also have other defining manners, for example, the layout configuration information may be set according to a partitioning rule of an environmental reference image serving as a target picture, in any case, the rule of partitioning the display frame of the atmosphere lamp is generally consistent with the rule of partitioning the target picture, so as to ensure that each color taking image determined after partitioning in the target picture has one unit frame corresponding to one unit frame in the atmosphere lamp, and it is convenient for the light emitting unit of any lamp group existing for each unit frame to take colors from the corresponding color taking image to realize light effect projection, so as to realize that the light atmosphere effect matched with the target picture is projected on the whole display frame of the atmosphere lamp.
According to the product architecture and the working principle of the atmosphere lamp equipment, the corner color taking method of the atmosphere lamp equipment can be realized as a computer program product, the computer program product is stored in a memory of a control chip in a controller of the atmosphere lamp equipment, a central processing unit in the control chip is invoked from the memory and then runs, and the atmosphere lamp is controlled to play corresponding lamp effects according to an environment reference image acquired by an image acquisition interface during running.
Referring to fig. 4, in one embodiment, the corner color extraction method of the atmosphere lamp device of the present application is mainly implemented on a controller side of the atmosphere lamp device, and is executed by a control chip of the controller, and includes:
Step S5100, according to layout configuration information for representing the frame partition layout, performing region segmentation on a target picture according to the frame partition layout to obtain a plurality of color-taking images distributed around the outer side of each original picture of the target picture;
when color taking is required to be performed for each lamp bead in the atmosphere lamp device based on the target picture, preset layout configuration information can be called from a memory of the controller. The layout configuration information is mainly used for representing the picture partition layout corresponding to the light effect as described above. The frame referred to herein means that a rectangular frame appears after the light-emitting strip of the atmosphere lamp device of the present application is enclosed on the display of the terminal device, and this rectangular frame corresponds to a display frame as a whole. Although on this rectangular frame an effect similar to the whole picture can be exhibited by the light emitting units on the frame side, in practice the ambient light device of the present application is only responsible for the light emission by the light emitting units on the frame side of the rectangular frame. The display of the drawings herein, therefore, is merely a naming actually given for ease of understanding.
Referring to the modes disclosed in the foregoing various embodiments, the layout configuration information may indicate how to partition a plane based on such a display frame, so that not only may atmosphere lamps in the atmosphere lamp device, that is, all light emitting units in the atmosphere lamp device, be partitioned according to the layout configuration information to obtain a plurality of unit frames, but also a target picture may be partitioned according to the layout configuration information to obtain a plurality of color taking areas, each color taking area correspondingly obtains a region image, so that each unit frame may establish a corresponding relationship with one region image.
In this step, the target picture is first divided into regions according to the layout configuration information, for example, when the layout configuration information is designated to be cut according to the layout of 3×4, the target picture may be divided into 3 rows and 4 columns, so as to obtain 12 color-taking regions, and the image content of each color-taking region is a corresponding region image, as shown in fig. 5.
Since the atmosphere lamp apparatus of the present application is mainly used for expanding the light color effect at the boundary of the target picture, the color of the image content of the central portion of the target picture may not be focused, but the target picture is taken as an original picture, and the region images distributed around the outer sides of the four original pictures of the target picture are focused, so that the present application uses the region images distributed around the outer sides of the four original pictures of the target picture as the color taking images, for example, in the case of obtaining 12 region images as described above, the number of the region images actually belonging to the color taking images is 10, and the region images not falling on the outer sides of any one original picture may not be considered here.
Step S5200, grouping a plurality of light emitting units in the atmosphere lamp equipment according to the picture division layout according to the layout configuration information, and independently setting corresponding lamp groups for the outer side of each original picture obtained by dividing each color-taking image;
As described above, the layout configuration information can be used to determine each unit frame in the display frame of the atmosphere lamp, but since the atmosphere lamp of the present application is actually formed by a plurality of light emitting units linearly surrounding the display of the terminal device, in this case, it is only necessary to group all the light emitting units of the atmosphere lamp in correspondence with each unit frame located at a position corresponding to an outer side of any original image. For example, it is known that the total amount of all the light emitting units in the atmosphere lamp is 120, and 10 color taking images are correspondingly determined, and thus, the number of the light emitting units corresponding to each color taking image is 120/10=12. Accordingly, every adjacent 12 light-emitting units on the light-emitting lamp strip of the atmosphere lamp are divided into the same lamp group, and a corresponding mapping relation is established on the outer side edge of the original image obtained by segmentation in the color-taking image corresponding to the unit picture to which each lamp group belongs, so that the subsequent calling is convenient. The original image outer side edge referred to by the present application is determined by taking the target image as the original image, so that the original image outer side edge on the color-taking image actually means a corresponding edge belonging to the outer side edge when the color-taking image is corresponding to the target image after the color-taking image is obtained by dividing the target image.
Accordingly, it will be understood that the four unit frames located at the four corners of the entire display frame each correspond to two orthogonal artwork outer sides, and that there are two light sets corresponding thereto, that is, four color-taking images located at the four corners of the target picture, each color-taking image having two artwork outer sides resulting from the division, each of the two artwork outer sides having its corresponding light set.
Each color-taking image positioned at the non-corner position of the target picture corresponds to the unit picture displaying the non-corner position in the picture one by one, and each unit picture only covers one lamp group, so that each color-taking image at the non-corner position only has one external side of the original picture and only corresponds to one lamp group.
Therefore, whether the color taking image is positioned at the corner position or the non-corner position of the target picture, the mapping corresponding relation between the color taking image and each lamp group can be determined by the external side of the original image obtained by dividing the color taking image, specifically, the lamp group covered by the corresponding unit picture of the color taking image is taken as the lamp group mapped by the color taking image, and the corresponding relation between the external side of each original image and the lamp group is established by taking each external side of the original image obtained by dividing the color taking image as a unit, so that each external side of each original image obtained by dividing in each color taking image is provided with a lamp group which is independently arranged for the external side of each original image.
Step S5300, using the color-capturing image at any target corner of the target picture as an exceptional color-capturing image, and setting the light-emitting color value of the light-emitting unit in the light group corresponding to the external side of the arbitrary original image according to the partial image covering the external side of the arbitrary original image obtained by dividing the exceptional color-capturing image.
In generating their respective light color values for the light emitting units of the individual light groups in the atmosphere lamp, the setting of the light color values of the light groups generated at the corner positions in the display frame is involved. For this purpose, the description is based on an arbitrary target corner position of a target picture corresponding to a display frame.
For the color-taking image at any target corner of the target picture, the color-taking image can be taken as an exceptional color-taking image, and the exceptional color-taking image is provided with two segmented original picture outer sides, and as each original picture outer side is independently provided with a corresponding lamp group, the two original picture outer sides respectively correspond to the two lamp groups.
According to the image making characteristics, the image color of the central part of the target picture can generate interference on the color taking of the corner, so that the interference can be reduced as much as possible when the luminous color value is determined for the lamp group corresponding to the exceptional color taking image. Specifically, for any one of the outer sides of the original image, when the luminous color value of the corresponding lamp group is required to be determined, a partial image covering the outer side of the original image can be determined on the exceptional color-taking image, and the partial image is restricted to cover the outer side of the original image, namely, a row of pixels where the outer side of the original image is located, so that the image content of the partial image is necessarily the image content of the periphery of the outer side of the original image, and the image content of the diagonal position of the corner of the object can be avoided as far as possible, so that the interference of the color close to the center of the object image is avoided, and the partial image can focus on the color around the outer side of the original image as much as possible.
When partial images corresponding to the outer sides of the two original images obtained by dividing the exceptional color-taking image are determined in the above manner, it is easy to understand that, since the outer sides of the two original images are two outer sides perpendicular to each other at the angular position, there is a part of the coincident image between the two partial images, which is necessarily concentrated right at the angular position. Meanwhile, two partial images have different image contents, and the respective different image contents are close to the outer sides of the original pictures, so that each partial image can avoid the interference of the variegated image contents and can subdivide the image contents corresponding to the outer sides of the two original pictures. Thus, when the two partial images are used to generate the luminescent color values of the respective lamp sets, the two luminescent color values will typically differ and will more reflect the actual color around the outer side of the respective artwork.
After the local images corresponding to the outer sides of the original pictures are determined, the color values of the pixels in each local image can be correspondingly fused into a comprehensive color value, the comprehensive color value is set to be the luminous color value of the luminous units in the corresponding lamp group, each luminous unit in the lamp group is controlled to emit light according to the luminous color value, the color basically consistent with the color of the corresponding part in the target picture can be displayed, the effect of extending the light effect of the target picture to the outside of the display is achieved, the effect is equivalent to that the display boundary of the interface image corresponding to the target picture on the display is expanded in the entity space through the atmosphere lamp, and therefore the lamplight atmosphere with more immersion feeling is rendered.
According to the above embodiment, the present application firstly performs region division on the target picture according to the layout configuration information representing the layout of the picture division, and obtains each color taking image distributed around the external side of each original picture on the target picture, and then groups the plurality of light emitting units in the atmosphere lamp device according to the layout configuration information, so as to obtain a plurality of lamp groups, then, based on the correspondence between the external side of the original picture and the color taking image, the corresponding relationship is established between the external side of the original picture obtained by dividing each color taking image and the corresponding lamp group, the lamp group can be a light emitting unit, i.e. a lamp bead set, surrounding the original picture corresponding to the color taking image on the picture, so that for the color taking image located at the corner position of the target picture, the two original picture external sides are obtained as exceptional color taking images, and can be used for determining the light emitting color values of the corresponding light emitting units in the two original picture external sides, and when the corresponding color taking image of the corresponding lamp groups are determined, the corresponding color values of the two exceptional light emitting units in the original picture external side are not determined, and the color taking values of the corresponding lamp groups can be removed from the corresponding to each other at the corner position of the picture, thus, the color taking image can be better removed from the color taking image at the corner position of the corresponding position of the original picture, and the color taking image can be better reflected by the different from the color taking image, and the color value of the partial picture can be better reflected from the image at the corresponding position of the different position, the method is more accurate and fine, the lamp effect played by the atmosphere lamp device is enabled to be more approximate to the real effect of the target picture, and the lamp atmosphere with more immersion is created.
On the basis of any embodiment of the method of the present application, referring to fig. 6, before dividing a target picture into regions according to a frame partition layout according to layout configuration information for representing the frame partition layout, the method includes:
step S4100, obtaining an interface image of the terminal equipment;
the controller in the atmosphere lamp device can continuously collect interface images in external terminal devices through the image acquisition interface thereof as environment reference images, and usually collect the interface images according to a preset frame rate, for example, 30 frames per second, therefore, a control chip of the controller is actually required to process image streams formed by the interface images of each frame, and corresponding lamp effect is generated for each interface image in the image streams.
When the image acquisition interface is a software interface, a relatively high-definition interface image can be directly acquired; when the image acquisition interface is a hardware interface such as a camera, a corresponding interface image can be acquired, and the same effect as that of the software interface can be achieved. Can be flexibly adapted in practice.
Step S4200, identifying an edge black band located on the outer side of the interface image;
the frame of the video or game program interface played on the terminal device is not necessarily matched with the display frame of the display, so that the interface image acquired by the controller may contain an edge black band. In this case, the interface image may be preprocessed, and the coordinate information of the edge black band may be determined by calculating the black pixel connected regions located on the edge regions of the respective outer sides of the interface image. The coordinate information of each edge black band may be expressed as one window coordinate.
And step S4300, clipping and removing the edge black band from the interface image to obtain a target picture.
After the coordinate information of each edge black band in the interface image is determined, cutting the edge black band according to the coordinate information, and cutting the corresponding edge black band to obtain purer image content which can be used as a target picture.
In a further alternative embodiment, considering that the original interface image generally has higher resolution, but the actual playing of the lamp effect does not need to rely on data with high resolution, the interface image can be compressed to a preset resolution on the basis of removing the edge black bands, and the interface image with smaller data volume is obtained to be used as the target picture. Therefore, the application can compress the interface image according to the need when in actual use.
According to the embodiment, the edge black bands are eliminated from the interface image to obtain the target picture, so that the black edges can be prevented from appearing on the outer side edges of all original pictures of the target picture, the brightness of the corresponding determined luminous color values can be prevented from being influenced, and the atmosphere effect of the lamp effect played according to the target picture can be ensured.
On the basis of any embodiment of the method of the present application, please refer to fig. 7, taking a color-taking image at any target corner position of the target picture as an exceptional color-taking image, setting a light-emitting color value of a light-emitting unit in a light group corresponding to an external side of any original picture according to a partial image covering the external side of the original picture obtained by dividing the exceptional color-taking image, including:
Step S5310, determining the outer sides of the two original pictures obtained by the exceptional color-taking image segmentation and the corresponding lamp groups thereof;
for any one exceptional color-taking image, since the exceptional color-taking image is positioned at one corner of the target picture, two original image outer sides are obtained through segmentation, and the two original image outer sides can be determined by comparing with the target picture. Meanwhile, as the mapping relation between the outer side of the original picture and one lamp group is established in advance, the corresponding lamp group data can be called.
Step S5320, respectively determining comprehensive color values of partial images correspondingly covering the outer sides of the original pictures for the two outer sides of the original pictures in the exceptional color-taking images, wherein the two partial images have coincident images at the positions of the target corners;
for the two original image outer sides of the exceptional color-taking image, it has been disclosed in the foregoing that each of the original image outer sides can determine its corresponding partial image from the exceptional color-taking image, and then, according to the color values of the pixels in the partial image, a comprehensive color value can be obtained by fusion. The outer sides of the two original pictures are all required to determine corresponding comprehensive color values according to the respective local images. The mode of determining the integrated color value may be to determine the average value of the color values of all pixels in the partial image, or may use a preset algorithm to perform weighted determination by using the color values of the pixels. In some embodiments, before determining the integrated color value corresponding to the local image in the above manner, the dark pixels in the local image may be filtered according to a preset dark threshold value, and only the valid pixels with the color value higher than the dark threshold value are reserved for determining the integrated color value.
As previously analyzed, since both partial images are determined based on their respective artwork outer sides, both partial images necessarily have a portion of the coincident image at the corner location, which is such that both composite color values exhibit the image content weighting characteristics of the corner-affected location. Meanwhile, because the image contents of the two partial images outside the angular point part are the image contents exclusive to each other, a certain difference is presented between the two comprehensive color values due to the superposition of the color values of the image contents exclusive to each other, and when the exceptional color taking image is used for setting the color values for the light emitting units in the light groups corresponding to the outer sides of the two original images, the light rays emitted by the two light groups have finer and finer effects.
And step S5330, setting the comprehensive color value obtained by each external side of the original image as the luminous color value of the lamp group corresponding to the external side of the original image.
After determining the comprehensive color value corresponding to the outer side of each original image of each exceptional color taking image, each comprehensive color value can be set to be the luminous color value of each luminous unit in the lamp group mapped by the outer side of the corresponding original image, and the luminous color values are transmitted to each corresponding luminous unit along with the packaging and transmission of the lamp effect playing instruction, and the luminous elements in the luminous units are controlled to emit light by each luminous unit according to the corresponding luminous color values.
According to the implementation, when the lamp group corresponding to the exceptional color taking image at the corner is taken, two lamp groups are correspondingly arranged on two original image outer sides of the corner in consideration of the exceptional color taking image, each original image outer side is correspondingly selected to be a partial image, and the two partial images are arranged to have both overlapping images and difference images, so that when the luminous color value of the corresponding lamp group is determined according to the two partial images and the lamp effect is played, the light effect of the two lamp groups can inherit the same color characteristic of the corner, and the effect of the image colors of the respective parts can be fused, the light effect of the corner is finer and softer, and the image color effect of the corner is reflected more accurately.
On the basis of any embodiment of the method of the present application, referring to fig. 8, in the exceptional color-taking image, for the two artwork outer sides, respectively determining the comprehensive color values of the partial images corresponding to the outer sides of the artwork, where the method includes:
step S5321, equally dividing the exceptional color-taking image according to the longitudinal direction and the transverse direction to obtain a plurality of primitives;
in order to facilitate the standardized process of processing the four exceptional color-taking images at the four corner positions of the target picture, a standardized algorithm can be adopted to uniformly apply the implementation. In this embodiment, the matrix segmentation method is used to equally segment each of the exceptional color-taking images. Specifically, as shown in fig. 9, the exceptional color-taking image at the target corner position may be equally divided in two directions of the vertical and horizontal directions, and divided into a plurality of primitives, for example, in fig. 9, the exceptional color-taking image at the upper left corner position is equally divided in two directions of the vertical and horizontal directions, and then a total of 4 primitives of 2×2 are obtained. In other embodiments, the exceptional color-taking image may be trisected, even quartered, etc. to obtain a corresponding plurality of primitives. The greater the number of segmentations, the finer the image content that may be subsequently used in determining the partial image, and the skilled artisan may be able to flexibly determine the number of aliquots in accordance with the principles disclosed herein.
Step S5322, for each external side of the original image, determining that each graphic element covering the external side of the original image is constructed into a partial image belonging to the same region;
when determining the partial image corresponding to the outer side of each original image of the exceptional color-taking image, in the embodiment, a row of primitives close to the outer side of the original image is selected from all the primitives obtained by halving to form the partial image. As illustrated in fig. 9, after the exceptional color-taking image is divided into A, B, C, D four primitives, for the outer side of the original image located above in fig. 9, A, B two primitives located above are selected to form a partial image corresponding to the outer side of the original image above, and for the outer side of the original image on the left side in fig. 9, A, C two primitives are selected to form a partial image corresponding to the outer side of the original image on the left side, where a at the corner point is a coincident image between the two partial images. It can be seen that the partial image as a whole covers the outer side of its corresponding artwork. According to the principle, in the exceptional color-taking image, the local image corresponding to the outer side of each original image is actually the image content obtained by expanding each row of pixels towards opposite sides by taking the outer side of the original image as an axis.
Accordingly, it will be understood that, when the exceptional color-taking image is located at the lower left corner of the target picture, assuming that the same reference numerals are given to the same layout as the split layout of the exceptional color-taking image at the upper left corner in fig. 9 after the exceptional color-taking image is equally divided, the partial image corresponding to the original outer side of the bottom is composed of C, D, the partial image corresponding to the original outer side of the left side is composed of A, C, and C is the superimposed image between the two partial images. Similarly, when the exceptional color-taking image is positioned at the upper right corner of the target picture, the local image corresponding to the outer side edge of the original image above the exceptional color-taking image is formed by A, B, the local image corresponding to the outer side edge of the original image on the right side of the exceptional color-taking image is formed by B, D, and the overlapped image between the two local images is B; when the exceptional color-taking image is positioned at the lower right corner of the target picture, the partial image corresponding to the outer side edge of the original image below the exceptional color-taking image is formed by C, D, the partial image corresponding to the outer side edge of the original image on the right side of the exceptional color-taking image is formed by B, D, and the overlapped image between the two partial images is D.
It can be seen that, according to the above manner, the partial images are determined by equally dividing the exceptional color-taking images, in fact, the exceptional color-taking images are partitioned in a matrix manner to obtain a plurality of primitives, and then each primitive belonging to the same region corresponding to the partial images is determined to define the partial images, wherein each partial image is regarded as the same region, and is conveniently described in terms of coordinate information, and is processed in such a manner, so that the processing is relatively efficient in operation, and the dimension specification of each partial image can be ensured to be standardized, and the method is particularly suitable for implementation on embedded chips, and the various control chips adopted by the controller of the atmosphere lamp device are the embedded chips.
Step S5323, determining the average value of the color values of all pixels in the same region as the comprehensive color value of the local image corresponding to the region.
In order to determine the luminous color value of the lamp group corresponding to the outer side edge of any one original image in each exceptional color taking image, the comprehensive color value of the pixels in the partial image corresponding to the outer side edge of the original image needs to be determined. In this embodiment, for a partial image in which the integrated color value needs to be determined, the color values of all pixels in the partial image may be averaged, specifically, the color values of each primary color may be averaged respectively, so as to obtain the average value corresponding to each primary color, thereby forming an integrated color value. The composite color value characterizes the average effect of the color values of all pixels in the entire partial image, since the partial image essentially covers the corresponding outer side of the artwork, i.e. the region extending inwards from the outer side of the artwork, the determined composite color value is able to effectively reflect the overall color effect within this region.
It will be appreciated that the partial image corresponding to the outer side of each artwork in the exceptional color-taking image may be determined according to the embodiment, so as to further determine the light-emitting color value of the light-emitting unit in the light group corresponding to the outer side of the artwork according to the integrated color value.
According to the above embodiment, the present application partitions the exceptional color-taking image in a matrix division manner to obtain a plurality of primitives, and then selects a plurality of primitives covering pixels on the outer side of the original image to determine the local image, so as to determine the corresponding comprehensive color value on the outer side of the original image according to the local image.
On the basis of any embodiment of the method of the present application, determining, in the exceptional color-taking image, for the two artwork outer sides, respectively, a comprehensive color value of a partial image correspondingly covering the artwork outer sides, including:
step S5321', for each local image corresponding to the external side of the original image, calculating the average value of the color values of each row of pixels parallel to the axis in the local image by taking the external side of the original image as the axis;
In this embodiment, considering that in the exceptional color-taking image, the local image corresponding to the outer side of each original image is closer to the pixels at the outer side of the original image, the boundary effect is more affected, so that the average value of the color values of the pixels in each row (each row or each column) parallel to the outer side of the original image can be considered first to measure the overall color of the pixels in each row.
Specifically, the outer side of the original image of the integrated color value may be required to be determined as an axis, then each row of pixels parallel to the axis in the exceptional color-taking image is taken as a corresponding set, and the color values of each pixel in the set are averaged to obtain a corresponding average value. Each row of pixels may have its corresponding mean value obtained in the same manner.
Step S5322', the average values of the color values of the pixels in each row are weighted and summed in a manner of decreasing the edge weight to the outer side of the original image, so as to obtain the comprehensive color value.
After the above steps, each row of pixels parallel to the outer side edge of the corresponding original image in the local image obtains the corresponding average value thereof, and considering the characteristic that the color value of the pixel closer to the outer side edge of the original image has higher influence on the boundary color effect, in this embodiment, the average values are further weighted and summed to obtain the comprehensive color value, and the weights matched by the average values determine the weights corresponding to the average values of the row according to the row in which the average value is located in the order from the outer side edge of the original image to the opposite side thereof, and the weights of the average values of the rows are gradually reduced from front to back according to the order, so as to ensure that the average value of the row with higher influence on the comprehensive color value is the average value of the row with higher influence on the comprehensive color value.
In one embodiment, the weights matched with the corresponding average values of the rows can take values between normalization intervals [0,1], each value takes a certain descending relation, and the weight sum of the average values of all the rows is ensured to be 1.
According to the method of the embodiment, the integrated color value of the local image is determined, and due to the fact that the influence of the pixels closer to the outer side edge of the original image on the boundary color is larger or smaller is fully considered, the determined integrated color value can reflect the real color effect at the outer side edge of the corresponding original image in the exceptional color-taking image, and when the integrated color value is used for playing the light effect, more realistic light effect can be obtained at the corresponding position of the display picture of the atmosphere lamp device.
On the basis of any embodiment of the method of the present application, according to the layout configuration information, the grouping of the plurality of light emitting units in the atmosphere lamp device according to the frame partition layout, and after independently setting a corresponding lamp group for each external side of each original image obtained by dividing each color-taking image, the method further includes:
and step S5400, taking the color-taking image at any non-corner position of the target picture as a conventional color-taking image, and setting the luminous color value of the luminous unit in the lamp group corresponding to the outer side of the original picture obtained by dividing the conventional color-taking image according to the full picture of the conventional color-taking image.
For other color-taking images located at non-corner positions of the target picture, since there is only one outside edge of the original image obtained by dividing the image, the image is named as a regular color-taking image, different from the exceptional color-taking image. For a conventional color-taking image, only a comprehensive color value is required to be determined for a single lamp group corresponding to the outer side edge of a single original image, and then the luminous color value of a luminous unit in the lamp group is determined according to the comprehensive color value.
The determination of the composite color value of the outer side of the artwork from the conventional color-taking image may be determined in any of the various ways disclosed hereinabove, for example:
in one embodiment, the average value may be obtained according to the color values of all pixels corresponding to the full image of the conventional color-taking image, and the average value is used as a comprehensive color value to determine the luminous color value of the luminous units in the corresponding lamp group.
In another embodiment, the weights matched by the averages may be weighted and summed in a manner disclosed above for the average matching weights of the color values of the pixels of each row parallel to the outer side of the original image, so that the weights matched by the averages are in a weight decreasing relationship from the outer side to the inner side, and the sum of the weights of all the averages is 1, which shows that the higher the weight obtained by the average of the color values of the pixels closer to the outer side of the original image is, so that the corresponding luminous color value can be determined.
In an embodiment for balancing the combined effect of the exceptional color-taking image and the conventional color-taking image, the exceptional color-taking image and the conventional color-taking image are both determined by adopting the same algorithm, specifically, the method disclosed in the foregoing may be implemented by carrying out weighted summation on the average matching weights of the color values of the pixels in each row, so that when the determined overall color values control the light-emitting units in the light groups at the corresponding unit frames to play the light effects, the overall effect is more coordinated and softer, and the light transition effect between the light groups on four sides of the display is more natural.
Therefore, when the comprehensive color value is determined according to the conventional color-taking image, as the conventional color-taking image only has one external side edge of the original image obtained by segmentation, no complex processing is needed, the corresponding comprehensive color value can be obtained by simply averaging or weighted averaging according to the color values of all pixels in the whole image, the calculated amount is small, the operation is rapid, and a plurality of conventional color-taking images can be processed at high speed in parallel by means of the same type of threads, so that the method is particularly suitable for embedded chip processing.
On the basis of any embodiment of the method of the present application, please refer to fig. 10, wherein a color-taking image at any non-corner position of the target picture is used as a conventional color-taking image, and the setting of the luminous color value of the luminous unit in the lamp group corresponding to the external side of the original image obtained by dividing the conventional color-taking image according to all images of the conventional color-taking image comprises:
Step S5410, filtering the darkness pixel set based on the full image of the conventional color-taking image to obtain an effective pixel set;
in the main image content of the target image, a large number of black pixels are sometimes generated due to the existence of a part of black objects, and when the black pixels are concentrated in a conventional color-taking image, if the comprehensive color value is directly determined according to the image content of the conventional color-taking image so as to determine the luminous color value of the luminous unit in the lamp group, the luminous effect may be excessively dim when the lamp effect is played, and the expected effect cannot be achieved. In this case, according to the present embodiment, the pixel filtering process may be performed on the conventional color-taking image first.
Specifically, a darkness threshold value can be preset, then full-image traversal is performed on a conventional color-taking image, pixels with color values lower than the darkness threshold value are marked as darkness pixels, pixels with color values exceeding the darkness threshold value are marked as effective pixels, and a darkness pixel set and an effective pixel set are respectively obtained. The darkness threshold is an empirical threshold for measuring whether the color value of the pixel reaches the expected corresponding threshold, for example, for the color values represented by the three primary colors of red, green and blue, the darkness threshold corresponding to the three primary colors can be set to be RGB (10, 10, 10), and when the color value of one primary color in the color value of the pixel is lower than the color value of the corresponding primary color in the darkness threshold, the pixel can be determined to be a darkness pixel, otherwise the pixel is a valid pixel. Of course, the decision condition may be flexibly changed, for example, it may be set that when the color value of more than two primary colors in the color values of the pixels is lower than the color value of the corresponding primary color in the false dark threshold value, the pixel is determined to be a dark pixel, and otherwise, the pixel is set to be a valid pixel.
Therefore, through the above process, the pixels which can cause the dim lamp effect in the conventional color-taking image are effectively identified, and the effective pixels can be obtained after the pixels are removed, and the data set formed by the effective pixels is the effective pixel set.
Step S5420, calculating the average value of the color values of all the effective pixels based on the effective pixel set;
on the basis of the effective pixel set, in order to simplify operation and improve operation efficiency, the color values of all the effective pixels can be directly calculated to be simple arithmetic average, and corresponding average values can be obtained. Of course, other embodiments disclosed above, such as the manner of determining the composite color value by performing the matching weight weighted summation on each row of pixels disclosed above, may be substituted.
Step S5430, setting the average value to be the light-emitting color value of the light-emitting unit in the light group corresponding to the external side of the original image obtained by the conventional color-taking image segmentation.
The average value determined based on the effective pixel set of the conventional color-taking image is used as the comprehensive color value, so that the average value can be used as the luminous color value of the luminous unit in the lamp group corresponding to the outer side of the original image obtained by dividing the conventional color-taking image.
According to the above embodiment, in the present application, when determining the light emitting color value of the corresponding light group by using the conventional color capturing image, dark light pixels in the image are removed first, and after effective pixels remain, the light emitting color value is determined according to the color value of the effective pixels, so that the brightness of the light is prevented from being lowered by black objects in the image content, and the emitted light effect is ensured to be more bright and colorful.
On the basis of any embodiment of the method, when the luminous color value of the luminous unit in the corresponding lamp group is determined by utilizing the comprehensive color value, various modes can be adopted, for example, the comprehensive color value can be directly used as the luminous color value of each corresponding luminous unit in an assigned mode, or the luminous color value of the luminous unit in the center of the lamp group can be set to be the comprehensive color value on the basis of the corresponding comprehensive color value of the lamp group, and the luminous color value of the luminous unit at the two sides of the central luminous unit can be adjusted by utilizing the corresponding comprehensive color value of the adjacent lamp group at the corresponding side to obtain the luminous color value of each luminous unit at the corresponding side, so that the luminous color of the central luminous unit of the current lamp group is the color represented by the comprehensive color value, and the luminous color of the luminous units at the two sides of the current lamp group gradually transits to the color represented by the corresponding comprehensive color value of the lamp group at the two sides of the current lamp group.
Referring to fig. 11, another embodiment of the present application further provides a corner color extraction device for an atmosphere lamp device, which includes an image segmentation module 5100, a grouping mapping module 5200, and a corner color extraction module 5300, where the image segmentation module 5100 is configured to perform region segmentation on a target picture according to a frame partition layout according to layout configuration information for representing the frame partition layout, so as to obtain a plurality of color extraction images distributed around outer sides of original pictures of the target picture; the grouping mapping module 5200 is configured to group the plurality of light emitting units in the atmosphere lamp device according to the layout configuration information, and independently set a corresponding lamp group for the outer side of each original image obtained by dividing each color-taking image; the corner color extraction module 5300 is configured to set, as an exceptional color extraction image, a color extraction image located at an arbitrary target corner position of the target image, and set a light emission color value of a light emitting unit in a light group corresponding to an external side of the arbitrary original image according to a partial image covering the external side of the arbitrary original image obtained by dividing the exceptional color extraction image.
On the basis of any embodiment of the apparatus of the present application, before the operation of the image segmentation module 5100, the corner color-taking apparatus of the atmosphere lamp device of the present application further includes: the image acquisition module is used for acquiring an interface image of the terminal equipment; a black band removal module configured to identify an edge black band located on an outer side of the interface image; and the black tape clipping module is used for clipping and removing the edge black tape from the interface image to obtain a target picture.
On the basis of any embodiment of the device of the present application, the corner color taking module 5300 includes: the side edge determining unit is used for determining the outer side edges of the two original pictures obtained by the exceptional color-taking image segmentation and the corresponding lamp groups of the two original pictures; the color value analysis unit is used for respectively determining comprehensive color values of partial images correspondingly covering the outer sides of the original pictures for the two outer sides of the original pictures in the exceptional color-taking images, wherein the two partial images have coincident images at the positions of the target corners; and the color mapping unit is used for setting the comprehensive color value obtained by each external side of the original image as the luminous color value of the lamp group corresponding to the external side of the original image.
On the basis of any embodiment of the device of the present application, the color value analysis unit includes: the primitive dividing subunit is arranged for equally dividing the exceptional color-taking image according to the longitudinal direction and the transverse direction to obtain a plurality of primitives; a region construction subunit, configured to determine, for each of the original image outer sides, that each primitive covering the original image outer side is constructed as a partial image belonging to the same region; and the color value determining subunit is used for determining the average value of the color values of all pixels in the same region as the comprehensive color value of the corresponding local image of the region.
On the basis of any embodiment of the device of the present application, the color value analysis unit includes: the line-by-line evaluation subunit is arranged for calculating the average value of the color values of each row of pixels parallel to the axis in the local image by taking the external side of the original image as the axis for the local image corresponding to the external side of each original image; and the weighted summation subunit is configured to perform weighted summation on the average value of the color values of each row of pixels according to the manner of gradually reducing the edge weight towards the outer side of the original image so as to obtain a comprehensive color value.
On the basis of any embodiment of the apparatus of the present application, the corner color taking module 5300 is further provided with: the middle section color taking module is used for taking a color taking image positioned at any non-corner position of the target picture as a conventional color taking image, and setting the luminous color value of the luminous unit in the lamp group corresponding to the outer side edge of the original picture obtained by dividing the conventional color taking image according to the full picture of the conventional color taking image.
On the basis of any embodiment of the device, the middle section color taking module comprises: the dark light filtering unit is arranged to filter a dark light pixel set in the normal color-taking image based on the full image of the normal color-taking image to obtain an effective pixel set; the color value average unit is set to calculate the average value of the color values of all the effective pixels based on the effective pixel set; the color value setting unit is used for setting the average value as the luminous color value of the luminous units in the lamp group corresponding to the outer side edge of the original image obtained by dividing the conventional color-taking image.
On the basis of any embodiment of the present application, referring to fig. 12, another embodiment of the present application further provides a computer device, which may be used as a controller in an atmosphere lamp device, and an internal structure of the computer device is shown in fig. 12. The computer device includes a processor, a computer readable storage medium, a memory, and a network interface connected by a system bus. The computer readable storage medium of the computer device stores an operating system, a database and computer readable instructions, the database can store a control information sequence, and when the computer readable instructions are executed by a processor, the processor can realize an atmosphere lamp device corner color-taking method. The processor of the computer device is used to provide computing and control capabilities, supporting the operation of the entire computer device. The memory of the computer device may store computer readable instructions that, when executed by the processor, cause the processor to perform the corner color extraction method of the mood light device of the present application. The network interface of the computer device is for communicating with a terminal connection. It will be appreciated by those skilled in the art that the structure shown in FIG. 12 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
The processor in this embodiment is configured to execute specific functions of each module and its sub-module in fig. 11, and the memory stores program codes and various data required for executing the above-mentioned modules or sub-modules. The network interface is used for data transmission between the user terminal or the server. The memory in this embodiment stores program codes and data required for executing all modules/sub-modules in the corner color-taking device for an atmosphere lamp apparatus according to the present application, and the server can call the program codes and data of the server to execute the functions of all the sub-modules.
The present application also provides a storage medium storing computer readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the corner color extraction method of the ambient light device according to any of the embodiments of the present application.
The application also provides a computer program product comprising computer programs/instructions which when executed by one or more processors implement the steps of the corner color extraction method of the ambient light device according to any of the embodiments of the application.
Those skilled in the art will appreciate that all or part of the processes implementing the methods of the above embodiments of the present application may be implemented by a computer program for instructing relevant hardware, where the computer program may be stored on a computer readable storage medium, where the program, when executed, may include processes implementing the embodiments of the methods described above. The storage medium may be a computer readable storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a random access Memory (Random Access Memory, RAM).
The foregoing is only a partial embodiment of the present application, and it should be noted that it will be apparent to those skilled in the art that modifications and adaptations can be made without departing from the principles of the present application, and such modifications and adaptations are intended to be comprehended within the scope of the present application.
In summary, when the luminous color values of the lamp groups corresponding to the corner positions of the target picture are determined, the lamp groups are more accurate and fine, the lamp effect played by the atmosphere lamp equipment is enabled to be more similar to the real effect of the target picture, and the lamplight atmosphere with more immersion sense is created.
Claims (10)
1. The corner color-taking method of the atmosphere lamp equipment is characterized by comprising the following steps of:
according to layout configuration information for representing the picture partition layout, carrying out region segmentation on a target picture according to the picture partition layout to obtain a plurality of color-taking images distributed around the outer side edges of all original pictures of the target picture;
according to the layout configuration information, grouping a plurality of light emitting units in the atmosphere lamp equipment according to the picture partition layout, and independently setting corresponding lamp groups for the outer side of each original picture obtained by dividing each color-taking image;
and taking the color-taking image positioned at any target corner position of the target picture as an exceptional color-taking image, and setting the luminous color value of the luminous unit in the lamp group corresponding to the external side of any original picture according to the partial image covering the external side of the original picture obtained by dividing the exceptional color-taking image.
2. The method for color extraction of corners of an atmosphere lamp device according to claim 1, wherein before dividing a target picture into areas according to a frame partition layout according to layout configuration information for representing the frame partition layout, the method comprises:
acquiring an interface image of terminal equipment;
identifying an edge black band located on the outer side of the interface image;
and cutting out the edge black bands from the interface image to obtain a target picture.
3. The method according to claim 1, wherein setting the emission color value of the light emitting unit in the lamp group corresponding to the outer side of the arbitrary artwork based on the partial image covering the outer side of the arbitrary artwork obtained by dividing the exceptional color-taking image at the arbitrary target corner position of the target picture as the exceptional color-taking image, comprises:
determining the outer sides of the two original pictures obtained by the exceptional color-taking image segmentation and the corresponding lamp groups of the two original pictures;
respectively determining comprehensive color values of partial images correspondingly covering the outer sides of the original pictures for the outer sides of the two original pictures in the exceptional color-taking images, wherein the two partial images have coincident images at the positions of the target corners;
And setting the comprehensive color value obtained by each corresponding external side of the original image as the luminous color value of the lamp group corresponding to the external side of the original image.
4. A corner color extraction method of an atmosphere lamp device according to claim 3, wherein the determining, in the exception color extraction image, for the two artwork outer sides, respectively, the comprehensive color value of the partial image corresponding to the outer side of the artwork comprises:
equally dividing the exceptional color-taking image according to the longitudinal direction and the transverse direction to obtain a plurality of primitives;
determining each primitive covering the outer side edge of the original image to construct a local image belonging to the same image area aiming at each outer side edge of the original image;
and determining the average value of the color values of all pixels in the same region as the comprehensive color value of the local image corresponding to the region.
5. A corner color extraction method of an atmosphere lamp device according to claim 3, wherein determining, in the exception color extraction image, for the two artwork outer sides, respectively, a comprehensive color value of a partial image corresponding to cover the artwork outer sides, comprises:
calculating the average value of the color values of each row of pixels parallel to the axis in the local image by taking the external side of the original image as the axis for the local image corresponding to the external side of each original image;
And carrying out weighted summation on the average value of the color values of each row of pixels according to the mode of gradually reducing the edge weight to the outer side of the original image, so as to obtain the comprehensive color value.
6. The method for color extraction of corners of an atmosphere lamp device according to any one of claims 1 to 5, wherein after grouping a plurality of light emitting units in the atmosphere lamp device according to the frame partition layout according to the layout configuration information, setting a corresponding lamp group for each external side of each original image obtained by dividing each color extraction image independently, further comprising:
and taking the color-taking image positioned at any non-corner position of the target picture as a conventional color-taking image, and setting the luminous color value of the luminous unit in the lamp group corresponding to the outer side edge of the original picture obtained by dividing the conventional color-taking image according to the full picture of the conventional color-taking image.
7. The method according to claim 6, wherein setting the color value of the light emission of the light emitting unit in the light group corresponding to the outer side of the original image obtained by dividing the conventional color taking image is performed by using the color taking image located at any non-corner position of the target image as the conventional color taking image, based on all the images of the conventional color taking image, and comprises:
Filtering a dark light pixel set in the full image based on the conventional color-taking image to obtain an effective pixel set;
calculating the average value of the color values of all the effective pixels based on the effective pixel set;
and setting the average value as the luminous color value of the luminous units in the lamp group corresponding to the outer side edge of the original image obtained by dividing the conventional color-taking image.
8. The utility model provides an atmosphere lamp equipment corner device of getting color which characterized in that includes:
the image segmentation module is used for carrying out region segmentation on the target picture according to the layout configuration information for representing the picture partition layout to obtain a plurality of color taking images distributed around the outer side of each original picture of the target picture;
the grouping mapping module is used for grouping the plurality of light emitting units in the atmosphere lamp equipment according to the layout configuration information and the frame partition layout, and independently setting corresponding lamp groups for the outer side of each original picture obtained by dividing each color-taking image;
the corner color taking module is used for taking a color taking image positioned at any target corner position of the target picture as an exceptional color taking image, and setting the luminous color value of the luminous unit in the lamp group corresponding to the external side of any original picture according to the partial image covering the external side of the original picture obtained by dividing the exceptional color taking image.
9. An atmosphere lamp device comprising a central processor and a memory, characterized in that the central processor is adapted to invoke a computer program stored in the memory for performing the steps of the method according to any of claims 1 to 7.
10. A non-transitory readable storage medium, characterized in that it stores a computer program in the form of computer readable instructions, which when invoked by a computer to run, performs the steps of the method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311472363.0A CN117202447B (en) | 2023-11-07 | 2023-11-07 | Atmosphere lamp equipment, corner color taking method thereof, corresponding device and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311472363.0A CN117202447B (en) | 2023-11-07 | 2023-11-07 | Atmosphere lamp equipment, corner color taking method thereof, corresponding device and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117202447A true CN117202447A (en) | 2023-12-08 |
CN117202447B CN117202447B (en) | 2024-01-05 |
Family
ID=88990978
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311472363.0A Active CN117202447B (en) | 2023-11-07 | 2023-11-07 | Atmosphere lamp equipment, corner color taking method thereof, corresponding device and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117202447B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117521179A (en) * | 2024-01-04 | 2024-02-06 | 深圳市智岩科技有限公司 | Atmosphere lamp equipment, luminous partition layout construction method and device and computer equipment |
CN117528873A (en) * | 2024-01-04 | 2024-02-06 | 深圳市智岩科技有限公司 | Atmosphere lamp equipment, luminous partition layout generation method and device and computer equipment |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2013080836A1 (en) * | 2011-11-30 | 2013-06-06 | パナソニック株式会社 | Light-emitting device |
WO2018110056A1 (en) * | 2016-12-14 | 2018-06-21 | シャープ株式会社 | Light source control device, display device, image processing device, method for controlling light source control device, and control program |
CN215345144U (en) * | 2021-07-09 | 2021-12-28 | 杭州加减智能科技有限公司 | Multifunctional television atmosphere lamp |
CN115134972A (en) * | 2022-07-20 | 2022-09-30 | 杭州涂鸦信息技术有限公司 | Illumination control method, device, equipment and storage medium based on environment color extraction |
CN115512340A (en) * | 2022-07-06 | 2022-12-23 | 支付宝(杭州)信息技术有限公司 | Intention detection method and device based on picture |
CN115776750A (en) * | 2022-11-30 | 2023-03-10 | 深圳市千岩科技有限公司 | Lamp effect control method, device, product, medium and lamp effect control equipment |
WO2023040431A1 (en) * | 2021-09-15 | 2023-03-23 | 华为技术有限公司 | Tone mapping method, device and system |
CN116761310A (en) * | 2023-06-20 | 2023-09-15 | 上海庆科信息技术有限公司 | Lamp strip control method and device, storage medium and electronic device |
-
2023
- 2023-11-07 CN CN202311472363.0A patent/CN117202447B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2013080836A1 (en) * | 2011-11-30 | 2013-06-06 | パナソニック株式会社 | Light-emitting device |
WO2018110056A1 (en) * | 2016-12-14 | 2018-06-21 | シャープ株式会社 | Light source control device, display device, image processing device, method for controlling light source control device, and control program |
CN215345144U (en) * | 2021-07-09 | 2021-12-28 | 杭州加减智能科技有限公司 | Multifunctional television atmosphere lamp |
WO2023040431A1 (en) * | 2021-09-15 | 2023-03-23 | 华为技术有限公司 | Tone mapping method, device and system |
CN115512340A (en) * | 2022-07-06 | 2022-12-23 | 支付宝(杭州)信息技术有限公司 | Intention detection method and device based on picture |
CN115134972A (en) * | 2022-07-20 | 2022-09-30 | 杭州涂鸦信息技术有限公司 | Illumination control method, device, equipment and storage medium based on environment color extraction |
CN115776750A (en) * | 2022-11-30 | 2023-03-10 | 深圳市千岩科技有限公司 | Lamp effect control method, device, product, medium and lamp effect control equipment |
CN116761310A (en) * | 2023-06-20 | 2023-09-15 | 上海庆科信息技术有限公司 | Lamp strip control method and device, storage medium and electronic device |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117521179A (en) * | 2024-01-04 | 2024-02-06 | 深圳市智岩科技有限公司 | Atmosphere lamp equipment, luminous partition layout construction method and device and computer equipment |
CN117528873A (en) * | 2024-01-04 | 2024-02-06 | 深圳市智岩科技有限公司 | Atmosphere lamp equipment, luminous partition layout generation method and device and computer equipment |
CN117528873B (en) * | 2024-01-04 | 2024-04-02 | 深圳市智岩科技有限公司 | Atmosphere lamp equipment, luminous partition layout generation method and device and computer equipment |
CN117521179B (en) * | 2024-01-04 | 2024-04-19 | 深圳市智岩科技有限公司 | Atmosphere lamp equipment, luminous partition layout construction method and device and computer equipment |
Also Published As
Publication number | Publication date |
---|---|
CN117202447B (en) | 2024-01-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN117202447B (en) | Atmosphere lamp equipment, corner color taking method thereof, corresponding device and medium | |
CN117202451B (en) | Atmosphere lamp equipment, and light-emitting control method, device and medium thereof | |
CN108876931B (en) | Three-dimensional object color adjustment method and device, computer equipment and computer readable storage medium | |
US9953556B2 (en) | Color correction method for optical see-through displays | |
CN112116692B (en) | Model rendering method, device and equipment | |
RU2450476C2 (en) | Device and method to determine optimal backlighting | |
CN117197261A (en) | Atmosphere lamp equipment, color taking method thereof, corresponding device and medium | |
CN110248242B (en) | Image processing and live broadcasting method, device, equipment and storage medium | |
CN107087150B (en) | A kind of three-dimensional camera shooting method, system and device based on binocular solid and photometric stereo | |
CN117412449B (en) | Atmosphere lamp equipment, lamp effect playing control method thereof, and corresponding device and medium | |
CN107249109A (en) | Image sensor, camera module and electronic installation | |
CN110335273A (en) | Detection method, detection device, electronic equipment and medium | |
CN113052923B (en) | Tone mapping method, tone mapping apparatus, electronic device, and storage medium | |
CN113191988B (en) | Brightness correction method and device, storage medium and electronic device | |
CN111667800A (en) | Image display parameter adjusting method and device, storage medium and terminal | |
CN111145138A (en) | Detection method, device and equipment of LED lamp panel and storage medium | |
CN113597061A (en) | Method, apparatus and computer readable storage medium for controlling a magic color light strip | |
CN114340102A (en) | Lamp strip control method and device, display equipment and system and storage medium | |
CN105976423B (en) | A kind of generation method and device of Lens Flare | |
CN115587948A (en) | Image dark field correction method and device | |
US20210199498A1 (en) | A method of measuring illumination, corresponding system, computer program product and use | |
CN117412452B (en) | Atmosphere lamp equipment, color matching method thereof, corresponding device and medium | |
CN117412451B (en) | Atmosphere lamp equipment, mapping color matching method thereof, corresponding device and medium | |
KR100614739B1 (en) | Interactive 3D spatial light illumination method and system | |
CN117412450A (en) | Atmosphere lamp equipment, lamp effect color matching method thereof, corresponding device and medium |
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 |