CN106528187B - Method and device for determining occupancy background color - Google Patents

Method and device for determining occupancy background color Download PDF

Info

Publication number
CN106528187B
CN106528187B CN201510571979.2A CN201510571979A CN106528187B CN 106528187 B CN106528187 B CN 106528187B CN 201510571979 A CN201510571979 A CN 201510571979A CN 106528187 B CN106528187 B CN 106528187B
Authority
CN
China
Prior art keywords
color
brightness
theme
theme color
preliminary
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510571979.2A
Other languages
Chinese (zh)
Other versions
CN106528187A (en
Inventor
陈挺
潘杰茂
唐斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201510571979.2A priority Critical patent/CN106528187B/en
Publication of CN106528187A publication Critical patent/CN106528187A/en
Application granted granted Critical
Publication of CN106528187B publication Critical patent/CN106528187B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Color Image Communication Systems (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Image Processing (AREA)
  • Processing Of Color Television Signals (AREA)

Abstract

The application discloses a method and a device for determining an occupancy background color, wherein the method comprises the following steps: referring to the proportion of various colors in the picture to be loaded, and selecting one color from the various colors as a primary theme color; performing offset adjustment on the saturation and the brightness of the preliminary theme color to obtain an adjusted theme color, wherein the saturation of the adjusted theme color belongs to a preset saturation interval, and the brightness of the adjusted theme color belongs to a preset brightness interval; and determining the adjusted theme color as the occupancy background color of the picture to be loaded. Because the preliminary theme color is determined by referring to the proportion of various colors in the picture to be loaded, the occupation background color obtained by adjusting the saturation and the brightness of the preliminary theme color can embody the characteristics of the picture to be loaded, and the occupation background colors determined aiming at different pictures to be loaded are possibly the same, so that the method is more beneficial for a user to distinguish different pictures to be loaded during practical application, and the visual experience of the user is improved.

Description

Method and device for determining occupancy background color
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a method and an apparatus for determining an occupancy background color.
Background
The picture is used as an important element in the webpage, and can attract the attention of a user more compared with characters, and the visual effect of the whole webpage is improved.
For pictures in a web page or application, the loading position is fixed, and the loading position of the picture is generally filled with a placeholder background color before the picture is loaded. In the prior art, when determining the background color of the occupied space of the picture, a fixed color setting mode is generally adopted, for example, 10 pictures in the whole webpage are to be loaded, and then the prior art sets a certain preset fixed color as the background color of the occupied space of the 10 pictures.
The inventor of the present invention finds that the prior art has the following disadvantages: the characteristic of the picture to be loaded cannot be reflected by the mode of setting the fixed color, and when the picture to be loaded is multiple, each position to be loaded is the same occupying background color, so that the user can not distinguish the pictures easily, and the visual experience of the user is reduced.
Disclosure of Invention
In view of this, the present application provides a method and an apparatus for determining an occupancy background color, so as to solve the problems of a single occupancy background color and poor user visual experience in the existing setting manner of the occupancy background color of a picture.
In order to achieve the above object, the following solutions are proposed:
a method for occupancy background color determination, comprising:
referring to the proportion of various colors in the picture to be loaded, and selecting one color from the various colors as a primary theme color;
performing offset adjustment on the saturation and the brightness of the preliminary theme color to obtain an adjusted theme color, wherein the saturation of the adjusted theme color belongs to a preset saturation interval, and the brightness of the adjusted theme color belongs to a preset brightness interval;
and determining the adjusted theme color as the occupancy background color of the picture to be loaded.
An occupancy background color determination device, comprising:
the preliminary theme color determining unit is used for referring to the proportion of various colors in the picture to be loaded and selecting one color as a preliminary theme color;
a preliminary theme color adjusting unit, configured to perform offset adjustment on the saturation and brightness of the preliminary theme color to obtain an adjusted theme color, where the saturation of the adjusted theme color belongs to a preset saturation interval, and the brightness of the adjusted theme color belongs to a preset brightness interval;
and the occupation background color determining unit is used for determining the adjusted theme color as the occupation background color of the picture to be loaded.
It can be seen from the foregoing technical solutions that, in the method for determining an occupancy background color provided in the embodiment of the present application, a ratio of each color in a to-be-loaded picture is referred to, and then one color is selected as a preliminary theme color, and offset adjustment of saturation and brightness is performed on the preliminary theme color, so that the saturation and brightness of the adjusted theme color are both within a corresponding preset range, and finally, the adjusted theme color is determined as the occupancy background color of the to-be-loaded picture. Because the preliminary theme color is determined by referring to the proportion of various colors in the picture to be loaded, the occupation background color obtained by adjusting the saturation and the brightness of the preliminary theme color can embody the characteristics of the picture to be loaded, and the occupation background colors determined aiming at different pictures to be loaded are possibly the same, so that the method is more beneficial for a user to distinguish different pictures to be loaded during practical application, and the visual experience of the user is improved.
Furthermore, after the preliminary theme color is determined, the saturation and the brightness of the preliminary theme color are adjusted to be within a preset interval, so that the problem that the visual experience of a user is influenced due to the fact that the brightness and the saturation of the space occupying background colors of a plurality of pictures to be loaded in the same page are greatly jittered is solved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic diagram of a hardware structure of a server disclosed in an embodiment of the present application;
FIG. 2 is a flowchart of a method for determining an occupancy background color disclosed in an embodiment of the present application;
FIG. 3 is a flowchart of another method for determining an occupancy background color disclosed in an embodiment of the present application;
FIG. 4 is a flowchart of another method for determining an occupancy background color disclosed in the embodiments of the present application;
FIG. 5 is a flowchart of another method for determining an occupancy background color disclosed in an embodiment of the present application;
FIG. 6 is a flowchart of another method for determining an occupancy background color disclosed in an embodiment of the present application;
fig. 7 is a schematic structural diagram of an occupancy background color determination apparatus disclosed in an embodiment of the present application;
FIG. 8 is a schematic diagram of a preliminary theme tone adjustment unit according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of another occupancy background color determination device disclosed in the embodiment of the present application;
fig. 10 is a schematic structural diagram of a preliminary theme color determination unit disclosed in an embodiment of the present application;
fig. 11 is a schematic structural diagram of another occupancy background color determination device disclosed in the embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The method for determining the occupancy background color is based on a server, and the hardware structure of the server can be a computer, a notebook computer and the like. Before describing the occupancy background color determination method of the present application, a hardware structure of the server is first described. As shown in fig. 1, the server may include:
a processor 1, a communication interface 2, a memory 3, a communication bus 4, and a display screen 5;
wherein the processor 1, the communication interface 2, the memory 3 and the display screen 5 are communicated with each other through a communication bus 4.
Next, we describe the occupancy background color determination method of the present application in conjunction with a server hardware structure, as shown in fig. 2, the method includes:
s200, referring to the proportion of various colors in the picture to be loaded, and selecting one color as a primary theme color;
specifically, a picture to be loaded generally includes a plurality of types of colors, and the proportion of the colors of the types is different. The method and the device can select one color as a primary theme color by referring to the proportion of various colors. Specifically, there may be a plurality of selection strategies, for example, according to the proportion of the colors, a certain color with a larger proportion is selected as the preliminary theme color.
In specific implementation, the picture to be loaded can be acquired through the communication interface 2. Alternatively, the communication interface 2 may be an interface of a communication module, such as an interface of a GSM module.
S210, performing offset adjustment on the saturation and brightness of the preliminary theme color to obtain an adjusted theme color;
the theme color includes three attributes of hue, saturation, and brightness. In this step, the saturation and brightness of the subject color are adjusted. And adjusting to enable the saturation of the adjusted theme color to belong to a preset saturation interval, and enable the brightness of the adjusted theme color to belong to a preset brightness interval.
Here, the preset saturation interval and the preset brightness interval may be set according to the user's needs. For example, if it is determined that the audience is mostly younger users, the saturation and brightness intervals may be set to be moderately low, so that the color appears more youthful and vibrant.
It will be appreciated that if the saturation and brightness of the preliminary theme colors both fall within the preset interval, they may be selected to be not adjusted again or to be fine-tuned.
Here, the preset saturation interval and brightness interval may be uploaded to the server through the communication interface 2 and stored in the memory 3. The memory 3 may also store a saturation and brightness adjustment algorithm.
This step can be performed in particular by the processor 1, i.e. the processor 1 reads the particular adjustment algorithm from the memory 3 using the communication bus 4, making a shift adjustment for the saturation and brightness of the preliminary theme colors. The processor 1 may be a central processing unit CPU or an application Specific Integrated circuit asic or one or more Integrated circuits configured to implement embodiments of the present application.
Step S220, determining the adjusted theme color as the occupancy background color of the picture to be loaded.
After the preliminary theme color is adjusted, the obtained adjusted theme color can be used as the occupied background color of the picture to be loaded.
According to the method for determining the occupancy background color, the proportion of various colors in the picture to be loaded is referred, one color is selected as a primary theme color, the primary theme color is subjected to offset adjustment of the saturation and the brightness, the saturation and the brightness of the adjusted theme color are within corresponding preset ranges, and finally the adjusted theme color is determined as the occupancy background color of the picture to be loaded. Because the preliminary theme color is determined by referring to the proportion of various colors in the picture to be loaded, the occupation background color obtained by adjusting the saturation and the brightness of the preliminary theme color can embody the characteristics of the picture to be loaded, and the occupation background colors determined aiming at different pictures to be loaded are possibly the same, so that the method is more beneficial for a user to distinguish different pictures to be loaded during practical application, and the visual experience of the user is improved.
Furthermore, after the preliminary theme color is determined, the saturation and the brightness of the preliminary theme color are adjusted to be within a preset interval, so that the problem that the visual experience of a user is influenced due to the fact that the brightness and the saturation of the space occupying background colors of a plurality of pictures to be loaded in the same page are greatly jittered is solved.
In another embodiment of the present application, another occupancy background color determination method is disclosed, see FIG. 3.
As shown in fig. 3, the method includes:
s300, determining the proportion of various colors in the picture to be loaded;
specifically, when calculating the proportion of each color in the picture to be loaded, an octree algorithm may be used. The octree algorithm is an existing algorithm, and the detailed algorithm is not explained in the present application. Of course, other algorithms than the octree algorithm may be used as long as the ratio of each color is guaranteed.
Step S310, selecting the color with the highest proportion of non-preset colors from various colors contained in the picture to be loaded as a primary theme color;
due to the particularity of the actual using scene, in order to distinguish the occupation background color from the page background color, the color which is the same as or similar to the page background color is eliminated when the preliminary theme color is determined. In this step, a preset color is set, and the color is the page ground color or a color close to the page ground color.
Typically, the page background color is white, and thus the preset color may include white.
Specifically, when the preliminary theme color is selected, the various colors may be sorted according to the proportional size of the various colors, for example, sorted in a descending order according to the proportional size. Further judging whether the first color in the sequence is a preset color or not, and if not, determining the first color as a preliminary theme color; if so, selecting the second color in the sequence, judging whether the second color is the preset color again, and determining the second color as the preliminary theme color until a color which is not the preset color is selected.
Step S320, carrying out offset adjustment on the saturation and the brightness of the preliminary theme color to obtain an adjusted theme color;
the theme color includes three attributes of hue, saturation, and brightness. In this step, the saturation and brightness of the subject color are adjusted. And adjusting to enable the saturation of the adjusted theme color to belong to a preset saturation interval, and enable the brightness of the adjusted theme color to belong to a preset brightness interval.
And S330, determining the adjusted theme color as the occupancy background color of the picture to be loaded.
In this embodiment, a specific implementation of determining a preliminary theme color is described. Specifically, the proportion of various colors in the picture to be loaded is determined through an octree algorithm, and then the color with the highest proportion of non-preset colors is selected as the primary theme color. The color with the highest proportion of the non-preset colors is selected as the primary theme color, and the color is closer to the theme color of the picture to be loaded when being used as the occupied background color after being adjusted, so that the characteristic of the picture to be loaded is better reflected.
In yet another embodiment of the present application, yet another occupancy background color determination method is disclosed, see FIG. 4.
As shown in fig. 4, the method includes:
s400, referring to the proportion of various colors in the picture to be loaded, and selecting one color as a primary theme color;
specifically, a picture to be loaded generally includes a plurality of types of colors, and the proportion of the colors of the types is different. The method and the device can select one color as a primary theme color by referring to the proportion of various colors. Specifically, there may be a plurality of selection strategies, for example, according to the proportion of the colors, a certain color with a larger proportion is selected as the preliminary theme color.
S410, carrying out offset adjustment on the saturation and the brightness of the preliminary theme color to obtain an adjusted theme color;
the theme color includes three attributes of hue, saturation, and brightness. In this step, the saturation and brightness of the subject color are adjusted. And adjusting to enable the saturation of the adjusted theme color to belong to a preset saturation interval, and enable the brightness of the adjusted theme color to belong to a preset brightness interval.
Step S420, judging whether the adjusted theme color is the same as the page ground color; if yes, go to step S430, otherwise go to step S440;
specifically, the page is used for displaying the picture to be loaded. Such as web pages, picture loading pages for applications, etc.
Step S430, performing hue adjustment processing on the adjusted theme color, and determining the processed theme color as the occupation background color of the picture to be loaded;
step S440, determining the adjusted theme color as the occupancy background color of the to-be-loaded picture.
Specifically, similar to the previous embodiment, it is considered that if the occupancy background color is the same as the page ground color, the occupancy effect of the picture cannot be well embodied, and therefore when it is detected that the theme color is the same as the page ground color, the hue of the theme color is further adjusted, and the adjusted hue can be distinguished from the hue of the page ground color. For example, if the bottom color of the page is white, if it is determined that the adjusted subject color is also white, the hue of the adjusted subject color is adjusted to be gray. And then regard the theme colour after adjusting as the occupation background colour, under the condition of guaranteeing to be close with the theme colour of waiting to load the picture, more can distinguish the page ground colour, embody the picture and occupy the place the effect.
In yet another embodiment of the present application, yet another occupancy background color determination method is disclosed, see FIG. 5.
As shown in fig. 5, the method includes:
s500, referring to the proportion of various colors in the picture to be loaded, and selecting one color as a primary theme color;
specifically, a picture to be loaded generally includes a plurality of types of colors, and the proportion of the colors of the types is different. The method and the device can select one color as a primary theme color by referring to the proportion of various colors. Specifically, there may be a plurality of selection strategies, for example, according to the proportion of the colors, a certain color with a larger proportion is selected as the preliminary theme color.
Step S510, judging whether the saturation of the primary theme color exceeds a saturation threshold, if so, executing step S520;
step S520, multiplying the saturation of the preliminary theme color by a preset saturation deviation proportion value;
step S530, judging whether the brightness of the preliminary theme color exceeds a brightness threshold value, if so, executing step S540;
step S540, multiplying the brightness of the preliminary theme color by a preset brightness deviation proportion value;
and step S550, determining the adjusted theme color as the occupancy background color of the picture to be loaded.
In this embodiment, a saturation threshold and a brightness threshold are preset, and when it is detected that the saturation and the brightness of the preliminary theme color exceed the corresponding thresholds, offset adjustment is performed on the saturation and the brightness according to a preset offset ratio, so that the saturation and the brightness belong to a preset saturation interval and a preset brightness interval.
Through the mode of this embodiment, the saturation and the luminance of the occupation background color of the picture of waiting to load are all in certain interval in the control, and when waiting to load the picture in the same page for many, the luminance of the occupation background color of each picture belongs to same interval, and the saturation also belongs to same interval, consequently makes the shake of the saturation and the luminance of each occupation background color in the same page be unlikely to too big, promotes user's visual experience.
The color model is exemplified as an HSB model in which the saturation maximum and the brightness maximum are both 100. The saturation interval is 0-65%, the brightness interval is 0-55%, the saturation deviation ratio value is 65%, and the brightness deviation ratio value is 50%. Therefore, if it is determined that the saturation x of the preliminary theme color exceeds 65, it is subjected to offset calculation: x 65%. The result of the offset calculation necessarily belongs to the saturation range 0-65. The same holds for luminance.
It should be understood that the above-mentioned offset adjustment manner for the saturation and brightness of the preliminary theme color is only an example, and should not be considered as a limitation to the offset adjustment algorithm of the present application, and any algorithm that can adjust the saturation and brightness of the preliminary theme color to the preset interval may be taken as a specific embodiment of the present application.
In yet another embodiment of the present application, yet another occupancy background color determination method is disclosed, see FIG. 6.
As shown in fig. 6, the method includes:
step S600, referring to the proportion of various colors in the picture to be loaded, and selecting one color as a primary theme color;
specifically, a picture to be loaded generally includes a plurality of types of colors, and the proportion of the colors of the types is different. The method and the device can select one color as a primary theme color by referring to the proportion of various colors. Specifically, there may be a plurality of selection strategies, for example, according to the proportion of the colors, a certain color with a larger proportion is selected as the preliminary theme color.
S610, performing offset adjustment on the saturation and brightness of the preliminary theme color to obtain an adjusted theme color;
the theme color includes three attributes of hue, saturation, and brightness. In this step, the saturation and brightness of the subject color are adjusted. And adjusting to enable the saturation of the adjusted theme color to belong to a preset saturation interval, and enable the brightness of the adjusted theme color to belong to a preset brightness interval.
Step S620, determining the average brightness value of each pixel point in the picture to be loaded;
and obtaining the global brightness mean value of the whole picture by calculating the average value of the brightness of each pixel point in the picture to be loaded.
Step S630, judging whether the deviation between the brightness of the adjusted theme color and the brightness average value exceeds a preset maximum deviation value, if so, executing step S640;
step S640, adjusting the brightness of the adjusted theme color again by using the brightness average value to obtain a secondarily adjusted theme color;
and comparing the brightness average value with the brightness of the adjusted subject color to determine whether the brightness of the adjusted subject color is too different from the overall average brightness of the whole picture, and if so, adjusting the brightness of the adjusted subject color again by using the brightness average value to make the brightness of the adjusted subject color approach or equal to the average brightness value.
And S650, determining the subject color after the secondary adjustment as the occupied background color of the picture to be loaded.
In this embodiment, after the brightness and the saturation of the preliminary theme color are adjusted, it is further determined whether the difference between the adjusted brightness of the theme color and the global average brightness of the picture to be loaded is too large, and if so, the brightness of the preliminary theme color is adjusted again by using the global average brightness so that the brightness of the preliminary theme color approaches or equals to the global average brightness of the picture.
As for the adjustment manner in step S640, the adjusted brightness of the theme color may be directly determined as the brightness average value. Of course, other adjustment methods may be used, as long as the difference between the brightness of the primary theme color after the secondary adjustment and the average brightness value is within the setting range.
The occupancy background color determination device provided in the embodiment of the present application is described below, and the occupancy background color determination device described below and the occupancy background color determination method described above may be referred to in a corresponding manner.
Referring to fig. 7, fig. 7 is a schematic structural diagram of an occupancy background color determination device disclosed in the embodiment of the present application.
As shown in fig. 7, the apparatus includes:
a preliminary theme color determining unit 71, configured to refer to proportions of various colors in the picture to be loaded, and select one color from the various colors as a preliminary theme color;
a preliminary theme color adjusting unit 72, configured to perform offset adjustment on the saturation and brightness of the preliminary theme color to obtain an adjusted theme color, where the saturation of the adjusted theme color belongs to a preset saturation interval, and the brightness of the adjusted theme color belongs to a preset brightness interval;
an occupancy background color determining unit 73, configured to determine the adjusted theme color as the occupancy background color of the to-be-loaded picture.
The device for determining the occupancy background color refers to the proportion of various colors in the picture to be loaded, then selects one color as the primary theme color, performs offset adjustment on the saturation and the brightness of the primary theme color, enables the saturation and the brightness of the adjusted theme color to be within the corresponding preset range, and finally determines the adjusted theme color as the occupancy background color of the picture to be loaded. Because the preliminary theme color is determined by referring to the proportion of various colors in the picture to be loaded, the occupation background color obtained by adjusting the saturation and the brightness of the preliminary theme color can embody the characteristics of the picture to be loaded, and the occupation background colors determined aiming at different pictures to be loaded are possibly the same, so that the method is more beneficial for a user to distinguish different pictures to be loaded during practical application, and the visual experience of the user is improved.
Furthermore, after the preliminary theme color is determined, the saturation and the brightness of the preliminary theme color are adjusted to be within a preset interval, so that the problem that the visual experience of a user is influenced due to the fact that the brightness and the saturation of the space occupying background colors of a plurality of pictures to be loaded in the same page are greatly jittered is solved.
Optionally, the embodiment of the present application discloses an optional structure of the preliminary theme color adjustment unit 72, and as shown in fig. 8, the preliminary theme color adjustment unit 72 may include:
a first preliminary theme color adjustment subunit 721, configured to determine whether the saturation of the preliminary theme color exceeds a saturation threshold, and if so, multiply the saturation of the preliminary theme color by a preset saturation offset ratio value;
the second preliminary theme color adjusting subunit 722 is configured to determine whether the brightness of the preliminary theme color exceeds a brightness threshold, and if so, multiply the brightness of the preliminary theme color by a preset brightness offset ratio value.
Optionally, the embodiment of the present application discloses another optional structure of the above occupancy background color determination device, and as can be seen from fig. 7 and 9, the device may further include:
a picture brightness mean value determining unit 74, configured to determine, after the preliminary theme color adjusting unit 72, a brightness mean value of each pixel point in the picture to be loaded;
a brightness contrast unit 75, configured to determine whether a deviation between the brightness of the adjusted theme color and the brightness average value exceeds a preset maximum deviation value;
a brightness adjusting unit 76, configured to adjust the brightness of the adjusted theme color again by using the brightness average value when the determination result of the brightness contrast unit 75 is yes, so as to obtain a secondarily adjusted theme color;
the occupancy background color determination unit 73 is specifically configured to determine the secondarily adjusted theme color as the occupancy background color of the to-be-loaded picture.
Optionally, the embodiment of the present application discloses an optional structure of the preliminary theme color determination unit 71, and as shown in fig. 10, the preliminary theme color determination unit 71 may include:
the color proportion calculation unit 711 is configured to determine proportions of the various colors in the picture to be loaded by using an octree algorithm;
and a theme color selecting unit 712, configured to select, as a preliminary theme color, a color with the highest proportion of non-preset colors from the various colors included in the picture to be loaded.
Optionally, the embodiment of the present application discloses yet another optional structure of the above occupancy background color determination device, and as can be seen from fig. 7 and 11, the device may further include:
a theme color determining unit 77, configured to determine, before the occupancy background color determining unit 73, whether the adjusted theme color is the same as a bottom color of a page, where the page is a page showing the to-be-loaded picture;
a hue processing unit 78, configured to perform hue adjustment processing on the adjusted subject color when the determination result of the subject color determining unit 77 is yes;
the occupancy background color determining unit 73 is specifically configured to determine the theme color after the hue adjustment processing as the occupancy background color of the to-be-loaded picture.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

1. A method for determining occupancy background color, comprising:
determining the proportion of various colors in the picture to be loaded;
selecting a color with the highest proportion of non-preset colors from various colors contained in the picture to be loaded as a primary theme color, wherein the preset color is a page ground color or a color close to the page ground color;
performing offset adjustment on the saturation and brightness of the preliminary theme color according to the user requirement to obtain an adjusted theme color, wherein the saturation of the adjusted theme color belongs to a preset saturation interval, and the brightness of the adjusted theme color belongs to a preset brightness interval;
and determining the adjusted theme color as the occupancy background color of the picture to be loaded.
2. The method of claim 1, wherein the offset adjusting the saturation and brightness of the preliminary theme color comprises:
judging whether the saturation of the preliminary theme color exceeds a saturation threshold value, if so, multiplying the saturation of the preliminary theme color by a preset saturation deviation proportion value;
and judging whether the brightness of the preliminary theme color exceeds a brightness threshold value, if so, multiplying the brightness of the preliminary theme color by a preset brightness deviation proportion value.
3. The method according to claim 1, further comprising, after the offset adjusting the saturation and brightness of the preliminary theme color:
determining the average brightness value of each pixel point in the picture to be loaded;
judging whether the deviation of the brightness of the adjusted theme color and the brightness average value exceeds a preset maximum deviation value or not;
if so, adjusting the brightness of the adjusted theme color again by using the brightness average value to obtain a secondarily adjusted theme color;
determining the adjusted theme color as the occupancy background color of the to-be-loaded picture specifically comprises:
and determining the secondarily adjusted theme color as the occupancy background color of the picture to be loaded.
4. The method according to claim 1, wherein before the determining the adjusted theme color as the occupancy background color of the to-be-loaded picture, the method further comprises:
judging whether the adjusted theme color is the same as the page ground color or not, wherein the page is a page for displaying the picture to be loaded;
and if so, carrying out hue adjustment processing on the adjusted theme color, and determining the processed theme color as the occupation background color of the picture to be loaded.
5. An occupancy background color determination device, comprising:
the preliminary theme color determining unit is used for referring to the proportion of various colors in the picture to be loaded and selecting one color as a preliminary theme color;
a preliminary theme color adjusting unit, configured to perform offset adjustment on the saturation and brightness of the preliminary theme color according to a user requirement, to obtain an adjusted theme color, where the saturation of the adjusted theme color belongs to a preset saturation interval, and the brightness of the adjusted theme color belongs to a preset brightness interval;
an occupation background color determining unit, configured to determine the adjusted theme color as an occupation background color of the to-be-loaded picture;
wherein the preliminary theme color determination unit includes:
the color proportion calculation unit is used for determining the proportion of various colors in the picture to be loaded;
and the theme color selecting unit is used for selecting a color with the highest proportion of non-preset colors from various colors contained in the picture to be loaded as a primary theme color, wherein the preset color is a page ground color or a color close to the page ground color.
6. The apparatus of claim 5, wherein the preliminary theme tone adjustment unit comprises:
the first preliminary theme color adjusting subunit is used for judging whether the saturation of the preliminary theme color exceeds a saturation threshold value, and if so, multiplying the saturation of the preliminary theme color by a preset saturation offset proportion value;
and the second preliminary theme color adjusting subunit is used for judging whether the brightness of the preliminary theme color exceeds a brightness threshold value, and if so, multiplying the brightness of the preliminary theme color by a preset brightness offset proportion value.
7. The apparatus of claim 5, further comprising:
the image brightness mean value determining unit is used for determining the brightness mean value of each pixel point in the image to be loaded after the preliminary theme tone adjusting unit;
the brightness contrast unit is used for judging whether the deviation of the brightness of the adjusted theme color and the brightness average value exceeds a preset maximum deviation value or not;
the brightness adjusting unit is used for adjusting the brightness of the adjusted theme color again by using the brightness average value when the judgment result of the brightness contrast unit is yes, so as to obtain the secondarily adjusted theme color;
the occupation background color determining unit is specifically configured to determine the secondarily adjusted theme color as the occupation background color of the to-be-loaded picture.
8. The apparatus of claim 5, further comprising:
a theme color judging unit, configured to judge whether the adjusted theme color is the same as a page ground color before the occupancy background color determining unit, where the page is a page showing the to-be-loaded picture;
the hue processing unit is used for carrying out hue adjustment processing on the adjusted theme color when the judgment result of the theme color judging unit is yes;
the occupancy background color determination unit is specifically configured to determine the theme color after the hue adjustment processing as the occupancy background color of the to-be-loaded picture.
CN201510571979.2A 2015-09-09 2015-09-09 Method and device for determining occupancy background color Active CN106528187B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510571979.2A CN106528187B (en) 2015-09-09 2015-09-09 Method and device for determining occupancy background color

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510571979.2A CN106528187B (en) 2015-09-09 2015-09-09 Method and device for determining occupancy background color

Publications (2)

Publication Number Publication Date
CN106528187A CN106528187A (en) 2017-03-22
CN106528187B true CN106528187B (en) 2020-04-07

Family

ID=58345828

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510571979.2A Active CN106528187B (en) 2015-09-09 2015-09-09 Method and device for determining occupancy background color

Country Status (1)

Country Link
CN (1) CN106528187B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107197353A (en) * 2017-05-24 2017-09-22 环球智达科技(北京)有限公司 The processing method of the occupy-place figure of interface images
CN107222773A (en) * 2017-05-24 2017-09-29 环球智达科技(北京)有限公司 The processing system of the occupy-place figure of interface images
CN110673904B (en) * 2018-07-03 2023-08-25 淘宝(中国)软件有限公司 Method, device and equipment for theme color processing and page generation display
CN109597664A (en) * 2018-09-21 2019-04-09 北京字节跳动网络技术有限公司 Background configuration method, device, equipment and the readable medium of display area
CN109491739B (en) * 2018-10-30 2023-04-07 北京字节跳动网络技术有限公司 Theme color dynamic determination method and device, electronic equipment and storage medium
CN109859283B (en) * 2018-12-22 2024-01-09 Oppo广东移动通信有限公司 Color taking method, color taking device, electronic equipment and storable medium
CN109783178B (en) * 2019-01-24 2022-08-23 北京字节跳动网络技术有限公司 Color adjusting method, device, equipment and medium for interface component
CN110298365B (en) * 2019-07-04 2023-04-07 浙江大学滨海产业技术研究院 Theme color extraction method based on human vision
WO2021168675A1 (en) * 2020-02-26 2021-09-02 Boe Technology Group Co., Ltd. Computer-implemented method, apparatus, and computer-program product
CN112995630B (en) * 2021-03-11 2022-12-30 杭州当贝网络科技有限公司 Flexible brightness adjusting method for fixed-focus projector, projector and readable storage medium
CN113207023B (en) * 2021-04-06 2023-05-02 深圳创维-Rgb电子有限公司 Method, device, equipment and medium for processing background color change of television detail page
CN113742025A (en) * 2021-09-17 2021-12-03 北京字跳网络技术有限公司 Page generation method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103914450A (en) * 2012-12-31 2014-07-09 北京新媒传信科技有限公司 Method and device for presenting web graphics in mobile terminal platform
CN104238902A (en) * 2013-06-09 2014-12-24 苹果公司 Stacked tab view
CN104462312A (en) * 2014-11-28 2015-03-25 北京奇虎科技有限公司 Web page displaying method and browser client side

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103914450A (en) * 2012-12-31 2014-07-09 北京新媒传信科技有限公司 Method and device for presenting web graphics in mobile terminal platform
CN104238902A (en) * 2013-06-09 2014-12-24 苹果公司 Stacked tab view
CN104462312A (en) * 2014-11-28 2015-03-25 北京奇虎科技有限公司 Web page displaying method and browser client side

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"Android UI设计(一)——胜过千言万语的图片设计";小老妈;《https://site.douban.com/169072/widget/notes/9233791/note/317606433/》;20131123;第1-5页 *

Also Published As

Publication number Publication date
CN106528187A (en) 2017-03-22

Similar Documents

Publication Publication Date Title
CN106528187B (en) Method and device for determining occupancy background color
CN109191395B (en) Image contrast enhancement method, device, equipment and storage medium
JP4820450B2 (en) Luminance conversion curve creation device and method, and brightness conversion curve creation program
RU2654159C1 (en) Image processing system and machine readable recording medium
CN110392305B (en) Video static picture detection method, terminal and computer readable storage medium
WO2006036026A1 (en) Image correction device, method, and image correction program
CN108961260B (en) Image binarization method and device and computer storage medium
JP5235759B2 (en) Image processing apparatus, image processing method, and program
US20090274368A1 (en) Image correction method and apparatus
JP2013020617A (en) Grayscale character image normalization device and method
CN114092360A (en) Image processing method, apparatus and readable storage medium
US8203772B2 (en) Image output method, apparatus, and program using one or more attention levels
CN110377390B (en) Image information processing method and device and electronic equipment
CN106528758B (en) Picture selection method and device
CN108921869B (en) Image binarization method and device
JP4536015B2 (en) Luminance conversion curve creation device and method, and brightness conversion curve creation program
US20110286672A1 (en) Translucent image detection apparatus, translucent image edge detection apparatus, translucent image detection method, and translucent image edge detection method
US9413925B2 (en) Image processing apparatus, image processing method, and storage medium
US9609171B2 (en) Applying luminance conversion processing in accordance with image attribute information to improve edge detection and image data correction for pseudo halftone processing
CN107085521A (en) A kind of icon display method and device
CN109559707B (en) Gamma value processing method and device of display panel and display equipment
JP2014096668A (en) Device for setting print charge, method, and program
CN107305685B (en) Image contrast enhancement method and apparatus
CN110035267B (en) Image enhancement circuit and method
EP2883205A1 (en) Method and apparatus to detect artificial edges in images

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant