CN109816755A - A kind of production method of ink image, calculates equipment and storage medium at device - Google Patents
A kind of production method of ink image, calculates equipment and storage medium at device Download PDFInfo
- Publication number
- CN109816755A CN109816755A CN201910107965.3A CN201910107965A CN109816755A CN 109816755 A CN109816755 A CN 109816755A CN 201910107965 A CN201910107965 A CN 201910107965A CN 109816755 A CN109816755 A CN 109816755A
- Authority
- CN
- China
- Prior art keywords
- image
- pixel
- intermediate image
- value
- produced
- 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.)
- Pending
Links
Landscapes
- Image Processing (AREA)
Abstract
The application provides a kind of production method of ink image, device, calculates equipment and storage medium, this method comprises: obtaining image to be produced;Edge extracting is carried out to the image to be produced, the first intermediate image after forming edge extracting;Fuzzy Processing is carried out to first intermediate image, obtains the second intermediate image;Color range adjustment is carried out to the image to be produced, obtains third intermediate image;Second intermediate image is merged with the third intermediate image, generates target ink image.The cartoon scene of common style can be efficiently converted to the cartoon scene of ink and wash style by the conversion of productions method of ink image through the invention.
Description
Technical field
This application involves Internet technical field, in particular to a kind of production method of ink image, calculates equipment at device
And storage medium.
Background technique
In the application of internet, with popularizing for smart machine, the mode that user contacts information is varied widely,
Cause media environment that the variation of matter has occurred, the information of user's contact has been turned to from traditional videoland using content as carrier
Information touching reaches, and content service is the service of a unusual core, and current content service mainly provides books, video display, music, figure
The content service of the types such as picture, video, picture, wherein image is a very important content service.
Ink image can deserve to be called a big invention of Chinese image.Traditional Chinese ink painting is introduced into image by it
In production, although image processing method at this stage is increasingly advanced, the production for wash cartoon is still to walk to draw
The standard picture of rendering makes assembly line, this just needs very big workload, therefore solves the above problems and just seem very necessary
?.
Summary of the invention
In view of this, this specification embodiment provides a kind of production method of ink image, device, calculates equipment and deposit
Storage media, to solve technological deficiency existing in the prior art.
On the one hand, this specification embodiment discloses a kind of production method of ink image, comprising:
Obtain image to be produced;
Edge extracting is carried out to the image to be produced, the first intermediate image after forming edge extracting;
Fuzzy Processing is carried out to first intermediate image, obtains the second intermediate image;
Color range adjustment is carried out to the image to be produced, obtains third intermediate image;
Second intermediate image is merged with the third intermediate image, generates target ink image.
Optionally, obtaining image to be produced includes:
Screenshot instruction is received, the screenshot instruction includes play position of the image to be produced in animated image;
It is instructed according to the screenshot and obtains frame image to be produced;
When receiving output order, the image to be produced is exported.
Optionally, carrying out edge extracting to the target image includes:
Image to be produced is filtered;
The gradient value of each pixel in filtered image is calculated by the first Sobel operator;
The first intermediate image after generating edge extracting according to the gradient value.
Optionally, include: by the gradient value that the first Sobel operator calculates each pixel in filtered image
Obtain the pixel value of each pixel (x, y) in filtered image;
Convolution algorithm, which is done, by the pixel value of the first Sobel operator and each pixel obtains the horizontal direction of current pixel point
Directional derivative GxWith vertical direction derivative Gy;
According to GxAnd GyDetermine the gradient value of current pixel point (x, y).
Optionally, include: according to the first intermediate image after gradient value generation edge extracting
Predetermined gradient threshold value;
The point that gradient value is greater than Grads threshold is set as to the boundary point of first intermediate image, the boundary point is primary
Connection obtains first intermediate image.
Optionally, carrying out Fuzzy Processing to first intermediate image includes:
First intermediate image is filtered;
It is carried out by the pixel value of each pixel in the first intermediate image after the 2nd Sobel operator and the filtering processing
Convolution algorithm obtains the second intermediate image.
Optionally, pass through the picture of each pixel in the first intermediate image after the 2nd Sobel operator and the filtering processing
Plain value progress convolution algorithm obtains the second intermediate image and includes:
First pixel value of each pixel (x, y) in the first intermediate image after obtaining filtering processing;
Convolution algorithm, which is done, by the first pixel value of the 2nd Sobel operator and each pixel obtains the level of current pixel point
The pixel value O in directionXWith the pixel value O of vertical directionY;
According to OXAnd OYDetermine the second pixel value of current pixel point (x, y);
Second intermediate image is obtained according to the second pixel value of each pixel.
Optionally, carrying out color range adjustment to the image to be produced includes:
Input levels adjustment is carried out to the image to be produced according to input algorithm, obtains input levels adjustment image;
Output levels adjustment is carried out to input levels adjustment image according to output algorithm, obtains the third middle graph
Picture.
Optionally, input levels adjustment is carried out to the image to be produced according to input algorithm, obtains input levels adjustment
Image includes:
Calculate input highlight levels value and input shadow color range value the first deviation, calculate each pixel color order component value with it is defeated
Enter the second deviation of shadow color range value;
If second deviation is less than or equal to 0, each pixel input levels adjustment component is equal to 0;
It is the middle tone at bottom by the ratio of first deviation and second deviation if second deviation is greater than 0
The power of color range value inverse adjusts component as each pixel input levels;
Input levels adjustment is carried out to the image to be produced according to each pixel input levels adjustment component.
Optionally, output levels adjustment is carried out to input levels adjustment image according to output algorithm, obtains described the
Three intermediate images include:
It calculates output highlight levels value and exports the deviation of shadow color range value;
Obtain the input levels adjustment component, output shadow color range value;
Component, output shadow color range value and output highlight levels value and output shadow color range are adjusted according to the input levels
The deviation of value determines the color range component of each pixel in the third intermediate image, to obtain the third intermediate image.
Optionally, after second intermediate image being merged with the third intermediate image, further includes:
Color saturation, contrast and brightness adjustment are carried out to the image after the merging, obtain target ink figure
Picture.
Optionally, the production method of ink image further include: will treated each frame target ink image according to broadcasting
Timing splicing generates wash cartoon.
Optionally, the production method of ink image further include: among the first intermediate image, the second intermediate image, third
Image and target ink image are sequentially in display according to generation sequential export.
On the other hand, this specification embodiment discloses a kind of device of the production of ink image, comprising:
Module is obtained, is configured as obtaining image to be produced;
First processing module is configured as carrying out edge extracting to the image to be produced, and the after forming edge extracting
One intermediate image;
Second processing module is configured as carrying out Fuzzy Processing to first intermediate image, obtains the second intermediate image;
Third processing module is configured as carrying out color range adjustment to the image to be produced, obtains third intermediate image;
Fourth processing module is configured as merging second intermediate image with the third intermediate image, generates mesh
Mark ink image.
Optionally, module is obtained, being additionally configured to screenshot instruction includes broadcasting position of the image to be produced in animated image
It sets, is instructed according to the screenshot and obtain frame image to be produced, when receiving output order, export the image to be produced;
First processing module is additionally configured to be filtered the image to be produced, passes through the first Sobel operator
The gradient value for calculating each pixel in filtered image, the first middle graph after edge extracting is generated according to the gradient value
Picture;
Second processing module is additionally configured to be filtered first intermediate image, is calculated by the 2nd Sobel
The pixel value of each pixel carries out convolution algorithm and obtains the second middle graph in sub the first intermediate image with after the filtering processing
Picture;
Third processing module is additionally configured to carry out input levels adjustment to the image to be produced according to input algorithm,
Input levels adjustment image is obtained, output levels adjustment is carried out to input levels adjustment image according to output algorithm, is obtained
The third intermediate image.
Optionally, first processing module is configured to obtain the picture of each pixel (x, y) in filtered image
Element value does convolution algorithm by the pixel value of the first Sobel operator and each pixel and obtains the horizontal direction of current pixel point
Directional derivative GxWith vertical direction derivative Gy, according to GxAnd GyDetermine the gradient value of current pixel point (x, y);
Second processing module, each pixel in the first intermediate image after being configured to obtain filtering processing (x,
Y) the first pixel value does convolution algorithm by the first pixel value of the 2nd Sobel operator and each pixel and obtains current pixel
The pixel value O of the horizontal direction of pointXWith the pixel value O of vertical directionY, according to OXAnd OYDetermine the second of current pixel point (x, y)
Pixel value obtains second intermediate image according to the second pixel value of each pixel.
On the other hand, this specification embodiment discloses a kind of calculating equipment, including memory, processor and is stored in
On reservoir and the computer instruction that can run on a processor, the processor realize the system of ink image when executing described instruction
The step of making method.
On the other hand, this specification embodiment discloses a kind of computer readable storage medium, is stored with computer and refers to
The step of order, which is executed by processor the production method of ink image.
A kind of production method for ink image that this specification provides, calculates equipment and storage medium at device, by this hair
The cartoon scene of common style can be efficiently converted to the animation of ink and wash style by the conversion of productions method of bright ink image
Scene, and the effect after conversion is beautiful, user experience is more preferably.
Detailed description of the invention
Fig. 1 is a kind of structural block diagram for calculating equipment that one embodiment of this specification provides;
Fig. 2 is a kind of production method flow chart for ink image that one embodiment of this specification provides;
Fig. 3 is a kind of production method flow chart for ink image that one embodiment of this specification provides;
Fig. 4 is a kind of production method flow chart for ink image that one embodiment of this specification provides;
Fig. 5 is a kind of production method flow chart for ink image that one embodiment of this specification provides;
Fig. 6 is a kind of structural schematic diagram of the producing device for ink image that one embodiment of this specification provides.
Specific embodiment
Many details are explained in the following description in order to fully understand this specification.But this specification energy
Enough to be implemented with being much different from other way described herein, those skilled in the art can be without prejudice to this specification intension
In the case where do similar popularization, therefore this specification is not limited by following public specific implementation.
The term used in this specification one or more embodiment be only merely for for the purpose of describing particular embodiments,
It is not intended to be limiting this specification one or more embodiment.In this specification one or more embodiment and appended claims
The "an" of singular used in book, " described " and "the" are also intended to including most forms, unless context is clearly
Indicate other meanings.It is also understood that term "and/or" used in this specification one or more embodiment refers to and includes
One or more associated any or all of project listed may combine.
It will be appreciated that though may be retouched using term first, second etc. in this specification one or more embodiment
Various information are stated, but these information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other
It opens.For example, first can also be referred to as second, class in the case where not departing from this specification one or more scope of embodiments
As, second can also be referred to as first.Depending on context, word as used in this " if " can be construed to
" ... when " or " when ... " or " in response to determination ".
In the present specification, production method, device, a kind of calculating equipment and the storage for providing a kind of ink image are situated between
Matter is described in detail one by one in the following embodiments.
Fig. 1 is to show the structural block diagram of the calculating equipment 100 according to one embodiment of this specification.The calculating equipment 100
Component include but is not limited to memory 110 and processor 120.Processor 120 is connected with memory 110 by bus 130.
Calculating equipment 100 further includes access device 140, and access device 140 may include wired or wireless any type
One or more of network interface (for example, network interface card (NIC)), such as IEEE802.11 WLAN (WLAN)
Wireless interface, worldwide interoperability for microwave accesses (Wi-MAX) interface, Ethernet interface, universal serial bus (USB) interface, Cellular Networks
Network interface, blue tooth interface, near-field communication (NFC) interface, etc..
In one embodiment of this specification, other unshowned portions in the above-mentioned component and Fig. 1 of equipment 100 are calculated
Part can also be connected to each other, such as pass through bus.It should be appreciated that calculating device structure block diagram shown in FIG. 1 merely for the sake of
Exemplary purpose, rather than the limitation to this specification range.Those skilled in the art can according to need, and increases or replaces it
His component.
Calculating equipment 100 can be any kind of static or mobile computing device, including mobile computer or mobile meter
Calculate equipment (for example, tablet computer, personal digital assistant, laptop computer, notebook computer, net book etc.), movement
Phone (for example, smart phone), wearable calculating equipment (for example, smartwatch, intelligent glasses etc.) or other kinds of shifting
Dynamic equipment, or the static calculating equipment of such as desktop computer or PC.Calculating equipment 100 can also be mobile or state type
Server.
Wherein, processor 120 can execute the step in method shown in Fig. 2.Fig. 2 shows implemented according to this specification one
A kind of production method flow chart for ink image that example provides, the production method of ink image may include step 202 to step
210。
Step 202 obtains image to be produced.
In this specification one or more embodiment, image to be produced is each frame image in target animation, therefore is needed
Image to be produced is intercepted from target animation, first the instruction of reception screenshot, have image to be produced in animation figure in screenshot instruction
As in play position information, according to play position information interception to a frame image be image to be produced.
Step 204 carries out edge extracting to the image to be produced, the first intermediate image after forming edge extracting.
In this specification one or more embodiment, step 204 can be realized by step as shown in Figure 3, including step
Rapid 302 to step 306.
Step 302 is filtered image to be produced.
In one embodiment that this specification provides, being filtered to image to be produced is to eliminate image as far as possible
In noise, preferably to extract and connect edge.
Step 304, the gradient value that each pixel in filtered image is calculated by the first Sobel operator.
In one embodiment that this specification provides, the edge extracting of image is realized using Sobel operator, is substantially to use
Convolution kernel and image do convolution to calculate the gradient value of each point in image, determine boundary point according to the size of gradient value, thus real
Existing edge extracting.
In one embodiment that this specification provides, the convolution kernel of the first Sobel operator are as follows:
Horizontal direction:Vertical direction:
The operator includes that it is respectively horizontally and vertically made plane volume with image by the matrix of two groups of 3x3
Product, can obtain directional derivative horizontally and vertically respectively.If representing image to be produced, G with AxAnd GyGeneration respectively
Table calculates resulting directional derivative through horizontal direction and vertical direction, and formula is as follows:
Assuming that obtaining the pixel value of each pixel in filtered image are as follows:The matrix is distinguished
The directional derivative G both horizontally and vertically of pixel (x, y) is calculated in substitution formula (1) and formula (2)xAnd Gy, recycle formula
(3) gradient value of you can get it pixel (x, y).
Step 306 generates the first intermediate image after edge extracting according to the gradient value.
In one embodiment that this specification provides, gradient value is greater than the pixel of Grads threshold by first predetermined gradient threshold value
Point is set as the boundary point of first intermediate image, and the boundary point is sequentially connected to obtain first intermediate image.
In one embodiment that this specification provides, Sobel operator detects edge from different directions, using on pixel
Under, the pixel value weighting algorithm of left and right adjoint point, according at edge point, there are this features of extreme value to carry out edge detection, this operator
The image procossing more to gray scale gradual change and noise it is preferable and more accurate to edge contrast locating.
Step 206 carries out Fuzzy Processing to first intermediate image, obtains the second intermediate image.
In this specification one or more embodiment, step 206 can be realized by step as shown in Figure 4, including step
Rapid 402 to step 404.
Step 402 is filtered first intermediate image.
In one embodiment that this specification provides, being filtered to the first intermediate image is still to disappear as far as possible
Except the noise in image.
Step 404 passes through the picture of each pixel in the first intermediate image after the 2nd Sobel operator and the filtering processing
Plain value carries out convolution algorithm and obtains the second intermediate image.
In one embodiment that this specification provides, the convolution kernel of the 2nd Sobel operator are as follows:
Horizontal direction:Vertical direction:
The operator includes that it is respectively horizontally and vertically made plane volume with image by the matrix of two groups of 3x3
Product, can obtain offset horizontally and vertically respectively.If representing the first intermediate image, O with BXAnd OYIt respectively represents
Through offset horizontally and vertically, formula is as follows:
Assuming that obtaining the first pixel value of each pixel in the first intermediate image after filtering processing are as follows:
By the matrix substitute into formula (4) respectively and formula (5) be calculated pixel (x, y) level and
The offset O of vertical directionXAnd OY, the second pixel value of the pixel (x, y) that recycles that formula (6) you can get it.
It, can be by it according to each picture in image to be produced after the second pixel value for calculating each pixel by above method
Putting in order for vegetarian refreshments is arranged as the matrix of m*n, obtains the second intermediate image C:
It is one kind based on the first Sobel operator by the 2nd Sobel operator in one embodiment that this specification provides
It improves, convolution algorithm is done by the first pixel value of the 2nd Sobel operator and each pixel and obtains the horizontal direction of each pixel
It is deviated with the pixel value of vertical direction, the second pixel value O after recycling calculations of offset offset horizontally and vertically,
To achieve the effect that image pixel is deviated to two crossed diagonals, to realize the effect of fuzzy splash.
Step 208 carries out color range adjustment to the image to be produced, obtains third intermediate image.
In this specification one or more embodiment, step 208 can be realized by step as shown in Figure 5, including step
Rapid 502 to step 504.
Step 502 carries out input levels adjustment to the image to be produced according to input algorithm, obtains input levels adjustment
Image.
In one embodiment that this specification provides, color image is arranged by multiple pixels, wherein each pixel
Point has single color, can be indicated by the color range value of RGB triple channel, the color range value value range under each channel is
[0,255].Color range adjustment refers to according to preset algorithm and parameter, adjusts to the color range value of each pixel in image to be produced
It is whole.
In one embodiment that this specification provides, input levels parameter includes (RGB full tunnel or R, G, B under each channel
Autonomous channel) input highlight levels value, input midtone levels value, input shadow color range value.Input highlight levels value, input
Midtone levels value, input shadow color range value, output highlight levels value can be distinguished with the default number for exporting shadow color range value
Be 1.0,1.0,0,1.0,0, usually set default number for input levels parameter and output levels parameter, be equivalent to without
Input levels adjustment and output levels adjustment.In the present embodiment, two kinds of color ranges are both needed to be adjusted.
Adjustment for input levels parameter can determine each pixel in input levels adjustment image by the following method
Input levels adjust component:
It calculates input highlight levels value H1 first and inputs the first deviation P1 of shadow color range value L1, calculate each pixel color range
The second deviation P2 of component value Q and input shadow color range value L1;
If the second deviation P2 is less than or equal to 0, each pixel input levels adjustment component is equal to 0;
It is bottom by the ratio of the first deviation P1 and the second deviation P2 if the second deviation P2 is greater than 0
The power of midtone levels value M inverse adjusts component as each pixel input levels, and formula is as follows:
It, can be by it according to figure to be produced after adjusting component D by the input levels that above method calculates each pixel
Putting in order for each pixel is arranged as the matrix of m*n as in, obtains input levels adjustment image:
Step 504 carries out output levels adjustment to input levels adjustment image according to output algorithm, obtains described the
Three intermediate images.
Output levels parameter includes output highlight levels value and output shadow color range value under each channel.For output levels
The adjustment of parameter can determine the output levels adjustment component of each pixel in output levels adjustment image by following formula:
D1=D* (H 2-L2)/255+L2 (8)
Wherein, D1 is that output levels adjust component, and D is that input levels adjusts component, and H2 is output highlight levels value, and L2 is
Export shadow color range value.
The output levels component D1 of each pixel is arranged as m*n according to putting in order for each pixel in image to be produced
Matrix, obtain third intermediate image:
In one embodiment that this specification provides, the adjustable image of input levels parameter is COLOR COMPOSITION THROUGH DISTRIBUTION, output
The overall color range of the adjustable image of color range parameter, input levels can control the level gap of image light and shade, and export
Color range can reduce the gap between image hierarchy, also can be reduced the contrast of image, pass through the tune to input and output color range parameter
It is whole, finally realize the color range processing to image.
Step 210 merges second intermediate image with the third intermediate image, generates target ink image.
In one embodiment that this specification provides, the second intermediate image and third intermediate image are merged, it is practical
On be by pixel corresponding in two image arrays carry out convolution algorithm, arrangement form new image array, as target water
Black image.
In one embodiment that this specification provides, by being carried out to each frame animation in existing common style animation
The processing such as edge extracting, fuzzy, color range adjustment generates each frame target ink image adjusted according to timing splicing is played
Wash cartoon realizes common style animation being converted to wash cartoon in real time, and can will be in the first intermediate image, second
Between image, third intermediate image and target ink image sequentially display according to generate sequential export, brought to player
Better game experiencing.
One embodiment of this specification also provides a kind of producing device of ink image, as shown in fig. 6, including obtaining module
602, first processing module 604, Second processing module 606, third processing module 608, fourth processing module 610.
Module 602 is obtained, is configured as obtaining image to be produced.
In this specification one or more embodiment, the acquisition module 602, being additionally configured to screenshot instruction includes wait make
Make play position of the image in animated image, is instructed according to the screenshot and obtain frame image to be produced;It is exported when receiving
When instruction, the image to be produced is exported.
First processing module 604 is configured as carrying out edge extracting to the image to be produced, after forming edge extracting
First intermediate image.
In one embodiment that this specification provides, the first processing module 604 is additionally configured to described to be produced
Image is filtered, and the gradient value of each pixel in filtered image is calculated by the first Sobel operator;According to described
Gradient value generates the first intermediate image after edge extracting.
The first processing module 604 is configured to obtain the picture of each pixel (x, y) in filtered image
Element value does convolution algorithm by the pixel value of the first Sobel operator and each pixel and obtains the horizontal direction of current pixel point
Directional derivative GxWith vertical direction derivative Gy, according to GxAnd GyThe gradient value for determining current pixel point (x, y), according to the gradient
Value generates the first intermediate image after edge extracting.
In one embodiment that this specification provides, the edge extracting of image is realized using Sobel operator, is substantially to use
Convolution kernel and image do convolution to calculate the gradient value of each point in image, determine boundary point according to the size of gradient value, thus real
Existing edge extracting.
Second processing module 606 is configured as carrying out Fuzzy Processing to first intermediate image, obtains the second middle graph
Picture.
In one embodiment that this specification provides, told Second processing module 606 is additionally configured to in described first
Between image be filtered, each pixel in the first intermediate image after passing through the 2nd Sobel operator and the filtering processing
Pixel value carry out convolution algorithm obtain the second intermediate image.
The Second processing module 606 is configured to obtain each picture in the first intermediate image after being filtered
First pixel value of vegetarian refreshments (x, y) does convolution algorithm by the first pixel value of the 2nd Sobel operator and each pixel and obtains respectively
The offset O horizontally and vertically of pixelXAnd OY, according to OXAnd OYDetermine the second pixel of each pixel (x, y)
Value, obtains second intermediate image according to the second pixel value of each pixel.
Third processing module 608 is configured as carrying out color range adjustment to second intermediate image, obtains third middle graph
Picture.
In one embodiment that this specification provides, the third processing module 608 is additionally configured to according to input algorithm
Input levels adjustment is carried out to the image to be produced, input levels adjustment image is obtained, according to output algorithm to the input
Color range adjusts image and carries out output levels adjustment, obtains the third intermediate image.
Fourth processing module 610 is configured as merging second intermediate image with the third intermediate image, generates
Target ink image.
In one embodiment that this specification provides, the fourth processing module is additionally configured to two image arrays
In corresponding pixel carry out convolution algorithm, arrangement forms new image array, obtains target ink image.
In one embodiment that this specification provides, by being carried out to each frame animation in existing common style animation
The processing such as edge extracting, fuzzy, color range adjustment, to make production effect more preferable, can also carry out the parameters such as brightness, contrast
Each frame target ink image adjusted is generated wash cartoon according to timing splicing is played, realized common wind by adjustment
Lattice animation is converted to wash cartoon in real time, and can by the first intermediate image, the second intermediate image, third intermediate image and
Target ink image brings better game experiencing to player sequentially in display according to sequential export is generated.
One embodiment of the application also provides a kind of calculating equipment, including memory, processor and storage are on a memory simultaneously
The computer instruction that can be run on a processor, the processor realize the system of ink image as previously described when executing described instruction
The step of making method.One embodiment of the application also provides a kind of computer readable storage medium, is stored with computer instruction, should
The step of instruction realizes the production method of ink image as previously described when being executed by processor.
A kind of exemplary scheme of the above-mentioned computer readable storage medium for the present embodiment of specification.It needs to illustrate
It is that the technical solution of the production method of the technical solution of the storage medium and above-mentioned ink image belongs to same design, stores
The detail content that the technical solution of medium is not described in detail may refer to the technical solution of the production method of above-mentioned ink image
Description.
The computer instruction includes computer program code, the computer program code can for source code form,
Object identification code form, executable file or certain intermediate forms etc..The computer-readable medium may include: that can carry institute
State any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic disk, CD, the computer storage of computer program code
Device, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory),
Electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that the computer-readable medium include it is interior
Increase and decrease appropriate can be carried out according to the requirement made laws in jurisdiction with patent practice by holding, such as in certain jurisdictions of courts
Area does not include electric carrier signal and telecommunication signal according to legislation and patent practice, computer-readable medium.
It should be noted that for the various method embodiments described above, describing for simplicity, therefore, it is stated as a series of
Combination of actions, but those skilled in the art should understand that, this specification is not limited by the described action sequence, because
For according to this specification, certain steps can use other sequences or carry out simultaneously.Secondly, those skilled in the art also should
Know, the embodiments described in the specification are all preferred embodiments, and related actions and modules might not all be this
Necessary to specification.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment
Point, it may refer to the associated description of other embodiments.
This specification preferred embodiment disclosed above is only intended to help to illustrate this specification.Alternative embodiment is not
All details of detailed descriptionthe, do not limit the invention to the specific embodiments described.Obviously, according in this specification
Hold, can make many modifications and variations.These embodiments are chosen and specifically described to this specification, is in order to preferably explain this Shen
Principle and practical application please, so that skilled artisan be enable to better understand and utilize the application.This explanation
Book is limited only by the claims and their full scope and equivalents.
Claims (18)
1. a kind of production method of ink image characterized by comprising
Obtain image to be produced;
Edge extracting is carried out to the image to be produced, the first intermediate image after forming edge extracting;
Fuzzy Processing is carried out to first intermediate image, obtains the second intermediate image;
Color range adjustment is carried out to the image to be produced, obtains third intermediate image;
Second intermediate image is merged with the third intermediate image, generates target ink image.
2. the method as described in claim 1, which is characterized in that described to obtain image to be produced and include:
Screenshot instruction is received, the screenshot instruction includes play position of the image to be produced in animated image;
It is instructed according to the screenshot and obtains frame image to be produced;
When receiving output order, the image to be produced is exported.
3. the method as described in claim 1, which is characterized in that described to include: to the image progress edge extracting to be produced
The image to be produced is filtered;
The gradient value of each pixel in filtered image is calculated by the first Sobel operator;
The first intermediate image after generating edge extracting according to the gradient value.
4. method as claimed in claim 3, which is characterized in that the first Sobel operator that passes through calculates filtered image
In the gradient value of each pixel include:
Obtain the pixel value of each pixel (x, y) in filtered image;
The side that convolution algorithm obtains the horizontal direction of current pixel point is done by the pixel value of the first Sobel operator and each pixel
To derivative GxWith vertical direction derivative Gy;
According to GxAnd GyDetermine the gradient value of current pixel point (x, y).
5. method as claimed in claim 3, which is characterized in that first generated according to the gradient value after edge extracting
Intermediate image includes:
Predetermined gradient threshold value;
The point that gradient value is greater than Grads threshold is set as to the boundary point of first intermediate image, the boundary point is once connected
Obtain first intermediate image.
6. the method according to claim 1, wherein described carry out Fuzzy Processing packet to first intermediate image
It includes:
First intermediate image is filtered;
Convolution is carried out by the pixel value of each pixel in the first intermediate image after the 2nd Sobel operator and the filtering processing
Operation obtains the second intermediate image.
7. according to the method described in claim 6, it is characterized in that, described pass through the 2nd Sobel operator and the filtering processing
The pixel value of each pixel carries out convolution algorithm and obtains the second intermediate image and include: in the first intermediate image afterwards
First pixel value of each pixel in the first intermediate image after obtaining filtering processing;
Convolution algorithm, which is done, by the first pixel value of the 2nd Sobel operator and each pixel obtains the horizontal direction of current pixel point
Deviate OXWith the offset O of vertical directionY;
According to OXAnd OYDetermine the second pixel value of each pixel of the first intermediate image;
Second intermediate image is obtained according to the second pixel value of each pixel.
8. the method according to claim 1, wherein described carry out color range adjustment package to the image to be produced
It includes:
Input levels adjustment is carried out to the image to be produced according to input algorithm, obtains input levels adjustment image;
Output levels adjustment is carried out to input levels adjustment image according to output algorithm, obtains the third intermediate image.
9. according to the method described in claim 8, it is characterized in that, described carry out the image to be produced according to input algorithm
Input levels adjusts
It calculates input highlight levels value and inputs the first deviation of shadow color range value, calculate each pixel color order component value and input is dark
Second deviation of rank value of mixing colours;
If second deviation is less than or equal to 0, each pixel input levels adjustment component is equal to 0;
It is the midtone levels at bottom by the ratio of first deviation and second deviation if second deviation is greater than 0
It is worth power reciprocal as each pixel input levels and adjusts component;
Input levels adjustment is carried out to the image to be produced according to each pixel input levels adjustment component.
10. according to the method described in claim 8, it is characterized in that, described adjust the input levels according to output algorithm
Image carries out output levels adjustment, and obtaining the third intermediate image includes:
It calculates output highlight levels value and exports the deviation of shadow color range value;
Obtain the input levels adjustment component, output shadow color range value;
Component, output shadow color range value are adjusted according to the input levels and are exported highlight levels value and exported shadow color range value
Deviation determines the color range component of each pixel in the third intermediate image, to obtain the third intermediate image.
11. the method according to claim 1, wherein described will be in second intermediate image and the third
Between image merge after, further includes:
Color saturation, contrast and brightness adjustment are carried out to the image after the merging, obtain target ink image.
12. method according to claim 2, which is characterized in that further include: by treated, each frame target ink image is pressed
Wash cartoon is generated according to timing splicing is played.
13. the method as described in claim 1, which is characterized in that further include: by the first intermediate image, the second intermediate image,
Three intermediate images and target ink image are sequentially in display according to generation sequential export.
14. a kind of producing device of ink image characterized by comprising
Module is obtained, is configured as obtaining image to be produced;
First processing module is configured as carrying out edge extracting to the image to be produced, in first after forming edge extracting
Between image;
Second processing module is configured as carrying out Fuzzy Processing to first intermediate image, obtains the second intermediate image;
Third processing module is configured as carrying out color range adjustment to the image to be produced, obtains third intermediate image;
Fourth processing module is configured as merging second intermediate image with the third intermediate image, generates target water
Black image.
15. device as claimed in claim 14, which is characterized in that the acquisition module, being additionally configured to screenshot instruction includes
Play position of the image to be produced in animated image instructs according to the screenshot and obtains frame image to be produced, when receiving
When output order, the image to be produced is exported;
The first processing module is additionally configured to be filtered the image to be produced, passes through the first Sobel operator
The gradient value for calculating each pixel in filtered image, the first middle graph after edge extracting is generated according to the gradient value
Picture;
The Second processing module is additionally configured to be filtered first intermediate image, is calculated by the 2nd Sobel
The pixel value of each pixel carries out convolution algorithm and obtains the second middle graph in sub the first intermediate image with after the filtering processing
Picture;
The third processing module is additionally configured to carry out input levels adjustment to the image to be produced according to input algorithm,
Obtain input levels adjustment image;Output levels adjustment is carried out to input levels adjustment image according to output algorithm, is obtained
The third intermediate image.
16. device as claimed in claim 14, which is characterized in that the first processing module is configured to obtain
The pixel value of each pixel (x, y) in filtered image does convolution by the pixel value of the first Sobel operator and each pixel
Operation obtains the directional derivative G of the horizontal direction of current pixel pointxWith vertical direction derivative Gy, according to GxAnd GyDetermine current picture
The gradient value of vegetarian refreshments (x, y);
The second processing device, the of each pixel in the first intermediate image after being configured to obtain filtering processing
One pixel value does convolution algorithm by the first pixel value of the 2nd Sobel operator and each pixel and obtains the water of current pixel point
Square to offset OXWith the offset O of vertical directionY, according to OXAnd OYDetermine the second picture of each pixel of the first intermediate image
Element value, obtains second intermediate image according to the second pixel value of each pixel.
17. a kind of calculating equipment including memory, processor and stores the calculating that can be run on a memory and on a processor
Machine instruction, which is characterized in that the processor realizes any one of claim 1-13 the method when executing described instruction
The step of.
18. a kind of computer readable storage medium, is stored with computer instruction, which is characterized in that the instruction is held by processor
The step of any one of claim 1-13 the method is realized when row.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910107965.3A CN109816755A (en) | 2019-02-02 | 2019-02-02 | A kind of production method of ink image, calculates equipment and storage medium at device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910107965.3A CN109816755A (en) | 2019-02-02 | 2019-02-02 | A kind of production method of ink image, calculates equipment and storage medium at device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN109816755A true CN109816755A (en) | 2019-05-28 |
Family
ID=66605153
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201910107965.3A Pending CN109816755A (en) | 2019-02-02 | 2019-02-02 | A kind of production method of ink image, calculates equipment and storage medium at device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN109816755A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112967194A (en) * | 2021-03-04 | 2021-06-15 | Oppo广东移动通信有限公司 | Target image generation method and device, computer readable medium and electronic equipment |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1365570A (en) * | 2000-03-28 | 2002-08-21 | 伊斯曼柯达公司 | Film scanner |
| CN101038675A (en) * | 2006-03-16 | 2007-09-19 | 腾讯科技(深圳)有限公司 | Method and apparatus for implementing wash painting style |
| CN101588438A (en) * | 2009-06-10 | 2009-11-25 | 拓维信息系统股份有限公司 | Mobile phone animation creation method for converting digitalized coloured picture into pictures of different styles |
| CN103116898A (en) * | 2013-01-30 | 2013-05-22 | 深圳深讯和科技有限公司 | Method and device for generating images in ink and wash painting style |
| CN108596828A (en) * | 2018-04-18 | 2018-09-28 | 网易(杭州)网络有限公司 | Image floodlight processing method and device, electronic equipment, storage medium |
-
2019
- 2019-02-02 CN CN201910107965.3A patent/CN109816755A/en active Pending
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1365570A (en) * | 2000-03-28 | 2002-08-21 | 伊斯曼柯达公司 | Film scanner |
| US20050146759A1 (en) * | 2000-03-28 | 2005-07-07 | Truc James A. | Film scanner |
| CN101038675A (en) * | 2006-03-16 | 2007-09-19 | 腾讯科技(深圳)有限公司 | Method and apparatus for implementing wash painting style |
| CN101588438A (en) * | 2009-06-10 | 2009-11-25 | 拓维信息系统股份有限公司 | Mobile phone animation creation method for converting digitalized coloured picture into pictures of different styles |
| CN103116898A (en) * | 2013-01-30 | 2013-05-22 | 深圳深讯和科技有限公司 | Method and device for generating images in ink and wash painting style |
| CN108596828A (en) * | 2018-04-18 | 2018-09-28 | 网易(杭州)网络有限公司 | Image floodlight processing method and device, electronic equipment, storage medium |
Non-Patent Citations (2)
| Title |
|---|
| 付庆军: "利用Photoshop实现摄影作品的仿水墨画效果", 《照相机》 * |
| 翁蕾蕾等: "水墨动画与现代电脑技术的融合", 《电视字幕(特技与动画)》 * |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112967194A (en) * | 2021-03-04 | 2021-06-15 | Oppo广东移动通信有限公司 | Target image generation method and device, computer readable medium and electronic equipment |
| CN112967194B (en) * | 2021-03-04 | 2024-05-14 | Oppo广东移动通信有限公司 | Target image generation method and device, computer readable medium and electronic device |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Ren et al. | Low-light image enhancement via a deep hybrid network | |
| CN110097609B (en) | Sample domain-based refined embroidery texture migration method | |
| US10198801B2 (en) | Image enhancement using self-examples and external examples | |
| CN109544662B (en) | Method and system for coloring cartoon style draft based on SRUnet | |
| CN109741279A (en) | Image saturation adjustment method, device, storage medium and terminal | |
| CN106530309B (en) | A kind of video matting method and system based on mobile platform | |
| US20220172322A1 (en) | High resolution real-time artistic style transfer pipeline | |
| CN112907700A (en) | Color filling method and device | |
| CN113409465A (en) | Method and device for generating hair model, storage medium and electronic equipment | |
| CN103050090A (en) | Method and device for adjusting display brightness of mobile terminal application | |
| CN103745430A (en) | Rapid beautifying method of digital image | |
| Wang et al. | Color contrast-preserving decolorization | |
| Zhao et al. | Regional traditional painting generation based on controllable disentanglement model | |
| CN109816755A (en) | A kind of production method of ink image, calculates equipment and storage medium at device | |
| CN110363733B (en) | Mixed image generation method and device | |
| CN115908596B (en) | Image processing method and electronic equipment | |
| An et al. | DIRBW-Net: An Improved Inverted Residual Network Model for Underwater Image Enhancement | |
| Zhang et al. | Pre‐trained low‐light image enhancement transformer | |
| CN110874816B (en) | Image processing method, device, mobile terminal and storage medium | |
| CN118822835B (en) | Style transfer method, medium, computer device and program product | |
| CN120451028B (en) | Image contrast determination method, device, equipment and storage medium | |
| Hou et al. | 5‐1: Adaptive Luminance Display Technology based on Neural Network | |
| CN119893169B (en) | Image conversion method, image conversion device, electronic equipment and computer readable storage medium | |
| CN114663454B (en) | Data processing method and device | |
| Yi et al. | An adaptive-stylization-based dynamic residual-multi-stage and multi-pooling approach to arbitrary image style transfer |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190528 |