Image processing and projection control method, electronic equipment, projector and storage medium
Through image processing technology, the current parameters of the projector light source are determined based on the target color gamut and the brightness value is embedded, which solves the problem of high hardware cost of the existing projector and realizes a more flexible and economical projection system.
Patent Information
- Application Number
- CN202311768342.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-20
- Publication Date
- 2025-06-27
AI Technical Summary
The existing projector hardware requirements are high, resulting in increased production costs, difficulty in effectively reducing power consumption, and complex maintenance.
Through the image processing method, the target color gamut is determined based on the color coordinates of the target pixel point in the image to be projected, the current parameters of multiple light sources in the target color gamut are determined, and the embedded brightness value is embedded in the intermediate projected image to generate a preprocessed projected image to control the brightness of the light source.
It reduces the hardware cost of the projection system, improves the flexibility of the projection system, reduces the need to obtain light source current parameters in real time, and reduces the overall cost of the projector.
Smart Images

Figure CN120223853A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of projection control, and more specifically, to an image processing and projection control method, an electronic device, a projector, and a computer-readable storage medium. Background Art
[0002] With the development of projection technology, a projector can adjust the brightness of a light source according to the actual content of an image to be projected, so as to restore the color of the projected image while reducing power consumption. Currently, when projecting each projected image, a highly real-time hardware can determine a corresponding current value according to the actual content of the projected image, and control the light source of the projector according to the determined current value to adjust the light source brightness.
[0003] However, adopting the above method has high requirements for the hardware of the projector, which increases the production cost of the projector. Summary of the Invention
[0004] The present application provides an image processing and projection control method, an electronic device, a projector, and a storage medium to improve the above defects.
[0005] In a first aspect, an embodiment of the present application provides an image processing method, the method including: determining a target color gamut corresponding to the image to be projected according to the color coordinates of target pixel points in the image to be projected; obtaining an intermediate projected image according to the image to be projected; determining current parameters corresponding to each of a plurality of light sources in the target color gamut according to the image to be projected and the target color gamut; determining an embedded brightness value corresponding to each light source according to the current parameter of each light source in the target color gamut; and embedding the embedded brightness values corresponding to the plurality of light sources into the intermediate projected image to obtain a preprocessed projected image.
[0006] In a second aspect, an embodiment of the present application provides a projection control method for a projector having a plurality of light-emitting color segments, the method including: obtaining a preprocessed projected image; the preprocessed projected image includes sub-projected images corresponding to each of the plurality of light-emitting color segments; extracting the embedded brightness value of the light source corresponding to the corresponding light-emitting color segment from the sub-projected image corresponding to each light-emitting color segment; determining the current parameter of the light source corresponding to each light-emitting color segment according to the embedded brightness value of the light source corresponding to each light-emitting color segment; determining a target modulation parameter of each pixel point in the image to be projected according to the sub-projected images corresponding to the plurality of light-emitting color segments; controlling the light sources corresponding to the plurality of light-emitting color segments to emit light according to the current parameters of the light sources corresponding to the plurality of light-emitting color segments, and modulating the light emitted by the light sources corresponding to the plurality of light-emitting color segments according to the target modulation parameters of each pixel point in the image to be projected.
[0007] In a third aspect, an embodiment of the present application further provides an electronic device, which is characterized by including: one or more first processors; a first memory; one or more applications, where one or more applications are stored in the first memory and are configured to be executed by one or more first processors, and one or more applications are configured to execute the above method.
[0008] In a fourth aspect, an embodiment of the present application further provides a projector, which is characterized by including: one or more second processors; a second memory; one or more applications, where one or more applications are stored in the second memory and are configured to be executed by one or more second processors, and one or more applications are configured to execute the above method.
[0009] In a fifth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores program code executable by a processor. When the program code is executed by the processor, the processor executes the above method.
[0010] An image processing and projection control method, an electronic device, a projector, and a storage medium provided by the present application. In the present application, according to the color coordinates of target pixel points in the image to be projected, a target color gamut corresponding to the image to be projected is determined. The target color gamut is a color gamut more suitable for the image to be projected, and an intermediate projection image is obtained according to the image to be projected; according to the image to be projected and the target color gamut, current parameters corresponding to each of a plurality of light sources in the target color gamut are determined; according to the current parameters of each light source in the target color gamut, an embedded brightness value corresponding to each light source is determined; the embedded brightness values corresponding to the plurality of light sources are embedded in the intermediate projection image to obtain a preprocessed projection image. The current parameters corresponding to each light source in the projector are pre-embedded in the image to be projected in the form of brightness values, and it is not necessary to obtain the current parameters of each light source in real time, which improves the flexibility of the projection system, reduces the hardware cost, and further reduces the cost of the projector.
[0011] Other features and advantages of the embodiments of the present application will be described in the subsequent specification. Moreover, some of them will become obvious from the specification, or can be understood by implementing the embodiments of the present application. The objectives and other advantages of the embodiments of the present application can be achieved and obtained by the structures specifically pointed out in the written specification, claims, and drawings. Description of the Drawings
[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those skilled in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0013] Figure 1 It shows a flowchart of an image processing method proposed according to an embodiment of the present application.
[0014] Figure 2 It shows a flowchart of a projection control method proposed according to an embodiment of the present application.
[0015] Figure 3 It shows a structural block diagram of an image processing device proposed according to an embodiment of the present application.
[0016] Figure 4 It shows a structural block diagram of a projection control device proposed according to an embodiment of the present application.
[0017] Figure 5 It shows a schematic diagram of an electronic device provided in an embodiment of the present application.
[0018] Figure 6 It shows a schematic diagram of a projector provided in an embodiment of the present application.
[0019] Figure 7 It shows a schematic diagram of a computer-readable storage medium provided in an embodiment of the present application. Detailed implementation manners
[0020] In order to enable those skilled in the art of the present technology to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Usually, the components of the embodiments of the present application described and shown in the accompanying drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application to be protected, but only represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application.
[0021] It should be noted that: similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of the present application, the terms "first", "second", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.
[0022] Please refer to Figure 1 , Figure 1 It shows a flowchart of an image processing method proposed according to an embodiment of the present application for an electronic device. The method includes:
[0023] S101. Determine the target color gamut corresponding to the image to be projected according to the color coordinates of the target pixel points in the image to be projected based on the initial color gamut.
[0024] Among them, the target color gamut and the initial color gamut can be different. The image to be projected is a color image, which can be a single image or a video frame. The electronic device can be a projector or other electronic devices.
[0025] The image to be projected is a color image, which can be a single image or a video frame. There can be multiple target pixel points, and the target pixel points can be any pixel point in the image to be projected; the target pixel points can be some pixel points obtained from the image to be projected. For example, the target pixel points can be pixel points with a luminance value higher than a preset luminance value or a pixel value higher than a preset pixel value, etc.
[0026] The color coordinate refers to the position of a color in the color space. Here, the color coordinate of the target pixel point refers to the position of the color corresponding to the target pixel point in the color space. The color coordinate of a color does not change with the color gamut it is in, that is, the color coordinate of the target pixel point is fixed.
[0027] The color gamut is a method of encoding a color, and also refers to the sum of the colors that a technical system can produce. The color gamut describes a set of colors, that is, the color coverage range. The target color gamut is the set of colors corresponding to the image to be projected. The target color gamut can be the same as the standard color gamut or a part of the standard color gamut. The standard color gamut can be the standard red-green-blue (sRGB) color gamut, the Adobe RGB color gamut, etc. The base point of the target color gamut refers to the color point selected as a reference or benchmark in the target color gamut. All points in the target color gamut can be represented by the base point of the target color gamut. Generally, the base point of the target color gamut is the vertex of the target color gamut.
[0028] In some embodiments, before S101, it includes: obtaining the target pixel points from the image to be projected according to the luminance and color coordinates of each pixel point in the image to be projected.
[0029] Only when each pixel point in the image to be projected is represented in the xyY color space can the luminance and color coordinates of each pixel point be obtained. When represented in other color spaces, the color space of each pixel point needs to be converted to the xyY color space. If the other color space is not the XYZ color space, the XYZ color space can be used as an intermediate color space. First, convert the other color space to the XYZ color space, and then convert the XYZ color space to the xyY color space.
[0030] Taking the representation of each pixel point in the RGB color space as an example, assume that the initial display color gamut is the BT.2020 color gamut, which is jointly determined by 3 base points and an equal-energy white point. The color coordinates of the four points are known, namely R(0.708, 0.292), G(0.170, 0.797), B(0.131, 0.046), W(0.3127, 0.3290). The color adaptation matrix M0 for color space conversion from the RGB color space to the XYZ color space can be obtained as follows:
[0031]
[0032] The XYZ color space representation [X i Y i Z i of pixel point i can be calculated through the calculation formula (1), and the calculation formula (1) is as follows:
[0033] [X i Y i Z i = [r i g i b i · M0 (1),
[0034] Then, through the calculation formula Convert the XYZ color space to the xyY color space, and the xyY color space representation of pixel point i is:
[0035]
[0036] Thus, the luminance of pixel point i in the image to be projected can be obtained as Y i and the color coordinates
[0037] In some embodiments, according to the luminance and color coordinates of each pixel point in the image to be projected, obtaining target pixel points from the image to be projected includes: obtaining first pixel points whose color coordinates are not the target color coordinates from the image to be projected; screening target pixel points with luminance higher than the luminance threshold from the first pixel points; the luminance threshold is determined based on the maximum luminance corresponding to the first pixel points.
[0038] Among them, the target color coordinates can be (0, 0). Obtaining the first pixel points whose color coordinates are not the target color coordinates from the image to be projected means removing the black points from the image to be projected and obtaining the remaining pixel points after removing the black points as the first pixel points. The set of the first pixel points can be represented by B, and the set of all pixel points on the image to be projected is represented by A.
[0039] Among them, the brightness threshold can be 1% of the maximum brightness lm_max in the first pixel points. Obtain the maximum brightness lm_max of the pixel points in set B, and screen out the first pixel points with brightness higher than the brightness threshold from the first pixel points, that is, remove the low-brightness points from set C. Obtain the remaining first pixel points after removing the low-brightness points as the target pixel points to obtain set C.
[0040] Since the points with color coordinates (0, 0) and the low-brightness points have a weak visual perception for users, removing the above points before determining the target color gamut can reduce the amount of calculation, simplify the calculation, and at the same time avoid the invalidation of some algorithms due to the existence of abnormal points.
[0041] In some embodiments, before S101, it includes: filtering out the color coordinate isolated points of the to-be-projected image according to the color coordinates of each pixel point in the to-be-projected image to obtain the target pixel points.
[0042] Among them, the color coordinate isolated point refers to the point with a relatively low density on the target intermediate projection image.
[0043] In some embodiments, based on the preset step size and the color coordinate range corresponding to the initial color gamut, construct a color gamut grid; for each grid in the color gamut grid, determine the evaluation value of the grid according to the number of pixel points with color coordinates in the grid and the area of the grid in the to-be-projected image; obtain the target grid in the color gamut grid with an evaluation value higher than the preset evaluation value; obtain the first pixel points located in the target grid as the target pixel points.
[0044] Among them, the preset step size can be set according to requirements. For example, the preset step size s = 0.001. Assume that the color coordinate range corresponding to the initial color gamut is x ∈ (0.13, 0.71), y ∈ (0.04, 0.80), and divide the color coordinate range into a color gamut grid with the preset step size. The color gamut grid includes multiple grids. Among them, the evaluation value of the grid can be the density of the first pixel points in the grid.
[0045] The number of the first pixel points in grid i is N i , the area of the grid is s 2 , the density of grid i is Among them, the preset evaluation value can be the average density of the first pixel points of the multiple grids included in the color gamut grid. The number of pixel points in set A is N C , the area of the initial color gamut is S, then the average density is:
[0046] Among them, c is a proportionality factor, which can be taken as 0.01.
[0047] After obtaining the evaluation value of each grid in the color gamut grid and the preset evaluation value, compare the evaluation value of each grid with the preset evaluation value, and obtain the grid with the evaluation value higher than the preset evaluation value as the target grid.
[0048] Perform k-means filtering on the first pixel points in the grids in the color gamut grid except the target grid. k can be selected according to requirements. For example, k = 5. Obtain the remaining first pixel points after the filtering process, that is, the first pixel points in the target grid, as the target pixel points, and obtain the set D. Among them, K-means filtering means replacing each pixel value with the average value of K pixel values.
[0049] In some embodiments, the target pixel points can be the pixel points in the intersection of set C and set D.
[0050] S102. Obtain an intermediate projection image according to the image to be projected.
[0051] In some embodiments, S102 may include: converting each pixel point in the image to be projected to the target color gamut to obtain the target color space representation of each pixel point in the target color gamut, and obtaining the intermediate projection image according to the target color space representation of each pixel point in the target color gamut.
[0052] The number of base points of the target color gamut is consistent with the number of color segments corresponding to the display system of the projector. Taking the three color segments of red, green, and blue as an example, then there are also three base points of the target color gamut, which are the points where the red, green, and blue primary colors of the target color gamut are located. Represent each pixel point in the image to be projected with the base points of the target color gamut, that is, represent each pixel point in the image to be projected with the red, green, and blue primary colors.
[0053] Taking the three color segments of red, green, and blue as an example, for each pixel point i in the image to be projected, it is necessary to first convert the color space where it is located to the XYZ color space.
[0054] According to the XYZ color space representation of the pixel point in the initial color gamut, the color space representation of the base points of the target color gamut, and the duty cycle of each of the multiple color segments corresponding to the projector, calculate the second color space representation of the target pixel point in the target color gamut. Among them, the duty cycle of a color segment refers to the time ratio occupied by a color segment in a cycle. Each pixel can be composed of multiple color segments, and each color segment represents the color presented by the pixel in that cycle.
[0055] Among them, the color space representation of pixel point i in the initial color gamut is [X i Y i Z i , the color space representations of the three base points of the target color gamut are The duty cycles of the multiple color segments corresponding to the projector are d = (d1, d2, d3), and the second color space representation of pixel point i in the target color gamut It can be calculated by formula (2). The calculation formula (2) is as follows:
[0056]
[0057] Since the Y of the target pixel is i a relative value, the calculated is a relative value.
[0058] After obtaining the second color space representation of the pixel, it is also necessary to calculate the first color space representation of the pixel.
[0059] In some embodiments, according to the second color space representation of the pixel in the target color gamut, determine the scaling factor corresponding to the pixel; according to the scaling factors corresponding to multiple pixels, determine the target scaling factor; according to the target scaling factor and the scaling factor corresponding to the pixel, determine the brightness gain corresponding to the pixel; according to the brightness gain corresponding to the pixel, the scaling factor corresponding to the pixel, and the second color space representation of the pixel in the target color gamut, calculate the first color space representation of the target pixel in the target color gamut.
[0060] Among them, the scaling factor is used to convert the second color space representation of the target pixel into an absolute value, and the brightness gain refers to the ratio of the brightness of the picture projected by the projector onto the screen to the brightness of the input picture. The picture brightness can be increased through the brightness gain.
[0061] Define the scaling factor of pixel i as s i , then s i is expressed as:
[0062]
[0063] Among them, is the second color space representation with the maximum brightness of the target pixel i.
[0064] After obtaining the scaling factor of pixel i, determine the target scaling factor from the scaling factors corresponding to multiple pixels respectively. The target scaling factor can be the maximum value among multiple scaling factors.
[0065] Define the brightness gain corresponding to pixel i as k i , the scaling factor corresponding to pixel i as s i , and the target scaling factor as s max , then the brightness gain corresponding to pixel i is:
[0066]
[0067] After obtaining the brightness gains of multiple pixel points, arrange the brightness gains corresponding to the multiple target pixel points in ascending order to obtain a brightness gain sequence; determine the target brightness gain from the brightness gain sequence.
[0068] To determine the target brightness gain from the brightness gain sequence, first define the brightness gain sequence as K with a length of N. Abandon the accurate display of pixel brightness with 0.001, and select the brightness gain at the 0.001×N + 1 position in the brightness gain sequence K as the target brightness gain k. t 。
[0069] Obtain the target brightness gain as k. t , the scaling factor of pixel point i is s. i and the second color space representation of pixel point i in the target color gamut. After that, calculate the first color space representation of pixel point i. It can be calculated by formula (3). Formula (3) is as follows:
[0070]
[0071] In some embodiments, to ensure the stability of the display, define a maximum target brightness gain to ensure that the target brightness gain can never exceed the maximum target brightness gain. The maximum target brightness gain is k. limit , then the target brightness gain k. t =MIN(k. limit , k. t ).
[0072] In some embodiments, according to the brightness gain corresponding to the pixel point, the scaling factor corresponding to the pixel point, and the second color space representation of the pixel point in the target color gamut, calculating the first color space representation of the target pixel point in the target color gamut may include: calculating the third color space representation of the pixel point of the image to be projected in the target color gamut according to the target brightness gain value and the second color space representation of the pixel point of the image to be projected in the target color gamut; if there are element values less than the first value in the third color space representation of the pixel point of the image to be projected in the target color gamut, replace the element values less than the first value in the third color space representation with the first value to obtain the first color space representation of the pixel point of the image to be projected in the target color gamut. If there are element values greater than the second value in the third color space representation of the pixel point of the image to be projected in the target color gamut, divide each element value in the third color space representation of the pixel point by the target element value to obtain the first color space representation of the pixel point of the image to be projected in the target color gamut, and the target element value is the largest element value in the third color space representation of the pixel point.
[0073] The third color space representation of the pixel point i of the image to be projected in the target color gamut can be calculated by the formula (8), and the third color space representation is Each third color space representation includes three element values, which are respectively and If then let be the first numerical value, and the first numerical value can be 0, that is, let If is greater than 1, then
[0074]
[0075] At this time, the first color space representation of the pixel point i
[0076] The first color space representation of the pixel point i is obtained After that, according to the first color space representation of the pixel point in the target color gamut, the adjustment factor of the image to be projected is determined. Among them, the adjustment factor of the image to be projected is the adjustment factor of the global grayscale image to be projected, which is used to adjust the brightness of the overall displayed image.
[0077] In some embodiments, the projector has multiple light-emitting color segments, and the adjustment factor includes the adjustment coefficients corresponding to the respective light-emitting color segments. If the projector has 3 light-emitting color segments, the adjustment factor includes the adjustment coefficients corresponding to the 3 light-emitting color segments respectively; if the projector has 6 light-emitting color segments, the adjustment factor includes the adjustment coefficients corresponding to the 6 light-emitting color segments respectively.
[0078] In some embodiments, the maximum value of the first color space representations of multiple pixel points in the target color gamut can be obtained as the adjustment factor of the image to be projected. Specifically, the maximum values of R, G, and B in the RGB color space of all pixel points in the target color gamut can be obtained as the adjustment coefficients of the corresponding color segments, and together they form the adjustment factor.
[0079] Taking the projector with 3 light-emitting color segments as an example, the adjustment factor of the global grayscale image to be projected is defined as (s r , s g , s b ), then:[[]]
[0080]
[0081] Among them, s r is the adjustment coefficient of the red light color segment, s g is the adjustment coefficient of the green light color segment, s b is the adjustment coefficient of the blue light color segment. When the adjustment factor of the image to be projected is 0, this adjustment factor can be assigned a value of 1×10 -16Taking the example that the projector has 3 light - emitting color segments, define the adjustment factor of the global grayscale image to be projected as (s r , s g , s b ), then:
[0082]
[0083] Among them, s r is the adjustment coefficient of the red - light color segment, s g is the adjustment coefficient of the green - light color segment, s b is the adjustment coefficient of the blue - light color segment. When the adjustment factor of the image to be projected is 0, the adjustment factor can be assigned a value of 1×10 -16 .
[0084] Finally, according to the adjustment factor of the image to be projected and the first color - space representation of the target pixel point in the target color gamut, the target color - space representation of the target pixel point can be determined.
[0085] Among them, the first color - space representation of the target pixel point i in the target color gamut is The adjustment factor of the image to be projected is [s r s g s b , and the target color - space representation of the target pixel point is [r i g i b i . [r i g i b i can be calculated through the calculation formula (4), and the calculation formula (4) is as follows:
[0086]
[0087] After obtaining the target color - space representation of each pixel point on the image to be projected, the image composed of each pixel point at this time is the intermediate projection image.
[0088] In some other embodiments, the projector for projecting the image to be projected has multiple light - emitting color segments. S102 may include: obtaining the intermediate projection images corresponding to each of the multiple light - emitting color segments according to the image to be projected. According to the fact that the projector for projecting the image to be projected has multiple light - emitting color segments, the image to be projected is split into the intermediate projection images corresponding to each of the light - emitting color segments.
[0089] S103. According to the image to be projected and the target color gamut, determine the current parameters corresponding to each of the multiple light sources in the target color gamut.
[0090] The magnitude of the current parameter corresponding to the light source under the color gamut affects the brightness value of the light source, and the brightness value of the light source can also reflect the magnitude of the current parameter corresponding to the light source under the color gamut. The brightness value of the light source under the color gamut is related to the target light source combination representation of the base point corresponding to the color gamut. That is, the current parameters corresponding to each light source under the target color gamut are determined based on the target light source combination representation of the base point of the target color gamut. The target light source combination representation refers to representing the pixel value of the base point with the brightness values of multiple light sources.
[0091] In some embodiments, the target light source combination representation of the base point of the target color gamut can be determined according to the first color space representation of the pixel point in the target color gamut in the image to be projected and the color space representation of the base point of the target color gamut, and the current parameter corresponding to it can be determined according to the brightness value of the corresponding light source in the target light source combination representation of the base point. Among them, the current parameter can be a relative current value or an absolute current value. The larger the current parameter, the larger the brightness value. Similarly, the larger the brightness value, the larger the current parameter.
[0092] In some embodiments, S103 may include: determining the conversion coefficient between the color space representations of multiple light sources and the color space representation of the base point of the target color gamut; determining the adjustment factor of the image to be projected according to the first color space representation of the pixel point in the target color gamut in the image to be projected; determining the target light source combination representation of the base point of the target color gamut according to the conversion coefficient and the adjustment factor; determining the current parameters corresponding to each light source under the target color gamut according to the target light source combination representation of the base point of the target color gamut.
[0093] The color space can be XYZ, RGB, Yuv, etc. Here, the light source and the base point of the target color gamut are represented by the XYZ color space, that is, the conversion coefficient between the tristimulus values of multiple light sources and the tristimulus values of the base point of the target color gamut is determined. The tristimulus value is the representation of the amount of stimulation of three primary colors that cause the human retina to sense a certain color, and the tristimulus values are represented by X (stimulus amount of red primary color), Y (stimulus amount of green primary color), and Z (stimulus amount of blue primary color).
[0094] In some embodiments, the initial color space representation of the base point can be obtained, and the base point is converted from the initial color space to the color space to obtain the intermediate color space representation of the base point.
[0095] Among them, the initial color space is the xyY color space, the intermediate color space is the XYZ color space, and the color coordinates of the base point of the target color gamut are known. That is, the (x i , y i ) of the base point i is known. Then, by setting the relative luminance Y i of the base point of the target color gamut to 1, the initial color space representation of the base point i can be obtained as [x i y i Yi .
[0096] Given the [x of the base point i i y i Y i , it is calculated by formula (5), and formula (5) is as follows:
[0097]
[0098] The initial color space representation [x of the base point i i y i Y i can be converted into an intermediate color space representation Furthermore, the intermediate color space representations of all the base points in the target color gamut are obtained respectively. The intermediate color space representation of a base point is the relative value obtained when the relative luminance Y of the base point in the target color gamut i is 1.
[0099] In some embodiments, the method for obtaining the color space representations of multiple light sources may include: obtaining the initial color space representations of multiple light sources, and converting the multiple light sources from the initial color space to the color space to obtain the color space representations of the multiple light sources.
[0100] Among them, according to the light source specification, the initial color space representation of the light source j is determined as [x j y j Y j , and through formula (5), the initial color space representation [x j y j Y j can be converted into the color space representation
[0101] The projector includes multiple light sources. It can be assumed that the number of light sources is n. Then the color space representations of the multiple light sources are
[0102] After obtaining the intermediate color space representation of the base point and the color space representations of the multiple light sources, an equation of the intermediate color space representation of the base point, the color space representations of the multiple light sources, and the conversion coefficient is constructed. This equation is shown in formula (6):
[0103]
[0104] Among them, C i is the initial conversion coefficient between the color space representations of the multiple light sources and the intermediate color space representation of the base point i in the target color gamut. Since there are n light sources, if the number of color segments corresponding to the projector is less than the number of light sources, C i has infinitely many solutions.
[0105] As an implementation, the constraint conditions of the calculation formula (6) and the optimization objective of the conversion coefficient can be set, and the optimal solution of the equation can be obtained by linear programming. Among them, the optimization objective of the linear programming method is to maximize the conversion coefficient, that is, to maximize the control parameter of the corresponding light source. Therefore, the brightness of the light output by the light source is increased as much as possible. That is, the constraint condition is C i > 0, and the optimization objective is MIN(MAX(C i ))). The constraint condition of the linear programming method is that the conversion coefficient is between 0 and 1.
[0106] Actually, when obtaining the initial color space representation of the base point, let the relative brightness Y of the base point i of the target color gamut i be 1. This 1 is a relative value, that is, each value in the obtained optimal solution matrix is a relative value. Therefore, after obtaining the optimal solution of the equation, each value in the optimal solution matrix needs to be divided by the maximum value to convert it into an absolute value, and the obtained result is the conversion coefficient C i .
[0107] Among them, each base point corresponds to an initial conversion coefficient, and the number of obtained initial conversion coefficients is the same as the number of base points of the target color gamut.
[0108] Given the conversion coefficient C of the base point i of the target color gamut i and the adjustment factor [s r s g s b , then the target light source combination representation of the base point i of the target color gamut is The formula C can be calculated by the calculation formula (7). The calculation formula (7) is as follows: i The current parameters corresponding to each of the multiple light sources under the target color gamut determine the brightness values of the multiple light sources respectively. Conversely, the brightness value of the light source can also reflect its current parameter. The target light source combination representation of the base point of the target color gamut includes the brightness values of the multiple light sources respectively.
[0109]
[0110] In some embodiments, according to the target light source combination representation of the base point of the target color gamut, the current parameters corresponding to each of the multiple light sources under the target color gamut are determined from the preset comparison relationship lookup table. The target light source combination representation includes the brightness values of the multiple light sources respectively. The preset comparison relationship lookup table includes the comparison relationship between the brightness value and the current parameter.
[0111] The comparison relationship curve between the brightness value and the current parameter can be viewed from the light source specification or obtained through light source optical verification, and then the preset comparison relationship lookup table is generated.
[0112] The comparison relationship curve between the brightness value and the current parameter can be viewed from the light source specification or obtained through light source optical verification, and then the preset comparison relationship lookup table is generated.
[0113] S104. Determine the embedded brightness value corresponding to each light source according to the current parameter of each light source under the target color gamut.
[0114] Among them, the brightness value is usually represented by a color level, and the range is generally from 0 to 255. The larger the value, the brighter the color.
[0115] In some embodiments, the mapping relationship between the current parameter and the embedded brightness value can be constructed to map the current parameter to a pixel value. Among them, the mapping relationship refers to the corresponding relationship between the elements of two sets of elements. Here, it refers to the corresponding relationship between the current parameter and the embedded brightness value, that is, when the current parameter is known, the embedded brightness value corresponding to the current value can be determined.
[0116] In some embodiments, S104 may include: determining the embedded brightness value corresponding to the light source according to the maximum current parameter of the light source, the minimum current parameter of the light source, the current parameter of the light source under the target color gamut, the maximum color level value, and the minimum color level value.
[0117] Among them, it is stipulated that the transmitted current value is within a certain range. Therefore, the maximum current value and the minimum current value of the light source are generally fixed. The maximum current value can be 10A, the minimum current value can be 0, the maximum brightness value is 225, and the minimum brightness value is 0. The maximum current value and the minimum current value are respectively corresponding to the maximum brightness value and the minimum brightness value one by one. After the one-to-one correspondence, the embedded brightness value corresponding to the current parameter can be determined according to the current parameter.
[0118] Specifically, determining the embedded brightness value corresponding to the light source according to the maximum current parameter of the light source, the minimum current parameter of the light source, the current parameter of the light source under the target color gamut, the maximum color level value, and the minimum color level value may include: calculating the difference between the maximum current parameter of the light source and the minimum current parameter of the light source as the first operation result; calculating the difference between the current parameter of the light source under the target color gamut and the minimum current parameter of the light source as the second operation result; calculating the difference between the maximum color level value and the minimum color level value as the third operation result; calculating the product of the second operation result corresponding to the light source and the third operation result, and calculating the ratio of the product to the first operation result to obtain the embedded brightness value corresponding to the light source.
[0119] Among them, the maximum current value is I_max, the minimum current value is I_min, the maximum color level is 225, the minimum color level is 0, the current parameter is I, and the embedded brightness value is B. The embedded brightness value can be determined by the calculation formula (5), and the calculation formula (5) is as follows:
[0120]
[0121] S105. Embed the embedded brightness values corresponding to the multiple light sources into the intermediate projection image to obtain a preprocessed projection image.
[0122] Among them, the preprocessed projection image includes sub-projection images corresponding to respective light-emitting color segments.
[0123] In some embodiments, S105 may include: replacing the luminance value at a preset embedding position in each intermediate projection image with the embedding luminance value of the light source corresponding to the corresponding light-emitting color segment to obtain the preprocessed projection image.
[0124] In some embodiments, the embedding luminance values corresponding to the light sources of the light-emitting color segment may be embedded into the intermediate projection image corresponding to the light-emitting color segment to obtain the sub-projection image corresponding to the light-emitting color segment.
[0125] If the light-emitting color segment corresponds to multiple light sources, the embedding luminance value corresponding to each light source may be embedded into the corresponding position. For example, the embedding position of the luminance value corresponding to light source 1 is (x1, y1), the embedding position of the luminance value corresponding to light source 2 is (x2, y2), and the embedding position of the luminance value corresponding to light source 3 is (x3, y3).
[0126] Among them, the embedding position may be a corner point of the intermediate projection image or an intermediate position among multiple intermediate projection images, which is specifically selected according to requirements.
[0127] By splitting the image to be projected into intermediate projection images corresponding to respective light-emitting color segments, and then replacing the luminance value at the preset embedding position in each intermediate projection image with the embedding luminance value of the light source corresponding to the corresponding light-emitting color segment, the embedding of the embedding luminance values of the light sources corresponding to multiple light-emitting color segments is realized, and when reading the decoded current parameters subsequently, it is only necessary to obtain them from the corresponding sub-projection image in the corresponding color segment, improving the efficiency of obtaining current parameters.
[0128] In this embodiment, according to the color coordinates of the target pixel points in the image to be projected, the target color gamut corresponding to the image to be projected is determined. The target color gamut is a color gamut more suitable for the image to be projected. An intermediate projection image is obtained according to the image to be projected; according to the image to be projected and the target color gamut, the current parameters corresponding to each light source in the target color gamut are determined; according to the current parameters of each light source in the target color gamut, the embedding luminance value corresponding to each light source is determined; the embedding luminance values corresponding to each light source are embedded into the intermediate projection image to obtain the preprocessed projection image. The current parameters corresponding to each light source in the projector are pre-embedded in the image to be projected in the form of luminance values, and it is not necessary to obtain the current parameters of each light source in real time, improving the flexibility of the projection system, reducing the hardware cost, and further reducing the cost of the projector.
[0129] Please refer to Figure 2 , Figure 2 which shows a flowchart of a projection control method proposed in an embodiment of the present application for a projector. The method includes:
[0130] S201. Obtain a preprocessed projection image.
[0131] Among them, the preprocessed projection image includes sub-projection images corresponding to respective light-emitting color segments.
[0132] S202. Extract the embedded brightness values of the light sources corresponding to the respective light-emitting color segments from the sub-projection images corresponding to each light-emitting color segment.
[0133] In some embodiments, the positions where the projector extracts the embedded brightness values of the light sources corresponding to the respective light-emitting color segments from the sub-projection images can be pre-calibrated in advance. If a light-emitting color segment corresponds to multiple light sources, it is necessary to calibrate the positions of the embedded brightness values corresponding to each light source in the sub-projection image, and extract the embedded brightness values of the corresponding light sources from the corresponding positions.
[0134] The embedded brightness values embedded in the preprocessed projection image are processed by the underlying FPGA in the projector. Among them, FPGA (Field-Programmable Gate Array) is a programmable chip used to implement various digital signal processing and image processing functions. In a projector, FPGA is widely used in multiple aspects such as image processing, keystone correction, and 3D functions.
[0135] S203. Determine the current parameters of the light sources corresponding to each light-emitting color segment according to the embedded brightness values of the light sources corresponding to each light-emitting color segment.
[0136] After extracting the embedded brightness values of the light sources corresponding to the respective light-emitting color segments, the current parameters corresponding to each light source can be calculated according to calculation formula (5), and the current parameters are calculated by the FPGA.
[0137] If the current parameter is a relative current value, the FPGA can directly sense the light engine information, that is, the brightness value of the light source. Only the information of the target color gamut needs to be transmitted to the FPGA for calculation to obtain the relative current information. In this case, the same model of light engine can use the same target color gamut.
[0138] If the current parameter is an absolute current value, the FPGA does not sense the light engine information. After the light engine information and the target color gamut are calculated and then processed by the FPGA, the absolute current value is obtained. In this way, each projector needs to recalculate the target color gamut.
[0139] S204. Determine the target modulation parameters of each pixel point in the image to be projected according to the sub-projection images corresponding to the respective light-emitting color segments.
[0140] Among them, the target modulation parameters at least include the pixel values of each pixel point in the image to be projected. Taking the three light-emitting color segments of RGB as an example, the target modulation parameters at least include the RGB values of each pixel point in the image to be projected.
[0141] Still taking the three light-emitting color segments of RGB as an example, the R light-emitting color segment corresponds to the sub-projection image R, the G light-emitting color segment corresponds to the sub-projection image G, and the B light-emitting color segment corresponds to the sub-projection image B. Then, the R value in the pixel value of the pixel point i of the image to be projected is the brightness value of the pixel point in the sub-projection image R, the G value in the pixel value of the pixel point i is the brightness value of the pixel point in the sub-projection image G, and the B value in the pixel value of the pixel point i is the brightness value of the pixel point in the sub-projection image B.
[0142] Since embedding the brightness value in the sub-projection image will cause the loss of the brightness value at the position where the embedded brightness value is embedded in the sub-projection image, affecting the projection display effect, it is necessary to perform compensation processing on the brightness value at this position.
[0143] In some embodiments, the embedded brightness value corresponding to the light-emitting color segment is embedded at the preset embedded position in the sub-projection image corresponding to the light-emitting color segment; S204 may include: determining the target brightness value of the pixel point at the preset embedded position in the sub-projection image corresponding to the light-emitting color segment according to the brightness values of the pixel points around the preset embedded position in the sub-projection image corresponding to the light-emitting color segment; determining the target modulation parameters of each pixel point in the image to be projected according to the target brightness value of the pixel point at the preset embedded position in the sub-projection image corresponding to the light-emitting color segment and the brightness values of the pixel points other than the pixel points at the preset embedded position in each sub-projection image.
[0144] If the pixel point i of the image to be projected is the pixel point at the preset embedded position in the sub-projection image B, then the B value in the pixel value of the pixel point i is the target brightness value obtained according to the brightness values of the pixel points around the pixel point i in the sub-projection image B, the G value in the pixel value of the pixel point i is the brightness value of the pixel point in the sub-projection image G, and the R value in the pixel value of the pixel point i is the brightness value of the pixel point in the sub-projection image R.
[0145] In some embodiments, the target brightness value of the preset embedded position in the sub-projection image corresponding to the light-emitting color segment can be determined by interpolation method or smoothing filtering method according to the brightness values of the pixel points around the preset embedded position in the sub-projection image corresponding to the light-emitting color segment.
[0146] Among them, interpolation is a method of interpolating a continuous function based on discrete data. Through it, the approximate values of the function at other points can be estimated based on the values of the function at a finite number of points. It can be used to repair the colors of image pixels, such as linear interpolation, bilinear interpolation, bicubic interpolation, etc. Smoothing filtering is a common image processing technique. Its main purpose is to remove noise, reduce the details and textures of the image, thereby enhancing the clarity and readability of the image. The smoothing filter usually sets the value of each pixel point in the image to the average value or weighted average value of the pixel points in its neighborhood. Common smoothing filters include mean filters, median filters, etc.
[0147] Among them, for the nearest neighbor interpolation method, the value of the pixel point closest to the pixel point located at the preset embedding position is taken as the target brightness value; for the bilinear interpolation method, the values of the four pixel points around the pixel point located at the preset embedding position are used and calculated according to certain weights to obtain the target brightness value; for the bicubic interpolation method, the values of the sixteen pixel points around the pixel point located at the preset embedding position are used and calculated according to certain weights to obtain the target brightness value; for the mean filter, the average value of all pixel points in the neighborhood of the pixel point located at the preset embedding position is calculated as the target brightness value; for the median filter, the values of all pixel points in the neighborhood of the pixel point located at the preset embedding position are sorted, and the middle value is taken as the target brightness value. Among them, all pixel points in the neighborhood of the pixel point located at the preset embedding position can be four pixel points or eight pixel points, which can be specifically selected according to requirements.
[0148] S205. Control the light sources corresponding to multiple light-emitting color segments to emit light according to the current parameters of the light sources corresponding to the multiple light-emitting color segments, and modulate the light emitted by the light sources corresponding to the multiple light-emitting color segments according to the target modulation parameters of each pixel point in the image to be projected.
[0149] Input the target modulation parameters of each pixel point in the image to be projected into the digital micromirror device (Digital Micromirror Devices, DMD) of the projector, that is, the spatial light modulator. Control the light sources corresponding to the multiple light-emitting color segments to emit light according to the current parameters of the light sources corresponding to the multiple light-emitting color segments, project the emitted light onto the DMD, and the DMD then modulates the light emitted by the light sources corresponding to the multiple light-emitting color segments according to the target modulation parameters of each pixel point in the image to be projected to complete the projection.
[0150] In this embodiment, when projecting the image to be projected, the current parameters of each light source have been pre-embedded into the preprocessed projection image in the form of brightness values. When projecting the image to be projected, it is only necessary to read the embedded brightness value from the corresponding embedded position in the sub-projection image of the corresponding light-emitting color segment, and then convert the embedded brightness value into a current parameter, without the need to obtain the current parameters of each light source in real time, and then control each light source to emit light according to the current parameters corresponding to each light source, modulate the light emitted by the light sources corresponding to each light-emitting color segment according to the target modulation parameters of each pixel point in the image to be projected, so as to project the image to be projected, which improves the flexibility of the projection system, reduces the hardware cost, and further reduces the cost of the projector.
[0151] Meanwhile, after extracting the embedded brightness value, the brightness value of the pixel point at the preset embedded position is compensated according to the brightness values of the pixel points around the preset embedded position, so as to ensure the display effect of the projection.
[0152] Refer to the appendix Figure 3 , Figure 3 which shows the structural block diagram of an image processing device proposed in an embodiment of the present application. The device 300 includes:
[0153] The first determination module 310 is configured to determine the target color gamut corresponding to the image to be projected according to the color coordinates of the target pixel points in the image to be projected;
[0154] The second determination module 320 is configured to obtain an intermediate projection image according to the image to be projected;
[0155] The third determination module 330 is configured to determine the current parameters corresponding to each of the multiple light sources under the target color gamut according to the image to be projected and the target color gamut;
[0156] The fourth determination module 340 is configured to determine the embedded brightness value corresponding to each light source according to the current parameter of each light source under the target color gamut;
[0157] The embedding module 350 is configured to embed the embedded brightness values corresponding to the multiple light sources into the intermediate projection image to obtain a preprocessed projection image.
[0158] Optionally, the fourth determination module 340 is further configured to determine the embedded brightness value corresponding to the light source according to the maximum current parameter of the light source, the minimum current parameter of the light source, the current parameter of the light source under the target color gamut, the maximum color level value, and the minimum color level value.
[0159] Optionally, the fourth determination module 340 is further configured to calculate the difference between the maximum current parameter and the minimum current parameter of the light source as the first operation result; calculate the difference between the current parameter of the light source under the target color gamut and the minimum current parameter of the light source as the second operation result; calculate the difference between the maximum color level value and the minimum color level value as the third operation result; calculate the product of the second operation result corresponding to the light source and the third operation result, and calculate the ratio of the product to the first operation result to obtain the embedded brightness value corresponding to the light source.
[0160] Optionally, the projector for projecting the image to be projected has multiple light-emitting color segments, and the second determination module 320 is further configured to obtain the intermediate projection images corresponding to the respective light-emitting color segments according to the image to be projected.
[0161] Optionally, the embedding module 350 is further configured to replace the brightness value at the preset embedding position in each intermediate projection image with the embedded brightness value of the light source corresponding to the corresponding light-emitting color segment to obtain a preprocessed projection image, where the preprocessed projection image includes sub-projection images corresponding to the respective light-emitting color segments.
[0162] Optionally, the third determination module 330 is further configured to determine the conversion coefficient between the color space representations of the multiple light sources and the color space representation of the base point of the target color gamut; determine the adjustment factor of the image to be projected according to the first color space representation of the pixel points in the image to be projected under the target color gamut; determine the target light source combination representation of the base point of the target color gamut according to the conversion coefficient and the adjustment factor; and determine the current parameters corresponding to the respective light sources of the multiple light sources under the target color gamut according to the target light source combination representation of the base point of the target color gamut.
[0163] Optionally, the third determination module 330 is further configured to determine the current parameters corresponding to the respective light sources of the multiple light sources under the target color gamut from a preset comparison relationship lookup table according to the target light source combination representation of the base point of the target color gamut, where the preset comparison relationship lookup table represents the comparison relationship between the light source brightness value and the current parameter.
[0164] Refer to the appendix Figure 4 , Figure 4 FIG. shows a structural block diagram of a projection control device proposed in an embodiment of the present application for a projector having multiple light-emitting color segments. The device 400 includes:
[0165] An acquisition module 410, configured to acquire a preprocessed projection image; the preprocessed projection image includes sub-projection images corresponding to the respective light-emitting color segments;
[0166] An extraction module 420, configured to extract the embedded brightness value of the light source corresponding to the corresponding light-emitting color segment from the sub-projection image corresponding to each light-emitting color segment;
[0167] A fifth determination module 430, configured to determine a current parameter of a light source corresponding to each light-emitting color segment according to an embedded brightness value of the light source corresponding to each light-emitting color segment;
[0168] A sixth determination module 440, configured to determine a target modulation parameter of each pixel point in the to-be-projected image according to the sub-projected image corresponding to each light-emitting color segment;
[0169] A projection module 450, configured to control the light sources corresponding to the multiple light-emitting colors to emit light according to the current parameters of the light sources corresponding to the multiple light-emitting color segments respectively, and modulate the light emitted by the light sources corresponding to the multiple light-emitting color segments respectively according to the target modulation parameters of each pixel point in the to-be-projected image.
[0170] Optionally, the embedded brightness value corresponding to the light-emitting color segment is embedded at a preset embedding position in the sub-projected image corresponding to the light-emitting color segment; the sixth determination module 440 is further configured to determine a target brightness value of the pixel point at the preset embedding position in the sub-projected image corresponding to the light-emitting color segment according to the brightness values of the pixel points around the preset embedding position in the sub-projected image corresponding to the light-emitting color segment; and determine the target modulation parameter of each pixel point in the to-be-projected image according to the target brightness value of the pixel point at the preset embedding position in the sub-projected image corresponding to the light-emitting color segment and the brightness values of the pixel points other than the pixel point at the preset embedding position in each sub-projected image.
[0171] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the foregoing method embodiments, and will not be described herein again.
[0172] In addition, in each embodiment of the present application, each function can be integrated into one processing module, or each module can exist physically alone, or two or more modules can be integrated into one module. The above-integrated module can be implemented in the form of hardware or in the form of a software function module.
[0173] Please refer to Figure 5 , Figure 5 FIG. shows a structural block diagram of an electronic device according to an embodiment of the present application. The electronic device 600 may include one or more of the following components: a first processor 610, a first memory 620, and one or more application programs, where one or more application programs may be stored in the first memory 620 and configured to be executed by one or more first processors 610, and one or more programs are configured to execute the method described in the foregoing method embodiments.
[0174] The first processor 610 may include one or more processing cores. The first processor 610 connects various parts within the entire electronic device 600 through various interfaces and circuits. By running or executing instructions, programs, code sets, or instruction sets stored in the first memory 620, and by calling data stored in the first memory 620, it performs various functions of the electronic device 600 and processes data. Optionally, the first processor 610 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), or programmable logic array (PLA). The first processor 110 may integrate a combination of one or several of a central processing unit (CPU), a graphics processing unit (GPU), and a modem, etc. Among them, the CPU mainly processes the operating system, user interface, application programs, etc.; the GPU is responsible for rendering and drawing display content; the modem is used to process wireless communication. It can be understood that the above-mentioned modem may not be integrated into the first processor 610 and may be implemented separately through a communication chip.
[0175] The first memory 620 may include a random access memory (RAM), or may also include a read-only memory. The first memory 620 can be used to store instructions, programs, code, code sets, or instruction sets. The first memory 620 may include a program storage area and a data storage area. Among them, the program storage area can store instructions for implementing the operating system, instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area can also store data created during the use of the terminal 600 (such as phone book, audio and video data, chat record data, etc.).
[0176] In addition, in each embodiment of the present application, each function may be integrated in a processing module, or each module may exist physically separately, or two or more modules may be integrated in one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software function module.
[0177] Please refer to Figure 6 , Figure 6The block diagram of a projector provided according to an embodiment of the present application is shown. The projector 700 may include one or more of the following components: a second processor 710, a second memory 720, and one or more application programs, where one or more application programs may be stored in the second memory 720 and configured to be executed by one or more second processors 710, and one or more programs are configured to execute the methods described in the foregoing method embodiments.
[0178] The second processor 710 may include one or more processing cores. The second processor 710 connects various parts within the entire projector 700 using various interfaces and lines, and by running or executing instructions, programs, code sets, or instruction sets stored in the second memory 720, and by calling data stored in the second memory 720, it executes various functions of the projector 700 and processes data. Optionally, the second processor 710 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), or programmable logic array (PLA). The second processor 110 may integrate a combination of one or several of a central processing unit (CPU), a graphics processing unit (GPU), and a modem, etc. Among them, the CPU mainly processes the operating system, user interface, and application programs, etc.; the GPU is responsible for rendering and drawing the display content; the modem is used to process wireless communication. It can be understood that the above modem may not be integrated into the second processor 710 and may be implemented separately through a communication chip.
[0179] The second memory 720 may include random access memory (RAM) and may also include read-only memory. The second memory 720 can be used to store instructions, programs, codes, code sets, or instruction sets. The second memory 720 may include a program storage area and a data storage area. Among them, the program storage area may store instructions for implementing the operating system, instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data created during the use of the terminal 700 (such as phone book, audio and video data, chat record data, etc.).
[0180] In addition, in each embodiment of the present application, each function can be integrated into one processing module, or each module can exist physically alone, or two or more modules can be integrated into one module. The above integrated module can be implemented in the form of hardware or in the form of a software function module.
[0181] Please refer to Figure 7 , Figure 7 which shows a structural block diagram of a computer-readable storage medium according to an embodiment of the present application. Program code is stored in the computer-readable medium 800, and the program code can be called by a processor to execute the method described in the above method embodiments.
[0182] The computer-readable storage medium 800 can be an electronic memory such as a flash memory, EEPROM (electrically erasable programmable read-only memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 800 has a storage space for the program code 810 that executes any method step in the above method. These program codes can be read out from or written into one or more computer program products. The program code 810 can be compressed in an appropriate form, for example.
[0183] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. An image processing method, characterized in that, For an electronic device, the method includes: Determining a target color gamut corresponding to the image to be projected according to the color coordinates of target pixel points in the image to be projected; Obtaining an intermediate projection image according to the image to be projected; Determining respective current parameters of multiple light sources under the target color gamut according to the image to be projected and the target color gamut; Determining an embedded brightness value corresponding to each light source according to the current parameter of each light source under the target color gamut; Embedding the embedded brightness values corresponding to the multiple light sources into the intermediate projection image to obtain a preprocessed projection image.
2. The method according to claim 1, wherein The determining an embedded brightness value corresponding to each light source according to the current parameter of each light source under the target color gamut includes: Determining the embedded brightness value corresponding to the light source according to the maximum current parameter of the light source, the minimum current parameter of the light source, the current parameter of the light source under the target color gamut, the maximum color level value, and the minimum color level value.
3. The method according to claim 2, wherein The determining the embedded brightness value corresponding to the light source according to the maximum current parameter of the light source, the minimum current parameter of the light source, the current parameter of the light source under the target color gamut, the maximum color level value, and the minimum color level value includes: Calculating a difference between the maximum current parameter of the light source and the minimum current parameter of the light source as a first operation result; Calculating a difference between the current parameter of the light source under the target color gamut and the minimum current parameter of the light source as a second operation result; Calculating a difference between the maximum color level value and the minimum color level value as a third operation result; Calculating a product of the second operation result corresponding to the light source and the third operation result, and calculating a ratio of the product to the first operation result to obtain the embedded brightness value corresponding to the light source.
4. The method according to claim 1, characterized in that The projector for projecting the image to be projected has multiple light-emitting color segments. The obtaining an intermediate projection image according to the image to be projected includes: Obtaining intermediate projection images corresponding to the multiple light-emitting color segments respectively according to the image to be projected; The embedding the embedded brightness values corresponding to the multiple light sources into the intermediate projection image to obtain a preprocessed projection image includes: Replacing the brightness value at a preset embedding position in each intermediate projection image with the embedded brightness value of the light source corresponding to the corresponding light-emitting color segment to obtain a preprocessed projection image, where the preprocessed projection image includes sub-projection images corresponding to the multiple light-emitting color segments respectively.
5. The method according to claim 1, characterized in that, The determining respective current parameters of multiple light sources under the target color gamut according to the image to be projected and the target color gamut includes: Determining conversion coefficients between the color space representations of the multiple light sources and the color space representation of the base point of the target color gamut; Determining an adjustment factor of the image to be projected according to the first color space representation of the pixel points in the image to be projected under the target color gamut; Determining a target light source combination representation of the base point of the target color gamut according to the conversion coefficients and the adjustment factor; Determining respective current parameters of the multiple light sources under the target color gamut according to the target light source combination representation of the base point of the target color gamut.
6. The method according to claim 5, wherein Determining the current parameters corresponding to each of a plurality of light sources under the target color gamut according to the target light source combination representation of the base points of the target color gamut includes: Determining the current parameters corresponding to each of a plurality of light sources under the target color gamut from a preset comparison relationship lookup table according to the target light source combination representation of the base points of the target color gamut, where the preset comparison relationship lookup table characterizes the comparison relationship between the light source brightness value and the current parameter.
7. A projection control method, characterized in that For a projector having a plurality of light-emitting color segments, the method includes: Obtaining the preprocessed projection image; the preprocessed projection image includes sub-projection images corresponding to each of the plurality of light-emitting color segments; Extracting the embedded brightness value of the light source corresponding to the corresponding light-emitting color segment from the sub-projection image corresponding to each light-emitting color segment; Determining the current parameter of the light source corresponding to each light-emitting color segment according to the embedded brightness value of the light source corresponding to each light-emitting color segment; Determining the target modulation parameter of each pixel point in the to-be-projected image according to the sub-projection images corresponding to each light-emitting color segment; Controlling the light sources corresponding to each of the plurality of light-emitting colors to emit light according to the current parameters of the light sources corresponding to each of the plurality of light-emitting color segments, and modulating the light emitted by the light sources corresponding to each of the plurality of light-emitting color segments according to the target modulation parameters of each pixel point in the to-be-projected image.
8. The method according to claim 7, wherein The embedded brightness value corresponding to the light-emitting color segment is embedded at a preset embedding position in the sub-projection image corresponding to the light-emitting color segment; The determining the target modulation parameter of each pixel point in the to-be-projected image according to the sub-projection images corresponding to each light-emitting color segment includes: Determining the target brightness value of the pixel point at the preset embedding position in the sub-projection image corresponding to the light-emitting color segment according to the brightness values of the pixel points around the preset embedding position in the sub-projection image corresponding to the light-emitting color segment; Determining the target modulation parameter of each pixel point in the to-be-projected image according to the target brightness value of the pixel point at the preset embedding position in the sub-projection image corresponding to the light-emitting color segment and the brightness values of the pixel points other than the pixel point at the preset embedding position in each sub-projection image.
9. An electronic device, characterized in that, Including: One or more first processors; A first memory; One or more application programs, where the one or more application programs are stored in the first memory and are configured to be executed by the one or more first processors, and the one or more application programs are configured to execute the method according to any one of claims 1-6.
10. A projector, characterized in that, Including: One or more second processors; A second memory; One or more application programs, where the one or more application programs are stored in the second memory and are configured to be executed by the one or more second processors, and the one or more application programs are configured to execute the method according to claim 7 or 8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program code executable by a processor, and when the program code is executed by the processor, the processor executes the method according to any one of claims 1-8.