Summary of the invention
Single in order to solve display effect, as can't to change flexibly according to the color of shown picture problem, the embodiment of the invention provides a kind of image processing method, device and terminal device.Described technical scheme is as follows:
On the one hand, provide a kind of image processing method, described method comprises:
Take pixel as unit, the Target Photo in the viewing area is split, obtain a plurality of pixels, described viewing area comprises Target Photo and background area;
According to default account form, obtain volume coordinate corresponding to described a plurality of pixel;
According to the distance between volume coordinate corresponding to the volume coordinate of at least three benchmark colors and described a plurality of pixel, determine the benchmark color of described Target Photo coupling;
According to the benchmark color of described Target Photo coupling and the background colour corresponding to benchmark color of described coupling, color filling is carried out in the background area of described viewing area.
Better, described default account form is YUV or RGB mode.
Better, according to the distance between volume coordinate corresponding to the volume coordinate of at least three benchmark colors and described a plurality of pixel, determine the benchmark color of described Target Photo coupling, comprising:
Calculate the distance between the volume coordinate of each pixel in each benchmark color and the described a plurality of pixel;
According to the distance size between the volume coordinate of each pixel in each benchmark color and the described a plurality of pixel, described each benchmark color is voted;
According to the number of votes obtained of each benchmark color after the ballot, determine the benchmark color with described Target Photo coupling.
Better, according to the distance size between the volume coordinate of each pixel in each benchmark color and the described a plurality of pixel, described each benchmark color voted to be comprised:
Get rid of the first pixel in described a plurality of pixel, described the first pixel is that described Target Photo characterizes the colour of skin and pixel corresponding to color development part;
Distance size according to described each benchmark color and between the volume coordinate of the second pixel in the described a plurality of pixels after getting rid of, described each benchmark color is voted, and described the second pixel is to characterize the colour of skin and pixel pixel in addition corresponding to color development part in described a plurality of pixel.
Better, according to the number of votes obtained of each benchmark color after the ballot, be defined as the benchmark color of described Target Photo coupling, comprising:
According to the number of votes obtained of each benchmark color after the ballot and the weight of ballot pixel or described each benchmark color, calculate the correction poll of each benchmark color;
According to the correction poll of described each benchmark color, determine the benchmark color with described Target Photo coupling.
On the other hand, provide a kind of picture processing device, described device comprises:
Split module, be used for take pixel as unit, the Target Photo in the viewing area is split, obtain a plurality of pixels, described viewing area comprises Target Photo and background area;
The volume coordinate acquisition module is used for obtaining volume coordinate corresponding to described a plurality of pixel according to default account form;
Benchmark color determination module is used for determining the benchmark color of described Target Photo coupling according to the distance between volume coordinate corresponding to the volume coordinate of at least three benchmark colors and described a plurality of pixel;
The background colour packing module is used for according to the benchmark color of described Target Photo coupling and the background colour corresponding to benchmark color of described coupling color filling being carried out in the background area of described viewing area.
Better, described default account form is YUV or RGB mode.
Better, described benchmark color determination module comprises:
Metrics calculation unit is for the distance between the volume coordinate of calculating each benchmark color and described a plurality of each pixel of pixel;
The ballot unit is used for according to the distance size between the volume coordinate of each benchmark color and described a plurality of each pixel of pixel described each benchmark color being voted;
Benchmark color determining unit is used for the number of votes obtained according to each benchmark color after the ballot, determines the benchmark color with described Target Photo coupling.
Better, described ballot unit is used for getting rid of the first pixel of described a plurality of pixels, and described the first pixel is that described Target Photo characterizes the colour of skin and pixel corresponding to color development part; Distance size according to described each benchmark color and between the volume coordinate of the second pixel in the described a plurality of pixels after getting rid of, described each benchmark color is voted, and described the second pixel is to characterize the colour of skin and pixel pixel in addition corresponding to color development part in described a plurality of pixel.
Better, described benchmark color determining unit is used for calculating the correction poll of each benchmark color according to the number of votes obtained of each benchmark color after the ballot and the weight of ballot pixel or described each benchmark color; According to the correction poll of described each benchmark color, determine the benchmark color with described Target Photo coupling.
Another aspect, a kind of terminal device, terminal device includes storer, and one or more than one program, one of them or an above procedure stores and are configured to carry out described one or an above program by one or above processor and comprise be used to the instruction of carrying out following operation in storer:
Take pixel as unit, the Target Photo in the viewing area is split, obtain a plurality of pixels, described viewing area comprises Target Photo and background area;
According to default account form, obtain volume coordinate corresponding to described a plurality of pixel;
According to the distance between volume coordinate corresponding to the volume coordinate of at least three benchmark colors and described a plurality of pixel, determine the benchmark color of described Target Photo coupling;
According to the benchmark color of described Target Photo coupling and the background colour corresponding to benchmark color of described coupling, color filling is carried out in the background area of described viewing area.
The beneficial effect that the technical scheme that the embodiment of the invention provides is brought is:
By according to the distance between the volume coordinate of pixel and benchmark color, definite benchmark color of mating most with Target Photo, and the background colour corresponding according to the benchmark color of described coupling, color filling is carried out in background area to described viewing area, make it possible to match colors according to the actual color of Target Photo, may the occur conflict mutually with color that Show Picture or close situation when avoiding filling according to default color, enriched display effect, so that the color of shown picture can change flexibly according to the color of Target Photo.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, embodiment of the present invention is described further in detail below in conjunction with accompanying drawing.
For the ease of understanding technical scheme provided by the invention, at first the noun that the present invention relates to is made an explanation:
Color mode just refers to utilize several " primary colors " to classify a concrete color that pixel has." primary colors " refers to that the mixing preparation that can not see through other colors draws " Essential colour ".For example: the pigment three primary colors during drawing are yellow (yellow), pinkish red (magenta), blue or green (cyan); And the three primary colors of light are red (red), green (green), blue (blue).Use these primary colors, can mix any one color in theory.
Pixel refers to the basic coding of basic protochrome and gray scale thereof.Popular, a width of cloth is drawn amplification without several times, can find that paintings are comprised of one by one little side's point, these little side's points are exactly pixel.
Color mode provides a kind of " coding " mode for these pixels just, comes to carry out mark for it with several primary colors.In theory, under each coded system, any one pixel can be marked as certain three-dimensional data:
For example: under the YUV pattern, the color of a pixel can be marked as (Y, U, V), and wherein, " Y " represents lightness (Luminance, Luma), and " U " and " V " then is colourity, concentration (Chrominance, Chroma).
And under the RGB pattern, the color of a concrete pixel can be marked as (R, G, B).Wherein, three letters represent respectively red (RDE), green (GREEN), blue (BLUE).
Need to prove, YUV can with the mutual conversion of RGB pattern, represent mode as example take above-mentioned two kinds of colors, it is a point in the three dimensions that consists of of three tagged elements of RGB or YUV that the color of a pixel can be considered as.
And utilizing space vector, we are easy to calculate the relation between any two points in the three dimensions.
For example: two some A in the space, B, its coordinate is respectively:
A (Y
a, U
a, V
a) and B (Y
b, U
b, V
b), this moment 2 apart from d be:
Fig. 1 is the process flow diagram of a kind of image processing method of providing of the embodiment of the invention.Referring to Fig. 1, described method comprises:
101, take pixel as unit, the Target Photo in the viewing area is split, obtain a plurality of pixels;
102, according to default account form, obtain volume coordinate corresponding to described a plurality of pixel;
103, the distance between the volume coordinate that the volume coordinate of at least three benchmark colors of basis and described a plurality of pixel are corresponding is determined the benchmark color that described Target Photo mates;
104, according to the benchmark color of described Target Photo coupling and the background colour corresponding to benchmark color of described coupling, color filling is carried out in the background area of described viewing area.
By according to the distance between the volume coordinate of pixel and benchmark color, definite benchmark color of mating most with Target Photo, and the background colour corresponding according to the benchmark color of described coupling, color filling is carried out in background area to described viewing area, make it possible to match colors according to the actual color of Target Photo, may the occur conflict mutually with color that Show Picture or close situation when avoiding filling according to default color, enriched display effect, so that the color of shown picture can change flexibly according to the color of Target Photo.
Better, described default account form is YUV or RGB mode.
Better, according to the distance between volume coordinate corresponding to the volume coordinate of at least three benchmark colors and described a plurality of pixel, determine the benchmark color of described Target Photo coupling, comprising:
Calculate the distance between the volume coordinate of each pixel in each benchmark color and the described a plurality of pixel;
According to the distance size between the volume coordinate of each pixel in each benchmark color and the described a plurality of pixel, described each benchmark color is voted;
According to the number of votes obtained of each benchmark color after the ballot, determine the benchmark color with described Target Photo coupling.
Better, according to the distance size between the volume coordinate of each pixel in each benchmark color and the described a plurality of pixel, described each benchmark color voted to be comprised:
Get rid of the first pixel in described a plurality of pixel, described the first pixel is that described Target Photo characterizes the colour of skin and pixel corresponding to color development part;
Distance size according to described each benchmark color and between the volume coordinate of the second pixel in the described a plurality of pixels after getting rid of, described each benchmark color is voted, and described the second pixel is to characterize the colour of skin and pixel pixel in addition corresponding to color development part in described a plurality of pixel.
Better, according to the number of votes obtained of each benchmark color after the ballot, be defined as the benchmark color of described Target Photo coupling, comprising:
According to the number of votes obtained of each benchmark color after the ballot and the weight of ballot pixel or described each benchmark color, calculate the correction poll of each benchmark color;
According to the correction poll of described each benchmark color, determine the benchmark color with described Target Photo coupling.
Above-mentioned all optional technical schemes can adopt any combination to form optional embodiment of the present invention, give unnecessary details no longer one by one at this.
Fig. 2 is the process flow diagram of a kind of image processing method of providing of the embodiment of the invention.Referring to Fig. 2, described method comprises:
201, take pixel as unit, the Target Photo in the viewing area is split, obtain a plurality of pixels.
In embodiments of the present invention, Target Photo is the main picture of the need configuration background colour in the viewing area.Viewing area for different application, its corresponding Target Photo can be different, as, for the business card in the address list, Target Photo is head portrait picture, for voice applications, Target Photo can be the album cover picture, and for news website, Target Photo can be a topic picture, and the not corresponding usefulness of the embodiment of the invention and Target Photo are enumerated one by one.
Business card viewing area in only take the viewing area as address list, be that example describes and Target Photo is head portrait picture in the business card, then this step 201 specifically comprises: take pixel as unit, the head portrait picture in the business card viewing area is split, obtain a plurality of pixels of this head portrait picture.
Need to prove, because Target Photo may be a picture compress or amplifies processing according to original image after, when therefore Target Photo being split, can carry out according to the resolution of original image corresponding to this Target Photo, also can carry out according to the current resolution of Target Photo.
202, according to default account form, obtain volume coordinate corresponding to described a plurality of pixel.
Wherein, described default account form is YUV or RGB mode.
Particularly, use YUV or RGB mode, be a plurality of pixel assignment of this Target Photo, each pixel is as a point in the three dimensions, as shown in Figure 3, Fig. 3 is the schematic diagram of the respective coordinates position of a certain pixel in coordinate system that provide of the embodiment of the invention.
Need to prove, according to different account forms, the volume coordinate that calculates may be different, and the embodiment of the invention is not done concrete restriction to this.
203, calculate distance between the volume coordinate of each pixel in each benchmark color and the described a plurality of pixel.
Wherein, the number of benchmark color and concrete corresponding color can be specified in advance, as, the benchmark color can have four kinds, is respectively red, yellow, orange, green.Need to prove, the number of the benchmark color that sets in advance is more, and the color matching effect of finally carrying out according to voting results is better.
Every kind of benchmark color has corresponding volume coordinate (as shown in Figure 4) in three dimensions, this volume coordinate can be the volume coordinate of calculating according to YUV or RGB mode, and its concrete account form need to be consistent with the account form of pixel volume coordinate.
204, according to the distance size between the volume coordinate of each pixel in each benchmark color and the described a plurality of pixel, described each benchmark color is voted.
Particularly, according to the distance size between the volume coordinate of each pixel in the volume coordinate of each benchmark color and a plurality of pixel, this distance can be air line distance, each pixel is according to the distance size between the volume coordinate of this pixel and each benchmark color, the nearest benchmark color with this pixel is given in ballot, so just obtain the voting results of a color proximity, for example: as shown in Figure 5, Fig. 5 is the schematic diagram that pixel is voted to the benchmark color, only shows the voting process of partial pixel point among this figure.In N the pixel 50% the approaching green of point is arranged, 40% point approaches yellow, and 10% point approaches redness, and wherein, N is integer.
When the viewing area is business card in the address list, this Target Photo is head portrait picture, for head portrait picture, personage's face and hair appears in possible greater probability, when calculating ballot, the black of the colour of skin and hair can be removed, correspondingly, the step 204 of this embodiment of the invention specifically comprises: get rid of the first pixel in described a plurality of pixel, described the first pixel is that described Target Photo characterizes the colour of skin and pixel corresponding to color development part; Distance size according to described each benchmark color and between the volume coordinate of the second pixel in the described a plurality of pixels after getting rid of, described each benchmark color is voted, and described the second pixel is to characterize the colour of skin and pixel pixel in addition corresponding to color development part in described a plurality of pixel.
Wherein, the part that characterizes the colour of skin and color development can be determined according to the color value of pixel.
205, according to the number of votes obtained of each benchmark color after the ballot, determine the benchmark color with described Target Photo coupling.
When pixel ballot is finished, compare according to the number of votes obtained of each the benchmark color after the ballot, the benchmark color that number of votes obtained is the highest is defined as the benchmark color with this Target Photo coupling.As, based on the example of step 204, in N the pixel 50% the approaching green of point being arranged, 40% point approaches yellow, and the approaching redness of 10% point is green with the benchmark color that this Target Photo mates then.
Alternatively, described step 205 specifically comprises: according to the weight of number of votes obtained and the ballot pixel of each benchmark color after the ballot, calculate the correction poll of each benchmark color; According to the correction poll of described each benchmark color, determine the benchmark color with described Target Photo coupling.
Wherein, the weight of ballot pixel can be determined according to color shared area ratio in this Target Photo corresponding to ballot pixel.
The color (such as black) that occurs in a big way in the target image (such as contact head image) may affect final realization effect), when ballot, can give lower weight, the large tracts of land influence of color is whole to be judged in case cross.
Still based on the example of step 204, in N the pixel 50% the approaching green of point is arranged, 40% point approaches yellow, 10% point approaches red, wherein, this 50% pixel that approaches green all is positioned at the same area, and should surpass 50% by zone shared area ratio in Target Photo, then be that the ballot weight of this pixel of 50% is composed lower value, such as 0.5, then at this moment, reduce to 25% according to 50% after the weight adjustment, according to the correction poll after adjusting, can determine to approach yellow point and account for 40%, therefore large percentage determines that yellow is the benchmark color of mating with Target Photo.
Alternatively, described step 205 can also specifically comprise: according to the number of votes obtained of each benchmark color and the weight of described each benchmark color after the ballot, calculate the correction poll of each benchmark color; According to the correction poll of described each benchmark color, determine the benchmark color with described Target Photo coupling.
Wherein, the weight of each benchmark color can be determined according to the number of votes obtained of this benchmark color, the ratio that the number of votes obtained of a certain benchmark color accounts for aggregate votes surpasses predetermined threshold value, then the weight with this benchmark color is adjusted into 0, as, know that through ballot the number of votes obtained of benchmark color black accounts for 80% of aggregate votes, surpass predetermined threshold value 50%, then the weight with this benchmark color is adjusted into 0, the impact of avoiding large-area inclined to one side black that color matching is caused.
206, according to the benchmark color of described Target Photo coupling and the background colour corresponding to benchmark color of described coupling, color filling is carried out in the background area of described viewing area.
Terminal equipment configuration has the background colour with each benchmark color-match, to obtain abundanter color matching effect, when determining the benchmark color of coupling, obtains corresponding with it background colour according to the benchmark color of determining.For example: reference color are yellow, and are the most good-looking under pitch black color matching, therefore set up the corresponding relation between reference color yellow and the aterrimus, when definite reference color are yellow, according to aterrimus color filling carried out in the background area of described viewing area.
In embodiments of the present invention, only to determine background colour by terminal device, and be filled to example according to background colour and describe, and in fact, in order more to be adapted to user's visual custom and aesthetic requirement, terminal device can be determined at least a background colour according to the current goal picture, and should offer user selection by at least a background colour, according to the background colour of user selection the background area of viewing area is filled.This background colour includes but not limited to the complementary colors of benchmark color etc.
Alternatively, in another embodiment that the embodiment of the invention provides, in order to improve the dirigibility of color matching, terminal device can also provide the color beyond at least a background colour to supply user selection, according to the background colour of user selection the background area of viewing area is filled.
207, the viewing area after demonstration is adjusted.
Alternatively, carry out the viewing area that effect shows for needs, such as business card etc., can directly show the zone after the adjustment, and only need to provide the viewing area of color matching suggestion for some, thumbnail or the display effect that can show the viewing area after the adjustment, select further according to current being seen effect and adjust for the user, relate to for daily picture processing or other in realization of picture color (being not limited to networking products or software product), the user can enjoy the color matching suggestion of specialty.For example, when lantern slide manufacturing and resume making, the technical scheme that the wright can utilize the embodiment of the invention to provide, the suggestion of preview color matching, thus the works of oneself are matched colors easily.
By according to the distance between the volume coordinate of pixel and benchmark color, definite benchmark color of mating most with Target Photo, and the background colour corresponding according to the benchmark color of described coupling, color filling is carried out in background area to described viewing area, make it possible to match colors according to the actual color of Target Photo, may the occur conflict mutually with color that Show Picture or close situation when avoiding filling according to default color, enriched display effect, so that the color of shown picture can change flexibly according to the color of Target Photo.
Fig. 6 is the functional-block diagram of a kind of picture processing device of providing of the embodiment of the invention.Referring to Fig. 6, this device comprises:
Split module 601, be used for take pixel as unit, the Target Photo in the viewing area is split, obtain a plurality of pixels, described viewing area comprises Target Photo and background area;
Volume coordinate acquisition module 602 is used for obtaining volume coordinate corresponding to described a plurality of pixel according to default account form;
Benchmark color determination module 603 is used for determining the benchmark color of described Target Photo coupling according to the distance between volume coordinate corresponding to the volume coordinate of at least three benchmark colors and described a plurality of pixel;
Background colour packing module 604 is used for according to the benchmark color of described Target Photo coupling and the background colour corresponding to benchmark color of described coupling color filling being carried out in the background area of described viewing area.
Better, described default account form is YUV or RGB mode.
Better, described benchmark color determination module 603 comprises:
Metrics calculation unit is for the distance between the volume coordinate of calculating each benchmark color and described a plurality of each pixel of pixel;
The ballot unit is used for according to the distance size between the volume coordinate of each benchmark color and described a plurality of each pixel of pixel described each benchmark color being voted;
Benchmark color determining unit is used for the number of votes obtained according to each benchmark color after the ballot, determines the benchmark color with described Target Photo coupling.
Better, described ballot unit is used for getting rid of the first pixel of described a plurality of pixels, and described the first pixel is that described Target Photo characterizes the colour of skin and pixel corresponding to color development part; Distance size according to described each benchmark color and between the volume coordinate of the second pixel in the described a plurality of pixels after getting rid of, described each benchmark color is voted, and described the second pixel is to characterize the colour of skin and pixel pixel in addition corresponding to color development part in described a plurality of pixel.
Better, described benchmark color determining unit is used for calculating the correction poll of each benchmark color according to the number of votes obtained of each benchmark color after the ballot and the weight of ballot pixel or described each benchmark color; According to the correction poll of described each benchmark color, determine the benchmark color with described Target Photo coupling.
Need to prove: the picture processing device that above-described embodiment provides is when picture processing, only the division with above-mentioned each functional module is illustrated, in the practical application, can as required the above-mentioned functions distribution be finished by different functional modules, the inner structure of the equipment of being about to is divided into different functional modules, to finish all or part of function described above.In addition, picture processing device and image processing method embodiment that above-described embodiment provides belong to same design, and its specific implementation process sees embodiment of the method for details, repeats no more here.
The all or part of step that one of ordinary skill in the art will appreciate that realization above-described embodiment can be finished by hardware, also can come the relevant hardware of instruction to finish by program, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be ROM (read-only memory), disk or CD etc.
Fig. 7 is a kind of terminal device structural representation that the embodiment of the invention provides.Referring to Fig. 7, this terminal device can be used for implementing the image processing method that above-described embodiment provides.Specifically:
Terminal device 700 can comprise communication unit 110, includes the storer 120 of one or more computer-readable recording mediums, input block 130, display unit 140, sensor 150, voicefrequency circuit 160, WiFi (wireless fidelity, Wireless Fidelity) module 170, include the parts such as the processor 180 of processing core more than one or one and power supply 190.It will be understood by those skilled in the art that the terminal device structure shown in Fig. 5 does not consist of the restriction to terminal device, can comprise the parts more more or less than diagram, perhaps make up some parts, perhaps different arrangements of components.Wherein:
Communication unit 110 can be used for receiving and sending messages or communication process in, the reception of signal and transmission, this communication unit 110 can be RF(Radio Frequency, radio frequency) circuit, router, modulator-demodular unit, etc. network communication equipment.Especially, when communication unit 110 is the RF circuit, after the downlink information reception with the base station, transfer to one or above processor 180 processing; In addition, will be referred to up data and send to the base station.Usually, RF circuit as communication unit includes but not limited to antenna, at least one amplifier, tuner, one or more oscillator, subscriber identity module (SIM) card, transceiver, coupling mechanism, LNA(Low Noise Amplifier, low noise amplifier), diplexer etc.In addition, communication unit 110 can also be by radio communication and network and other devices communicatings.Described radio communication can be used arbitrary communication standard or agreement, include but not limited to GSM (Global System of Mobile communication, global system for mobile communications), GPRS (General Packet Radio Service, general packet radio service), CDMA (Code Division Multiple Access, CDMA), WCDMA (Wideband Code Division Multiple Access, Wideband Code Division Multiple Access (WCDMA)), LTE (Long Term Evolution, Long Term Evolution), Email, SMS (Short Messaging Service, Short Message Service) etc.Storer 120 can be used for storing software program and module, and processor 180 is stored in software program and the module of storer 120 by operation, and various functions are used and data are processed thereby carry out.Storer 120 can mainly comprise storage program district and storage data field, wherein, but the required application program (such as sound-playing function, image player function etc.) of storage program district storage operating system, at least one function etc.; The data (such as voice data, phone directory etc.) that the use according to terminal device 700 creates etc. can be stored in the storage data field.In addition, storer 120 can comprise high-speed random access memory, can also comprise nonvolatile memory, for example at least one disk memory, flush memory device or other volatile solid-state parts.Correspondingly, storer 120 can also comprise Memory Controller, so that the access of processor 180 and 130 pairs of storeies 120 of input block to be provided.
Input block 130 can be used for receiving numeral or the character information of input, and generation is inputted with the user arranges and function control is relevant keyboard, mouse, control lever, optics or trace ball signal.Particularly, input block 130 can comprise touch-sensitive surperficial 131 and other input equipments 132.Touch-sensitive surperficial 131, be also referred to as touch display screen or Trackpad, can collect the user thereon or near touch operation (use such as the user any suitable objects such as finger, stylus or annex on touch-sensitive surperficial 131 or near the operation touch-sensitive surperficial 131), and drive corresponding coupling arrangement according to predefined formula.Optionally, touch-sensitive surperficial 131 can comprise touch detecting apparatus and two parts of touch controller.Wherein, touch detecting apparatus detects user's touch orientation, and detects the signal that touch operation is brought, and sends signal to touch controller; Touch controller receives touch information from touch detecting apparatus, and converts it to contact coordinate, gives processor 180 again, and the order that energy receiving processor 180 is sent is also carried out.In addition, can adopt the polytypes such as resistance-type, condenser type, infrared ray and surface acoustic wave to realize touch-sensitive surperficial 131.Except touch-sensitive surperficial 131, input block 130 can also comprise other input equipments 132.Particularly, other input equipments 132 can include but not limited to one or more in physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, the control lever etc.
Display unit 140 can be used for showing by the information of user's input or offers user's information and the various graphical user interface of terminal device 700, and these graphical user interface can be made of figure, text, icon, video and its combination in any.Display unit 140 can comprise display panel 141, optionally, can adopt the forms such as LCD (Liquid Crystal Display, liquid crystal display), OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) to configure display panel 141.Further, touch-sensitive surperficial 131 can cover display panel 141, when touch-sensitive surperficial 131 detect thereon or near touch operation after, send processor 180 to determining the type of touch event, provide corresponding vision output according to the type of touch event at display panel 141 with preprocessor 180.Although in Fig. 5, touch-sensitive surperficial 131 with display panel 141 be as two independently parts realize input and input function, in certain embodiments, can with touch-sensitive surperficial 131 with the integrated and realization input and output function of display panel 141.
Terminal device 700 also can comprise at least a sensor 150, such as optical sensor, motion sensor and other sensors.Particularly, optical sensor can comprise ambient light sensor and proximity transducer, and wherein, ambient light sensor can be regulated according to the light and shade of ambient light the brightness of display panel 141, proximity transducer can when terminal device 700 moves in one's ear, cut out display panel 141 and/or backlight.A kind of as motion sensor, Gravity accelerometer can detect the size of the acceleration that (is generally three axles) on all directions, size and the direction of gravity be can detect when static, application (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as passometer, knock) of mobile phone attitude etc. can be used for identifying; As for terminal device 700 other sensors such as configurable gyroscope, barometer, hygrometer, thermometer, infrared ray sensor also, do not repeat them here.
Voicefrequency circuit 160, loudspeaker 161, microphone 162 can provide the audio interface between user and the terminal device 700.Voicefrequency circuit 160 can be transferred to loudspeaker 161 with the electric signal after the voice data conversion that receives, and is converted to voice signal output by loudspeaker 161; On the other hand, microphone 162 is converted to electric signal with the voice signal of collecting, by being converted to voice data after voicefrequency circuit 160 receptions, after again voice data output processor 180 being processed, to send to such as another terminal device, perhaps export voice data to storer 120 in order to further process through RF circuit 110.Voicefrequency circuit 160 also may comprise earphone jack, so that communicating by letter of peripheral hardware earphone and terminal device 700 to be provided.
In order to realize radio communication, can dispose wireless communication unit 170 on this terminal device, this wireless communication unit 170 can be the WiFi module.WiFi belongs to the short range wireless transmission technology, terminal device 700 by wireless communication unit 170 can help that the user sends and receive e-mail, browsing page and access streaming video etc., it provides wireless broadband internet access for the user.Although Fig. 5 shows wireless communication unit 170, be understandable that, it does not belong to must consisting of of terminal device 700, fully can be as required in the scope of the essence that does not change invention and omit.
Processor 180 is control centers of terminal device 700, utilize the various piece of various interface and the whole mobile phone of connection, by moving or carry out software program and/or the module that is stored in the storer 120, and call the data that are stored in the storer 120, carry out various functions and the deal with data of terminal device 700, thereby mobile phone is carried out integral monitoring.Optionally, processor 180 can comprise one or more processing cores; Preferably, processor 180 can integrated application processor and modem processor, and wherein, application processor is mainly processed operating system, user interface and application program etc., and modem processor is mainly processed radio communication.Be understandable that, above-mentioned modem processor also can not be integrated in the processor 180.
Terminal device 700 comprises that also the power supply 190(that powers to all parts is such as battery), preferably, power supply can link to each other with processor 180 logics by power-supply management system, thereby realizes the functions such as management charging, discharge and power managed by power-supply management system.Power supply 190 can also comprise one or more direct current or the random component such as AC power, recharging system, power failure detection circuit, power supply changeover device or inverter, power supply status indicator.
Although not shown, terminal device 700 can also comprise camera, bluetooth module etc., does not repeat them here.Specifically in the present embodiment, the display unit of terminal device is touch-screen display, terminal device also includes storer, and one or more than one program, one of them or an above procedure stores and are configured to carry out described one or an above program by one or above processor and comprise be used to the instruction of carrying out following operation in storer:
Take pixel as unit, the Target Photo in the viewing area is split, obtain a plurality of pixels;
According to default account form, obtain volume coordinate corresponding to described a plurality of pixel;
According to the distance between volume coordinate corresponding to the volume coordinate of at least three benchmark colors and described a plurality of pixel, determine the benchmark color of described Target Photo coupling;
According to the benchmark color of described Target Photo coupling and the background colour corresponding to benchmark color of described coupling, color filling is carried out in the background area of described viewing area.
Alternatively, described default account form is YUV or RGB mode.
Alternatively, described storer also comprises the instruction of carrying out following operation: calculate the distance between the volume coordinate of each pixel in each benchmark color and the described a plurality of pixel;
According to the distance size between the volume coordinate of each pixel in each benchmark color and the described a plurality of pixel, described each benchmark color is voted;
According to the number of votes obtained of each benchmark color after the ballot, determine the benchmark color with described Target Photo coupling.
Alternatively, described storer also comprises the instruction of carrying out following operation: get rid of the first pixel in described a plurality of pixel, described the first pixel is that described Target Photo characterizes the colour of skin and pixel corresponding to color development part;
Distance size according to described each benchmark color and between the volume coordinate of the second pixel in the described a plurality of pixels after getting rid of, described each benchmark color is voted, and described the second pixel is to characterize the colour of skin and pixel pixel in addition corresponding to color development part in described a plurality of pixel.
Alternatively, described storer also comprises the instruction of carrying out following operation:
According to the number of votes obtained of each benchmark color after the ballot and the weight of ballot pixel or described each benchmark color, calculate the correction poll of each benchmark color;
According to the correction poll of described each benchmark color, determine the benchmark color with described Target Photo coupling.
The above only is preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.