Control method and device of light source equipment, control equipment and computer program
By obtaining the levels of registers and input channels, determining the level of the output channel to control the light source device, the problem of low control flexibility of light source device in the prior art is solved, and higher control flexibility is achieved.
Patent Information
- Application Number
- CN202411823272.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-03-28
AI Technical Summary
The existing light source equipment control methods have low flexibility, and usually only one fixed control method can be used for RGB channel control.
By obtaining the level of the register and the level of the multiple input channel, the level of the multiple output channel is determined, thereby controlling the light source device for lighting or projection. This method can determine the control method of the light source device according to the level of the register, and supports the use of two or more methods for control.
The flexibility of controlling the light source device is improved, so that a variety of methods can be used to control the light source device, which is more flexible than the prior art.
Smart Images

Figure CN119729942A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of programmable digital light source control, and in particular, relates to a control method, device, control device and computer program for a light source device. Background Art
[0002] In the current control methods of light source devices, usually one light source device can only use one fixed control method to perform RGB (red, green and blue) channel control.
[0003] For example, in a display system, an RGB (red, green, and blue) light source is a common light source including a red light, a green light, and a blue light. There are generally two control methods for the RGB light source, one of which is to control the three lights in the RGB light source respectively by the levels corresponding to the three input channels, for example, the level of the first input channel is used to control the red light, the level of the second input channel is used to control the green light, and the level of the third input channel is used to control the blue light; the other is to control the three lights in the RGB light source respectively by the levels corresponding to the two input channels, for example, if the first input channel is at a high level and the second input channel is at a low level, the red light is controlled, if the first input channel is at a low level and the second input channel is at a high level, the green light is controlled, if the first input channel and the second input channel are both at a high level, the blue light is controlled, and if the first input channel and the second input channel are both at a low level, no control is performed. At present, common light source devices only use one of the control methods for fixing RGB light sources (such as some DLP projection systems use the second method), thereby reducing the flexibility of controlling the light source device. Summary of the invention
[0004] In view of this, embodiments of the present application provide a control method, an apparatus, a control device, and a storage medium for a light source device to solve the technical problem of low flexibility in the existing control of light source devices.
[0005] In a first aspect, an embodiment of the present application provides a method for controlling a light source device, including:
[0006] Acquire a first level of a first register and second levels of each of the multiple input channels;
[0007] Determining a third level for each of the multiple output channels according to the first level and the second levels for each of the multiple input channels;
[0008] According to the third levels of the multiple output channels, the light source device is controlled to perform lighting or projection.
[0009] Optionally, determining the third level of each of the multiple output channels according to the first level and the second levels of each of the multiple input channels includes:
[0010] If the first level is in the first state, determining the third level of each of the multiple output channels according to the second level of each of the multiple input channels;
[0011] If the first level is in the second state, the third level of each of the multiple output channels is determined according to the second level of each of some input channels among the multiple input channels.
[0012] Optionally, the multiple input channels include a first input channel, a second input channel, and a third input channel, and the multiple output channels include a first output channel, a second output channel, and a third output channel; and determining the third levels of the multiple output channels according to the second levels of some of the input channels in the multiple input channels comprises:
[0013] If the second level of the first input channel and the second level of the second input channel are both low levels, determining that the third levels of the multiple output channels are all low levels;
[0014] If the second level of the first input channel is a high level, and the second level of the second input channel is a low level, then determining that the third level of the first output channel is a high level, and determining that the third level of the second output channel and the third level of the third output channel are low levels;
[0015] If the second level of the first input channel is a low level, and the second level of the second input channel is a high level, then determining that the third level of the second output channel is a high level, and determining that the third level of the first output channel and the third level of the third output channel are low levels;
[0016] If the second level of the first input channel and the second level of the second input channel are both high levels, the third level of the third output channel is determined to be high, and the third level of the first output channel and the third level of the second output channel are determined to be low levels.
[0017] Optionally, determining the third level of each of the multiple output channels according to the first level and the second levels of each of the multiple input channels includes:
[0018] obtaining a fourth level of the second register;
[0019] If the fourth level is in the third state, determining the third level of each of the multiple output channels according to the first level and the second level of each of the multiple input channels;
[0020] If the fourth level is in the fourth state, the third levels of the multiple output channels are determined to be the corresponding preset levels.
[0021] Optionally, determining the third level of each of the multiple output channels according to the first level and the second levels of each of the multiple input channels includes:
[0022] Get the fifth level of the third register;
[0023] If the fifth level is in the fifth state, determining the third level of each of the multiple output channels according to the second level of each of the multiple input channels according to the first channel correspondence relationship; the first channel correspondence relationship is used to describe the correspondence between the multiple input channels and the multiple output channels;
[0024] If the fifth level is in the sixth state, the third levels of the multiple output channels are determined according to the second channel correspondence relationship based on the second levels of the multiple input channels; the second channel correspondence relationship is used to describe the correspondence relationship between the multiple input channels and the multiple output channels, and the first channel correspondence relationship and the second channel correspondence relationship are not exactly the same.
[0025] Optionally, also include:
[0026] Obtaining the sixth level of the fourth register;
[0027] According to the sixth level, an enable signal is sent to the multiple output channels.
[0028] Optionally, determining the third level of each of the multiple output channels according to the first level and the second levels of each of the multiple input channels includes:
[0029] The third level of each of the multiple output channels is controlled according to the first level of the first register, the second level corresponding to each of the multiple input channels, the fourth level of the second register, the fifth level of the third register and the sixth level of the fourth register.
[0030] In a second aspect, an embodiment of the present application provides a control device for a light source device, comprising:
[0031] A first acquisition unit, used for acquiring a first level of a first register and second levels of each of the multiple input channels;
[0032] A first determining unit, configured to determine a third level of each of the multiple output channels according to the first level and the second levels of each of the multiple input channels;
[0033] The first control unit is used to control the light source device to perform lighting or projection according to the third levels of each of the multiple output channels.
[0034] In a third aspect, an embodiment of the present application provides a control device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, each step in the method for controlling a light source device as described in any one of the first aspects above is implemented.
[0035] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements each step in the method for controlling a light source device as described in any one of the first aspects above.
[0036] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the terminal device executes each step in the method for controlling a light source device as described in any one of the first aspects above.
[0037] The control method, device, control device and computer program of the light source device provided in the embodiments of the present application have the following beneficial effects:
[0038] In the control method of the light source device provided in the embodiment of the present application, the first level of the first register and the second level of each of the multiple input channels are first obtained, and then the third level of each of the multiple output channels is determined according to the first level and the second level of each of the multiple input channels, and finally the light source device is controlled to perform lighting according to the third level of each of the multiple output channels. The method of the present application can determine the control method of the light source device according to the level of the register, so two or more methods can be used to control the light source device. Compared with the existing technology that can only use one fixed control method for control, the method of the present application improves the flexibility of controlling the light source device. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0040] Figure 1 A flowchart of a control method for a light source device provided in an embodiment of the present application;
[0041] Figure 2 A schematic diagram of the structure of a control device for a light source device provided in an embodiment of the present application;
[0042] Figure 3 A schematic diagram of the structure of a control device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] It should be noted that the terms used in the embodiments of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application. In the description of the embodiments of the present application, unless otherwise specified, "multiple" refers to two or more than two, and "at least one", "one or more" refers to one, two or more. The terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, it is defined that the "first" and "second" features can explicitly or implicitly include one or more of the features.
[0044] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear at different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0045] The execution subject of the control method of the light source device provided in the embodiment of the present application may be a control device of the light source device.
[0046] The control method of the light source device provided in the embodiment of the present application can be applied to various application scenarios where the light source device needs to be controlled. Specifically, when the user needs to improve the flexibility of controlling the light source device, the various steps of the control method of the light source device provided in the embodiment of the present application can be performed by the control device of the light source device, so that the light source device can be controlled using two or more methods, thereby improving the flexibility of controlling the light source device.
[0047] See also Figure 1 , Figure 1 This is a flowchart of a control method for a light source device provided in an embodiment of the present application. The control method for the light source device may include S101 to S103, which are described in detail as follows:
[0048] In S101 , a first level of a first register and second levels of each of a plurality of input channels are acquired.
[0049] In the embodiment of the present application, when it is necessary to control the light source device, the control device may first obtain the first level of the first register and the second levels of each of the multiple input channels.
[0050] In an optional implementation, the light source device may include multiple input channels, multiple output channels, and multiple lights of different colors, wherein the second level of the multiple input channels may be used to control the third level of the multiple output channels, and the third level of each output channel is used to control a light of a corresponding color. Specifically, the multiple input channels may include a first input channel, a second input channel, and a third input channel; the multiple output channels may include a first output channel, a second output channel, and a third output channel; the third level of the first output channel may be used to control a red light, the third level of the second output channel may be used to control a green light, and the third level of the third output channel may be used to control a blue light.
[0051] Wherein, the first level of the first register can be used to determine a specific method for controlling the third level of multiple output channels by the second level of multiple input channels. Exemplarily, when the first level of the first register is in the first state, the control device can determine the third level of each of the multiple output channels according to the second level of each of the multiple input channels, that is, the control device can determine the third level of each of the first output channel, the second output channel, and the third output channel according to the second level of each of the first input channel, the second input channel, and the third input channel; when the first level of the first register is in the second state, the control device can determine the third level of each of the multiple output channels according to the second level of each of some input channels in the multiple input channels, that is, the control device can determine the third level of each of the first output channel, the second output channel, and the third output channel according to the second level of each of the first output channel and the second output channel.
[0052] In S102, a third level of each of the multiple output channels is determined according to the first level and the second levels of each of the multiple input channels.
[0053] In the embodiment of the present application, after acquiring the first level of the first register and the second levels of the multiple input channels, the control device may determine the third levels of the multiple output channels according to the first level and the second levels of the multiple input channels.
[0054] Specifically, if the first level acquired by the control device is in the first state, the control device may determine the third level of each of the multiple output channels according to the second level of each of the multiple input channels. Exemplarily, the first state may be a low level.
[0055] More specifically, the control device can determine the third level of the first output channel according to the second level of the first input channel, and can determine the third level of the second output channel according to the second level of the second input channel, and can determine the third level of the third output channel according to the second level of the third input channel.
[0056] Specifically, if the first level acquired by the control device is in the second state, the control device may determine the third level of each of the multiple output channels according to the second level of each of some of the multiple input channels. Exemplarily, the second state may be a high level.
[0057] More specifically, if the second level of the first input channel and the second level of the second input channel are both low levels, it is determined that the third levels of the multiple output channels are all low levels; if the second level of the first input channel is high level, and the second level of the second input channel is low level, it is determined that the third level of the first output channel is high level, and the third level of the second output channel and the third level of the third output channel are low levels; if the second level of the first input channel is low level, and the second level of the second input channel is high level, it is determined that the third level of the second output channel is high level, and the third level of the first output channel and the third level of the third output channel are low levels; if the second level of the first input channel and the second level of the second input channel are both high levels, it is determined that the third level of the third output channel is high level, and the third level of the first output channel and the third level of the second output channel are low levels.
[0058] In an optional implementation manner, the control device may acquire, in addition to acquiring the first level of the first register, the fourth level of the second register.
[0059] Among them, the fourth level of the second register can be used to determine a method for determining the third level of each output channel. Specifically, one method for determining the third level of each output channel is to determine it according to the second levels of multiple input channels, and another method for determining the third level of each output channel is to determine it according to a preset level.
[0060] Exemplarily, when the fourth level of the second register is in the third state, the third level of each output channel is determined according to the second level of the multiple input channels, wherein the specific method of determining the third level of each output channel by the second level of the multiple input channels can refer to the aforementioned part of the embodiment of the present application, which will not be repeated here; when the fourth level of the second register is in the fourth state, the third level of each output channel is determined according to the preset level, and exemplarily, when the fourth level of the second register is in the fourth state, the preset level of the first output channel is a high level, then the level of the first output channel will not be controlled by the second level of each input channel, but always maintains a high level. Exemplarily, the third state can be a low level, and the fourth state can be a high level.
[0061] Based on this, after the control device obtains the fourth level of the second register, if the fourth level is in the third state, the control device can determine the third level of each of the multiple output channels based on the first level and the second level of each of the multiple input channels; if the fourth level is in the fourth state, the control device can determine that the third level of each of the multiple output channels is the corresponding preset level.
[0062] In an optional implementation manner, the control device may acquire not only the first level of the first register but also the fifth level of the third register.
[0063] The fifth level of the third register may be used to determine the corresponding relationship between the multiple input channels and the multiple output channels.
[0064] Exemplarily, when the fifth level of the third register is in the fifth state, the correspondence between the multiple input channels and the multiple output channels may be a first channel correspondence, and when the fifth level of the third register is in the sixth state, the correspondence between the multiple input channels and the multiple output channels may be a second channel correspondence. The first channel correspondence and the second channel correspondence are respectively used to describe two different correspondences between the multiple input channels and the multiple output channels.
[0065] Exemplarily, if in the first channel correspondence, the first input channel corresponds to the first output channel (that is, the third level of the first output channel is determined according to the second level of the first input channel), the second input channel corresponds to the second output channel, and the third input channel corresponds to the third output channel, then the second channel correspondence may be that the three input channels all correspond to the same output channel. Exemplarily, if the first input channel, the second input channel, and the third input channel all correspond to the first output channel, the second output channel, or the third output channel, and exemplarily, if the first input channel, the second input channel, and the third input channel all correspond to the first output channel, then the third level of the first output channel may be determined according to the second levels of the first input channel, the second input channel, and the third input channel, respectively. It should be noted that the above examples are only used to illustrate that the first channel correspondence and the second channel correspondence are not exactly the same. In actual applications, the first channel correspondence and the second channel correspondence can be set according to actual needs.
[0066] Based on this, after the control device obtains the fifth level of the third register, if the fifth level is in the fifth state, the control device determines the third level of each of the multiple output channels according to the first channel correspondence and the second level of each of the multiple input channels; if the fifth level is in the sixth state, the control device determines the third level of each of the multiple output channels according to the second channel correspondence and the second level of each of the multiple input channels. Exemplarily, the fifth state may be a low level, and the sixth state may be a high level.
[0067] In an optional implementation manner, the control device may acquire, in addition to acquiring the first level of the first register, the sixth level of the fourth register.
[0068] The sixth level of the fourth register may be used to enable each output channel.
[0069] Exemplarily, the fourth register may include three fourth sub-registers, and the sixth level of each fourth sub-register is used to control the sending of an enable signal to one output channel. For example, when the sixth level of the fourth sub-register numbered 1 is high, the control device may send an enable signal to the first output channel to enable the first output channel, and when the sixth level of the fourth sub-register numbered 1 is low, the control device may not send an enable signal to the first output channel to put the first output channel in a closed state; when the sixth level of the fourth sub-register numbered 2 is high, the control device may send an enable signal to the second output channel to enable the second output channel, and when the sixth level of the fourth sub-register numbered 2 is low, the control device may not send an enable signal to the second output channel to put the second output channel in a closed state; when the sixth level of the fourth sub-register numbered 3 is high, the control device may send an enable signal to the third output channel to enable the third output channel, and when the sixth level of the fourth sub-register numbered 1 is low, the control device may not send an enable signal to the third output channel to put the third output channel in a closed state.
[0070] Based on this, after the control device obtains the sixth level of the fourth register, the control device may send an enable signal to the multiple output channels according to the sixth level.
[0071] In an optional implementation, in addition to obtaining the first level of the first register, the control device can also obtain the fourth level of the second register, the fifth level of the third register, and the sixth level of the fourth register. After obtaining the first level of the first register, the fourth level of the second register, the fifth level of the third register, and the sixth level of the fourth register, the control device can control the third level of each of the multiple output channels according to the first level of the first register, the second levels corresponding to each of the multiple input channels, the fourth level of the second register, the fifth level of the third register, and the sixth level of the fourth register.
[0072] In order to describe in more detail the specific method of controlling the third level of each of the multiple output channels according to the first level of the first register, the second levels corresponding to the multiple input channels, the fourth level of the second register, the fifth level of the third register, and the sixth level of the fourth register, two truth tables corresponding to the description of the present application are provided below and examples are given.
[0073] Truth Table 1
[0074]
[0075]
[0076] Truth Table 2
[0077]
[0078]
[0079] Taking the data corresponding to sequence number 2 in truth table 1 as an example, the first level of the first register, the fourth level of the second register, and the fifth level of the third register are all low levels, and the sixth level of the fourth register is used to enable the first output channel (R). Since the first level of the first register and the fifth level of the third register are both low levels, the first output channel corresponds to the first input channel. Since the fourth level of the second register is a low level, the third level of the first output channel is determined according to the second level of the first input channel, rather than according to the preset level. Therefore, the control device can determine the third level of the first output channel (R) according to the second level (X) of the first input channel (R).
[0080] Taking the data corresponding to sequence number 5 in truth table 1 as an example, the first level of the first register, the fourth level of the second register, and the fifth level of the third register are all low levels, and the sixth level of the fourth register is used to enable the first output channel (R) and the second output channel (G). Since the first level of the first register and the fifth level of the third register are both low levels, the first output channel corresponds to the first input channel, and the second output channel corresponds to the second input channel. Since the fourth level of the second register is a low level, the third level of the first output channel is determined according to the second level of the first input channel, and the third level of the second output channel is determined according to the second level of the second input channel, rather than according to the preset level. Therefore, the control device can determine the third level of the first output channel (R) according to the second level (X) of the first input channel (R), and can determine the third level of the second output channel (G) according to the second level (Y) of the second input channel (G).
[0081] Taking the data corresponding to sequence number 8 in truth table 1 as an example, the first level of the first register, the fourth level of the second register, and the fifth level of the third register are all low levels, and the sixth level of the fourth register is used to enable the first output channel (R), the second output channel (G), and the third output channel (B). Since the first level of the first register and the fifth level of the third register are both low levels, the first output channel corresponds to the first input channel, and the second output channel corresponds to the second input channel, and the second output channel corresponds to the second input channel. Since the fourth level of the second register is low, the first output channel is The third level is determined according to the second level of the first input channel, and the third level of the second output channel is determined according to the second level of the second input channel, and the third level of the third output channel is determined according to the second level of the third input channel, rather than according to the preset level. Therefore, the control device can determine the third level of the first output channel (R) according to the second level (X) of the first input channel (R), and can determine the third level of the second output channel (G) according to the second level (Y) of the second input channel (G), and can determine the third level of the third output channel (B) according to the second level (Z) of the third input channel (B).
[0082] Taking the data corresponding to sequence number 10 in truth table 1 as an example, the first level of the first register and the fourth level of the second register are both low levels, the fifth level of the third register is a high level, and the sixth level of the fourth register is used to enable the first output channel (R). The control device can determine the third level of the first output channel (R) according to the second level (X) of the first input channel, the second level (Y) of the second input channel, and the second level (Z) of the third input channel.
[0083] Taking the data corresponding to sequence number 16 in truth table 1 as an example, the first level of the first register and the fourth level of the second register are both low levels, the fifth level of the third register is high level, and the sixth level of the fourth register is used to enable the first output channel (R), to enable the second output channel (G), and to enable the third output channel (B). The control device can determine the third level of the first output channel (R) according to the second level (X) of the first input channel, the second level (Y) of the second input channel, and the second level (Z) of the third input channel, and can determine the third level of the second output channel (G) according to the second level (X) of the first input channel, the second level (Y) of the second input channel, and the second level (Z) of the third input channel, and can determine the third level of the three output channels (G) according to the second level (X) of the first input channel, the second level (Y) of the second input channel, and the second level (Z) of the third input channel.
[0084] Taking the data corresponding to sequence number 18 in truth table 1 as an example, the first level of the first register is a low level, the fourth level of the second register is a high level, and the sixth level of the fourth register is used to enable the first output channel (R). At this time, the third level of the first output channel (R) is fixed to a preset level (here, a high level is used as an example, but it can also be a low level), that is, no matter whether the second level (X) of the first input channel is a high level or a low level, the third level of the first output channel (R) is fixed to the preset level. It should be noted that when the fourth level of the second register is a high level, no matter whether the fifth level of the third register is a high level or a low level, the result is the same.
[0085] Taking the data corresponding to sequence number 24 in truth table 1 as an example, the first level of the first register is a low level, the fourth level of the second register is a high level, and the sixth level of the fourth register is used to enable the first output channel (R), and the sixth level of the fourth register is used to enable the second output channel (G), and the sixth level of the fourth register is used to enable the third output channel (B). At this time, the third level of the first output channel (R) is fixed to a preset level (here taking a high level as an example, of course it can also be a low level), the third level of the second output channel (G) is fixed to a preset level, and the third level of the third output channel (B) is fixed to a preset level.
[0086] Taking the data corresponding to sequence number 26 in truth table 2 as an example, the first level of the first register is a high level, the fourth level of the second register and the fifth level of the third register are low levels, and the sixth level of the fourth register is used to enable the first output channel (R). At this time, the second level (X) of the first input channel can be determined by the levels of LED0 and LED1. Specifically, when LED0 is a high level and LED1 is a low level, the second level (X) of the first input channel can be a high level.
[0087] Taking the data corresponding to the sequence number 32 in the truth table 2 as an example, the first level of the first register is a high level, the fourth level of the second register and the fifth level of the third register are low levels, and the sixth level of the fourth register is used to enable the first output channel (R), and the sixth level of the fourth register is used to enable the second output channel (G), and the sixth level of the fourth register is used to enable the third output channel (B). At this time, the control device can determine the second level (X) of the first input channel, the second level (Y) of the second input channel, and the second level (Z) of the third input channel through the levels of LED0 and LED1. Specifically, when LED0 is a high level and LED1 is a low level, the second level (X) of the first input channel can be a high level, when LED0 is a low level and LED1 is a high level, the second level (Y) of the second input channel can be a high level, and when LED0 and LED1 are both high levels, the second level (Z) of the third input channel can be a high level.
[0088] Taking the data corresponding to sequence number 40 in truth table 2 as an example, the first level of the first register and the fifth level of the third register are high levels, the fourth level of the second register is low, and the sixth level of the fourth register is used to enable the first output channel (R), and the sixth level of the fourth register is used to enable the second output channel (G), and the sixth level of the fourth register is used to enable the third output channel (B). At this time, the control device can determine the second level (X) of the first input channel, the second level (Y) of the second input channel, and the third output channel through the levels of LED0 and LED1. The third level of the first output channel (R) may be determined according to the second level (X) of the first input channel, the second level (Y) of the second input channel, and the second level (Z) of the third input channel, and the third level of the second output channel (G) may be determined according to the second level (X) of the first input channel, the second level (Y) of the second input channel, and the second level (Z) of the third input channel, and the third level of the third output channel (G) may be determined according to the second level (X) of the first input channel, the second level (Y) of the second input channel, and the second level (Z) of the third input channel.
[0089] Taking the data corresponding to sequence number 48 in truth table 2 as an example, the first level of the first register and the fourth level of the second register are high levels, and the sixth level of the fourth register is used to enable the first output channel (R), and the sixth level of the fourth register is used to enable the second output channel (G), and the sixth level of the fourth register is used to enable the third output channel (B). At this time, the third level of the first output channel (R) is fixed to a preset level (here taking a high level as an example, of course it can also be a low level), the third level of the second output channel (G) is fixed to a preset level, and the third level of the third output channel (B) is fixed to a preset level.
[0090] In S103, the light source device is controlled to perform lighting or projection according to the third levels of the multiple output channels.
[0091] In the embodiment of the present application, after determining the third level of each of the multiple output channels, the control device can control the light source device to perform lighting or projection according to the third level of each of the multiple output channels.
[0092] Specifically, the light source device may include a red light, a green light and a blue light, wherein the third level of the first output channel is used to control the red light, the third level of the second output channel is used to control the green light, and the third level of the third output channel is used to control the blue light.
[0093] Based on this, if the third level of the first output channel is determined to be a high level, the control device can control the red light to turn on, and if the third level of the first output channel is determined to be a low level, the control device can control the red light to turn off; if the third level of the second output channel is determined to be a high level, the control device can control the green light to turn on, and if the third level of the second output channel is determined to be a low level, the control device can control the green light to turn off; if the third level of the third output channel is determined to be a high level, the control device can control the blue light to turn on, and if the third level of the third output channel is determined to be a low level, the control device can control the blue light to turn off.
[0094] In order to better describe the advantages of the control method of the light source device provided in the present application, some application examples of the control method of the light source device provided in the embodiments of the present application are provided below.
[0095] The fourth level of the second register can be set to a high level, the first level of the first register and the fifth level of the third register can be set according to actual needs, and by controlling the sixth level of the fourth register to enable the three output channels at the same time, approximate white light can be mixed. At this time, the color temperature of the approximate white light can also be changed by adjusting the current. In addition, any two of the three output channels can be enabled by controlling the sixth level of the fourth register, thereby mixing an approximate cyan, yellow, and purple monochromatic constant current light source. Since the fourth level of the second register is set to a high level, these light sources are always on or always off, and the output of this light source will not be temporarily turned off when the frame is switched. The overall contrast will be slightly worse. However, it can replace an additional stroboscopic light source in industrial vision applications.
[0096] In addition, the fourth level of the second register can be set to a low level, and the fifth level of the third register can be set to a high level, the first level of the first register can be set according to actual needs, and the second channel correspondence can be set so that the first input channel, the second input channel and the third input channel all correspond to the second output channel, and the second output channel can be enabled separately by controlling the sixth level of the fourth register. At this time, when the first input channel, the second input channel and the third input channel are at a high level, the green light corresponding to the second output channel can be controlled to turn on, so the exposure duty cycle of the green light is approximately equal to 100%. Similarly, the red light and the blue light with an exposure duty cycle of approximately 100% can be obtained by a similar method.
[0097] It can be seen from the above that in the control method of the light source device provided in the embodiment of the present application, the first level of the first register and the second level of each of the multiple input channels are first obtained, and then the third level of each of the multiple output channels is determined according to the first level and the second level of each of the multiple input channels, and finally the light source device is controlled to perform lighting according to the third level of each of the multiple output channels. The method of the present application can determine the control method of the light source device according to the level of the register, so two or more methods can be used to control the light source device. Compared with the existing technology that can only use one fixed control method for control, the method of the present application improves the flexibility of controlling the light source device.
[0098] Based on the control method of the light source device provided in the above embodiment, the present application further provides a control device for the light source device implementing the above method embodiment. Figure 2 , Figure 2 This is a schematic diagram of the structure of a control device for a light source device provided in an embodiment of the present application. Figure 2 As shown, the control device 20 of the light source device may include: a first acquisition unit 21 , a first determination unit 22 and a first control unit 23 .
[0099] in:
[0100] The first acquisition unit 21 is used to acquire the first level of the first register and the second levels of each of the multiple input channels.
[0101] The first determining unit 22 is used for determining the third level of each of the multiple output channels according to the first level and the second level of each of the multiple input channels.
[0102] The first control unit 23 is used to control the light source device to perform lighting or projection according to the third levels of the multiple output channels.
[0103] Optionally, the first determining unit 22 is specifically configured to:
[0104] If the first level is in the first state, determining the third level of each of the multiple output channels according to the second level of each of the multiple input channels;
[0105] If the first level is in the second state, the third levels of the multiple output channels are determined according to the second levels of some input channels among the multiple input channels.
[0106] Optionally, the multiple input channels include a first input channel, a second input channel, and a third input channel, and the multiple output channels include a first output channel, a second output channel, and a third output channel; and the first determining unit 22 is specifically configured to:
[0107] If the second level of the first input channel and the second level of the second input channel are both low levels, determining that the third levels of the multiple output channels are both low levels;
[0108] If the second level of the first input channel is a high level and the second level of the second input channel is a low level, then determining the third level of the first output channel is a high level, and determining the third level of the second output channel and the third level of the third output channel are low levels;
[0109] If the second level of the first input channel is a low level, and the second level of the second input channel is a high level, then determining the third level of the second output channel is a high level, and determining the third level of the first output channel and the third level of the third output channel are low levels;
[0110] If the second level of the first input channel and the second level of the second input channel are both high levels, the third level of the third output channel is determined to be high, and the third level of the first output channel and the third level of the second output channel are determined to be low levels.
[0111] Optionally, the first determining unit 22 is further configured to:
[0112] obtaining a fourth level of the second register;
[0113] If the fourth level is in the third state, determining the third level of each of the multiple output channels according to the first level and the second level of each of the multiple input channels;
[0114] If the fourth level is in the fourth state, the third levels of the multiple output channels are determined to be the corresponding preset levels.
[0115] Optionally, the first determining unit 22 is further configured to:
[0116] Get the fifth level of the third register;
[0117] If the fifth level is in the fifth state, the third levels of the multiple output channels are determined according to the second levels of the multiple input channels according to the first channel correspondence relationship; the first channel correspondence relationship is used to describe the correspondence between the multiple input channels and the multiple output channels;
[0118] If the fifth level is in the sixth state, the third levels of the multiple output channels are determined according to the second channel correspondence relationship based on the second levels of the multiple input channels; the second channel correspondence relationship is used to describe the correspondence between the multiple input channels and the multiple output channels, and the first channel correspondence relationship and the second channel correspondence relationship are not exactly the same.
[0119] Optionally, the first determining unit 22 is further configured to:
[0120] Obtaining the sixth level of the fourth register;
[0121] According to the sixth level, an enable signal is sent to the multiple output channels.
[0122] Optionally, the first determining unit 22 is further configured to:
[0123] The third levels of the multiple output channels are controlled according to the first level of the first register, the second levels corresponding to the multiple input channels, the fourth level of the second register, the fifth level of the third register and the sixth level of the fourth register.
[0124] See also Figure 3 , Figure 3 This is a schematic diagram of the structure of a control device provided in an embodiment of the present application. Figure 3 As shown, the control device 3 provided in this embodiment may include: a processor 30, a memory 31, and a computer program 32 stored in the memory 31 and executable on the processor 30, such as a program corresponding to the control method of the light source device. When the processor 30 executes the computer program 32, the steps in the control method embodiment applied to the light source device are implemented, such as Figure 1Alternatively, when the processor 30 executes the computer program 32, the functions of each module / unit in the above-mentioned control device for light source equipment are realized, for example Figure 2 The functions of the units 21 to 23 are shown.
[0125] Exemplarily, the computer program 32 may be divided into one or more modules / units, one or more modules / units are stored in the memory 31, and are executed by the processor 30 to complete the present application. The one or more modules / units may be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program 32 in the control device 3. For example, the computer program 32 may be divided into a first acquisition unit 21, a first determination unit 22, and a first control unit 23. For the specific functions of each unit, please refer to Figure 2 The relevant descriptions in the corresponding embodiments are not repeated here.
[0126] Those skilled in the art will understand that Figure 3 This is only an example of the control device 3 and does not constitute a limitation on the control device 3 , which may include more or less components than shown in the figure, or a combination of certain components, or different components.
[0127] The processor 30 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0128] The memory 31 may be an internal storage unit of the control device 3, such as a hard disk or memory of the control device 3. The memory 31 may also be an external storage device of the control device 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, or a flash card, etc., equipped on the control device 3. Further, the memory 31 may also include both an internal storage unit and an external storage device of the control device 3. The memory 31 is used to store computer programs and other programs and data required by the control device. The memory 31 may also be used to temporarily store data that has been output or is to be output.
[0129] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional units as needed, that is, the internal structure of the control device of the light source equipment can be divided into different functional units to complete all or part of the functions described above. The functional units in the embodiment can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0130] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0131] An embodiment of the present application provides a computer program product. When the computer program product is executed on a terminal device, the terminal device implements the steps in the above-mentioned various method embodiments.
[0132] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0133] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0134] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for controlling a light source device, characterized in that: include: Acquire a first level of a first register and second levels of each of the multiple input channels; Determining a third level for each of the multiple output channels according to the first level and the second levels for each of the multiple input channels; According to the third levels of the multiple output channels, the light source device is controlled to perform lighting or projection.
2. The method according to claim 1, characterized in that The determining, according to the first level and the second levels of the multiple input channels, the respective third levels of the multiple output channels comprises: If the first level is in the first state, determining the third level of each of the multiple output channels according to the second level of each of the multiple input channels; If the first level is in the second state, the third level of each of the multiple output channels is determined according to the second level of each of some input channels among the multiple input channels.
3. The method according to claim 2, characterized in that The multiple input channels include a first input channel, a second input channel and a third input channel, and the multiple output channels include a first output channel, a second output channel and a third output channel; The determining, according to the second levels of some input channels among the multiple input channels, the third levels of the multiple output channels respectively, comprises: If the second level of the first input channel and the second level of the second input channel are both low levels, determining that the third levels of the multiple output channels are all low levels; If the second level of the first input channel is a high level, and the second level of the second input channel is a low level, then determining that the third level of the first output channel is a high level, and determining that the third level of the second output channel and the third level of the third output channel are low levels; If the second level of the first input channel is a low level, and the second level of the second input channel is a high level, then determining that the third level of the second output channel is a high level, and determining that the third level of the first output channel and the third level of the third output channel are low levels; If the second level of the first input channel and the second level of the second input channel are both high levels, the third level of the third output channel is determined to be high, and the third level of the first output channel and the third level of the second output channel are determined to be low levels.
4. The method according to claim 1, characterized in that The determining, according to the first level and the second levels of the multiple input channels, the respective third levels of the multiple output channels comprises: obtaining a fourth level of the second register; If the fourth level is in the third state, determining the third level of each of the multiple output channels according to the first level and the second level of each of the multiple input channels; If the fourth level is in the fourth state, the third levels of the multiple output channels are determined to be the corresponding preset levels.
5. The method according to claim 1, characterized in that The determining, according to the first level and the second levels of the multiple input channels, the respective third levels of the multiple output channels comprises: Get the fifth level of the third register; If the fifth level is in the fifth state, determining the third level of each of the multiple output channels according to the second level of each of the multiple input channels according to the first channel correspondence relationship; the first channel correspondence relationship is used to describe the correspondence between the multiple input channels and the multiple output channels; If the fifth level is in the sixth state, the third levels of the multiple output channels are determined according to the second channel correspondence relationship based on the second levels of the multiple input channels; the second channel correspondence relationship is used to describe the correspondence relationship between the multiple input channels and the multiple output channels, and the first channel correspondence relationship and the second channel correspondence relationship are not exactly the same.
6. The method according to claim 1, characterized in that Also includes: Obtaining the sixth level of the fourth register; According to the sixth level, an enable signal is sent to the multiple output channels.
7. The method according to claim 1, characterized in that The determining, according to the first level and the second levels of the multiple input channels, the respective third levels of the multiple output channels comprises: The third level of each of the multiple output channels is controlled according to the first level of the first register, the second level corresponding to each of the multiple input channels, the fourth level of the second register, the fifth level of the third register and the sixth level of the fourth register.
8. A control device for a light source device, characterized in that: include: A first acquisition unit, used for acquiring a first level of a first register and second levels of each of the multiple input channels; A first determining unit, configured to determine a third level of each of the multiple output channels according to the first level and the second levels of each of the multiple input channels; The first control unit is used to control the light source device to perform lighting or projection according to the third levels of each of the multiple output channels.
9. A control device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, each step in the method for controlling the light source device according to any one of claims 1 to 7 is implemented.
10. A computer program, characterized in that When the computer program is executed by a processor, each step in the method for controlling a light source device according to any one of claims 1 to 7 is implemented.