The content of the invention
It is an object of the invention to provide a kind of theme background method to set up, device and electronic equipment, to realize setting figure
The theme background of piece.
To achieve these goals, the technical scheme that the embodiment of the present invention is used is as follows:
In a first aspect, the embodiment of the invention provides a kind of theme background method to set up, reader, methods described are applied to
Including:
Set the theme colors of painting canvas;
It is that transparent picture is drawn on the painting canvas for having set theme colors by background colour.
Second aspect, the embodiment of the present invention additionally provides a kind of theme background and sets device, is applied to reader, the master
Topic background sets device to be included:
Setting unit, the theme colors for setting painting canvas;
Drawing unit, for being that transparent picture is drawn on the painting canvas for having set theme colors by background colour.
The third aspect, the embodiment of the present invention additionally provides a kind of electronic equipment, and the electronic equipment is provided with reader, institute
Stating electronic equipment includes:
Memory;
Processor;And
Theme background sets device, and the theme background sets device and is installed in the memory and including one or many
The individual software function module by the computing device, the theme background sets device to be included:
Setting unit, the theme colors for setting painting canvas;
Drawing unit, for being that transparent picture is drawn on the painting canvas for having set theme colors by background colour.
Theme background method to set up provided in an embodiment of the present invention, device and electronic equipment, the theme background method to set up
Including:Set the theme colors of painting canvas;It is that transparent picture is drawn on the painting canvas for having set theme colors by background colour.
Theme background method to set up, device and the electronic equipment that the present invention is provided can set the theme background of reader as needed
When set reader in picture background color so that the theme background color of reader and picture background color keep one
Cause, user is obtained good reading experience.
To enable the above objects, features and advantages of the present invention to become apparent, preferred embodiment cited below particularly, and coordinate
Appended accompanying drawing, is described in detail below.
Specific embodiment
Below in conjunction with accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Ground description, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.Generally exist
The component of the embodiment of the present invention described and illustrated in accompanying drawing can be arranged and designed with a variety of configurations herein.Cause
This, the detailed description of the embodiments of the invention to providing in the accompanying drawings is not intended to limit claimed invention below
Scope, but it is merely representative of selected embodiment of the invention.Based on embodiments of the invention, those skilled in the art are not doing
The every other embodiment obtained on the premise of going out creative work, belongs to the scope of protection of the invention.
It should be noted that:Similar label and letter represents similar terms in following accompanying drawing, therefore, once a certain Xiang Yi
It is defined in individual accompanying drawing, then it need not be further defined and explained in subsequent accompanying drawing.
A kind of theme background method to set up and device are the embodiment of the invention provides, the theme background method to set up and device
Reader is applied to, the reader can be various ocr softwares, such as caricature ocr software, novel ocr software, various branch
Browser of reading etc. is held, the reader is arranged in electronic equipment 100.
As shown in figure 1, being the block diagram of electronic equipment provided in an embodiment of the present invention 100.Electronic equipment 100 includes
But it is not limited to smart mobile phone, PC (personal computer, PC), panel computer, personal digital assistant
(personal digital assistant, PDA), mobile internet surfing equipment (mobile Internet device, MID) etc.,
Electronic equipment 100 includes that theme background sets device 110, memory 120, storage control 130, processor 140, Peripheral Interface
150th, display unit 160.
Each element phase of the memory 120, storage control 130, processor 140, Peripheral Interface 150, display unit 160
Directly or indirectly it is electrically connected between mutually, to realize the transmission or interaction of data.For example, these elements can pass through each other
One or more communication bus or holding wire are realized being electrically connected with.The theme background sets device 110 can including at least one
During the memory 120 is stored in the form of the software or firmware (firmware) or it is solidificated in the behaviour of the electronic equipment 100
Make the software function module in system (operating system, OS).During the processor 140 is used to perform memory 120
The executable module of storage, such as described theme background sets software function module or computer program that device 110 includes.
Wherein, memory 120 may be, but not limited to, random access memory (Random Access Memory,
RAM), read-only storage (Read Only Memory, ROM), programmable read only memory (Programmable Read-Only
Memory, PROM), erasable read-only memory (Erasable Programmable Read-Only Memory, EPROM),
Electricallyerasable ROM (EEROM) (Electric Erasable Programmable Read-Only Memory, EEPROM) etc..
Wherein, memory 120 is used for storage program, and the processor 140 performs described program after execute instruction is received, foregoing
Method performed by the electronic equipment 100 of the stream process definition that embodiment of the present invention any embodiment is disclosed can apply to treatment
In device 140, or realized by processor 140.
Processor 140 is probably a kind of IC chip, the disposal ability with signal.Above-mentioned processor 140 can
Being general processor, including central processing unit (Central Processing Unit, abbreviation CPU), network processing unit
(Network Processor, abbreviation NP) etc.;Can also be digital signal processor (DSP), application specific integrated circuit (ASIC),
It is field programmable gate array (FPGA) or other PLDs, discrete gate or transistor logic, discrete hard
Part component.Can realize or perform disclosed each method in the embodiment of the present invention, step and logic diagram.General processor
Can be microprocessor or the processor 140 can also be any conventional processor 140 etc..
Display unit 160 provides an interactive interface (such as user interface) between electronic equipment 100 and user
Or referred to user for display image data.In the present embodiment, the display unit 160 can be liquid crystal display or touch
Control display.If touch control display, it can be that the capacitance type touch control screen or resistance-type for supporting single-point and multi-point touch operation are touched
Control screen etc..Support that single-point and multi-point touch operation refer to that touch control display can be sensed from one on the touch control display or many
The touch control operation produced simultaneously at individual position, and transfer to processor 140 to be calculated and processed the touch control operation for sensing.
As shown in Fig. 2 being that the theme background of the electronic equipment 100 being applied to shown in Fig. 1 provided in an embodiment of the present invention sets
Put the structural representation of device 110.The theme background sets device 110 is used to set the theme background of reader, theme background
The read interface style of reader is referred to, content etc. the layout of color, control including window, icon style, by changing
To reach the purpose at enhancement system interface, theme background refers mainly to the color background of the window of reader to these vision contents.It is main
Topic background sets device 110 includes setting unit 111, processing unit 112, drawing unit 113 and adjustment unit 114.
The setting unit 111 is used to set the theme colors of painting canvas, and the painting canvas is the display interface of reader, and such as webpage is clear
Look at the page or mobile phone ocr software display interface.Painting canvas can be arranged to different by setting unit 111 according to practical application scene
Theme colors, such as when the scene at night or dark sets device 110 using theme background, can be by setting unit
The painting canvas is set other dark theme colors such as grey by 111;When daytime or light stronger scene use theme
When background sets device 110, the painting canvas can be arranged to by setting unit 111 for other brighter theme colors such as white,
In order to provide preferable reading effect, more preferable reading experience is brought to user, while can also protect the eyes of user
After setting unit 111 sets the theme colors of painting canvas, it is transparent figure that drawing unit 113 is used for background colour
Piece is drawn on the painting canvas for having set theme colors.Background colour is transparent picture, i.e. the picture does not have background colour, only remains
The color of pattern on picture.Such as it is painted with a big tree for green on the picture without background colour, setting unit 111 is by painting canvas
Theme colors are set to blueness, the pattern of big tree in picture are drawn on the painting canvas for having set body color, so as to have changed
The background color of picture.
When the background colour of picture is not transparent, it is necessary to it is transparent picture that the background colour for removing picture obtains background colour,
In the present embodiment, processing unit 112 is used to obtain the background colour of picture, when the background colour of picture is nontransparent, removal figure
The background colour of piece is transparent picture to obtain background colour.Specifically, in the present embodiment, processing unit 112 obtains the picture back of the body
The mode of scenery is that the pixel for counting different colours in picture accounts for the ratio of all pixels point, that is, count all pictures in the picture
The quantity of vegetarian refreshments, while counting the respective RGB ratio value of all pixels point (RGB, Red Green Blue), is had
The quantity of the pixel of identical RGB ratio value, so as to the pixel for calculating different RGB ratio values accounts for all pixels point
The percentage of quantity, the color for choosing percentage highest RGB ratio value is the background colour of picture.For example, in a picture
In, RGB ratio value accounts for the 80% of all pixels point, three primary colors for the pixel of the color (i.e. white) of (255,255,255)
Ratio value accounts for the 20% of all pixels point for the pixel of color (i.e. black) of (0,0,0), then processing unit 112 is by three primary colors
Ratio value is the color of (255,255,255) as the background colour of picture.In pixel of the statistics with identical RGB ratio value
During the quantity of point, the RGB ratio value scope of the pixel with identical RGB ratio value can be expanded 5, such as in system
Meter RGB ratio value for the pixel of (234,212,100) quantity when, can count RGB colour scope for (229~
The quantity of 239,207~217,95~pixel 105), and then the close pixel of colour is merged into statistics so that acquisition
Background colour is more accurate.But not limited to this, can also obtain the background colour of picture by other reasonable manners.Choose percentage
After the color of highest pixel is for the background colour of picture, if the background colour of picture is nontransparent, the background of picture is removed
It is transparent picture that color obtains background colour.
The display interface of reader typically has two plates of frame and painting canvas (being appreciated that the background that is the theme), and some are read
Gap is provided between the painting canvas and painting canvas of reading device, the gap can be understood as a part for frame, for readding with frame
Read device, in the present embodiment, adjustment unit 114 is used to be adjusted to the border color of reader the theme colors of painting canvas, such as sets
After the theme colors of painting canvas are set as blueness by unit 111, the border color of the adjustment reader of adjustment unit 114 is blueness, is led to
Cross and the border color of reader is adjusted to the color consistent with the theme colors of painting canvas, be conducive to the display interface of reader
Color is unified, and increases aesthetic feeling, user is had more preferable reading experience.
Fig. 3 is refer to, is that the theme background of the electronic equipment 100 being applied to shown in Fig. 1 provided in an embodiment of the present invention sets
The flow chart of method is put, the theme background method to set up is comprised the following steps:
Step S110, sets the theme colors of painting canvas.
In the present embodiment, step S110 can be performed by setting unit 111.
Step S130, is that transparent picture is drawn on the painting canvas for having set theme colors by background colour.
In the present embodiment, step S130 can be performed by drawing unit 113.
The theme background method to set up also includes:
Step S120, obtains the background colour of the picture, when the background colour of the picture is nontransparent, removes the figure
The background colour of piece is transparent picture to obtain background colour.
Fig. 4 is refer to, step S120 includes following sub-step:
Step S121, the pixel for counting the different colours in the picture accounts for the percentage of all pixels point.
Step S122, chooses the color of percentage highest pixel as the background colour of the picture.
In the present embodiment, step S120, S121, S122 can be performed by processing unit 112.
The theme background method to set up also includes:
Step S140, the border color of the reader is adjusted to the theme colors of the painting canvas.
In the present embodiment, step S140 can be performed by adjustment unit 114.
In sum, the invention provides a kind of theme background method to set up, device and electronic equipment, the theme background sets
The method of putting includes:Set the theme colors of painting canvas;It is that transparent picture is drawn on and has set described in theme colors by background colour
On painting canvas.Theme background method to set up, device and the electronic equipment that the present invention is provided can set reader as needed
The background color of picture in reader is set during theme background, so that the background face of the theme background color of reader and picture
Color is consistent, and user is obtained good reading experience.
In several embodiments provided herein, it should be understood that disclosed apparatus and method, it is also possible to pass through
Other modes are realized.Device embodiment described above is only schematical, for example, flow chart and block diagram in accompanying drawing
Show the device of multiple embodiments of the invention, the architectural framework in the cards of method and computer program product,
Function and operation.At this point, each square frame in flow chart or block diagram can represent one the one of module, program segment or code
Part a, part for the module, program segment or code is used to realize holding for the logic function for specifying comprising one or more
Row instruction.It should also be noted that at some as in the implementation replaced, the function of being marked in square frame can also be being different from
The order marked in accompanying drawing occurs.For example, two continuous square frames can essentially be performed substantially in parallel, they are sometimes
Can perform in the opposite order, this is depending on involved function.It is also noted that every in block diagram and/or flow chart
The combination of the square frame in individual square frame and block diagram and/or flow chart, can use the function or the special base of action for performing regulation
Realized in the system of hardware, or can be realized with the combination of computer instruction with specialized hardware.
In addition, each functional module in each embodiment of the invention can integrate to form an independent portion
Divide, or modules individualism, it is also possible to which two or more modules are integrated to form an independent part.
If the function is to realize in the form of software function module and as independent production marketing or when using, can be with
Storage is in a computer read/write memory medium.Based on such understanding, technical scheme is substantially in other words
The part contributed to prior art or the part of the technical scheme can be embodied in the form of software product, the meter
Calculation machine software product is stored in a storage medium, including some instructions are used to so that a computer equipment (can be individual
People's computer, server, or network equipment etc.) perform all or part of step of each embodiment methods described of the invention.
And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), arbitrary access are deposited
Reservoir (RAM, Random Access Memory), magnetic disc or CD etc. are various can be with the medium of store program codes.Need
Illustrate, herein, such as first and second or the like relational terms be used merely to by an entity or operation with
Another entity or operation make a distinction, and not necessarily require or imply these entities or there is any this reality between operating
The relation or order on border.And, term " including ", "comprising" or its any other variant be intended to the bag of nonexcludability
Contain, so that process, method, article or equipment including a series of key elements are not only including those key elements, but also including
Other key elements being not expressly set out, or it is this process, method, article or the intrinsic key element of equipment also to include.
In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including the key element
Process, method, article or equipment in also there is other identical element.
The preferred embodiments of the present invention are the foregoing is only, is not intended to limit the invention, for the skill of this area
For art personnel, the present invention can have various modifications and variations.It is all within the spirit and principles in the present invention, made any repair
Change, equivalent, improvement etc., should be included within the scope of the present invention.It should be noted that:Similar label and letter exists
Similar terms is represented in following accompanying drawing, therefore, once being defined in a certain Xiang Yi accompanying drawing, then it is not required in subsequent accompanying drawing
It is further defined and is explained.
The above, specific embodiment only of the invention, but protection scope of the present invention is not limited thereto, and it is any
Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, should all contain
Cover within protection scope of the present invention.Therefore, protection scope of the present invention described should be defined by scope of the claims.