Color picking method and device for display screen
By obtaining and analyzing the user's color picking area setting information and adjustment information, the RGB color space value is weighted to adjust the color picking area of the display screen, which solves the problem of low color picking accuracy in the prior art and achieves a higher Color accuracy.
Patent Information
- Application Number
- CN202411640861.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-02-07
AI Technical Summary
In the prior art, the color picking method of display screens is relatively low, and it is not possible to effectively perform targeted color picking according to the characteristics of the color picking area set by the user.
By obtaining the color-taking area setting information and adjustment information of the target user and multiple reference users, the adjustment information of the target color-taking area is determined, and weighted adjustment is performed based on the RGB color space value to obtain more accurate color collection results.
The color selection accuracy of the display screen is improved, and color adjustment can be made more accurately according to the user-set color selection area characteristics.
Smart Images

Figure CN119400124A_ABST
Abstract
Description
Technical Field
[0001] The present application mainly relates to the field of display technology, and specifically to a color extraction method and device for a display screen. Background Art
[0002] The color information of an image is a relatively simple but widely used visual feature. Color information is often related to the objects or scenes contained in the image. Compared with other image features (brightness, texture, etc.), color information is less dependent on changes in image size, direction, and viewing angle, and has better robustness. Therefore, the color information of an image is often used in application scenarios that require color control based on color information, such as the lighting effect control of an ambient light. At present, in the process of color extraction of a display screen, the color average is calculated based on the RGB (Red, Green, Blue) values of all pixels in the image, and no targeted color picking is performed based on the characteristics of the color picking area set by the user, resulting in a low color picking accuracy. Summary of the invention
[0003] The present application provides a color picking method and device for a display screen, aiming to solve the problem of low accuracy of the color picking method for a display screen in the prior art.
[0004] In a first aspect, the present application provides a color picking method for a display screen, the color picking method for a display screen comprising:
[0005] Get the screen image of the display screen;
[0006] Acquire target color picking area setting information determined by a target user on a display screen, wherein the target color picking area setting information includes area information of a plurality of color picking areas set by the target user on the display screen, wherein the color picking areas are used to represent a portion of an image area delineated on the screen image;
[0007] Acquire reference color picking area setting information and corresponding reference color picking area adjustment information of multiple reference users using the display screen, wherein the reference color picking area adjustment information includes color weights corresponding to the multiple color picking areas, and the color weights corresponding to the multiple color picking areas are used to adjust the colors of the multiple color picking areas in the reference color picking area setting information;
[0008] Determine the target color picking area adjustment information corresponding to the target color picking area setting information based on the reference color picking area setting information and the reference color picking area adjustment information of multiple reference users and the target color picking area setting information;
[0009] Determine a first RGB color space value of each pixel point in each color picking area on the screen image based on the target color picking area setting information;
[0010] Based on the target color picking area adjustment information, a first RGB color space value of each pixel in each of the color picking areas is weightedly adjusted to obtain a second RGB color space value of each pixel in each of the color picking areas on the screen image;
[0011] The second RGB color space value of each pixel in each color picking area on the screen image is determined as a color picking result.
[0012] Optionally, the weighted adjustment of the first RGB color space value of each pixel in each of the color picking areas based on the target color picking area adjustment information to obtain the second RGB color space value of each pixel in each of the color picking areas on the screen image includes:
[0013] Convert the first RGB color space value of each pixel in the color picking area to the HSV color space to obtain the color hue value corresponding to the first RGB color space value of each pixel in the color picking area;
[0014] Clustering the color tone value and coordinate information of each pixel in the color picking area to obtain a plurality of pixel clusters;
[0015] Weighting the first RGB color space values of the pixels in the pixel clusters based on the preset cluster weights of the pixel clusters to obtain third RGB color space values corresponding to the first RGB color space values in the pixel clusters;
[0016] Based on the target color picking area adjustment information, the third RGB color space value of each pixel point in each of the color picking areas is weightedly adjusted to obtain the second RGB color space value of each pixel point in each of the color picking areas on the screen image.
[0017] Optionally, the color picking method of the display screen includes:
[0018] Obtaining the number of pixels in the pixel cluster;
[0019] Determine the pixel cluster with the largest number of pixels in the color picking area as the core cluster;
[0020] Calculating the cluster center distance between the cluster center of each pixel cluster and the cluster center of the core cluster respectively;
[0021] The preset cluster weight of each pixel cluster is determined based on the number of pixels in each pixel cluster and the cluster center distance corresponding to each pixel cluster, wherein the larger the number of pixels, the larger the preset cluster weight, and the larger the cluster center distance, the smaller the preset cluster weight.
[0022] Optionally, the determining the target color picking area adjustment information corresponding to the target color picking area setting information based on the reference color picking area setting information and the reference color picking area adjustment information of multiple reference users and the target color picking area setting information includes:
[0023] Calculating the user similarity between each of the reference users and the target user respectively;
[0024] respectively calculating the first setting information similarity between the reference color picking area setting information of each reference user and the target color picking area setting information of the target user;
[0025] Determine an average value of the user similarity and the first setting information similarity as the total similarity;
[0026] The target color picking area adjustment information corresponding to the target color picking area setting information is determined based on the reference color picking area setting information of the reference user with the highest total similarity.
[0027] Optionally, respectively calculating the first setting information similarity between the reference color picking area setting information of each reference user and the target color picking area setting information of the target user includes:
[0028] Respectively obtain the number of color picking areas of the reference color picking area setting information and the number of color picking areas of the target color picking area setting information;
[0029] When the number of color picking areas in the reference color picking area setting information is greater than the number of color picking areas in the target color picking area setting information, determining the number of color picking areas in the target color picking area setting information as a first preset number;
[0030] Clustering the color picking areas in the reference color picking area setting information into a first preset number of first segmented area clusters based on the centroid positions of the color picking areas in the reference color picking area setting information, each first segmented area cluster including at least one color picking area;
[0031] Merging each first segmented region cluster into a new color picking region to obtain a first preset number of color picking regions in the reference color picking region setting information;
[0032] Matching a first preset number of color picking areas in the reference color picking area setting information with a first preset number of color picking areas in the target color picking area setting information one by one to obtain a first preset number of color picking area pairs, wherein the color picking area pairs include a color picking area in the reference color picking area setting information and a color picking area in the target color picking area setting information;
[0033] Calculating the region similarity index between two color picking regions in the color picking region pair to obtain the region similarity indexes of a first preset number of color picking region pairs;
[0034] Based on a first preset number of regional weight coefficients, the regional similarity indicators of a first preset number of color picking area pairs are weighted and summed to obtain a first setting information similarity between the reference color picking area setting information of the reference user and the target color picking area setting information of the target user.
[0035] Optionally, respectively calculating the user similarities between each of the reference users and the target user includes:
[0036] Acquire a plurality of first historical color picking area setting information historically selected by the reference user within a preset historical time period and a plurality of second historical color picking area setting information historically selected by the target user within a preset historical time period;
[0037] Determine a first historical color picking area setting information and a second historical color picking area setting information as a setting information group, to obtain a plurality of setting information groups;
[0038] Calculate the second setting information similarity between the first historical color picking area setting information and the second historical color picking area setting information in the setting information group, and obtain the second setting information similarity corresponding to the plurality of setting information groups;
[0039] An average value of the second setting information similarities corresponding to the plurality of setting information groups is determined as the user similarity between the target user and the reference user.
[0040] Optionally, a frame of the display screen is provided with a plurality of atmosphere lights, and the color selection method of the display screen includes:
[0041] Determine the mapping relationship between each atmosphere light and each color picking area based on the target color picking area setting information;
[0042] Determine an average value of the second RGB color space values of each pixel point in the color picking area as a fourth RGB color space value of the color picking area, and obtain a plurality of fourth RGB color space values of the color picking area;
[0043] Based on the fourth RGB color space value of each color picking area, the ambient light corresponding to each color picking area is controlled to emit light, so as to improve the display effect of the color picking area.
[0044] In a second aspect, the present application provides a color picking device for a display screen, the color picking device for a display screen comprising:
[0045] A first acquisition unit, used to acquire a screen image of the display screen;
[0046] A second acquisition unit is used to acquire target color picking area setting information determined by a target user on the display screen, wherein the target color picking area setting information includes area information of multiple color picking areas set by the target user on the display screen, and the color picking area is used to represent a portion of an image area delineated on the screen image;
[0047] A third acquisition unit is used to acquire reference color picking area setting information and corresponding reference color picking area adjustment information of multiple reference users using the display screen, wherein the reference color picking area adjustment information includes color weights corresponding to the multiple color picking areas, and the color weights corresponding to the multiple color picking areas are used to adjust the colors of the multiple color picking areas in the reference color picking area setting information;
[0048] A first determining unit, configured to determine target color picking area adjustment information corresponding to the target color picking area setting information based on reference color picking area setting information and reference color picking area adjustment information of multiple reference users and the target color picking area setting information;
[0049] A second determining unit, configured to determine a first RGB color space value of each pixel point in each color picking area on the screen image based on the target color picking area setting information;
[0050] an adjusting unit, configured to perform weighted adjustment on a first RGB color space value of each pixel point in each of the color picking areas based on the target color picking area adjustment information, so as to obtain a second RGB color space value of each pixel point in each of the color picking areas on the screen image;
[0051] The third determining unit is used to determine the second RGB color space value of each pixel point in each color picking area on the screen image as a color picking result.
[0052] In a third aspect, the present application provides a computer device, the computer device comprising:
[0053] one or more processors;
[0054] Memory; and
[0055] One or more applications, wherein the one or more applications are stored in the memory and are configured to be executed by the processor to implement the color picking method for a display screen described in any one of the first aspects.
[0056] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a plurality of instructions, wherein the instructions are suitable for loading by a processor to execute the steps in the color picking method for a display screen described in any one of the first aspects.
[0057] The present application provides a color picking method and device for a display screen, the color picking method for a display screen comprising: acquiring a screen image of the display screen; acquiring target color picking area setting information determined by a target user on the display screen, the target color picking area setting information comprising area information of multiple color picking areas set by the target user on the display screen, the color picking area being used to characterize a portion of an image area delineated on the screen image; acquiring reference color picking area setting information and corresponding reference color picking area adjustment information of multiple reference users using the display screen, the reference color picking area adjustment information comprising color weights corresponding to the multiple color picking areas, the color weights corresponding to the multiple color picking areas being used to adjust the colors of the multiple color picking areas in the reference color picking area setting information Color is adjusted; based on the reference color picking area setting information and reference color picking area adjustment information of multiple reference users and the target color picking area setting information, the target color picking area adjustment information corresponding to the target color picking area setting information is determined; based on the target color picking area setting information, the first RGB color space value of each pixel in each color picking area on the screen image is determined; based on the target color picking area adjustment information, the first RGB color space value of each pixel in each color picking area is weightedly adjusted to obtain the second RGB color space value of each pixel in each color picking area on the screen image; the second RGB color space value of each pixel in each color picking area on the screen image is determined as the color picking result. The present application can determine a targeted adjustment scheme according to the characteristics of the color picking area set by the user, and can improve the color picking accuracy of the display screen. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0059] Figure 1 A schematic diagram of a scene of a color picking system for a display screen provided in an embodiment of the present application;
[0060] Figure 2 This is a schematic diagram of an embodiment of a color picking method for a display screen provided in an embodiment of the present application;
[0061] Figure 3 is a schematic diagram of multiple color picking areas in an embodiment of a color picking method for a display screen provided in an embodiment of the present application;
[0062] Figure 4 It is a schematic structural diagram of an embodiment of a color picking device for a display screen provided in an embodiment of the present application;
[0063] Figure 5It is a schematic diagram of the structure of an embodiment of a computer device provided in the embodiments of the present application. DETAILED DESCRIPTION
[0064] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0065] In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first" and "second" are used only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0066] In this application, the word "exemplary" is used to mean "used as an example, illustration, or description." Any embodiment described in this application as "exemplary" is not necessarily to be construed as being preferred or advantageous over other embodiments. The following description is given to enable any technician in the field to implement and use the present application. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present application can be implemented without using these specific details. In other instances, well-known structures and processes will not be elaborated in detail to avoid obscuring the description of the present application with unnecessary details. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present application.
[0067] The embodiments of the present application provide a method and device for picking colors for a display screen, which are described in detail below.
[0068] See also Figure 1 , Figure 1This is a scene diagram of a color picking system for a display screen provided in an embodiment of the present application. The color picking system for a display screen may include a computer device 100, in which a color picking device for a display screen is integrated.
[0069] In the embodiment of the present application, the computer device 100 may be an independent server, or a server network or server cluster composed of servers. For example, the computer device 100 described in the embodiment of the present application includes but is not limited to a computer, a network host, a single network server, a plurality of network server sets or a cloud server composed of a plurality of servers. The cloud server is composed of a large number of computers or network servers based on cloud computing.
[0070] In the embodiment of the present application, the above-mentioned computer device 100 can be a general-purpose computer device or a special-purpose computer device. In a specific implementation, the computer device 100 can be a desktop computer, a portable computer, a network server, a PDA (Personal Digital Assistant), a mobile phone, a tablet computer, a wireless terminal device, a communication device, an embedded device, etc. This embodiment does not limit the type of the computer device 100.
[0071] Those skilled in the art will understand that Figure 1 The application environment shown in the figure is only one application scenario of the present application solution and does not constitute a limitation on the application scenario of the present application solution. Other application environments may also include Figure 1 More or less computer equipment as shown in Figure 1 Only one computer device is shown in the figure. It can be understood that the color picking system of the display screen can also include one or more other computer devices that can process data, which is not limited here.
[0072] In addition, if Figure 1 As shown, the color picking system of the display screen may further include a memory 200 for storing data.
[0073] It should be noted that Figure 1 The scene diagram of the color picking system of the display screen shown is merely an example. The color picking system and scene of the display screen described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. A person of ordinary skill in the art can know that with the evolution of the color picking system of the display screen and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
[0074] First, an embodiment of the present application provides a color picking method for a display screen, and the color picking method for a display screen includes: acquiring a screen image of the display screen; acquiring target color picking area setting information determined by a target user on the display screen, the target color picking area setting information including area information of multiple color picking areas set by the target user on the display screen, the color picking area being used to characterize a portion of an image area delineated on the screen image; acquiring reference color picking area setting information and corresponding reference color picking area adjustment information of multiple reference users using the display screen, the reference color picking area adjustment information including color weights corresponding to the multiple color picking areas, the color weights corresponding to the multiple color picking areas being used to adjust the multiple color picking areas in the reference color picking area setting information adjust the color; determine the target color picking area adjustment information corresponding to the target color picking area setting information based on the reference color picking area setting information and the reference color picking area adjustment information of multiple reference users and the target color picking area setting information; determine the first RGB color space value of each pixel point in each color picking area on the screen image based on the target color picking area setting information; perform weighted adjustment on the first RGB color space value of each pixel point in each color picking area based on the target color picking area adjustment information to obtain the second RGB color space value of each pixel point in each color picking area on the screen image; determine the second RGB color space value of each pixel point in each color picking area on the screen image as the color picking result.
[0075] like Figure 2 As shown, Figure 2 1 is a flow chart of an embodiment of a color picking method for a display screen provided in an embodiment of the present application, and the color picking method for a display screen comprises the following steps:
[0076] 201. Acquire a screen image of a display screen.
[0077] In the embodiment of the present application, the display screen displays a screen image after being powered on, and the screen image displayed by the display screen is acquired.
[0078] 202. Obtain target color picking area setting information determined by the target user on the display screen.
[0079] The target color picking area setting information includes area information of multiple color picking areas set by the target user on the display screen, and the color picking area is used to represent a part of the image area delineated on the screen image.
[0080] The color picking area can be a rectangle, circle, polygon or irregular shape, etc., depending on the user's specific settings. Figure 3 As shown, there are multiple color picking areas on the screen image of the display screen.
[0081] Specifically, multiple color picking tracks circled by the user using a color picking pen on the display screen are obtained, the area within the color picking tracks is determined as the color picking area, and the area information of the obtained multiple color picking areas is determined as the target color picking area setting information. The area information includes the coordinate information of each point in the color picking area.
[0082] 203. Obtain reference color picking area setting information and corresponding reference color picking area adjustment information of a plurality of reference users using the display screen.
[0083] The reference color picking area adjustment information includes color weights corresponding to the multiple color picking areas, and the color weights corresponding to the multiple color picking areas are used to adjust the colors of the multiple color picking areas in the reference color picking area setting information. The reference color picking area adjustment information includes color weights corresponding to the multiple color picking areas, which can be set by the user. For example, the color weights corresponding to the three color picking areas are 0.8, 0.7, and 0.9, respectively.
[0084] The reference user may be a user who uses the same display screen as the target user.
[0085] 204. Determine target color picking area adjustment information corresponding to the target color picking area setting information based on the reference color picking area setting information and the reference color picking area adjustment information of the multiple reference users and the target color picking area setting information.
[0086] In the embodiment of the present application, the target color picking area adjustment information corresponding to the target color picking area setting information is determined based on the reference color picking area setting information and the reference color picking area adjustment information of multiple reference users and the target color picking area setting information, including:
[0087] (1) Calculate the user similarity between each reference user and the target user respectively.
[0088] In the embodiment of the present application, the user similarity between each reference user and the target user is calculated respectively, including:
[0089] First, a plurality of first historical color picking area setting information historically selected by a reference user within a preset historical time period and a plurality of second historical color picking area setting information historically selected by a target user within a preset historical time period are obtained.
[0090] The preset historical time period can be within a week, within 10 days, etc., depending on the specific setting. The plurality of first historical color picking area setting information is the color picking area setting information set by the reference user at different times. The plurality of second historical color picking area setting information is the color picking area setting information set by the target user at different times.
[0091] Then, a first historical color picking area setting information and a second historical color picking area setting information are determined as a setting information group, and a plurality of setting information groups are obtained.
[0092] Then, the second setting information similarity of the first historical color picking area setting information and the second historical color picking area setting information in the setting information group is calculated to obtain the second setting information similarity corresponding to the plurality of setting information groups. The calculation method of the second setting information similarity of the first historical color picking area setting information and the second historical color picking area setting information is referred to the calculation method of the first setting information similarity.
[0093] An average value of the second setting information similarities corresponding to the plurality of setting information groups is determined as the user similarity between the target user and the reference user.
[0094] (2) Calculating the similarity between the reference color picking area setting information of each reference user and the first setting information of the target color picking area setting information of the target user respectively.
[0095] In the embodiment of the present application, respectively calculating the similarity of the first setting information of the reference color picking area setting information of each reference user and the target color picking area setting information of the target user includes:
[0096] First, the number of color picking areas in the reference color picking area setting information and the number of color picking areas in the target color picking area setting information are obtained respectively.
[0097] When the number of color picking areas in the reference color picking area setting information is greater than the number of color picking areas in the target color picking area setting information, the number of color picking areas in the target color picking area setting information is determined as a first preset number.
[0098] Based on the centroid position of the color picking area in the reference color picking area setting information, the color picking areas in the reference color picking area setting information are clustered into a first preset number of first segmented area clusters, each of which includes at least one color picking area. Specifically, based on the centroid position of the color picking area in the reference color picking area setting information, the color picking areas in the reference color picking area setting information are clustered into a first preset number of first segmented area clusters, including: randomly dividing the color picking areas in the reference color picking area setting information into Q segmented area sets. Clustering the Q segmented area sets respectively, clustering each segmented area set into a first preset number of second segmented area clusters. Determining each second segmented area cluster as a target segmented area cluster, and calculating the area cluster similarity between the target segmented area cluster and the second segmented area clusters in the Q segmented area sets respectively. Merging the second segmented area clusters with the greatest similarity to the target segmented area cluster in each segmented area set to obtain the first segmented area cluster corresponding to the target segmented area cluster, obtaining the first segmented area cluster corresponding to each second segmented area cluster, and obtaining the first preset number of first segmented area clusters corresponding to the first preset number of second segmented area clusters.
[0099] Each first segmented area cluster is merged into a new color picking area to obtain the first preset number of color picking areas in the reference color picking area setting information. Specifically, each first segmented area cluster is merged into a new color picking area to obtain the first preset number of color picking areas in the reference color picking area setting information, including: obtaining the centroid of each color picking area in the first segmented area cluster, connecting the centroids of each color picking area in the first segmented area cluster in sequence to obtain a first polygonal area, and geometrically enlarging the first polygonal area to obtain a second polygonal area, wherein the second polygonal area and the first polygonal area have the same centroid, the second polygonal area is the smallest polygonal area that is geometrically enlarged by the first polygonal area and contains each color picking area in the first segmented area cluster, and the second polygonal area is determined as a new color picking area after the color picking areas in the first segmented area cluster are merged to obtain the first preset number of new color picking areas in the reference color picking area setting information.
[0100] Match the first preset number of color picking areas in the reference color picking area setting information with the first preset number of color picking areas in the target color picking area setting information one by one to obtain a first preset number of color picking area pairs, the color picking area pair including a color picking area in the reference color picking area setting information and a color picking area in the target color picking area setting information. Specifically, calculate the color picking area distance between a color picking area in the reference color picking area setting information and each color picking area in the target color picking area setting information, wherein the color picking area distance is the distance between the centroids of two color picking areas. The color picking area in the target color picking area setting information with the smallest color picking area distance from a color picking area in the reference color picking area setting information and a color picking area in the reference color picking area setting information are determined as a color picking area pair.
[0101] The region similarity index between the two color picking regions in the color picking region pair is calculated to obtain the region similarity index of the first preset number of color picking region pairs. Specifically, the intersection-over-combination ratio between the two color picking regions in the color picking region pair is determined as the region similarity index.
[0102] Based on the first preset number of regional weight coefficients, the regional similarity indicators of the first preset number of color picking area pairs are weighted and summed to obtain the first setting information similarity between the reference color picking area setting information of the reference user and the target color picking area setting information of the target user. Specifically, the regional area ratio of each color picking area in the target color picking area setting information is obtained, and the regional area ratio of each color picking area in the target color picking area setting information is determined as the regional weight coefficient of the first preset number of color picking areas. Based on the first preset number of regional weight coefficients, the regional similarity indicators of the first preset number of color picking area pairs are weighted and summed to obtain the first setting information similarity between the reference color picking area setting information of the reference user and the target color picking area setting information of the target user.
[0103] (3) The average of the user similarity and the first setting information similarity is determined as the total similarity.
[0104] (4) Determining the target color picking area adjustment information corresponding to the target color picking area setting information based on the reference color picking area setting information of the reference user with the highest total similarity.
[0105] Specifically, the color weights of the first preset number of color picking areas in the reference color picking area setting information of the reference user with the highest total similarity are determined as the color weights of the corresponding color picking areas in the target color picking area adjustment information.
[0106] 205. Determine a first RGB color space value of each pixel in each color picking area on the screen image based on the target color picking area setting information.
[0107] In a specific embodiment, the fifth RGB color space value of each pixel in each color picking area is determined from the screen image based on the target color picking area setting information, and the fifth RGB color space value of each pixel is determined as the first RGB color space value of each pixel.
[0108] In another specific embodiment, the fifth RGB color space value of each pixel in each color picking area is determined from the screen image based on the target color picking area setting information, and the fifth RGB color space value of each pixel is processed to obtain the first RGB color space value of each pixel.
[0109] The fifth RGB color space value of each pixel is processed to obtain the first RGB color space value of each pixel, including: taking out the fifth RGB color space value of each pixel, reducing the value according to the one-dimensional DCT transformation, channel transmission, content transformation and restoration, and obtaining the first RGB color space value of each pixel.
[0110] In the process of data processing, the content data is taken out, the value is reduced according to the one-dimensional DCT transform, the channel is transmitted, and the content is transformed and restored. The formula is expressed as:
[0111] Content data extraction: extracting content from raw data, denoted as C.
[0112] One-dimensional discrete cosine transform (DCT):
[0113] Perform a one-dimensional DCT transform on the content data C to obtain the transformed coefficient D:
[0114]
[0115] Numerical reduction: DCT coefficients are reduced to obtain the reduced coefficients D′.
[0116]
[0117] Channel transmission: The reduced coefficient D′ is transmitted through the channel.
[0118] Content transformation and restoration: The receiver performs an inverse DCT transform on the received reduction coefficient D′ to obtain the restored content data C′:
[0119]
[0120] The whole process can be expressed as:
[0121]
[0122] C: Original content data, indicating the input data that needs to be processed.
[0123] D: Coefficient after one-dimensional discrete cosine transform (DCT), representing the representation of content data in the frequency domain.
[0124] Dk: The kth coefficient after DCT transformation, representing a specific frequency component in the frequency domain.
[0125] : DCT coefficients after numerical reduction, representing the processed data before transmission.
[0126] : The kth DCT coefficient after reduction.
[0127] α: reduction factor, usually less than 1, used to control the reduction ratio of DCT coefficients.
[0128] : The restored content data represents the output data obtained by the receiver through inverse DCT transformation.
[0129] : The nth value in the restored content data.
[0130] N: The length of the data, indicating the number of data points processed.
[0131] n: Index variable used for inverse DCT transform, indicating the position in the restored data.
[0132] k: Index variable used for DCT transform, indicating the position in the frequency domain.
[0133] 206. Perform weighted adjustment on the first RGB color space value of each pixel in each color picking area based on the target color picking area adjustment information to obtain the second RGB color space value of each pixel in each color picking area on the screen image.
[0134] Specifically, according to the color weight of the color picking area in the target color picking area adjustment information, the first RGB color space value of each pixel in the color picking area is weightedly adjusted to obtain the second RGB color space value of each pixel in the color picking area. Each color picking area is adjusted in turn to obtain the second RGB color space value of each pixel in each color picking area on the screen image.
[0135] Further, based on the target color picking area adjustment information, the target color picking area setting information is weightedly adjusted for the first RGB color space value of each pixel in each color picking area to obtain the second RGB color space value of each pixel in each color picking area on the screen image, including:
[0136] (1) Convert the first RGB color space value of each pixel in the color picking area to the HSV color space to obtain the color hue value corresponding to the first RGB color space value of each pixel in the color picking area.
[0137] (2) Clustering is performed based on the color hue value and coordinate information of each pixel in the color picking area to obtain multiple pixel clusters.
[0138] Specifically, the color hue value and coordinate information of each pixel in the same pixel cluster are similar.
[0139] (3) The first RGB color space values of the pixels in the pixel clusters are weighted based on the preset cluster weights of the pixel clusters to obtain third RGB color space values corresponding to the first RGB color space values in the pixel clusters.
[0140] Specifically, the number of pixels in the pixel clustering cluster is obtained; the pixel clustering cluster with the largest number of pixels in the color picking area is determined as the core clustering cluster; the cluster center distance between the cluster center of each pixel clustering cluster and the cluster center of the core clustering cluster is calculated respectively; the preset cluster weight of each pixel clustering cluster is determined based on the number of pixels in each pixel clustering cluster and the cluster center distance corresponding to each pixel clustering cluster, wherein the larger the number of pixels, the larger the preset cluster weight, and the larger the cluster center distance, the smaller the preset cluster weight.
[0141] (4) Based on the target color picking area adjustment information, a weighted adjustment is performed on the third RGB color space value of each pixel in each color picking area to obtain a second RGB color space value of each pixel in each color picking area on the screen image.
[0142] 207. Determine the second RGB color space value of each pixel in each color picking area on the screen image as a color picking result.
[0143] Furthermore, the border of the display screen is provided with a plurality of atmosphere lights, and the color selection method of the display screen includes:
[0144] (1) Determine the mapping relationship between each ambient light and each color picking area based on the target color picking area setting information.
[0145] In the embodiment of the present application, one color picking area may correspond to one atmosphere light, or may correspond to multiple atmosphere lights, depending on the specific situation.
[0146] (2) Determine the average value of the second RGB color space value of each pixel in the color picking area as the fourth RGB color space value of the color picking area, and obtain the fourth RGB color space values of the plurality of color picking areas.
[0147] (3) Based on the fourth RGB color space value of each color picking area, the ambient light corresponding to each color picking area is controlled to emit light, so as to improve the display effect of the color picking area.
[0148] Specifically, the atmosphere light corresponding to each color picking area may be adjusted to the fourth RGB color space value of each color picking area.
[0149] In order to better implement the color picking method of the display screen in the embodiment of the present application, based on the color picking method of the display screen, the embodiment of the present application also provides a color picking device for the display screen, such as Figure 4 As shown, the color picking device of the display screen includes:
[0150] A first acquisition unit 701 is used to acquire a screen image of a display screen;
[0151] A second acquisition unit 702 is used to acquire target color picking area setting information determined by a target user on the display screen, wherein the target color picking area setting information includes area information of multiple color picking areas set by the target user on the display screen, and the color picking area is used to represent a portion of the image area delineated on the screen image;
[0152] A third acquisition unit 703 is used to acquire reference color picking area setting information and corresponding reference color picking area adjustment information of multiple reference users using the display screen, wherein the reference color picking area adjustment information includes color weights corresponding to the multiple color picking areas, and the color weights corresponding to the multiple color picking areas are used to adjust the colors of the multiple color picking areas in the reference color picking area setting information;
[0153] A first determining unit 704 is configured to determine target color picking area adjustment information corresponding to the target color picking area setting information based on reference color picking area setting information and reference color picking area adjustment information of multiple reference users and the target color picking area setting information;
[0154] A second determining unit 705 is used to determine a first RGB color space value of each pixel point in each color picking area on the screen image based on the target color picking area setting information;
[0155] An adjustment unit 706 is used to perform weighted adjustment on the first RGB color space value of each pixel point in each of the color picking areas based on the target color picking area adjustment information to obtain a second RGB color space value of each pixel point in each of the color picking areas on the screen image;
[0156] The third determining unit 707 is used to determine the second RGB color space value of each pixel in each color picking area on the screen image as a color picking result.
[0157] The embodiment of the present application further provides a computer device, which integrates any color picking device of a display screen provided in the embodiment of the present application, and the computer device includes:
[0158] one or more processors;
[0159] Memory; and
[0160] One or more applications, wherein the one or more applications are stored in a memory and are configured to execute, by a processor, the steps of the method for picking a color for a display screen in any of the above-mentioned embodiments of the method for picking a color for a display screen.
[0161] like Figure 5 As shown, it shows a schematic diagram of the structure of the computer device involved in the embodiment of the present application, specifically:
[0162] The computer device may include components such as a processor 601 with one or more processing cores, a memory 602 with one or more computer-readable storage media, a power supply 603, and an input unit 604. Those skilled in the art will appreciate that the computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or group certain components, or arrange the components differently. Among them:
[0163] The processor 601 is the control center of the computer device. It uses various interfaces and lines to connect various parts of the entire computer device. By running or executing software programs and / or modules stored in the memory 602, and calling data stored in the memory 602, it executes various functions of the computer device and processes data, thereby monitoring the computer device as a whole. Optionally, the processor 601 may include one or more processing cores; the processor 601 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 gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. Preferably, the processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 601.
[0164] The memory 602 can be used to store software programs and modules. The processor 601 executes various functional applications and data processing by running the software programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 602 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 602 may also include a memory controller to provide the processor 601 with access to the memory 602.
[0165] The computer device also includes a power supply 603 for supplying power to various components. Preferably, the power supply 603 can be logically connected to the processor 601 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 603 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0166] The computer device may further include an input unit 604, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0167] Although not shown, the computer device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 601 in the computer device will load the executable files corresponding to the processes of one or more application programs into the memory 602 according to the following instructions, and the processor 601 will run the application programs stored in the memory 602, thereby realizing various functions, as follows:
[0168] Acquire a screen image of a display screen; acquire target color picking area setting information determined by a target user on the display screen, the target color picking area setting information including area information of multiple color picking areas set by the target user on the display screen, the color picking area being used to characterize a portion of an image area delineated on the screen image; acquire reference color picking area setting information and corresponding reference color picking area adjustment information of multiple reference users using the display screen, the reference color picking area adjustment information including color weights corresponding to multiple color picking areas, the color weights corresponding to multiple color picking areas being used to adjust the colors of multiple color picking areas in the reference color picking area setting information; determine target color picking area adjustment information corresponding to the target color picking area setting information based on the reference color picking area setting information and the reference color picking area adjustment information of multiple reference users and the target color picking area setting information; determine a first RGB color space value of each pixel in each color picking area on the screen image based on the target color picking area setting information; perform weighted adjustment on the first RGB color space value of each pixel in each color picking area based on the target color picking area adjustment information to obtain a second RGB color space value of each pixel in each color picking area on the screen image; determine the second RGB color space value of each pixel in each color picking area on the screen image as a color picking result.
[0169] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0170] To this end, the embodiment of the present application provides a computer-readable storage medium, which may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any of the color picking methods for a display screen provided in the embodiment of the present application. For example, the computer program loaded by the processor can execute the following steps:
[0171] Acquire a screen image of a display screen; acquire target color picking area setting information determined by a target user on the display screen, the target color picking area setting information including area information of multiple color picking areas set by the target user on the display screen, the color picking area being used to characterize a portion of an image area delineated on the screen image; acquire reference color picking area setting information and corresponding reference color picking area adjustment information of multiple reference users using the display screen, the reference color picking area adjustment information including color weights corresponding to multiple color picking areas, the color weights corresponding to multiple color picking areas being used to adjust the colors of multiple color picking areas in the reference color picking area setting information; determine target color picking area adjustment information corresponding to the target color picking area setting information based on the reference color picking area setting information and the reference color picking area adjustment information of multiple reference users and the target color picking area setting information; determine a first RGB color space value of each pixel in each color picking area on the screen image based on the target color picking area setting information; perform weighted adjustment on the first RGB color space value of each pixel in each color picking area based on the target color picking area adjustment information to obtain a second RGB color space value of each pixel in each color picking area on the screen image; determine the second RGB color space value of each pixel in each color picking area on the screen image as a color picking result.
[0172] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the detailed description of other embodiments above, and will not be repeated here.
[0173] In specific implementation, the above units or structures can be implemented as independent users, or can be arbitrarily grouped and implemented as the same or several users. The specific implementation of the above units or structures can refer to the previous method embodiments and will not be repeated here.
[0174] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0175] The above is a detailed introduction to a color picking method and device for a display screen provided in an embodiment of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A color picking method for a display screen, characterized in that: The color picking method of the display screen comprises: Get the screen image of the display screen; Acquire target color picking area setting information determined by a target user on a display screen, wherein the target color picking area setting information includes area information of a plurality of color picking areas set by the target user on the display screen, wherein the color picking areas are used to represent a portion of an image area delineated on the screen image; Acquire reference color picking area setting information and corresponding reference color picking area adjustment information of multiple reference users using the display screen, wherein the reference color picking area adjustment information includes color weights corresponding to the multiple color picking areas, and the color weights corresponding to the multiple color picking areas are used to adjust the colors of the multiple color picking areas in the reference color picking area setting information; Determine the target color picking area adjustment information corresponding to the target color picking area setting information based on the reference color picking area setting information and the reference color picking area adjustment information of multiple reference users and the target color picking area setting information; Determine a first RGB color space value of each pixel point in each color picking area on the screen image based on the target color picking area setting information; Based on the target color picking area adjustment information, a first RGB color space value of each pixel in each of the color picking areas is weightedly adjusted to obtain a second RGB color space value of each pixel in each of the color picking areas on the screen image; The second RGB color space value of each pixel in each color picking area on the screen image is determined as a color picking result.
2. The color picking method for a display screen according to claim 1, characterized in that: The step of weighting the first RGB color space value of each pixel in each color picking area based on the target color picking area adjustment information to obtain the second RGB color space value of each pixel in each color picking area on the screen image includes: Convert the first RGB color space value of each pixel in the color picking area to the HSV color space to obtain the color hue value corresponding to the first RGB color space value of each pixel in the color picking area; Clustering the color tone value and coordinate information of each pixel in the color picking area to obtain a plurality of pixel clusters; Weighting the first RGB color space values of the pixels in the pixel clusters based on the preset cluster weights of the pixel clusters to obtain third RGB color space values corresponding to the first RGB color space values in the pixel clusters; Based on the target color picking area adjustment information, the third RGB color space value of each pixel point in each of the color picking areas is weightedly adjusted to obtain the second RGB color space value of each pixel point in each of the color picking areas on the screen image.
3. The color picking method of a display screen according to claim 2, characterized in that: The color picking method of the display screen comprises: Obtaining the number of pixels in the pixel cluster; Determine the pixel cluster with the largest number of pixels in the color picking area as the core cluster; Calculating the cluster center distance between the cluster center of each pixel cluster and the cluster center of the core cluster respectively; The preset cluster weight of each pixel cluster is determined based on the number of pixels in each pixel cluster and the cluster center distance corresponding to each pixel cluster, wherein the larger the number of pixels, the larger the preset cluster weight, and the larger the cluster center distance, the smaller the preset cluster weight.
4. The color picking method for a display screen according to claim 1, characterized in that: The determining the target color picking area adjustment information corresponding to the target color picking area setting information based on the reference color picking area setting information and the reference color picking area adjustment information of multiple reference users and the target color picking area setting information includes: Calculating the user similarity between each of the reference users and the target user respectively; respectively calculating the first setting information similarity between the reference color picking area setting information of each reference user and the target color picking area setting information of the target user; Determine an average value of the user similarity and the first setting information similarity as the total similarity; The target color picking area adjustment information corresponding to the target color picking area setting information is determined based on the reference color picking area setting information of the reference user with the highest total similarity.
5. The color picking method for a display screen according to claim 4, characterized in that: The respectively calculating the first setting information similarity between the reference color picking area setting information of each reference user and the target color picking area setting information of the target user comprises: Respectively obtain the number of color picking areas of the reference color picking area setting information and the number of color picking areas of the target color picking area setting information; When the number of color picking areas in the reference color picking area setting information is greater than the number of color picking areas in the target color picking area setting information, determining the number of color picking areas in the target color picking area setting information as a first preset number; Clustering the color picking areas in the reference color picking area setting information into a first preset number of first segmented area clusters based on the centroid positions of the color picking areas in the reference color picking area setting information, each first segmented area cluster including at least one color picking area; Merging each first segmented region cluster into a new color picking region to obtain a first preset number of color picking regions in the reference color picking region setting information; Matching a first preset number of color picking areas in the reference color picking area setting information with a first preset number of color picking areas in the target color picking area setting information one by one to obtain a first preset number of color picking area pairs, wherein the color picking area pairs include a color picking area in the reference color picking area setting information and a color picking area in the target color picking area setting information; Calculating the region similarity index between two color picking regions in the color picking region pair to obtain the region similarity indexes of a first preset number of color picking region pairs; Based on a first preset number of regional weight coefficients, the regional similarity indicators of a first preset number of color picking area pairs are weighted and summed to obtain a first setting information similarity between the reference color picking area setting information of the reference user and the target color picking area setting information of the target user.
6. The color picking method for a display screen according to claim 4, characterized in that: The respectively calculating the user similarity between each of the reference users and the target user comprises: Acquire a plurality of first historical color picking area setting information historically selected by the reference user within a preset historical time period and a plurality of second historical color picking area setting information historically selected by the target user within a preset historical time period; Determine a first historical color picking area setting information and a second historical color picking area setting information as a setting information group, to obtain a plurality of setting information groups; Calculate the second setting information similarity between the first historical color picking area setting information and the second historical color picking area setting information in the setting information group, and obtain the second setting information similarity corresponding to the plurality of setting information groups; An average value of the second setting information similarities corresponding to the plurality of setting information groups is determined as the user similarity between the target user and the reference user.
7. The color picking method for a display screen according to claim 1, characterized in that: The frame of the display screen is provided with a plurality of atmosphere lights, and the color selection method of the display screen comprises: Determine the mapping relationship between each atmosphere light and each color picking area based on the target color picking area setting information; Determine an average value of the second RGB color space values of each pixel point in the color picking area as a fourth RGB color space value of the color picking area, and obtain a plurality of fourth RGB color space values of the color picking area; Based on the fourth RGB color space value of each color picking area, the ambient light corresponding to each color picking area is controlled to emit light, so as to improve the display effect of the color picking area.
8. A color picking device for a display screen, characterized in that: The color picking device of the display screen comprises: A first acquisition unit, used to acquire a screen image of the display screen; A second acquisition unit is used to acquire target color picking area setting information determined by a target user on the display screen, wherein the target color picking area setting information includes area information of multiple color picking areas set by the target user on the display screen, and the color picking area is used to represent a portion of an image area delineated on the screen image; A third acquisition unit is used to acquire reference color picking area setting information and corresponding reference color picking area adjustment information of multiple reference users using the display screen, wherein the reference color picking area adjustment information includes color weights corresponding to the multiple color picking areas, and the color weights corresponding to the multiple color picking areas are used to adjust the colors of the multiple color picking areas in the reference color picking area setting information; A first determining unit, configured to determine target color picking area adjustment information corresponding to the target color picking area setting information based on reference color picking area setting information and reference color picking area adjustment information of multiple reference users and the target color picking area setting information; A second determining unit, configured to determine a first RGB color space value of each pixel point in each color picking area on the screen image based on the target color picking area setting information; an adjusting unit, configured to perform weighted adjustment on a first RGB color space value of each pixel point in each of the color picking areas based on the target color picking area adjustment information, so as to obtain a second RGB color space value of each pixel point in each of the color picking areas on the screen image; The third determining unit is used to determine the second RGB color space value of each pixel point in each color picking area on the screen image as a color picking result.
9. A computer device, characterized in that: The computer device comprises: one or more processors; Memory; and One or more application programs, wherein the one or more application programs are stored in the memory and are configured to be executed by the processor to implement the color picking method for a display screen according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps of the color picking method for a display screen according to any one of claims 1 to 7.