CN106296623B - A kind of image processing method and device - Google Patents
A kind of image processing method and device Download PDFInfo
- Publication number
- CN106296623B CN106296623B CN201510316889.9A CN201510316889A CN106296623B CN 106296623 B CN106296623 B CN 106296623B CN 201510316889 A CN201510316889 A CN 201510316889A CN 106296623 B CN106296623 B CN 106296623B
- Authority
- CN
- China
- Prior art keywords
- brightness
- pixel
- base map
- coverage diagram
- transparency
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Abstract
The present invention discloses a kind of image processing method, which comprises predefines base map and coverage diagram, wherein the pixel on the base map and the coverage diagram has one-to-one relationship;Using it is any to the pixel with one-to-one relationship as process object, wherein the pixel being located on the base map in the process object is known as base map pixel, and the pixel being located on the coverage diagram in the process object is known as coverage diagram pixel;With any Color Channel in three Color Channels of red, green, blue for Color Channel to be processed, the brightness of the base map pixel based on the Color Channel to be processed, the brightness of the coverage diagram pixel are obtained, and obtain the transparency of the coverage diagram;According to the transparency of the brightness of the base map pixel, the brightness of the coverage diagram pixel and the coverage diagram, determine to the brightness in the process object treated result.Compared with the picture processing mode of existing map overlay, the present invention does not depend on system API realization, can be used for the terminal of any system platform.
Description
Technical field
The present invention relates to picture process fields, and in particular to a kind of image processing method and device.
Background technique
Map overlay is a kind of picture processing mode, actually a kind of hybrid guided mode of positive folded bed die formula and colour filter mode
Formula.It is to be overlapped mutually secondary colour and primary colours under the mode, that is to say, that bottom layer image controls draw above layer, can be allowed to
It brightens or dimmed.The region darker than 50% will be dimmed using the folded bed die formula of positive, and the region brighter than 50% then uses colour filter mode
It brightens.Picture dark portion is darker, and highlights is brighter, causes the larger contrast of image comparison of light and shade, and the sense that can eliminate duplication.
But the picture processing mode of existing map overlay is all based on system API realization, that is to say, that for not
The terminal of support system API can not achieve the picture treatment process of map overlay.
Summary of the invention
In view of this, the present invention provides a kind of image processing method and devices.On the one hand, the present invention provides a kind of figures
Piece processing method, which comprises
Predefine base map and coverage diagram, wherein the pixel on the base map and the coverage diagram, which has, to be corresponded
Relationship;
Using it is any to the pixel with one-to-one relationship as process object, wherein be located in the process object
Pixel on the base map is known as base map pixel, and the pixel being located on the coverage diagram in the process object is known as covering
Lid image vegetarian refreshments;
With any Color Channel in three Color Channels of red, green, blue for Color Channel to be processed, obtain based on it is described to
The brightness of the base map pixel of Color Channel, the brightness of the coverage diagram pixel are handled, and obtains the coverage diagram
Transparency;
According to the transparency of the brightness of the base map pixel, the brightness of the coverage diagram pixel and the coverage diagram,
It determines to the brightness in process object treated the result.
Preferably, the method also includes:
Obtain the transparency of the base map;
According to the transparency of the transparency of the base map and the coverage diagram, determine to the base map and the coverage diagram
The transparency in result after reason.
Preferably, the brightness according to the base map pixel, the brightness and the covering of the coverage diagram pixel
The transparency of figure is determined to the brightness in process object treated the result, comprising:
According to the transparency of the brightness of the base map pixel, the brightness of the coverage diagram pixel and the coverage diagram,
It determines described to process object treated the intermediate result;
According to the intermediate result, the transparency of the brightness of the base map pixel and the coverage diagram, determine to described
Brightness in process object treated result.
Preferably, the brightness according to the base map pixel, the brightness and the covering of the coverage diagram pixel
The transparency of figure is determined to process object treated the intermediate result, comprising:
Judge whether the brightness of the base map pixel is not more than preset median luminance value;
If the brightness of the base map pixel is no more than the median luminance value, by the bright of the base map pixel
K times of the product of the transparency of degree, the brightness of the coverage diagram pixel and the coverage diagram, is determined as to the process object
Intermediate result that treated, wherein it is any value within the scope of the pre-set interval at midpoint that k, which is with 2,;
If the brightness of the base map pixel be greater than the median luminance value, by the brightness of the base map pixel with
M times of the sum of the brightness of the coverage diagram pixel is determined as first to process object treated the intermediate result
Point;It is determined as the brightness of the base map pixel and n times of the product of the brightness of the coverage diagram pixel to the processing pair
As the second part of treated intermediate result;By the second part of the first part of the intermediate result and the intermediate result
Difference subtract P after, then with the transparency of the coverage diagram do product, obtain to the process object treated intermediate knot
Fruit;Wherein, m and n is with 2 for any value within the scope of the pre-set interval at midpoint, and P is the pre-set interval range with 1 for midpoint
Interior any value.
It is preferably, described according to the intermediate result, the transparency of the brightness of the base map pixel and the coverage diagram,
It determines to the brightness in process object treated the result, comprising:
By the difference of Q and the transparency of the coverage diagram multiplied by the brightness of the base map pixel, it is determined as to the place
The first part of result after managing object handles;By the first part to process object treated the result with it is described
To sum of process object treated the intermediate result, it is determined as to the brightness in the result that deals with objects that treated,
Wherein, it is any value within the scope of the pre-set interval at midpoint that Q, which is with 1,.
Preferably, described according to the transparency of the base map pixel and the transparency of the coverage diagram, it determines to described
Transparency in process object treated result, comprising:
By the transparency of the transparency of the base map and the coverage diagram and, subtract the transparency of the base map with it is described
The product of the transparency of coverage diagram is determined as to the transparency in the base map and the coverage diagram treated result.
On the other hand, the present invention also provides a kind of picture processing unit, described device includes:
First determining module, for predefining base map and coverage diagram, wherein the picture on the base map and the coverage diagram
Vegetarian refreshments has one-to-one relationship;
Second determining module, for using it is any to the pixel with one-to-one relationship as process object, wherein institute
It states the pixel being located on the base map in process object and is known as base map pixel, be located at the coverage diagram in the process object
On pixel be known as coverage diagram pixel;
First obtains module, for logical for color to be processed with any Color Channel in three Color Channels of red, green, blue
Road obtains the brightness of the base map pixel based on the Color Channel to be processed, the brightness of the coverage diagram pixel, with
And obtain the transparency of the coverage diagram;
Third determining module, for according to the brightness of the base map pixel, the brightness of the coverage diagram pixel and institute
It states the transparency of coverage diagram, determines to the brightness in the process object treated result.
Preferably, described device further include:
Second obtains module, for obtaining the transparency of the base map;
4th determining module, for determining to described according to the transparency of the base map and the transparency of the coverage diagram
Transparency in base map and the coverage diagram treated result.
Preferably, the third determining module, comprising:
First determine submodule, for according to the brightness of the base map pixel, the brightness of the coverage diagram pixel and
The transparency of the coverage diagram determines described to process object treated the intermediate result;
Second determines submodule, for according to the intermediate result, the brightness of the base map pixel and the coverage diagram
Transparency, determine to the brightness in process object treated the result.
Preferably, described first submodule is determined, comprising:
Judging submodule, for judging whether the brightness of the base map pixel is not more than preset median luminance value;
Third determines submodule, if the brightness for the base map pixel is no more than the median luminance value,
By k times of the product of the transparency of the brightness of the base map pixel, the brightness of the coverage diagram pixel and the coverage diagram,
It is determined as to process object treated the intermediate result, wherein it is any within the scope of the pre-set interval at midpoint that k, which is with 2,
Value;
4th determines submodule, if the brightness for the base map pixel is greater than the median luminance value, by institute
State the brightness of base map pixel and the brightness of the coverage diagram pixel and m times, be determined as to process object processing
The first part of intermediate result afterwards;By the n of the brightness of the base map pixel and the product of the brightness of the coverage diagram pixel
Times, it is determined as the second part to process object treated the intermediate result;By the first part of the intermediate result with
After the difference of the second part of the intermediate result subtracts P, then with the transparency of the coverage diagram product is done, obtained to the place
Intermediate result after managing object handles;Wherein, m and n is with 2 for any value within the scope of the pre-set interval at midpoint, and P is with 1
For any value within the scope of the pre-set interval at midpoint.
Preferably, described second submodule is determined, comprising:
5th determines submodule, for by the difference of Q and the transparency of the coverage diagram multiplied by the base map pixel
Brightness is determined as the first part to process object treated the result;
6th determines submodule, for by the first part to process object treated the result with it is described right
Sum of process object treated the intermediate result is determined as to the brightness in the result that deals with objects that treated,
In, it is any value within the scope of the pre-set interval at midpoint that Q, which is with 1,.
Preferably, the 4th determining module, comprising:
7th determines submodule, for by the transparency of the transparency of the base map and the coverage diagram and, subtract institute
The product for stating the transparency of base map and the transparency of the coverage diagram, is determined as that treated to the base map and the coverage diagram
As a result the transparency in.
The present invention predefines base map and coverage diagram, wherein the pixel on the base map and the coverage diagram has one
One corresponding relationship;Secondly, using it is any to the pixel with one-to-one relationship as process object, wherein it is described processing pair
It is located at the pixel on the base map as in and is known as base map pixel, the pixel being located on the coverage diagram in the process object
Point is known as coverage diagram pixel;With any Color Channel in three Color Channels of red, green, blue for Color Channel to be processed, obtain
The brightness of the base map pixel based on the Color Channel to be processed, the brightness of the coverage diagram pixel are taken, and is obtained
Take the transparency of the coverage diagram;Finally, according to the brightness of the base map pixel, the brightness of the coverage diagram pixel and institute
It states the transparency of coverage diagram, determines to the brightness in the process object treated result.With the figure of existing map overlay
Piece processing mode is compared, and the present invention does not depend on system API realization, can be used for the terminal of any system platform.
Detailed description of the invention
In order to more clearly explain the technical solutions in the embodiments of the present application, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, the drawings in the following description are only some examples of the present application, for
For those of ordinary skill in the art, without any creative labor, it can also be obtained according to these attached drawings
His attached drawing.
Fig. 1 is image processing method flow chart provided by the invention;
Fig. 2 is picture processing device structure diagram provided by the invention;
Fig. 3 is the block diagram of the part-structure of mobile terminal provided by the invention.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on
Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall in the protection scope of this application.
Embodiment one
With reference to Fig. 1, Fig. 1 is a kind of image processing method flow chart provided in this embodiment, be can specifically include:
S101: base map and coverage diagram are predefined, wherein the pixel on the base map and the coverage diagram has one by one
Corresponding relationship.
Image processing method in the present embodiment actually carries out map overlay processing to two pictures.So first
It needs to be determined that two pictures are respectively as base map and coverage diagram.Specifically, if to realize the map overlay of base map and coverage diagram,
Then the pixel on the base map and the coverage diagram has one-to-one relationship.Specially map overlay when two open and mutually covered on figure
Pixel there is one-to-one relationship.
S102: using it is any to the pixel with one-to-one relationship as process object, wherein in the process object
Pixel on the base map is known as base map pixel, and the pixel being located on the coverage diagram in the process object claims
For coverage diagram pixel.
The present embodiment is using a pair of of pixel with one-to-one relationship as process object, wherein the process object
In, the pixel on the base map is known as base map pixel, and the pixel on the coverage diagram is known as covering image
Vegetarian refreshments.It is understood that when the pixel in base map and coverage diagram with one-to-one relationship is all as having dealt with objects
After processing, the base map and the coverage diagram just complete map overlay.
S103: with any Color Channel in three Color Channels of red, green, blue for Color Channel to be processed, acquisition is based on
The brightness of the base map pixel of the Color Channel to be processed, the brightness of the coverage diagram pixel, the coverage diagram
Transparency.
Since base map and coverage diagram all have three Color Channels of red, green, blue, so, current embodiment require that being based respectively on
Three Color Channels, to the pixel on base map and coverage diagram with one-to-one relationship to handling.That is, by figure
Also there are three Color Channels of red, green, blue in picture after the processing obtained after layer superposition processing.
In practical application, any one Color Channel is determined as Color Channel to be processed, it is logical based on the color to be processed
Road obtains the brightness of the base map pixel, such as based on red channel, obtains the redness of base map pixel, logical based on green
Road obtains the green degree of base map pixel, is based on blue channel, obtains the blue degree of base map pixel.It is similar, based on described wait locate
Color Channel is managed, the brightness of the coverage diagram pixel is obtained.In addition, the present embodiment also needs to obtain the transparent of the coverage diagram
Degree.
S104: according to the saturating of the brightness of the base map pixel, the brightness of the coverage diagram pixel and the coverage diagram
Lightness is determined to the brightness in process object treated the result.
In a kind of embodiment, firstly, according to the brightness of the base map pixel, the brightness of the coverage diagram pixel and
The transparency of the coverage diagram determines described to process object treated the intermediate result;
Secondly, according to the intermediate result, the transparency of the brightness of the base map pixel and the coverage diagram, determining pair
Brightness in process object treated the result.
Wherein, determine it is described to process object treated the intermediate result during, first, it is determined that obtaining
Whether the brightness of the base map pixel is not more than preset median luminance value, it is preferable that when maximum brightness value is 1, in
Between brightness value be set as 0.5, when maximum value be 255 when, median luminance value is set as 127.5.It is understood that intermediate luminance
Value may exist a tolerable section, as median luminance value can be set to 0.5 as in the default tolerable section at midpoint
Any value.
If the brightness of the base map pixel is no more than the median luminance value, by the bright of the base map pixel
K times of the product of the transparency of degree, the brightness of the coverage diagram pixel and the coverage diagram, is determined as to the process object
Intermediate result that treated, wherein it is any value within the scope of the pre-set interval at midpoint, preferred value 2 that k, which is with 2,.
If the brightness of the base map pixel be greater than the median luminance value, by the brightness of the base map pixel with
M times of the sum of the brightness of the coverage diagram pixel is determined as first to process object treated the intermediate result
Point;It is determined as the brightness of the base map pixel and n times of the product of the brightness of the coverage diagram pixel to the processing pair
As the second part of treated intermediate result;By the second part of the first part of the intermediate result and the intermediate result
Difference subtract P after, then with the transparency of the coverage diagram do product, obtain to the process object treated intermediate knot
Fruit;Wherein, m and n is with 2 for any value within the scope of the pre-set interval at midpoint, preferred value 2;It is the pre- of midpoint that P, which is with 1,
If any value in interval range, preferred value 1.
In practical application, after determining to process object treated the intermediate result, the intermediate result, institute are utilized
It states the brightness of base map pixel and the transparency of the coverage diagram, determines to bright in the process object treated result
Degree, specifically, being determined as the difference of Q and the transparency of the coverage diagram multiplied by the brightness of the base map pixel to described
The first part of process object treated result;By the first part and institute to process object treated the result
Sum to process object treated the intermediate result is stated, is determined as to bright in the result that deals with objects that treated
Degree, wherein it is any value within the scope of the pre-set interval at midpoint, preferred value 1 that Q, which is with 1,.
In another embodiment, when carrying out map overlay processing to base map and coverage diagram, it is also necessary to after determining processing
The transparency of picture.
Specifically, obtaining the transparency of the base map first;Secondly, according to the transparency of the base map and the coverage diagram
Transparency, determine to the transparency in the base map and the coverage diagram treated result.
In a kind of implementation, by the transparency of the base map and the transparency of the coverage diagram and, subtract the bottom
The product of the transparency of the transparency of figure and the coverage diagram is determined as to the base map and the coverage diagram treated result
In transparency.
The present embodiment predefines base map and coverage diagram, wherein the base map has with the pixel on the coverage diagram
One-to-one relationship;Secondly, using it is any to the pixel with one-to-one relationship as process object, wherein the processing
It is located at the pixel on the base map in object and is known as base map pixel, the picture being located on the coverage diagram in the process object
Vegetarian refreshments is known as coverage diagram pixel;With any Color Channel in three Color Channels of red, green, blue for Color Channel to be processed,
The brightness of the base map pixel based on the Color Channel to be processed, the brightness of the coverage diagram pixel are obtained, and
Obtain the transparency of the coverage diagram;Finally, according to the brightness of the base map pixel, the brightness of the coverage diagram pixel and
The transparency of the coverage diagram is determined to the brightness in process object treated the result.With existing map overlay
Picture processing mode is compared, and the present embodiment does not depend on system API realization, can be used for the terminal of any system platform.
Embodiment two
With reference to Fig. 2, Fig. 2 is a kind of picture processing device structure diagram provided in this embodiment, be can specifically include:
First determining module 201, for predefining base map and coverage diagram, wherein on the base map and the coverage diagram
Pixel have one-to-one relationship;
Second determining module 202, for using it is any to the pixel with one-to-one relationship as process object,
In, the pixel on the base map is located in the process object and is known as base map pixel, is located in the process object described
Pixel on coverage diagram is known as coverage diagram pixel;
First obtain module 203, for any Color Channel in three Color Channels of red, green, blue be face to be processed
Chrominance channel, obtain the brightness of the base map pixel based on the Color Channel to be processed, the coverage diagram pixel it is bright
Degree, and obtain the transparency of the coverage diagram;
Third determining module 204, for according to the brightness of the base map pixel, the brightness of the coverage diagram pixel and
The transparency of the coverage diagram is determined to the brightness in process object treated the result.
The present embodiment can also determine the transparency of picture after processing, described device further include:
Second obtains module, for obtaining the transparency of the base map;
4th determining module, for determining to described according to the transparency of the base map and the transparency of the coverage diagram
Transparency in base map and the coverage diagram treated result.
Wherein, the 4th determining module include the 7th determine submodule, for by the transparency of the base map with it is described
The sum of the transparency of coverage diagram subtracts the product of the transparency of the base map and the transparency of the coverage diagram, is determined as to institute
State base map and the coverage diagram treated the transparency in result.
In addition, the third determining module, comprising:
First determine submodule, for according to the brightness of the base map pixel, the brightness of the coverage diagram pixel and
The transparency of the coverage diagram determines described to process object treated the intermediate result;
Second determines submodule, for according to the intermediate result, the brightness of the base map pixel and the coverage diagram
Transparency, determine to the brightness in process object treated the result.
Wherein, described first submodule is determined, comprising:
Judging submodule, for judging whether the brightness of the base map pixel is not more than preset median luminance value;
Third determines submodule, if the brightness for the base map pixel is no more than the median luminance value,
By k times of the product of the transparency of the brightness of the base map pixel, the brightness of the coverage diagram pixel and the coverage diagram,
It is determined as to process object treated the intermediate result, wherein it is any within the scope of the pre-set interval at midpoint that k, which is with 2,
Value;
4th determines submodule, if the brightness for the base map pixel is greater than the median luminance value, by institute
State the brightness of base map pixel and the brightness of the coverage diagram pixel and m times, be determined as to process object processing
The first part of intermediate result afterwards;By the n of the brightness of the base map pixel and the product of the brightness of the coverage diagram pixel
Times, it is determined as the second part to process object treated the intermediate result;By the first part of the intermediate result with
After the difference of the second part of the intermediate result subtracts P, then with the transparency of the coverage diagram product is done, obtained to the place
Intermediate result after managing object handles;Wherein, m and n is with 2 for any value within the scope of the pre-set interval at midpoint, and P is with 1
For any value within the scope of the pre-set interval at midpoint.
Described second determines submodule, comprising:
5th determines submodule, for by the difference of Q and the transparency of the coverage diagram multiplied by the base map pixel
Brightness is determined as the first part to process object treated the result;
6th determines submodule, for by the first part to process object treated the result with it is described right
Sum of process object treated the intermediate result is determined as to the brightness in the result that deals with objects that treated,
In, it is any value within the scope of the pre-set interval at midpoint that Q, which is with 1,.
Picture processing unit provided in this embodiment, can predefine base map and coverage diagram, wherein the base map and institute
The pixel stated on coverage diagram has one-to-one relationship;Using it is any to the pixel with one-to-one relationship as processing pair
As, wherein the pixel being located on the base map in the process object is known as base map pixel, is located in the process object
Pixel on the coverage diagram is known as coverage diagram pixel;It is with any Color Channel in three Color Channels of red, green, blue
Color Channel to be processed, the brightness of the base map pixel of the acquisition based on the Color Channel to be processed, the covering image
The brightness of vegetarian refreshments, and obtain the transparency of the coverage diagram.According to the brightness of the base map pixel, the coverage diagram pixel
The brightness of point and the transparency of the coverage diagram are determined to the brightness in process object treated the result.With it is existing
The picture processing mode of map overlay is compared, and the present embodiment does not depend on system API realization, can be used for the end of any system platform
End.
The embodiment of the invention also provides a kind of terminals, as shown in figure 3, for ease of description, illustrating only and the present invention
The relevant part of embodiment, it is disclosed by specific technical details, please refer to present invention method part.The terminal can wrap
Include mobile phone, tablet computer, PDA (Personal Digital Assistant, personal digital assistant), POS (Point of
Sales, point-of-sale terminal), any terminal device such as vehicle-mounted computer, taking the terminal as an example:
Fig. 3 shows the block diagram of the part-structure of mobile phone relevant to terminal provided in an embodiment of the present invention.With reference to figure
3, mobile phone include: radio frequency (Radio Frequency, RF) circuit 310, memory 320, input unit 330, display unit 340,
Sensor 350, voicefrequency circuit 360, Wireless Fidelity (wireless fidelity, WiFi) module 370, processor 380 and
The components such as power supply 390.It will be understood by those skilled in the art that handset structure shown in Fig. 3 does not constitute the restriction to mobile phone,
It may include perhaps combining certain components or different component layouts than illustrating more or fewer components.
It is specifically introduced below with reference to each component parts of the Fig. 3 to mobile phone:
RF circuit 310 can be used for receiving and sending messages or communication process in, signal sends and receivees, particularly, by base station
After downlink information receives, handled to processor 380;In addition, the data for designing uplink are sent to base station.In general, RF circuit packet
Include but be not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier (Low Noise
Amplifier, LNA), duplexer etc..In addition, RF circuit 310 can also be communicated with network and other equipment by wireless communication.
Any communication standard or agreement, including but not limited to global system for mobile communications (Global can be used in above-mentioned wireless communication
System of Mobile communication, GSM), general packet radio service (General Packet Radio
Service, GPRS), CDMA (Code Division Multiple Access, CDMA), wideband code division multiple access
(Wideband Code Division Multiple Access, WCDMA), long term evolution (Long Term Evolution,
LTE)), Email, short message service (Short Messaging Service, SMS) etc..
Memory 320 can be used for storing software program and module, and processor 380 is stored in memory 320 by operation
Software program and module, thereby executing the various function application and data processing of mobile phone.Memory 320 can mainly include
Storing program area and storage data area, wherein storing program area can application journey needed for storage program area, at least one function
Sequence (such as sound-playing function, image player function etc.) etc.;Storage data area can be stored to be created according to using for mobile phone
Data (such as audio data, phone directory etc.) etc..It, can be in addition, memory 320 may include high-speed random access memory
Including nonvolatile memory, for example, at least a disk memory, flush memory device or other volatile solid-states
Part.
Input unit 330 can be used for receiving the number or character information of input, and generate the user setting with mobile phone 300
And the related key signals input of function control.Specifically, input unit 330 may include touch panel 331 and other inputs
Equipment 332.Touch panel 331, also referred to as touch screen, collecting the touch operation of user on it or nearby, (for example user makes
With the operation of any suitable object or attachment such as finger, stylus on touch panel 331 or near touch panel 331), and
Corresponding attachment device is driven according to preset formula.Optionally, touch panel 331 may include touch detecting apparatus and touching
Touch two parts of controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation bring letter
Number, transmit a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and is converted into
Contact coordinate, then give processor 380, and order that processor 380 is sent can be received and executed.Furthermore, it is possible to using
The multiple types such as resistance-type, condenser type, infrared ray and surface acoustic wave realize touch panel 331.It is defeated in addition to touch panel 331
Entering unit 330 can also include other input equipments 332.Specifically, other input equipments 332 can include but is not limited to physics
One of keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, operating stick etc. are a variety of.
Display unit 340 can be used for showing information input by user or be supplied to user information and mobile phone it is various
Menu.Display unit 340 may include display panel 341, optionally, can use liquid crystal display (Liquid Crystal
Display, LCD), the forms such as Organic Light Emitting Diode (Organic Light-Emitting Diode, OLED) it is aobvious to configure
Show panel 341.Further, touch panel 331 can cover display panel 341, when touch panel 331 detect it is on it or attached
After close touch operation, processor 380 is sent to determine the type of touch event, is followed by subsequent processing device 380 according to touch event
Type corresponding visual output is provided on display panel 341.Although in Fig. 3, touch panel 331 and display panel 341
It is that the input and input function of mobile phone are realized as two independent components, but in some embodiments it is possible to by touch-control
Panel 331 and display panel 341 are integrated and that realizes mobile phone output and input function.
Mobile phone 300 may also include at least one sensor 350, such as optical sensor, motion sensor and other sensings
Device.Specifically, optical sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can be according to environment
The light and shade of light adjusts the brightness of display panel 341, and proximity sensor can close display panel when mobile phone is moved in one's ear
341 and/or backlight.As a kind of motion sensor, accelerometer sensor can detect in all directions (generally three axis) and add
The size of speed can detect that size and the direction of gravity when static, can be used to identify application (such as the horizontal/vertical screen of mobile phone posture
Switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;Also as mobile phone
The other sensors such as configurable gyroscope, barometer, hygrometer, thermometer, infrared sensor, details are not described herein.
Voicefrequency circuit 360, loudspeaker 361, microphone 362 can provide the audio interface between user and mobile phone.Audio-frequency electric
Electric signal after the audio data received conversion can be transferred to loudspeaker 361, be converted to sound by loudspeaker 361 by road 360
Signal output;On the other hand, the voice signal of collection is converted to electric signal by microphone 362, is turned after being received by voicefrequency circuit 360
It is changed to audio data, then by after the processing of audio data output processor 380, such as another mobile phone is sent to through RF circuit 310,
Or audio data is exported to memory 320 to be further processed.
WiFi belongs to short range wireless transmission technology, and mobile phone can help user's transceiver electronics postal by WiFi module 370
Part, browsing webpage and access streaming video etc., it provides wireless broadband internet access for user.Although Fig. 3 is shown
WiFi module 370, but it is understood that, and it is not belonging to must be configured into for mobile phone 300, it is can according to need completely not
Change in the range of the essence of invention and omits.
Processor 380 is the control centre of mobile phone, using the various pieces of various interfaces and connection whole mobile phone, is led to
It crosses operation or executes the software program and/or module being stored in memory 320, and call and be stored in memory 320
Data execute the various functions and processing data of mobile phone, to carry out integral monitoring to mobile phone.Optionally, processor 380 can wrap
Include one or more processing units;Preferably, processor 380 can integrate application processor and modem processor, wherein answer
With the main processing operation system of processor, user interface and application program etc., modem processor mainly handles wireless communication.
It is understood that above-mentioned modem processor can not also be integrated into processor 380.
Mobile phone 300 further includes the power supply 390 (such as battery) powered to all parts, it is preferred that power supply can pass through electricity
Management system and processor 380 are logically contiguous, to realize management charging, electric discharge and power consumption by power-supply management system
The functions such as management.
Although being not shown, mobile phone 300 can also include camera, bluetooth module etc., and details are not described herein.
Specifically in the present embodiment, the processor 380 in terminal can be according to following instruction, will be one or more
The corresponding executable file of the process of application program is loaded into memory 320, and is run by processor 380 and be stored in storage
Application program in device 320, to realize various functions:
Predefine base map and coverage diagram, wherein the pixel on the base map and the coverage diagram, which has, to be corresponded
Relationship;
Using it is any to the pixel with one-to-one relationship as process object, wherein be located in the process object
Pixel on the base map is known as base map pixel, and the pixel being located on the coverage diagram in the process object is known as covering
Lid image vegetarian refreshments;
With any Color Channel in three Color Channels of red, green, blue for Color Channel to be processed, obtain based on it is described to
The brightness of the base map pixel of Color Channel, the brightness of the coverage diagram pixel are handled, and obtains the coverage diagram
Transparency;
According to the transparency of the brightness of the base map pixel, the brightness of the coverage diagram pixel and the coverage diagram,
It determines to the brightness in process object treated the result.
Preferably, the method also includes:
Obtain the transparency of the base map;
According to the transparency of the transparency of the base map and the coverage diagram, determine to the base map and the coverage diagram
The transparency in result after reason.
Preferably, the brightness according to the base map pixel, the brightness and the covering of the coverage diagram pixel
The transparency of figure is determined to the brightness in process object treated the result, comprising:
According to the transparency of the brightness of the base map pixel, the brightness of the coverage diagram pixel and the coverage diagram,
It determines described to process object treated the intermediate result;
According to the intermediate result, the transparency of the brightness of the base map pixel and the coverage diagram, determine to described
Brightness in process object treated result.
Preferably, the brightness according to the base map pixel, the brightness and the covering of the coverage diagram pixel
The transparency of figure is determined to process object treated the intermediate result, comprising:
Judge whether the brightness of the base map pixel is not more than preset median luminance value;
If the brightness of the base map pixel is no more than the median luminance value, by the bright of the base map pixel
K times of the product of the transparency of degree, the brightness of the coverage diagram pixel and the coverage diagram, is determined as to the process object
Intermediate result that treated, wherein it is any value within the scope of the pre-set interval at midpoint that k, which is with 2,;
If the brightness of the base map pixel be greater than the median luminance value, by the brightness of the base map pixel with
M times of the sum of the brightness of the coverage diagram pixel is determined as first to process object treated the intermediate result
Point;It is determined as the brightness of the base map pixel and n times of the product of the brightness of the coverage diagram pixel to the processing pair
As the second part of treated intermediate result;By the second part of the first part of the intermediate result and the intermediate result
Difference subtract P after, then with the transparency of the coverage diagram do product, obtain to the process object treated intermediate knot
Fruit;Wherein, m and n is with 2 for any value within the scope of the pre-set interval at midpoint, and P is the pre-set interval range with 1 for midpoint
Interior any value.
It is preferably, described according to the intermediate result, the transparency of the brightness of the base map pixel and the coverage diagram,
It determines to the brightness in process object treated the result, comprising:
By the difference of Q and the transparency of the coverage diagram multiplied by the brightness of the base map pixel, it is determined as to the place
The first part of result after managing object handles;By the first part to process object treated the result with it is described
To sum of process object treated the intermediate result, it is determined as to the brightness in the result that deals with objects that treated,
Wherein, it is any value within the scope of the pre-set interval at midpoint that Q, which is with 1,.
Preferably, described according to the transparency of the base map pixel and the transparency of the coverage diagram, it determines to described
Transparency in process object treated result, comprising:
By the transparency of the transparency of the base map and the coverage diagram and, subtract the transparency of the base map with it is described
The product of the transparency of coverage diagram is determined as to the transparency in the base map and the coverage diagram treated result.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality
Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit
The unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be with
It is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actual
It needs that some or all of the modules therein is selected to achieve the purpose of the solution of this embodiment.Those of ordinary skill in the art are not
In the case where making the creative labor, it can understand and implement.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
It is provided for the embodiments of the invention a kind of image processing method above and device is described in detail, herein
Apply that a specific example illustrates the principle and implementation of the invention, the explanation of above example is only intended to help
Understand method and its core concept of the invention;At the same time, for those skilled in the art, according to the thought of the present invention,
There will be changes in the specific implementation manner and application range, in conclusion the content of the present specification should not be construed as to this
The limitation of invention.
Claims (10)
1. a kind of image processing method, which is characterized in that the described method includes:
Predefine base map and coverage diagram, wherein the pixel on the base map and the coverage diagram has one-to-one relationship;
Using it is any to the pixel with one-to-one relationship as process object, wherein be located in the process object described
Pixel on base map is known as base map pixel, and the pixel being located on the coverage diagram in the process object is known as coverage diagram
Pixel;
With any Color Channel in three Color Channels of red, green, blue for Color Channel to be processed, obtain based on described to be processed
The brightness of the base map pixel of Color Channel, the brightness of the coverage diagram pixel, and obtain the saturating of the coverage diagram
Lightness;
According to the transparency of the brightness of the base map pixel, the brightness of the coverage diagram pixel and the coverage diagram, determine
To the brightness in process object treated the result;
The brightness, the brightness of the coverage diagram pixel and the transparency of the coverage diagram according to the base map pixel,
It determines to the brightness in process object treated the result, comprising:
According to the transparency of the brightness of the base map pixel, the brightness of the coverage diagram pixel and the coverage diagram, determine
It is described to process object treated the intermediate result;
According to the intermediate result, the transparency of the brightness of the base map pixel and the coverage diagram, determine to the processing
The brightness in result after object handles.
2. the method according to claim 1, wherein the method also includes:
Obtain the transparency of the base map;
According to the transparency of the transparency of the base map and the coverage diagram, determine to after the base map and coverage diagram processing
Result in transparency.
3. the method according to claim 1, wherein the brightness according to the base map pixel, described covering
The brightness of lid image vegetarian refreshments and the transparency of the coverage diagram are determined to process object treated the intermediate result, comprising:
Judge whether the brightness of the base map pixel is not more than preset median luminance value;
If the brightness of the base map pixel is no more than the median luminance value, by the brightness of the base map pixel,
K times of the product of the transparency of the brightness and coverage diagram of the coverage diagram pixel, is determined as at the process object
Intermediate result after reason, wherein it is any value within the scope of the pre-set interval at midpoint that k, which is with 2,;
If the brightness of the base map pixel be greater than the median luminance value, by the brightness of the base map pixel with it is described
M times of the sum of the brightness of coverage diagram pixel is determined as the first part to process object treated the intermediate result;It will
N times of the product of the brightness of the base map pixel and the brightness of the coverage diagram pixel, is determined as at the process object
The second part of intermediate result after reason;By the difference of the first part of the intermediate result and the second part of the intermediate result
After value subtracts P, then with the transparency of the coverage diagram product is done, obtained to the process object treated intermediate result;Its
In, m and n are with 2 for any value within the scope of the pre-set interval at midpoint, and P is with 1 for appointing within the scope of the pre-set interval at midpoint
One value.
4. according to the method described in claim 3, it is characterized in that, described according to the intermediate result, the base map pixel
Brightness and the coverage diagram transparency, determine to the brightness in process object treated the result, comprising:
By the difference of Q and the transparency of the coverage diagram multiplied by the brightness of the base map pixel, it is determined as to the processing pair
As the first part of treated result;By the first part to process object treated the result and described to institute
Sum for stating process object treated intermediate result is determined as to the brightness in the result that deals with objects that treated, wherein
It is any value within the scope of the pre-set interval at midpoint that Q, which is with 1,.
5. according to the method described in claim 2, it is characterized in that, the transparency according to the base map pixel and described
The transparency of coverage diagram is determined to the transparency in process object treated the result, comprising:
By the transparency of the transparency of the base map and the coverage diagram and, subtract the transparency and the covering of the base map
The product of the transparency of figure is determined as to the transparency in the base map and the coverage diagram treated result.
6. a kind of picture processing unit, which is characterized in that described device includes:
First determining module, for predefining base map and coverage diagram, wherein the pixel on the base map and the coverage diagram
With one-to-one relationship;
Second determining module, for using it is any to the pixel with one-to-one relationship as process object, wherein the place
It is located at the pixel on the base map in reason object and is known as base map pixel, is located on the coverage diagram in the process object
Pixel is known as coverage diagram pixel;
First obtain module, for any Color Channel in three Color Channels of red, green, blue be Color Channel to be processed,
The brightness of the base map pixel based on the Color Channel to be processed, the brightness of the coverage diagram pixel are obtained, and
Obtain the transparency of the coverage diagram;
Third determining module, for according to the brightness of the base map pixel, the brightness of the coverage diagram pixel and described covering
The transparency of lid figure is determined to the brightness in process object treated the result;
The third determining module, comprising:
First determines submodule, for according to the brightness of the base map pixel, the brightness of the coverage diagram pixel and described
The transparency of coverage diagram determines described to process object treated the intermediate result;
Second determines submodule, for according to the saturating of the intermediate result, the brightness of the base map pixel and the coverage diagram
Lightness is determined to the brightness in process object treated the result.
7. device according to claim 6, which is characterized in that described device further include:
Second obtains module, for obtaining the transparency of the base map;
4th determining module, for determining to the base map according to the transparency of the base map and the transparency of the coverage diagram
With the transparency in the coverage diagram treated result.
8. device according to claim 6, which is characterized in that described first determines submodule, comprising:
Judging submodule, for judging whether the brightness of the base map pixel is not more than preset median luminance value;
Third determines submodule, if the brightness for the base map pixel is no more than the median luminance value, by institute
K times for stating the product of the transparency of the brightness of base map pixel, the brightness of the coverage diagram pixel and the coverage diagram determines
For to process object treated the intermediate result, wherein it is any value within the scope of the pre-set interval at midpoint that k, which is with 2,;
4th determines submodule, if the brightness for the base map pixel is greater than the median luminance value, by the bottom
The brightness of the brightness of image vegetarian refreshments and the coverage diagram pixel and m times, be determined as dealing with objects that treated to described
The first part of intermediate result;By the brightness of the base map pixel and n times of the product of the brightness of the coverage diagram pixel, really
It is set to the second part to process object treated the intermediate result;By the first part of the intermediate result and it is described in
Between result second part difference subtract P after, then with the transparency of the coverage diagram do product, obtain to the process object
Intermediate result that treated;Wherein, m and n is with 2 for any value within the scope of the pre-set interval at midpoint, and it is midpoint that P, which is with 1,
Pre-set interval within the scope of any value.
9. device according to claim 8, which is characterized in that described second determines submodule, comprising:
5th determines submodule, for the brightness by the difference of Q and the transparency of the coverage diagram multiplied by the base map pixel,
It is determined as the first part to process object treated the result;
6th determines submodule, for by the first part to process object treated the result with described to described
Sum of process object treated intermediate result is determined as to the brightness in the result that deals with objects that treated, wherein Q
To be any value within the scope of the pre-set interval at midpoint with 1.
10. device according to claim 7, which is characterized in that the 4th determining module, comprising:
7th determines submodule, for by the transparency of the transparency of the base map and the coverage diagram and, subtract the bottom
The product of the transparency of the transparency of figure and the coverage diagram is determined as to the base map and the coverage diagram treated result
In transparency.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510316889.9A CN106296623B (en) | 2015-06-10 | 2015-06-10 | A kind of image processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510316889.9A CN106296623B (en) | 2015-06-10 | 2015-06-10 | A kind of image processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106296623A CN106296623A (en) | 2017-01-04 |
CN106296623B true CN106296623B (en) | 2019-07-05 |
Family
ID=57659677
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510316889.9A Active CN106296623B (en) | 2015-06-10 | 2015-06-10 | A kind of image processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106296623B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106910232A (en) * | 2017-02-24 | 2017-06-30 | 青岛海信电器股份有限公司 | Line drawing eraser removes method and device |
US10496902B2 (en) * | 2017-09-21 | 2019-12-03 | International Business Machines Corporation | Data augmentation for image classification tasks |
CN108053436B (en) * | 2017-11-15 | 2020-10-16 | 阿里巴巴(中国)有限公司 | Picture processing method and device, electronic equipment and picture server |
CN109803163B (en) * | 2017-11-16 | 2021-07-09 | 腾讯科技(深圳)有限公司 | Image display method and device and storage medium |
CN108389176A (en) * | 2018-03-09 | 2018-08-10 | 网易(杭州)网络有限公司 | Method, apparatus, storage medium, processor and the terminal of image blend processing |
CN109165013A (en) * | 2018-07-04 | 2019-01-08 | 惠州市德赛西威汽车电子股份有限公司 | Multi-drawing layer stacking display methods, device, storage medium and terminal in application program |
CN111553835B (en) * | 2020-04-10 | 2024-03-26 | 上海完美时空软件有限公司 | Method and device for generating pinching face data of user |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101437169A (en) * | 2008-12-19 | 2009-05-20 | 深圳市迅雷网络技术有限公司 | Method and apparatus for implementing black and white of color image |
CN102572304A (en) * | 2011-12-13 | 2012-07-11 | 广东威创视讯科技股份有限公司 | Image addition processing method and device |
-
2015
- 2015-06-10 CN CN201510316889.9A patent/CN106296623B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101437169A (en) * | 2008-12-19 | 2009-05-20 | 深圳市迅雷网络技术有限公司 | Method and apparatus for implementing black and white of color image |
CN102572304A (en) * | 2011-12-13 | 2012-07-11 | 广东威创视讯科技股份有限公司 | Image addition processing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN106296623A (en) | 2017-01-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106296623B (en) | A kind of image processing method and device | |
US11429276B2 (en) | Method for displaying graphical user interface and mobile terminal | |
US9697622B2 (en) | Interface adjustment method, apparatus, and terminal | |
CN105518605B (en) | A kind of touch operation method and device of terminal | |
CN105867730B (en) | The display methods and device of status bar | |
CN107256129A (en) | Switch method, device and its relevant device of application under span mode | |
CN106293375B (en) | A kind of method for changing scenes and equipment | |
CN104571979B (en) | A kind of method and apparatus for realizing split view | |
CN104915091B (en) | A kind of method and apparatus for the prompt information that Shows Status Bar | |
CN108037871A (en) | Screenshotss method and mobile terminal | |
CN106775323A (en) | Method, device and the mobile communication terminal of application program have been adjusted in communication process | |
CN108595201A (en) | A kind of application program update method and mobile terminal | |
CN105653220B (en) | Screen data display method and device in remote control | |
CN109379484A (en) | A kind of information processing method and terminal | |
CN104820546B (en) | Function information methods of exhibiting and device | |
CN110109604A (en) | A kind of application interface display methods and mobile terminal | |
CN109117041A (en) | A kind of message treatment method and mobile terminal | |
CN109508136A (en) | A kind of display methods and mobile terminal of application program | |
CN110442297A (en) | Multi-screen display method, split screen display available device and terminal device | |
CN107103074A (en) | The processing method and mobile terminal of a kind of sharing information | |
CN104915625B (en) | A kind of method and device of recognition of face | |
CN108920040A (en) | A kind of application icon method for sorting and mobile terminal | |
CN107977261A (en) | Method, equipment, mobile terminal and the computer-readable storage medium of limiting process | |
CN107608725A (en) | A kind of information processing method and terminal | |
CN105187944B (en) | A kind of method and apparatus to Show Status Bar |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |