Summary of the invention
The technical issues of disclosure solves is to provide a kind of image processing method, at least to be partially solved in the prior art
The filter of pencil drawing style cannot be considered in terms of the technical issues of effect and performance.In addition, also providing a kind of image processing apparatus, image
Handle hardware device, computer readable storage medium and image processing terminal.
To achieve the goals above, according to one aspect of the disclosure, the following technical schemes are provided:
A kind of image processing method, comprising:
According to the corresponding luminance component of original image, the luminance picture of the original image is obtained;
Edge detection process is carried out to obtain the edge image of the luminance picture to the luminance picture;
The tone images of the luminance picture are obtained according to predetermined reference image;And
Pencil drawing style image corresponding with the original image is generated according to the edge image and the tone images.
Further, described that the luminance picture of the original image is obtained according to the corresponding luminance component of original image, packet
It includes:
Color notation conversion space processing is carried out to the original image, the extract light intensity level from transformed image obtains
Original intensity image;
The luminance picture of the original image is obtained according to the original intensity image.
It is further, described that the luminance picture of the original image is obtained according to the original intensity image, comprising:
Denoising is carried out to the original intensity image, obtains the luminance picture of the original image.
Further, described that edge detection process is carried out to obtain the edge graph of the luminance picture to the luminance picture
Picture, comprising:
Edge detection is carried out to the luminance picture, obtains initial edge image;
The edge image is obtained according to the initial edge image.
Further, described that edge detection process is carried out to obtain the edge graph of the luminance picture to the luminance picture
Picture, comprising:
Planar convolution is done using the first default matrix template and the luminance picture, obtains the first brightness of each pixel
Difference value, and planar convolution is done using the second default matrix template and the luminance picture, obtain each pixel second is bright
Spend difference value;
For each pixel, corresponding picture is determined according to the first luminance difference score value and the second luminance difference score value
Element value, obtains the edge image of the luminance picture.
Further, described to be directed to each pixel, according to the first luminance difference score value and second brightness difference
Value determines corresponding pixel value, obtains the edge image of the luminance picture, comprising:
For each pixel, the root mean square of the first luminance difference score value and the second luminance difference score value is calculated, it will
The root mean square obtains the edge image of the luminance picture as corresponding pixel value.
It is further, described that the edge image is obtained according to the initial edge image, comprising:
Expansion process at least once is done to the initial edge image, the image after being expanded;
The edge image is obtained according to the image after the expansion.
Further, the image according to after the expansion obtains the edge image, comprising:
Inversion operation is carried out to the pixel value of each pixel in the image after the expansion;
The edge image is obtained according to negated pixel value.
It is further, described that edge image is obtained according to negated pixel value, comprising:
Using formula Rx,y=(1.0-Valx,y)αCalculate the α power of the negated pixel value of each pixel, wherein
Valx,yFor negated pixel value, Rx,yTo calculate the pixel value after α power, α is customized parameter;
By the R of all pixels pointx,yPixel value constitutes the edge image.
Further, the tone images that the luminance picture is obtained according to predetermined reference image, comprising:
Brightness histogram matching is carried out to the luminance picture and the reference picture, obtains brightness mapping table;
Color mapping is carried out to the luminance picture according to the brightness mapping table, obtains the tone images.
Further, described that brightness histogram matching is carried out to the luminance picture and the reference picture, obtain brightness
Mapping table, comprising:
Obtain the brightness histogram of the reference picture;
The Luminance Distribution of the luminance picture is adjusted, so that the histogram of the luminance picture and the reference picture is bright
The degree of approximation for spending histogram is greater than preset value;
The brightness mapping table is determined according to the reference picture and luminance picture adjusted.
Further, described that lead corresponding with the original image is generated according to the edge image and the tone images
Stroke style image, comprising:
Product is carried out to the edge image and the tone images, obtains black and white pencil corresponding with the original image
Painting style table images.
Further, described that lead corresponding with the original image is generated according to the edge image and the tone images
Stroke style image, comprising:
Luminance component is obtained according to the tone images, and color component is obtained according to the original image;
Starting color pencil drawing style image is generated according to the luminance component and the color component;And
The starting color pencil drawing style image is transformed into RGB color, is obtained corresponding with the original image
Drawing with colored pencil style image.
To achieve the goals above, according to the another aspect of the disclosure, and also the following technical schemes are provided:
A kind of image processing apparatus, comprising:
Brightness separation module, for obtaining the luminance graph of the original image according to the corresponding luminance component of original image
Picture;
Image processing module, for carrying out edge detection process to the luminance picture to obtain the side of the luminance picture
Edge image, and obtain according to predetermined reference image the tone images of the luminance picture;And
Pencil drawing generation module, for being generated and the original image pair according to the edge image and the tone images
The pencil drawing style image answered.
Further, the brightness separation module includes:
Brightness separative unit, for carrying out color notation conversion space processing to the original image, from transformed image
Extract light intensity level obtains original intensity image;
Luminance picture generation unit, for obtaining the luminance picture of the original image according to the original intensity image.
Further, the luminance picture generation unit is specifically used for: denoising is carried out to the original intensity image,
Obtain the luminance picture of the original image.
Further, described image processing module includes:
Edge detection unit obtains initial edge image for carrying out edge detection to the luminance picture;
Edge image generation unit, for obtaining the edge image according to the initial edge image.
Further, described image processing module is specifically used for: using the first default matrix template and the luminance picture
Planar convolution is done, obtains the first luminance difference score value of each pixel, and using the second default matrix template and the luminance graph
As doing planar convolution, the second luminance difference score value of each pixel is obtained;For each pixel, according to first luminance difference
Score value and the second luminance difference score value determine corresponding pixel value, obtain the edge image of the luminance picture.
Further, described image processing module is specifically used for: being directed to each pixel, calculates first brightness difference
The root mean square of value and the second luminance difference score value obtains the luminance picture using the root mean square as corresponding pixel value
Edge image.
Further, the edge image generation unit is specifically used for: doing to the initial edge image swollen at least once
Swollen processing, the image after being expanded;The edge image is obtained according to the image after the expansion.
Further, the edge image generation unit is specifically used for: to each pixel in the image after the expansion
The pixel value of point carries out inversion operation;The edge image is obtained according to negated pixel value.
Further, the edge image generation unit is specifically used for: using formula Rx,y=(1.0-Valx,y)αIt calculates every
The α power of a negated pixel value of pixel, wherein Valx,yFor negated pixel value, Rx,yTo calculate the picture after α power
Element value, α is customized parameter;By the R of all pixels pointx,yPixel value constitutes the edge image.
Further, described image processing module includes:
Histogram Matching unit is obtained for carrying out brightness histogram matching to the luminance picture and the reference picture
To brightness mapping table;
Tone images generation module is obtained for carrying out color mapping to the luminance picture according to the brightness mapping table
To the tone images.
Further, the Histogram Matching unit is specifically used for: obtaining the brightness histogram of the reference picture;Adjustment
The Luminance Distribution of the luminance picture, so that the histogram of the luminance picture is close with the brightness histogram of the reference picture
It is greater than preset value like degree;The brightness mapping table is determined according to the reference picture and luminance picture adjusted.
Further, the pencil drawing generation module is specifically used for: carrying out to the edge image and the tone images
Product obtains black and white pencil drawing style image corresponding with the original image.
Further, the pencil drawing generation module is specifically used for: obtaining luminance component, and root according to the tone images
Color component is obtained according to the original image;The starting color pencil painting style is generated according to the luminance component and the color component
Table images;And the starting color pencil drawing style image is transformed into RGB color space, is obtained and the original image
Corresponding drawing with colored pencil style image.
To achieve the goals above, according to the another aspect of the disclosure, and also the following technical schemes are provided:
A kind of electronic equipment, comprising:
Memory, for storing non-transient computer readable instruction;And
Processor, for running the computer-readable instruction, so that the processor realizes any of the above-described figure when executing
The step of as described in processing method technical solution.
To achieve the goals above, according to the another aspect of the disclosure, and also the following technical schemes are provided:
A kind of computer readable storage medium, for storing non-transient computer readable instruction, when the non-transient calculating
When machine readable instruction is executed by computer, so that the computer executes described in any of the above-described image processing method technical solution
The step of.
To achieve the goals above, according to the another aspect of the disclosure, and also the following technical schemes are provided:
A kind of image processing terminal, including any of the above-described image processing apparatus.
The embodiment of the present disclosure is by obtaining the luminance graph of the original image according to the corresponding luminance component of original image
Picture, then edge detection process is carried out to obtain the edge image of the luminance picture, according to predetermined reference to the luminance picture
Image obtains the tone images of the luminance picture, further according to the edge image and the tone images generate with it is described original
The corresponding pencil drawing style image of image, the filter for solving pencil drawing style in the prior art cannot be considered in terms of effect and performance
Technical problem.
Above description is only the general introduction of disclosed technique scheme, in order to better understand the technological means of the disclosure, and
It can be implemented in accordance with the contents of the specification, and to allow the above and other objects, features and advantages of the disclosure can be brighter
Show understandable, it is special below to lift preferred embodiment, and cooperate attached drawing, detailed description are as follows.
Specific embodiment
Illustrate embodiment of the present disclosure below by way of specific specific example, those skilled in the art can be by this specification
Disclosed content understands other advantages and effect of the disclosure easily.Obviously, described embodiment is only the disclosure
A part of the embodiment, instead of all the embodiments.The disclosure can also be subject to reality by way of a different and different embodiment
It applies or applies, the various details in this specification can also be based on different viewpoints and application, in the spirit without departing from the disclosure
Lower carry out various modifications or alterations.It should be noted that in the absence of conflict, the feature in following embodiment and embodiment can
To be combined with each other.Based on the embodiment in the disclosure, those of ordinary skill in the art are without making creative work
Every other embodiment obtained belongs to the range of disclosure protection.
It should be noted that the various aspects of embodiment within the scope of the appended claims are described below.Ying Xian
And be clear to, aspect described herein can be embodied in extensive diversified forms, and any specific structure described herein
And/or function is only illustrative.Based on the disclosure, it will be understood by one of ordinary skill in the art that one described herein
Aspect can be independently implemented with any other aspect, and can combine the two or both in these aspects or more in various ways.
For example, carry out facilities and equipments in terms of any number set forth herein can be used and/or practice method.In addition, can make
With other than one or more of aspect set forth herein other structures and/or it is functional implement this equipment and/or
Practice the method.
It should also be noted that, diagram provided in following embodiment only illustrates the basic structure of the disclosure in a schematic way
Think, component count, shape and the size when only display is with component related in the disclosure rather than according to actual implementation in schema are drawn
System, when actual implementation kenel, quantity and the ratio of each component can arbitrarily change for one kind, and its assembly layout kenel can also
It can be increasingly complex.
In addition, in the following description, specific details are provided for a thorough understanding of the examples.However, fields
The skilled person will understand that the aspect can be practiced without these specific details.
In order to solve the technical issues of filter of pencil drawing style in the prior art cannot be considered in terms of effect and performance, the disclosure
Embodiment provides a kind of image processing method.As shown in Figure 1, the image processing method mainly includes the following steps S1 to step
S3.Wherein:
Step S1: according to the corresponding luminance component of original image, the luminance picture of the original image is obtained.
Wherein, original image can be the photo of shooting.
Wherein, luminance picture is the image of luminance component composition.
Specifically, need to be carried out color notation conversion space if original image is RGB image, it is corresponding bright to obtain
Information is spent, and then obtains corresponding luminance picture.
Step S2: edge detection process is carried out to obtain the edge image of the luminance picture to luminance picture;
Step S3: the tone images of the luminance picture are obtained according to predetermined reference image.
Step S4: pencil drawing style image corresponding with the original image is generated according to edge image and tone images.
The present embodiment is carried out by according to the corresponding luminance component of original image, obtaining luminance picture, then to luminance picture
Edge detection process obtains the color of the luminance picture according to predetermined reference image to obtain the edge image of the luminance picture
It changes the line map picture, generates pencil drawing style image further according to edge image and tone images, solve pencil drawing style in the prior art
Filter the technical issues of cannot be considered in terms of effect and performance.
In an alternative embodiment, step S1 is specifically included:
Step S11: to original image progress color notation conversion space processing, the extract light intensity level from transformed image,
Obtain original intensity image.
Specifically, then needing to carry out color to it if original image is RGB (Red Green Blue, RGB) image
Space converts to obtain corresponding luminance component, such as original image is transformed into YCbCr color space by RGB color,
Wherein, conversion formula is as follows:
Y=0.257*R+0.564*G+0.098*B+16
Cb=-0.148*R-0.291*G+0.439*B+128
Cr=0.439*R-0.368*G-0.071*B+128
Wherein, it is then respectively blue component and red component that Y, which is luminance component, Cb and Cr, then Y is the brightness point extracted
Amount.
Or original image is transformed into LAB color space by RGB color, wherein L is luminance component, and A, B are color
Color component, A indicate the range from carmetta to green, and B indicates the range from yellow to blue, then L is the brightness point extracted
Amount.
Step S12: the luminance picture of the original image is obtained according to original intensity image.
Further, step S12 includes:
Directly subsequent processing is carried out using original intensity image as the luminance picture of the original image;Or to initial bright
It spends image and carries out denoising, obtain the luminance picture of the original image.
Denoising is carried out to original intensity image specifically, median filtering can be used, is made an uproar with the spiced salt eliminated in image
Sound considers, the present embodiment can be used the median filter of 3*3 size, specifically face domain for the 8 of each pixel for performance
Inside seek intermediate value.
In an alternative embodiment, step S2 includes:
Step S21: edge detection is carried out to luminance picture, obtains initial edge image.
Step S22: the edge image is obtained according to initial edge image.
Further, step S2 includes:
Planar convolution is done using the first default matrix template and luminance picture, obtains the first brightness difference of each pixel
Value, and planar convolution is done using the second default matrix template and luminance picture, obtain the second luminance difference score value of each pixel;
For each pixel, corresponding pixel value is determined according to the first luminance difference score value and the second luminance difference score value, is obtained described bright
Spend the edge image of image.
Herein, in order to distinguish different default matrix templates, the default matrix template first appeared is known as here
The default matrix template of subsequent appearance is known as the second default matrix template by the first default matrix template.
And in order to distinguish different luminance difference score values, the luminance difference score value first appeared is known as the first brightness difference here
Value, is known as the second luminance difference score value for the luminance difference score value of subsequent appearance.
Specifically, Sobel filtering, which can be used, carries out edge detection, Sobel filtering includes two groups of matrix templates, respectively horizontal
To template and vertical framework, wherein the first default matrix template can be cross form, and the second default matrix template can be vertical
To template.The size of template can be 3x3, it is made planar convolution with luminance picture, can obtain transverse direction and longitudinal direction respectively
Brightness difference approximation i.e. the first luminance difference score value and the second luminance difference score value.Wherein, adoptable cross form and longitudinal mould
Plate is as follows:
Further, described to be directed to each pixel, according to the first luminance difference score value and second brightness difference
Value determines corresponding pixel value, obtains the edge image of the luminance picture, comprising:
For each pixel, the root mean square of the first luminance difference score value and the second luminance difference score value is calculated, root mean square is made
For corresponding pixel value, the edge image of the luminance picture is obtained.
Specifically, passing through formula by taking the luminance difference score value that above-mentioned formwork calculation obtains as an exampleIt calculates
To the pixel value of each pixel.
Further, step S22 includes:
Expansion process at least once is done to initial edge image, the image after being expanded;It is obtained according to the image after expansion
To the edge image.
Specifically, expansion is a kind of algorithm of morphological image, in the present embodiment for making image border more overstriking i.e.
It becomes apparent from, is specifically as follows for each pixel of initial edge image, formula f can be used in the maximizing in 8 neighborhoodsx,y=
maxx-1≤i≤x+1maxy-1≤j≤y+1Vali,jIt is calculated, wherein Vali,jIt is i, the corresponding pixel value of the pixel of j for position.?
It can according to need circulation herein to execute repeatedly, the number of execution is more, and edge is thicker to be more obvious.
Further, the image according to after the expansion obtains the edge image, comprising:
Inversion operation is carried out to the pixel value of each pixel in the image after expansion;It is obtained according to negated pixel value
To the edge image.
It is further, described that the edge image is obtained according to negated pixel value, comprising:
Using formula Rx,y=(1.0-Valx,y)αCalculate the α power of the negated pixel value of each pixel, wherein
Valx,yFor negated pixel value, Rx,yTo calculate the pixel value after α power, α is customized parameter;By all pixels point
Rx,yPixel value constitutes the edge image.
Wherein, the bigger image border α is more black.
In an alternative embodiment, step S3 includes:
Step S31: carrying out brightness histogram matching to luminance picture and the reference picture, obtains the brightness mapping
Table.
Step S32: color mapping is carried out to luminance picture according to brightness mapping table, obtains the tone images.
Further, step S31 includes:
Obtain the brightness histogram of the reference picture;The Luminance Distribution for adjusting luminance picture, so that luminance picture is straight
Side's figure and the degree of approximation of the brightness histogram of reference picture are greater than preset value;According to reference picture and luminance picture adjusted
Determine the brightness mapping table.
Specifically, the present embodiment uses Histogram Matching, so that the variation of the histogram of luminance picture is and reference picture
Histogram it is close.That is, adjustment luminance picture Luminance Distribution make it consistent with the Luminance Distribution of reference picture or
It is close.For example, in same coordinate system, the overlapping area and ginseng of the brightness histogram of the histogram and reference picture of luminance picture
The ratio of the gross area of the brightness histogram of image is examined, is greater than predetermined ratio value (such as 95%), that is, thinks that degree of approximation is greater than
Preset value.Wherein, the histogram of reference picture is adjustable variable, and the brighter or darker image of practical entirety is as reference
Figure, the luminance picture that can make are brighter or darker.
In an alternative embodiment, step S4 includes:
Product is carried out to edge image and tone images, obtains black and white pencil drawing style figure corresponding with the original image
Picture.
In an alternative embodiment, step S4 includes:
Step S41: luminance component is obtained according to tone images, and color component is obtained according to original image.
Step S42: starting color pencil drawing style image is generated according to luminance component and color component.
Step S43: starting color pencil drawing style image is transformed into RGB color, is obtained and the original image
Corresponding drawing with colored pencil style image.
Specifically, being converted into YCbCr color space, then corresponding color component is if original image is RGB image
Cb and Cr, the then luminance component determined by above-mentioned steps then form YCbCr image by Y-component, Cb component and Cr component as Y
That is starting color pencil drawing style image, then convert it to RGB color and drawing with colored pencil style image can be obtained.
The conversion formula that it is used is as follows:
R=1.164* (Y-16)+1.596* (Cr-128)
G=1.164* (Y-16) -0.392* (Cb-128) -0.813* (Cr-128)
B=1.164* (Y-16)+2.017* (Cb-128)
If original image is transformed into LAB color space by RGB color, divide with the brightness that reason above-mentioned steps determine
Amount is used as L * component, and LAB image can be obtained as color component in A, B, then converts it to RGB color and coloured silk can be obtained
Color pencil drawing style image.
Those skilled in the art will be understood that on the basis of above-mentioned each embodiment, can also carry out obvious variant (example
Such as, cited mode is combined) or equivalent replacement.
Hereinbefore, although describing each step in image processing method embodiment, ability according to above-mentioned sequence
Field technique personnel it should be clear that the step in the embodiment of the present disclosure not necessarily executes in the order described above, can also with inverted order, simultaneously
Other sequences such as row, intersection execute, moreover, those skilled in the art can also add other on the basis of above-mentioned steps
The mode of step, these obvious variants or equivalent replacement should also be included within the protection scope of the disclosure, and details are not described herein.
It is below embodiment of the present disclosure, embodiment of the present disclosure can be used for executing embodiments of the present disclosure realization
The step of, for ease of description, part relevant to the embodiment of the present disclosure is illustrated only, it is disclosed by specific technical details, it asks
Referring to embodiments of the present disclosure.
In order to solve the technical issues of filter of pencil drawing style in the prior art cannot be considered in terms of effect and performance, the disclosure
Embodiment provides a kind of image processing apparatus.The device can execute the step in above-mentioned image processing method embodiment.Such as Fig. 2
It is shown, the device mainly includes: brightness separation module 21, image processing module 22 and pencil drawing generation module 23;Wherein,
Brightness separation module 21 is used to obtain the luminance graph of the original image according to the corresponding luminance component of original image
Picture;
Image processing module 22 is used to carry out edge detection process to the luminance picture to obtain the luminance picture
Edge image, and obtain according to predetermined reference image the tone images of the luminance picture;And
Pencil drawing generation module 23 is used to be generated and the original image according to the edge image and the tone images
Corresponding pencil drawing style image.
Further, the brightness separation module 21 includes: brightness separative unit 211 and luminance picture generation unit 212;
Wherein,
Brightness separative unit 211 is used to carry out color notation conversion space processing to the original image, from transformed image
Middle extract light intensity level obtains original intensity image;
Luminance picture generation unit 212 is used to obtain the luminance graph of the original image according to the original intensity image
Picture.
Further, the luminance picture generation unit 212 is specifically used for: carrying out at denoising to the original intensity image
Reason, obtains the luminance picture of the original image.
Further, described image processing module 22 includes: edge detection unit 221 and edge image generation unit 222;
Wherein,
Edge detection unit 221 is used to carry out edge detection to the luminance picture, obtains initial edge image;
Edge image generation unit 222 is used to obtain the edge image according to the initial edge image.
Further, described image processing module 22 is specifically used for: using the first default matrix template and the luminance graph
As doing planar convolution, the first luminance difference score value of each pixel is obtained, and using the second default matrix template and the brightness
Image does planar convolution, obtains the second luminance difference score value of each pixel;For each pixel, according to first brightness
Difference value and the second luminance difference score value determine corresponding pixel value, obtain the edge image of the luminance picture.
Further, described image processing module 22 is specifically used for: being directed to each pixel, calculates first luminance difference
The root mean square of score value and the second luminance difference score value obtains the luminance graph using the root mean square as corresponding pixel value
The edge image of picture.
Further, the edge image generation unit 222 is specifically used for: doing at least once to the initial edge image
Expansion process, the image after being expanded;The edge image is obtained according to the image after the expansion.
Further, the edge image generation unit 222 is specifically used for: to each picture in the image after the expansion
The pixel value of vegetarian refreshments carries out inversion operation;The edge image is obtained according to negated pixel value.
Further, the edge image generation unit 222 is specifically used for: using formula Rx,y=(1.0-Valx,y)αMeter
Calculate the α power of the negated pixel value of each pixel, wherein Valx,yFor negated pixel value, Rx,yAfter calculating α power
Pixel value, α is customized parameter;By the R of all pixels pointx,yPixel value constitutes the edge image.
Further, described image processing module 22 includes: Histogram Matching unit 223 and tone images generation module
224;Wherein,
Histogram Matching unit 223 is used to carry out brightness histogram matching to the luminance picture and the reference picture,
Obtain brightness mapping table;
Tone images generation module 224 is used to carry out color mapping to the luminance picture according to the brightness mapping table,
Obtain the tone images.
Further, the Histogram Matching unit 223 is specifically used for: obtaining the brightness histogram of the reference picture;
The Luminance Distribution of the luminance picture is adjusted, so that the brightness histogram of the histogram of the luminance picture and the reference picture
Degree of approximation be greater than preset value;The brightness mapping table is determined according to the reference picture and luminance picture adjusted.
Further, the pencil drawing generation module 23 is specifically used for: to the edge image and the tone images into
Row product obtains black and white pencil drawing style image corresponding with the original image.
Further, the pencil drawing generation module 23 is specifically used for: luminance component is obtained according to the tone images, and
Color component is obtained according to the original image;Starting color pencil drawing is generated according to the luminance component and the color component
Style image;And the starting color pencil drawing style image is transformed into RGB color, is obtained and the original graph
As corresponding drawing with colored pencil style image.
The detailed descriptions such as the technical effect of working principle, realization in relation to image processing apparatus embodiment can refer to aforementioned
Related description in image processing method embodiment, details are not described herein.
Below with reference to Fig. 3, it illustrates the structural schematic diagrams for the electronic equipment for being suitable for being used to realize the embodiment of the present disclosure.This
Electronic equipment in open embodiment can include but is not limited to such as mobile phone, laptop, digit broadcasting receiver,
PDA (personal digital assistant), PAD (tablet computer), PMP (portable media player), car-mounted terminal (such as vehicle mounted guidance
Terminal) etc. mobile terminal and such as number TV, desktop computer etc. fixed terminal.Electronic equipment shown in Fig. 3
An only example, should not function to the embodiment of the present disclosure and use scope bring any restrictions.
As shown in figure 3, electronic equipment may include processing unit (such as central processing unit, graphics processor etc.) 301,
Random access storage can be loaded into according to the program being stored in read-only memory (ROM) 302 or from storage device 308
Program in device (RAM) 303 and execute various movements appropriate and processing.In RAM 303, it is also stored with electronic device
Required various programs and data.Processing unit 301, ROM 302 and RAM 303 are connected with each other by bus 304.Input/
Output (I/O) interface 305 is also connected to bus 304.
In general, following device can connect to I/O interface 305: including such as touch screen, touch tablet, keyboard, mouse, figure
As the input unit 306 of sensor, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD), loudspeaking
The output device 307 of device, vibrator etc.;Storage device 308 including such as tape, hard disk etc.;And communication device 309.It is logical
T unit 309 can permit electronic equipment and wirelessly or non-wirelessly be communicated with other equipment to exchange data.Although Fig. 3 is shown
Electronic equipment with various devices, it should be understood that being not required for implementing or having all devices shown.It can replace
Implement or have more or fewer devices in generation ground.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description
Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium
On computer program, which includes the program code for method shown in execution flow chart.In such reality
It applies in example, which can be downloaded and installed from network by communication device 309, or from storage device 308
It is mounted, or is mounted from ROM 302.When the computer program is executed by processing unit 301, the embodiment of the present disclosure is executed
Method in the above-mentioned function that limits.
It should be noted that the above-mentioned computer-readable medium of the disclosure can be computer-readable signal media or meter
Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not
Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter
The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires
Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage
Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device,
Or above-mentioned any appropriate combination.In the disclosure, computer readable storage medium can be it is any include or storage journey
The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this
In open, computer-readable signal media may include in a base band or as the data-signal that carrier wave a part is propagated,
In carry computer-readable program code.The data-signal of this propagation can take various forms, including but not limited to
Electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable and deposit
Any computer-readable medium other than storage media, the computer-readable signal media can send, propagate or transmit and be used for
By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium
Program code can transmit with any suitable medium, including but not limited to: electric wire, optical cable, RF (radio frequency) etc. are above-mentioned
Any appropriate combination.
Above-mentioned computer-readable medium can be included in above-mentioned electronic equipment;It is also possible to individualism, and not
It is fitted into the electronic equipment.
Above-mentioned computer-readable medium carries one or more program, when said one or multiple programs are by the electricity
When sub- equipment executes, so that the electronic equipment: according to the corresponding luminance component of original image, obtaining the brightness of the original image
Image;Edge detection process is carried out to obtain the edge image of the luminance picture to the luminance picture;According to predetermined reference
Image obtains the tone images of the luminance picture;And it is generated and the original according to the edge image and the tone images
The corresponding pencil drawing style image of beginning image.
The calculating of the operation for executing the disclosure can be write with one or more programming languages or combinations thereof
Machine program code, above procedure design language include object oriented program language-such as Java, Smalltalk, C+
+, it further include conventional procedural programming language-such as " C " language or similar programming language.Program code can
Fully to execute, partly execute on the user computer on the user computer, be executed as an independent software package,
Part executes on the remote computer or executes on a remote computer or server completely on the user computer for part.
In situations involving remote computers, remote computer can pass through the network of any kind --- including local area network (LAN)
Or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as utilize Internet service
Provider is connected by internet).
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the disclosure, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use
The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box
The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually
It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse
Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding
The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction
Combination realize.
Being described in unit involved in the embodiment of the present disclosure can be realized by way of software, can also be by hard
The mode of part is realized.Wherein, the title of unit does not constitute the restriction to the unit itself under certain conditions, for example, the
One acquiring unit is also described as " obtaining the unit of at least two internet protocol addresses ".
Above description is only the preferred embodiment of the disclosure and the explanation to institute's application technology principle.Those skilled in the art
Member is it should be appreciated that the open scope involved in the disclosure, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic
Scheme, while should also cover in the case where not departing from design disclosed above, it is carried out by above-mentioned technical characteristic or its equivalent feature
Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed in the disclosure
Can technical characteristic replaced mutually and the technical solution that is formed.