Movatterモバイル変換


[0]ホーム

URL:


CN110865862A - Page background setting method and device and electronic equipment - Google Patents

Page background setting method and device and electronic equipment
Download PDF

Info

Publication number
CN110865862A
CN110865862ACN201911111909.3ACN201911111909ACN110865862ACN 110865862 ACN110865862 ACN 110865862ACN 201911111909 ACN201911111909 ACN 201911111909ACN 110865862 ACN110865862 ACN 110865862A
Authority
CN
China
Prior art keywords
color element
main color
preset
pixel
candidate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911111909.3A
Other languages
Chinese (zh)
Other versions
CN110865862B (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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology 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 Beijing ByteDance Network Technology Co LtdfiledCriticalBeijing ByteDance Network Technology Co Ltd
Priority to CN201911111909.3ApriorityCriticalpatent/CN110865862B/en
Publication of CN110865862ApublicationCriticalpatent/CN110865862A/en
Application grantedgrantedCritical
Publication of CN110865862BpublicationCriticalpatent/CN110865862B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

The embodiment of the disclosure discloses a page background setting method, a page background setting device and electronic equipment, wherein the method comprises the following steps: acquiring R, G, B three-channel values corresponding to each pixel of a theme picture in a page; for each pixel, determining a candidate main color element corresponding to the pixel according to the value of the R, G, B three channels corresponding to the pixel; for each candidate dominant color element, determining the number of pixels corresponding to the candidate dominant color element; determining whether each candidate main color element meets a preset visual attribute condition; determining candidate main color elements which meet preset visual attribute conditions and the corresponding pixel number meets the preset conditions as main color elements of the theme picture; the main color element is used as the main color element of the page background, and the color attribute of the main color element is set in the preset area of the page according to the preset rule, so that the main color element gradually changes in the preset area, the visual effect of the page is optimized, and the user experience is improved.

Description

Page background setting method and device and electronic equipment
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a method and an apparatus for setting a page background, and an electronic device.
Background
The page background is mainly used for creating a more interesting Word document background, the Web layout view and the reading layout view can display the background, and gradient, pattern, picture, pure color or texture elements can be applied to the background, and the elements can be tiled or repeated to fill the page.
In general, in setting the page background, the color of the page background may be set by a user or a developer.
Disclosure of Invention
This disclosure is provided to introduce concepts in a simplified form that are further described below in the detailed description. This disclosure is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
The embodiment of the disclosure provides a page background setting method and device and electronic equipment, so that the theme pictures and the color tones of a public page are coordinated, the visual effect of the page is further optimized, and the user experience is improved.
In a first aspect, an embodiment of the present disclosure provides a page background setting method, where the method includes: acquiring R, G, B three-channel values corresponding to each pixel of a theme picture in a page; for each pixel, determining a candidate main color element corresponding to the pixel according to the value of the R, G, B three channels corresponding to the pixel; for each candidate main color element, determining the number of pixels corresponding to the candidate main color element; determining whether each candidate main color element meets a preset visual attribute condition; determining candidate main color elements which meet the preset visual attribute condition and the corresponding pixel number meets the preset condition as main color elements of the theme picture; and taking the main color element as a main color element of the page background, and setting the color attribute of the main color element in a preset area of the page according to a preset rule, so that the main color element gradually changes in the preset area.
In a second aspect, an embodiment of the present disclosure provides a page background setting apparatus, where the apparatus includes: the acquisition module is used for acquiring R, G, B three-channel values corresponding to each pixel of the theme pictures in the page; the first determination module is used for determining a candidate main color element corresponding to each pixel according to the R, G, B three-channel value corresponding to the pixel; the second determining module is used for determining the number of pixels corresponding to each candidate main color element; a third determining module, configured to determine whether each candidate dominant color element satisfies a preset visual attribute condition; a fourth determining module, configured to determine, as a dominant color element of the theme picture, a candidate dominant color element that satisfies the preset visual attribute condition and the corresponding number of pixels satisfies a preset condition; and the setting module is used for taking the main color element as a main color element of the page background, and setting the color attribute of the main color element in a preset area of the page according to a preset rule, so that the main color element gradually changes in the preset area.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: one or more processors; a storage device having one or more programs stored thereon, which when executed by the one or more processors, cause the one or more processors to implement the page background setting method of the first aspect.
In a fourth aspect, the disclosed embodiments provide a computer-readable medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the page background setting method described in the first aspect above.
According to the page background setting method, the page background setting device and the electronic equipment, the main color element corresponding to the theme picture in the page is obtained and is used as the main color element of the page background, and the color attribute of the main color element is set in the preset area of the page according to the preset rule, so that the main color element gradually changes in the preset area, the theme picture is coordinated with the color tone of the public page, the visual effect of the page is optimized, and the user experience is improved.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
FIG. 1 is a flow diagram of one embodiment of a page background setting method according to the present disclosure;
FIG. 2 is a schematic flow chart of obtaining candidate dominant color elements to which the present disclosure relates;
FIG. 3 is a schematic flow chart of determining candidate dominant color elements to which the present disclosure relates;
FIG. 4 is a schematic structural diagram illustrating one embodiment of a page background setting apparatus according to the present disclosure;
FIG. 5 is an exemplary system architecture to which the page context setting method of one embodiment of the present disclosure may be applied;
fig. 6 is a schematic diagram of a basic structure of an electronic device provided according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict.
Referring to fig. 1, a flowchart of one embodiment of a page background setting method according to the present disclosure is shown. As shown in fig. 1, the page background setting method includes the following steps:
step 101, obtaining R, G, B three-channel values corresponding to each pixel of the theme pictures in the page.
The page may be a Web page, a page of an application, or the like.
The page may include at least one picture. The theme picture may be a picture including the largest number of pixels in the at least one picture, may be a picture located in a designated area of the page (for example, a middle area of the page), or may be a picture determined from the at least one picture by a selection operation of a user.
The theme pictures can be selected arbitrarily according to the requirements of users. In some application scenarios, the theme picture may be an avatar picture displayed on the page by the user. The page background generated by the head portrait picture of the user is easier to distinguish the user and show the uniqueness of the corresponding user.
In some application scenarios, the page may be obtained by a user click, for example, the user clicks a page recommended by a browser, or the user inputs a page address in an address bar and clicks and loads a corresponding page, and it should be understood that the user click is widely understood herein and includes a mouse click (for example, using a mouse operation in a PC), a keyboard input (for example, using an Enter key in a PC), a gesture operation (for example, a user clicks through a gesture in a display screen of a mobile terminal), a mobile terminal key operation, and the like; in other application scenarios, the page may also be opened by browser jumping, including browser auto-jumping or user click link address jumping, etc.
For each pixel, the pixel value of the pixel can be divided into three primary color components of Red (Red, R), Green (Green, G), and Blue (Blue, B).
The R, G, B three primary color components for each pixel may be referred to generally as the R, G, B three channel components.
The R, G, B three-channel values corresponding to the pixels of the subject pictures in the page can be obtained by using various existing methods for extracting the pixel values of the images.
The above method for extracting pixel values of an image is a method widely studied and applied at present, and is not described herein again.
And 102, for each pixel, determining a candidate main color element corresponding to the pixel according to the value of the R, G, B three channels corresponding to the pixel.
A plurality of candidate dominant color elements may be set in advance. And then determining the candidate main color element corresponding to the pixel according to the pixel value of the pixel.
In practice, a plurality of candidate dominant color elements may be obtained by the following steps as shown in fig. 2:
in step a101, for each of the R, B, G three channels, the value range between the maximum value and the minimum value corresponding to the channel is divided into N regions.
Here, the maximum value may be 255 and the minimum value may be 0. In the above division, the value range between the maximum value and the minimum value of the R channel may be divided into N regions, the value range between the maximum value and the minimum value of the G channel may be divided into N regions, and the value range between the maximum value and the minimum value of the B channel may be divided into N regions.
Step A102, for each region, mapping each value in the region to a representative value.
For example, the value range between the maximum value and the minimum value of the G channel is divided into 16 regions, the value of the first region includes 0 to 15, the value of the second region includes 16 to 31, the value of the third region includes 32 to 47 … …, and then each value in the first region may be mapped to represent a value 1, each value in the second region may be mapped to represent a value 2, each value in the third region may be mapped to represent a value 3 … …, and so on, and the values in the value ranges of the 16 regions may all be mapped to represent one value.
Step A103, combining the N representative values respectively corresponding to the R, G, B three channels to obtain N × N × N representative value combinations, wherein each combination corresponds to a candidate main color element.
Thus, there may be N × N candidate dominant color elements.
Further, the candidate main element corresponding to the pixel can be determined by the steps shown in fig. 3:
step B101, for each of the R, G, B channels of the pixel, determines a target region of the N regions corresponding to the value of the channel.
And step B102, determining a representative numerical value combination corresponding to the R, G, B three-channel value of the pixel according to the target areas corresponding to the R, G, B three-channel values respectively, and determining the candidate main color element corresponding to the pixel according to the representative numerical value combination.
The value range of N may be 8 to 32, that is, the value range between the maximum value and the minimum value corresponding to each of the R, G, B three channels is divided into 8 to 32 regions.
Further, the value range between the maximum value and the minimum value corresponding to each channel is represented by the granularity value available in the N divided regions. That is, for each channel in R, G, B, the channel is divided into N granularities. N can be between 8 and 32. For each determined value of N, the granularity value into which each channel is divided is also determined.
Further, the value range between the maximum value and the minimum value corresponding to each channel is divided into more regions by the value N taken in the value range, the number of the obtained candidate main color elements is more, and the image can be accurately divided into color intervals.
It should be noted that when N is less than 8, the distinction degree of different colors of the picture is poor because the divided regions of the value ranges respectively corresponding to the channels are too few.
When N is greater than 32, the images are excessively differentiated in different colors, and the number of candidate dominant color elements is too large, which is not favorable for the display effect of the dominant color element selected from the candidate dominant color elements.
Step 103, for each candidate dominant color element, determining the number of pixels corresponding to the candidate dominant color element.
After the candidate main color elements corresponding to each pixel of the theme picture are obtained, the number of pixels corresponding to each candidate main color element can be detected, and all the candidate main color elements are arranged in a descending order according to the number of the pixels, so that the main color elements can be determined as soon as possible.
And 104, determining whether each candidate main color element meets a preset visual attribute condition.
And 105, determining the candidate main color elements which meet the preset visual attribute condition and the corresponding pixel number meets the preset condition as the main color elements of the theme picture.
Visual attributes of a color may include saturation (color saturation), brightness, hue, and the like. A preset visual attribute condition may be set for each visual attribute. And for the candidate main color element, determining whether each visual attribute value corresponding to the candidate main color element meets a preset visual attribute condition. The candidate main color element of which the corresponding visual attribute value meets the preset visual attribute condition and the corresponding pixel number meets the preset condition can be determined as the main color element of the theme picture.
In some application scenarios, preset visual attribute conditions may be set for saturation and brightness. In these application scenarios, it may be determined, for each candidate dominant color element, whether the saturation and the brightness of the candidate dominant color element satisfy a preset saturation condition and a preset brightness condition, respectively.
Candidate main color elements which meet preset visual attribute conditions and correspond to pixels of which the proportion of the number of the pixels to the total number of the pixels contained in the picture is 5% -12% can be determined as main color elements of the theme picture, so that the visual effect visible to naked eyes can be obtained.
The above-mentioned dominant color element may be at least one color value determined according to a color value of a pixel of the subject picture. In some application scenarios, the dominant color element may be determined according to the number of pixel points corresponding to the color value of each color included in the theme picture, for example, the color value with the largest number of corresponding pixel points is determined as the dominant color element. In some other application scenarios, the dominant color element may be determined according to a color value of a color corresponding to a key object in the theme picture. The key object may be an object located in the middle region of the theme picture, or an object including the largest number of pixel points.
In some application scenarios, the visual attributes include saturation and brightness. In these application scenarios, thestep 104 may include determining whether the saturation of each candidate main color element satisfies a preset saturation condition and the brightness satisfies a preset brightness condition. Thestep 105 may include determining candidate main color elements, of which the saturation satisfies a preset saturation condition, the brightness satisfies a preset brightness condition, and the number of corresponding pixels satisfies the preset condition, as the main color elements of the theme picture.
In some optional implementations, the preset saturation condition is that the saturation is between 30% and 100%, and preferably, when the saturation is less than 40%, the saturation is set to 40% to increase the color content of the page and optimize the visual effect; when the saturation is more than 90%, the saturation is set to 90% to reduce the achromatic components in the page and optimize the visual effect.
The preset brightness condition is that the brightness is between 0-100%, and preferably, when the brightness is greater than 85%, the brightness is set to 85% to reduce the brightness of the page and optimize the visual effect.
And 106, taking the main color element as a main color element of the page background, and setting the color attribute of the main color element in a preset area of the page according to a preset rule, so that the main color element gradually changes in the preset area.
Further, determining a main color element from the theme picture, taking the main color element as a background color of an upper half screen of the page, and gradually changing the background color from dark to light or from light to dark to realize transition and connection of the page background and the color elements of the public page.
Generally, a plurality of colors usually exist in a theme picture, and if the color in a page is not associated with the color in the theme picture, the color of the theme picture is not coordinated with the color of a page background, so that the phenomenon of splitting between the theme picture and the page occurs, and the visual effect of the page is reduced.
According to the method provided by the embodiment of the disclosure, the main color element corresponding to the theme picture in the page is obtained, the main color element is used as the main color element of the page background, and the color attribute of the main color element is set in the preset region of the page according to the preset rule, so that the main color element gradually changes in the preset region, and further the theme picture is coordinated with the tone of the public page, the visual effect of the page is optimized, and the user experience is improved.
Referring to fig. 4, which shows a schematic structural diagram of an embodiment of a page background setting apparatus according to the present disclosure, as shown in fig. 4, the page background setting apparatus includes an obtainingmodule 401, a first determiningmodule 402, a second determiningmodule 403, a third determiningmodule 404, a fourth determiningmodule 405, and asetting module 406. The acquiringmodule 401 is configured to acquire R, G, B three-channel values corresponding to pixels of a theme picture in a page; a first determiningmodule 402, configured to, for each pixel, determine, according to a value of R, G, B three channels corresponding to the pixel, a candidate dominant color element corresponding to the pixel; a second determiningmodule 403, configured to determine, for each candidate dominant color element, a number of pixels corresponding to the candidate dominant color element; a third determiningmodule 404, configured to determine whether each candidate dominant color element satisfies a preset visual attribute condition; a fourth determiningmodule 405, configured to determine, as a main color element of the theme picture, a candidate main color element that meets a preset visual attribute condition and the corresponding number of pixels meets the preset condition; thesetting module 406 is configured to use the dominant color element as a dominant color element of the page background, and set a color attribute of the dominant color element in a preset region of the page according to a preset rule, so that the dominant color element changes gradually in the preset region.
It should be noted that specific processing of the obtainingmodule 401, the first determiningmodule 402, the second determiningmodule 403, the third determiningmodule 404, the fourth determiningmodule 405, and thesetting module 406 of the page background setting apparatus and technical effects thereof may refer to relevant descriptions ofstep 101,step 102,step 103,step 104,step 105, and step 106 in the corresponding embodiment of fig. 1, which are not described herein again.
In some optional implementations of this embodiment, the page background setting apparatus further includes a candidate dominant color element determination module. The candidate dominant color element determination module is configured to obtain a candidate dominant color element based on the following steps: for each of R, G, B three channels, dividing the value range between the maximum value and the minimum value corresponding to the channel into N areas; for each region, mapping each value in the region to a representative value; and combining the N representative values respectively corresponding to the R, G, B three channels to obtain N multiplied by N representative value combinations, wherein each combination corresponds to a candidate main color element.
In some optional implementations of this embodiment, the first determiningmodule 402 is further configured to: for each of R, G, B three channels, dividing the value range between the maximum value and the minimum value corresponding to the channel into N areas; for each region, mapping each value in the region to a representative value; and combining the N representative values respectively corresponding to the R, G, B three channels to obtain N multiplied by N representative value combinations, wherein each combination corresponds to a candidate main color element.
In some optional implementations of this embodiment, the first determiningmodule 402 is further configured to: for each of the R, G, B channels of the pixel, determining a target region of the N regions corresponding to the value of the channel; and determining a representative numerical value combination corresponding to the R, G, B three-channel values of the pixel according to the target areas corresponding to the R, G, B three-channel values respectively, and determining a candidate main color element corresponding to the pixel according to the representative numerical value combination.
In some optional implementations of this embodiment, the value of N ranges from 8 to 32.
In some optional implementations of this embodiment, the fourth determiningmodule 405 is further configured to: and determining candidate main color elements which meet the preset visual attribute condition and of which the corresponding pixel number accounts for 5% -12% of the total pixel number contained in the picture as the main color elements of the theme picture.
In some optional implementations of the present embodiment, the visual attributes may include saturation and brightness; and, the third determiningmodule 404 is further configured to: determining whether the saturation of each candidate main color element meets a preset saturation condition and whether the brightness meets a preset brightness condition; and, the fourth determiningmodule 405 is further configured to: and determining candidate main color elements with saturation meeting a preset saturation condition, brightness meeting a preset brightness condition and corresponding pixel number meeting the preset condition as main color elements of the theme picture.
In some optional implementations of this embodiment, the preset saturation condition is that the saturation is between 30% and 100%, and the preset brightness condition is that the brightness is between 0% and 100%.
The following describes the operation of the page background setting device by way of an example.
Take an example where a white cloud is floating in the sky where the content of the selected subject picture is blue in a certain page.
Firstly, the obtainingmodule 401 obtains R, G, B three-channel values corresponding to all pixels in the theme picture, and the first determiningmodule 402 divides a value range between a maximum value and a minimum value corresponding to each channel into 16 regions for each channel of R, G, B corresponding to each pixel, and maps the 16 regions into a fixed representative value, and then combines the representative values obtained by the three channels, so as to obtain 16 × 16 candidate main color elements.
Then, of the 16 × 16 candidate main color elements, if it is determined based on the granularity value that the white clouds in the subject picture can be divided into five candidate main color elements with different gradients (white 1, white 2, white 3, white 4, and white 5), and the blue sky can be divided into five candidate main color elements with different gradients (blue 1, blue 2, blue 3, blue 4, and blue 5).
Next, the second determiningmodule 403 detects the number of pixels corresponding to each of the ten candidate main color elements, namely the five candidate main color elements of the white cloud and the five candidate main color elements of the blue sky, and performs descending order on the ten candidate main color elements according to the number of pixels, assuming that the order is blue 1, blue 2, blue 3, blue 4, blue 5, white 1, white 2, white 3, white 4, and white 5, the third determiningmodule 404 first determines whether blue 1 meets a preset visual attribute condition, that is, detects whether the number of pixels, saturation, and brightness corresponding to blue 1 are all within a preset range. If so, the fourth determiningmodule 405 sets blue 1 as the main color element of the theme picture. And then thesetting module 406 sets the color attribute of blue 1 in the upper half screen of the page according to a preset rule, so that the color of blue 1 gradually changes in the upper half screen of the page.
If the third determiningmodule 404 detects that any one of the saturation and the brightness of blue 1 does not satisfy the corresponding preset range, it detects whether the saturation and the brightness corresponding to blue 2 are both within the preset range to determine whether blue 2 can be set as the main color element of the background of the page.
And repeating the steps until the main color element meeting the preset requirement is found.
Referring to fig. 5, an exemplary system architecture to which the page context setting method of one embodiment of the present disclosure may be applied is shown.
As shown in fig. 5, the system architecture may includeterminal devices 501, 502, 503, anetwork 504, and aserver 505. Thenetwork 504 serves to provide a medium for communication links between theterminal devices 501, 502, 503 and theserver 505.Network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few. The terminal devices and servers described above may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., Ad hoc peer-to-peer networks), as well as any currently known or future developed network.
Theterminal devices 501, 502, 503 may interact with aserver 505 over anetwork 504 to receive or send messages or the like. Theterminal devices 501, 502, 503 may have various client applications installed thereon, such as a video distribution application, a search application, and a news application.
Theterminal devices 501, 502, 503 may be hardware or software. When theterminal devices 501, 502, 503 are hardware, they may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, mpeg compression standard Audio Layer 3), MP4 players (Moving Picture Experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop portable computers, desktop computers, and the like. When theterminal devices 501, 502, and 503 are software, they can be installed in the electronic devices listed above. It may be implemented as multiple pieces of software or software modules (e.g., software or software modules used to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
Theserver 505 may be a server that can provide various services, for example, receives a video acquisition request sent by theterminal device 501, 502, 503, performs analysis processing on the video acquisition request, and sends the analysis processing result (for example, video data corresponding to the acquisition request) to theterminal device 501, 502, 503.
It should be noted that the page background setting method provided by the embodiment of the present disclosure may be executed by theserver 505, and accordingly, the page background setting apparatus may be provided in theserver 505. It can also be executed by theterminal equipment 501, 502, 503, and accordingly, the page background setting means can be provided in theterminal equipment 501, 502, 503.
It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 6, a block diagram of an electronic device (e.g., the server of FIG. 5) suitable for use in implementing embodiments of the present disclosure is shown. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, the electronic device may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In theRAM 603, various programs and data necessary for the operation of the electronic apparatus are also stored. Theprocessing device 601, theROM 602, and theRAM 603 are connected to each other via abus 604. An input/output (I/O)interface 605 is also connected tobus 604.
Generally, the following devices may be connected to the I/O interface 605:input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.;output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like;storage 608 including, for example, tape, hard disk, etc.; and acommunication device 609. The communication means 609 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from theROM 602. The computer program, when executed by theprocessing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring R, G, B three-channel values corresponding to each pixel of a theme picture in a page; for each pixel, determining a candidate main color element corresponding to the pixel according to the value of the R, G, B three channels corresponding to the pixel; for each candidate main color element, determining the number of pixels corresponding to the candidate main color element; determining whether each candidate main color element meets a preset visual attribute condition; determining candidate main color elements which meet preset visual attribute conditions and the corresponding pixel number meets the preset conditions as main color elements of the theme picture; and taking the main color element as a main color element of the page background, and setting the color attribute of the main color element in a preset area of the page according to a preset rule, so that the main color element gradually changes in the preset area.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. The name of the module does not in some cases form a limitation on the unit itself, and for example, the acquiring module may also be described as a module that acquires R, G, B three-channel values corresponding to each pixel of the subject picture in the page.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (9)

CN201911111909.3A2019-11-132019-11-13Page background setting method and device and electronic equipmentActiveCN110865862B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201911111909.3ACN110865862B (en)2019-11-132019-11-13Page background setting method and device and electronic equipment

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201911111909.3ACN110865862B (en)2019-11-132019-11-13Page background setting method and device and electronic equipment

Publications (2)

Publication NumberPublication Date
CN110865862Atrue CN110865862A (en)2020-03-06
CN110865862B CN110865862B (en)2023-04-28

Family

ID=69654801

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201911111909.3AActiveCN110865862B (en)2019-11-132019-11-13Page background setting method and device and electronic equipment

Country Status (1)

CountryLink
CN (1)CN110865862B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN112037303A (en)*2020-08-312020-12-04深圳市欢太科技有限公司 Card background color generation method, device, equipment and medium for theme display cards
CN112069340A (en)*2020-09-042020-12-11北京字节跳动网络技术有限公司 Background image processing and search result display method, device, device and medium
CN112579962A (en)*2020-12-292021-03-30五八有限公司Webpage color adjusting method and device, electronic equipment and computer readable medium
CN113656134A (en)*2021-08-172021-11-16北京百度网讯科技有限公司 Color matching method, apparatus, device and storage medium for interface elements
CN113886726A (en)*2021-10-272022-01-04北京达佳互联信息技术有限公司Page display method and device, electronic equipment and storage medium
CN114119783A (en)*2021-12-082022-03-01掌阅科技股份有限公司 Image processing method, electronic device and computer storage medium
CN114416089A (en)*2022-01-192022-04-29惠州Tcl移动通信有限公司 Page display method, device, mobile terminal and storage medium
CN116033638A (en)*2023-03-302023-04-28深圳市智岩科技有限公司Light control method, device, product, medium and light control equipment
CN116188608A (en)*2022-12-272023-05-30上海元彩科技有限公司Method and device for arranging colors in plane
CN117315172A (en)*2023-09-222023-12-29鲸数科技(北京)有限公司Map page configuration method, map page configuration device, electronic equipment and computer readable medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20020102018A1 (en)*1999-08-172002-08-01Siming LinSystem and method for color characterization using fuzzy pixel classification with application in color matching and color match location
US6963425B1 (en)*2000-08-142005-11-08National Instruments CorporationSystem and method for locating color and pattern match regions in a target image
US20190005652A1 (en)*2017-06-302019-01-03Canon Kabushiki KaishaBackground modelling of sport videos
CN109783182A (en)*2019-02-152019-05-21百度在线网络技术(北京)有限公司A kind of method of adjustment, device, equipment and the medium of page subject matter tone
CN110210532A (en)*2019-05-152019-09-06北京字节跳动网络技术有限公司Background colour generation method, device and electronic equipment
CN110377860A (en)*2019-07-182019-10-25百度(中国)有限公司A kind of page color method of adjustment, device and electronic equipment
WO2020138803A1 (en)*2018-12-242020-07-02(주)제이엘케이Image analysis device and method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20020102018A1 (en)*1999-08-172002-08-01Siming LinSystem and method for color characterization using fuzzy pixel classification with application in color matching and color match location
US6963425B1 (en)*2000-08-142005-11-08National Instruments CorporationSystem and method for locating color and pattern match regions in a target image
US20190005652A1 (en)*2017-06-302019-01-03Canon Kabushiki KaishaBackground modelling of sport videos
WO2020138803A1 (en)*2018-12-242020-07-02(주)제이엘케이Image analysis device and method
CN109783182A (en)*2019-02-152019-05-21百度在线网络技术(北京)有限公司A kind of method of adjustment, device, equipment and the medium of page subject matter tone
CN110210532A (en)*2019-05-152019-09-06北京字节跳动网络技术有限公司Background colour generation method, device and electronic equipment
CN110377860A (en)*2019-07-182019-10-25百度(中国)有限公司A kind of page color method of adjustment, device and electronic equipment

Cited By (16)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN112037303A (en)*2020-08-312020-12-04深圳市欢太科技有限公司 Card background color generation method, device, equipment and medium for theme display cards
CN112069340A (en)*2020-09-042020-12-11北京字节跳动网络技术有限公司 Background image processing and search result display method, device, device and medium
CN112579962A (en)*2020-12-292021-03-30五八有限公司Webpage color adjusting method and device, electronic equipment and computer readable medium
CN113656134B (en)*2021-08-172023-08-04北京百度网讯科技有限公司 Color matching method, device, device and storage medium for interface elements
CN113656134A (en)*2021-08-172021-11-16北京百度网讯科技有限公司 Color matching method, apparatus, device and storage medium for interface elements
CN113886726A (en)*2021-10-272022-01-04北京达佳互联信息技术有限公司Page display method and device, electronic equipment and storage medium
CN114119783A (en)*2021-12-082022-03-01掌阅科技股份有限公司 Image processing method, electronic device and computer storage medium
CN114119783B (en)*2021-12-082025-05-06掌阅科技股份有限公司 Image processing method, electronic device and computer storage medium
CN114416089A (en)*2022-01-192022-04-29惠州Tcl移动通信有限公司 Page display method, device, mobile terminal and storage medium
CN116188608A (en)*2022-12-272023-05-30上海元彩科技有限公司Method and device for arranging colors in plane
CN116188608B (en)*2022-12-272024-03-12上海元彩科技有限公司Method and device for arranging colors in plane
WO2024140594A1 (en)*2022-12-272024-07-04上海元彩科技有限公司Method and apparatus for arranging colors on plane
CN116033638B (en)*2023-03-302023-06-13深圳市智岩科技有限公司Light control method, device, product, medium and light control equipment
CN116033638A (en)*2023-03-302023-04-28深圳市智岩科技有限公司Light control method, device, product, medium and light control equipment
CN117315172A (en)*2023-09-222023-12-29鲸数科技(北京)有限公司Map page configuration method, map page configuration device, electronic equipment and computer readable medium
CN117315172B (en)*2023-09-222024-04-12鲸数科技(北京)有限公司Map page configuration method, map page configuration device, electronic equipment and computer readable medium

Also Published As

Publication numberPublication date
CN110865862B (en)2023-04-28

Similar Documents

PublicationPublication DateTitle
CN110865862B (en)Page background setting method and device and electronic equipment
CN111260601B (en)Image fusion method and device, readable medium and electronic equipment
CN110211030B (en)Image generation method and device
CN113191726B (en)Task detail interface display method, device, equipment and computer readable medium
CN110784754A (en)Video display method and device and electronic equipment
JP7261732B2 (en) Method and apparatus for determining character color
US11514263B2 (en)Method and apparatus for processing image
CN113742025A (en)Page generation method, device, equipment and storage medium
CN112348910B (en) Method, device, apparatus and computer readable medium for acquiring images
CN110852946A (en)Picture display method and device and electronic equipment
CN110097520B (en)Image processing method and device
CN113989396A (en) Image rendering method, apparatus, device, storage medium and program product
CN110399802B (en)Method, apparatus, medium, and electronic device for processing eye brightness of face image
CN113961280B (en)View display method and device, electronic equipment and computer readable storage medium
CN110851059A (en)Picture editing method and device and electronic equipment
CN110599394A (en)Method and device for processing pictures in online presentation, storage medium and equipment
CN112579962A (en)Webpage color adjusting method and device, electronic equipment and computer readable medium
CN117234650A (en)Image display method and device, storage medium and electronic equipment
EP4283973A1 (en)Image brightness adjustment method and apparatus, and electronic device and medium
CN111199519B (en)Method and device for generating special effect package
CN110825480A (en)Picture display method and device, electronic equipment and computer readable storage medium
CN113763258A (en)Beautifying method and device for video image
CN111596987A (en)Page display method and device and electronic equipment
CN117315172B (en)Map page configuration method, map page configuration device, electronic equipment and computer readable medium
CN115801976B (en) Video processing method, device, equipment and medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp