CN102521867A - Mobile phone anime character and background creation method - Google Patents

Mobile phone anime character and background creation method Download PDF

Info

Publication number
CN102521867A
CN102521867A CN2011104245540A CN201110424554A CN102521867A CN 102521867 A CN102521867 A CN 102521867A CN 2011104245540 A CN2011104245540 A CN 2011104245540A CN 201110424554 A CN201110424554 A CN 201110424554A CN 102521867 A CN102521867 A CN 102521867A
Authority
CN
China
Prior art keywords
image
pixeldes
pixel
pearl
mobile phone
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.)
Granted
Application number
CN2011104245540A
Other languages
Chinese (zh)
Other versions
CN102521867B (en
Inventor
向黎生
周业波
杨秋伟
封模春
沈林超
龙伯康
柏丙军
彭革刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Talkweb Information System Co Ltd
Original Assignee
Talkweb Information System Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Talkweb Information System Co Ltd filed Critical Talkweb Information System Co Ltd
Priority to CN201110424554.0A priority Critical patent/CN102521867B/en
Publication of CN102521867A publication Critical patent/CN102521867A/en
Application granted granted Critical
Publication of CN102521867B publication Critical patent/CN102521867B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)

Abstract

The invention discloses a mobile phone anime character and background creation method, using any one of the following five methods to process an original image or using any one of the previous four methods and the method 5 to process the original image in a mixed mode. The methods are as follows: method 1: off-diagonal element blanking method; method 2: random fuzzification method; method 3: bead curtain effect simulation method; method 4: image color shifting method; and method 5: monochromatization and passivation method. The method provided by the invention is novel in conception, not only has strong enjoyment and is simple to realize, but also has small data volume, is easy to implement and suitable for running on a mobile phone.

Description

A kind of cartoon character on mobile phone and background creative method
Technical field
The present invention relates to a kind of cartoon character on mobile phone and background creative method.
Background technology
As a branch of animation industry, China's mobile phone cartoon product has also obtained significant progress, mainly comprises animation multimedia message, four lattice mobile phone cartoons, flash and turn-based mobile phone games etc. at present.They have the dual nature of cultural product and information products concurrently: need follow the principle of generality of socialist culture product undoubtedly as cultural product, but unsuitable blunt preach, and will teach through lively activities; Then hope to introduce advanced computer technology as much as possible as information products, in the hope of when improving the quality of products, improving its production efficiency.
Dim on the art is a kind of aesthstic boundary.Than clear, clearly demarcated very color digital works, it similarly is a kind of art form special aesthetic feeling, that understand by thinking and but be difficult to express by words that has.If the RGB digital photograph is analogized to Chinese realistic painting birds and flowers in the traditional Chinese Painting, is noble woman with heavy makeup; So various dim works similarly are the landscape painting done with splashes of ink in the traditional Chinese Painting; Be the young woman in village who does not execute the woman, really be: " overflowing fine side is good for water light, and the empty Mongolian rain of the scene of mountains is also strange ".Than beautiful in colour, distinct colored digital photo, indistinct, the empty Mongolian of the scene of mountains that the present invention pursued are with leaving the infinite imagination space of spectators for.
Find at present to have this type of similar to have the report of the animation works of chromatography or black and white hazy picture works effect as yet with the present invention.
Summary of the invention
Technical matters to be solved by this invention provides a kind of cartoon character on mobile phone and background creative method, and cartoon character on mobile phone of the present invention and background creative method data processing amount are little, easy to implement, are suitable on mobile phone, moving.
The technical solution of invention is following:
A kind of cartoon character on mobile phone and background creative method, adopt any method in following five kinds of methods original image to be handled or adopted any method in the method and 5 pairs of source images hybrid processing of method in preceding 4:
Method 1: off diagonal element blanking method:
Method 2: Fuzzy and Random method;
Method 3: pearl-decorated curtain effect simulation method;
Method 4: figure image drift color method;
Method 5: monochromatization and passivating method.
The step of described off diagonal element blanking method is:
With the original image gridding, the pixel at the diagonal line place of each grid keeps color, and the pixel zero clearing of other positions is a white, promptly replaces with white pixel;
The corresponding mesh-density gridSize of gridding is less than 5 pixels; Described mesh-density is the length of side of square net.
Fuzzy and Random method step in the method 2 is:
Step (1). with reservation deposit output image be target image the data space zero clearing for white;
Step (2). begin from the upper left corner of original image, parameter i is a linage-counter, and parameter j is a column counter, parameter i and parameter j all with gridSize as incremental steps, parameter k is an auxiliary counter, k is incremented to gridSize from 0, reaches zero clearing again behind the gridSize; (3) set by step~(4) travel through full figure, promptly accomplish the process of Fuzzy and Randomization;
Step (3). at each is in the grid of the length of side with gridSize, confirms that by following method source, whole two types of pixels are pixelSou and pixelDes position:
pixelSou=souBase+(i+k+yrand)*lineByte+(j+k+xrand)*pixelByte;
pixelDes=desBase+(i+k)*lineByte+(j+k)*pixelByte;
Wherein souBase and desBasewe are respectively the base address of source, whole two types of pixels; LineByte is the every capable byte number of image; PixelByte is the every pixel words joint number of image; I and j are the ordinal number of corresponding line and row, and yrand and xrand are random numbers, and random number is random valued between 0-gridsize;
Step (4). the taking-up source pixel is filled enamel, green, red data are given corresponding output pixel point
*(pixelDes)=*(pixelSou);
*(pixelDes+1)=*(pixelSou+1);
*(pixelDes+2)=*(pixelSou+2)。
Pearl-decorated curtain effect simulation method is:
Step 1: make the pearl-decorated curtain template: set the pearl-decorated curtain parameter and make the pelletron template, described pearl-decorated curtain parameter comprises pelletron row distance, pearl body line-spacing, pearl body diameter, pearl body connecting line diameter [in instance, the line diameter is 2]
Step 2: described pearl-decorated curtain template is superimposed upon on the image that method 1 or method 2 form and obtains the final new images with pearl-decorated curtain effect as covering plate.
The step of figure image drift color method is:
Step (1). choose 2 color typical applications, according to the position of 2 color typical applications, from image, find out their corresponding indigo plant, green, the red numerical value of pixel respectively, note is made b1, g1, r1, and b2, g2, r2 respectively;
Step (2). process points X, the initial coordinate of Y is made as the image upper left corner, i.e. X, Y all is made as 0;
Step (3). through following steps (4)~(9) by row, according to pixels be that process points advances line by line:
Step (4). obtain the indigo plant of current process points, green, red numerical value, note is made sb, sg, sr respectively;
Step (5). remember then that like abs (sb-b1)<areaExtanDegree and abs (sg-g1)<areaExtanDegree and abs (sr-r1)<areaExtanDegree b1 is b, note g1 is g, and note r1 is r, changes step (7) and carries out the operation of figure image drift look; Wherein, areaExtanDegree is the area extension degree; Otherwise, like satisfied step (8) the reservation primary colors that then changes of criterion; [move the look operation and can bring the effect that there is something in the wind: because during there is something in the wind, typical application was to be taken in the sky (or massif), this judgement is a scope of measuring sky (or massif).Because in the RGB color standard, the RGB value is more little, color relation is dark more.For example RGB three looks all be 0 o'clock be exactly black.The essence of moving the look operation of step 7 is the values that reduce RGB, thereby the colour of sky of making (or color of massif) deepening reaches the effect that there is something in the wind]
Step (6). remember then that like abs (sb-b2)<areaExtanDegree and abs (sg-g2)<areaExtanDegree and abs (sr-r2)<areaExtanDegree b2 is b, note g2 is g, and note r2 is r, changes step (7) and carries out the operation of figure image drift look; Otherwise, like satisfied step (8) the reservation primary colors that then changes of criterion;
Step (7). by following formula the RGB standard transformation of color is become the YCrCb standard
Y=(257*r+504*g+98*b)/1000+16;
Cr=(439*r-368*g-71*b)/1000+128;
Cb=(-148*r-291*g+439*b)/1000+128;
According to fog concentration parameter correction Y value:
Y=Y*fog;
By following formula the contravariant of YCrCb standard is changed to the RGB standard:
fogB=(1.164*(Y-16)+2.017*(Cb-128));
fogG=(1.164*(Y-16)-0.813*(Cr-128)-0.392*(Cb-128));
fogR=(1.164*(Y-16)+1.596*(Cr-128));
Current pixel value is given dim yellow move look and output
*(pixelDes)=sb-(fogB*fog/10);
*(pixelDes+1)=sg-(fogG*fog/10);
*(pixelDes+2)=sr-(fogR*fog/10);
Change step (9);
Step (8). the view data of process points is kept former data output:
*(pixelDes)=sb;
*(pixelDes+1)=sg;
*(pixelDes+2)=sr;
Step (9). process points Building X mark+1, as then not changeing step (4) to the image right margin; Otherwise change step (10);
Step (10). process points Building X mark is made as 0, and process points Building Y mark+1 does not then change step (4) to border, image bottom right like process points; Otherwise EOP (end of program).
Described monochromatization and passivating method are:
Earlier original image is carried out the monochromatization operation, promptly each pixel of image is carried out following gray processing operation:
Handle the gray-scale value I=0.3B+0.59G+0.11R of each picture point of back, wherein B, G, R are the original indigo plant of this pixel, green, red component value; Obtain the image after the monochromatization;
Again the image after the monochromatization is carried out passivation operation; Passivation operation as follows, for the filter window of a N*N, to each column element maximizing, intermediate value and the minimum value of this filter window; Obtain minimum M axMin, the intermediate value MedMed in all intermediate values and the maximal value MinMax in all minimum value in all maximal values again, the intermediate value that finally obtains is MED=med [MaxMin, MedMed, MinMax].
Because still nobody expect can be on mobile phone the photo with I (or friend) be material, carry out DIY and operate and create cartoon character on mobile phone or animation background; Consider that particularly mobile phone is the computing power of weak (desktop computer that only is equivalent to the initial stage in this century) far with respect to desk-top computer, also often makes the people step back.
For to this special Platform Implementation DIY image manipulation of mobile phone, a series of measures below having adopted in the design, particularly reduce the memory requirements of application program:
A. application program is good more simply more.We become Midlet with each establishment of component as far as possible, and used a plurality of Midlet are encapsulated in the Midlet bag, and this makes the Program Manager of mobile phone can manage Midlet and the employed resource of Midlet more frugally.
B. application program is more little good more.The assembly of temporarily not using in the deletion application program reduces unnecessary information as far as possible, to reduce the volume of whole procedure.When on wireless network, downloading application program, the smaller applications program will shorten download time greatly, and can move with other application programs on the equipment are compatible (rather than exclusive).
C. reduce the total memory requirements of application program as far as possible.Major measure has: 1. use object type less, use scalar type (scalar type) instead.Because scalar type takies internal memory still less than object type; 2. lack statement object as far as possible.Because when statement during an object, system will be on the operation heap allocation space, so should when application program is about to use this object, reallocate it, rather than all distribute during program start.And, in case program no longer needs this object, will be null just to the equal assignment of quoting of this object.3. need use data type by precision.Whenever and wherever possible just should use boolean, byte, data types such as short replace int.This details is very little to the influence of desktop computer program, but will be with producing the influence that takes care of the pence to mobile phone.4. reuse as far as possible.Let a plurality of quoting use same object at the different time of program in life cycle.For example reuse some large-scale array, reuse the runtime storage that has distributed capable of using, use the 'inertia' instantiation.Though this does not meet the soft project principle, be fit to the very reality of weak computing equipment of this ability of mobile phone.5. avoid in circulation, creating object.6. running check storer operating position.Relevant method has: freeMemory and totalMemory.OutMemoryError mistake by oneself.Should guarantee application program when internal memory overflows, have a predetermined routine that withdraws from that this is managed, and do not leave operating system for.7. in time discharge resource.To file, network connection or the like resource, in the time no longer need using, don't not account for and putting.Should oneself carry out necessary clear operation, and not rely on garbage collector or host environment.8. the local variables that use more.In desktop computer was used, the developer was accustomed to setting more class data member, and less use local variable.But " global variable " in type data member type of being actually is to need frequent data dispatch, stack manipulation supports, is actually consumption CPU and calculates and support.Through the local variable assignment, eliminate the additional step of the data member of access classes, can reduce the CPU treatment capacity of application program.Though lost the benefit that data encapsulation is brought like this in class,, for the application program of on this microminiature computing equipment of mobile phone, moving, need mass data, its processing speed need at first be considered.
Beneficial effect:
Cartoon character on mobile phone of the present invention and background creative method; Adopt image processing algorithm; With the digital photograph is material; Be transformed into different chromatographys or black and white hazy picture works, on animation server or cellphone subscriber individual's mobile phone, carry out the DIY operation, create special cartoon character of effect or animation background.
The present invention uses simple and practical Digital Image Processing algorithm; Note reducing data volume and improve the CPU operational efficiency; Make that be limited by can be with creation cost and operational effect fast on the mobile phone cartoon works of mobile phone screen size and mobile phone computing power; For all ages and classes, different levels, be in the cellphone subscriber of different time sections, electronics information serious and comical at the same time, different-style is provided, bring more colourful look and joy for cellphone subscriber's life.Will point out especially: one of the object of the invention is to be weaker than far away at this software and hardware resources of mobile phone to realize the DIY image manipulation on the platform of computing machine, is necessary fully so in design, take above-mentioned a series of specific aim measure.
Description of drawings
Fig. 1 is the synoptic diagram of off diagonal element blanking method; (the step-length step among Fig. 1 is gridSize))
Former figure of Fig. 2 digital photograph and the design sketch that adopts 5 kinds of methods to obtain ((a)~(d) are former figure, (e) wherein; (f) design sketch (also can be called " fine gauze overflows graceful " design sketch visually) for adopting the off diagonal element blanking method; (g), (h) for adopting the design sketch (also can be called dim at random design sketch visually) of Fuzzy and Random method, (i); (j) (also can be called " pearl-decorated curtain flickers " design sketch, (k) visually for the design sketch that adopts pearl-decorated curtain effect simulation method to handle; (l) for adopting the design sketch of figure image drift color method, (also can be called " there is something in the wind " design sketch visually, (m); (n) for adopting the design sketch of monochromatization and passivating method, (also can be called " scribbling sketch is enjoyable " design sketch visually).
Embodiment
Below will combine accompanying drawing and specific embodiment that the present invention is explained further details:
The present invention provides " fine gauze overflows graceful ", " dim at random ", " pearl-decorated curtain flickers ", " there is something in the wind " and five kinds of artistic creation gimmicks such as " scribbling sketch are enjoyable ".Wherein " fine gauze overflows graceful " creation technique is realized with " off diagonal element blanking " algorithm of original creation; The then stack random pixel output on the basis of blanking of " dim at random " creation technique; " pearl-decorated curtain flickers " creation technique is stack pearl-decorated curtain effect simulation on the basis of blanking then; And the basis of " scribbling sketch is enjoyable " is monochromatization and passivation." but there is something in the wind " creation technique then not blanking, and used the figure image drift look algorithm of original creation, and with following definitions 2 statements.
Definition 1. as divide certain image branch into some grids, and then, by certain rule some pixel in each grid is concealed, then be called picture blanking.Picture blanking can reach fine gauze mist, indistinct effect.Especially, when the pictorial element that only keeps on the diagonal line, then be called degree of depth blanking or off diagonal element blanking
(referring to Fig. 1); Otherwise,, then be called shallow degree blanking or diagonal entry blanking as keeping the pictorial element on the off-diagonal.
Can realize indistinct visual effect through picture blanking technology (particularly degree of depth blanking).For example, when the grid length and width are gridSize, then only keep gridSize pixel on the diagonal line as adopting degree of depth blanking; As adopt shallow degree blanking then will keep the individual pixel of gridSize* (gridSize-1) on the off-diagonal;
Definition 2. as with the color correct of certain pixel for its original value deducts it and a non-product of bearing (or just non-) coefficient, then be called this pixel enforcement figure image drift look.Especially, when selecting non-negative coefficient for use, be called dim yellow and move look; When selecting non-positive coefficient for use, then be called paleization and move look.Particularly:
A. the original brightness Y of pixel is provided by following formula:
Y=0.257*r in+0.504*g in+0.98*b in (1)
R wherein In, g In, b InBe the original color value of this pixel.
B. move colour system count M be an actual effect, with non-negative (or the just non-) coefficient of the phase step type of brightness Y negative correlation.
C. move look output r Out, g Out, b OutProvide by following formula;
r out=abs(r in-(M 1*r in)) (2)
g out=abs(g in-(M 2*g in)) (3)
b out=abs(b in-(M 3*b in)) (4)
The abs function is the operation that takes absolute value in the formula.
Embodiment 1:
Want the cartoon character on mobile phone and the background creative method of embodiment of the present invention, it is following at first will to set a parameter:
1. yarn curtain density is mesh-density (gridSize): yarn curtain density answers<5.
2. fog concentration (fog): fog concentration should be between 1.0~2.0.
3 color typical applications (colorSamples): the user selects 2 color typical applications through on-the-spot What You See Is What You Get ground, and the dim visual effect of fog appears in the atomizing zone that program has just atomized and confirmed by the area extension degree.And the color of making pearl-decorated curtain according to the color of 2 color typical applications is so the color of pearl-decorated curtain is flexible and changeable.
4. area extension degree (areaExtanDegree): selected numerical value is big more, via the dim typical application expansion of color to move the look zone big more.Optional scope is 1~100.
Different background and personage's hazy picture works are referring to Fig. 2.
Method 1: " off diagonal element blanking " method, promptly first data space zero clearing of reservation being deposited output image then, conceals the pictorial element on the off-diagonal for white, also promptly, only the pictorial element on the diagonal line is stayed.Particularly, make linage-counter and column counter that [front has been set when the setup parameter: yarn curtain density (gridSize): yarn curtain density should<5 with gridSize.] travel through full figure for step-length " jump ", and jump when further when linage-counter or column counter, because begun another grid, auxiliary counter then changes to gridSize by 0, thereby only the image copy on the source images diagonal line is gone to target image.Through this minority that stays, the algorithm that conceals big portion reaches fine gauze mist, indistinct effect.Fig. 1 is the diagram of " off diagonal element blanking " algorithm.
Step (1). the data space zero clearing of reservation being deposited output image is white;
Step (2). begin from the upper left corner of image, parameter i is a linage-counter, and parameter j is a column counter, and gridSize is as step-length, and parameter k is an auxiliary counter, (3) set by step~(4) traversal full figure;
Step (3). confirm the position (pixelSou and pixelDes) of source (source), two types of pixels of target (destination):
pixelSou=souBase+(i+k)*lineByte+(j+k)*pixelByte;
pixelDes=desBase+(i+k)*lineByte+(j+k)*pixelByte;
Wherein souBase and desBasewe are the base address of source, whole two types of pixels, and lineByte is the every capable byte number of image, and pixelByte is the every pixel words joint number of image, and i and j are corresponding line and row, and the k variation range is 0~gridSize;
The data space zero clearing of reservation being deposited output image is white; If so there are not data to output to this pixel, it is exactly white, therefore just produced the effect of blanking.
Can understand like this, with view picture figure gridding, with the pixel reservation at grid diagonal line place, the pixel of other points all is made as white.
Method 2: realize Fuzzy and Random.The basis of Fuzzy and Random method also is " off diagonal element blanking " algorithm.Be characterized in that linage-counter and column counter are that step-length travels through full figure with gridSize still " jump ", but in influencing the auxiliary counter of source address, add random number.Wherein,
(1) linage-counter and the column counter that constitute the source pointer are progressively made a leapleap forward; Auxiliary counter has 2 variablees; One is k (changing to gridSize by 0), another be random number yrand or xrand [scope of random number between 0-gridsize at random] thus copying the source images of assigned address to target image gets on;
(2) linage-counter and the column counter that constitute object pointer are progressively made a leapleap forward, and auxiliary counter has only 1 variable k (changing to gridSize by 0).
Step (1). the data space zero clearing of reservation being deposited output image is white;
Step (2). begin from the upper left corner of image, parameter i is a linage-counter, and parameter j is a column counter, and parameter k is an auxiliary counter, and gridSize is as step-length, and (3) set by step~(4) travel through full figure;
Step (3). confirm source (source), whole (destination) two types of pixels (pixelSou and pixelDes) position:
pixelSou=souBase+(i+k+yrand)*lineByte+(j+k+xrand)*pixelByte;
pixelDes=desBase+(i+k)*lineByte+(j+k)*pixelByte;
Wherein souBase and desBasewe are the base address of source, whole two types of pixels; LineByte is the every capable byte number of image, and pixelByte is the every pixel words joint number of image, and i and j are corresponding line and row; The k variation range is 0~gridSize, and yrand and xrand are random numbers;
Step (4). the taking-up source pixel is filled enamel, green, red data are given corresponding output pixel point
*(pixelDes)=*(pixelSou);
*(pixelDes+1)=*(pixelSou+1);
*(pixelDes+2)=*(pixelSou+2)。
Method 3: realize the pearl-decorated curtain effect.The basis of pearl-decorated curtain effect simulation method also is " off diagonal element blanking " algorithm.Linage-counter and column counter are that step-length travels through full figure " jump " with gridSize.Wherein, linage-counter and column counter jump when further, and auxiliary counter then changes to gridSize by 0, thereby with the off diagonal element blanking in the source images.(referring to Fig. 1) and, because be the color of making pearl-decorated curtain according to the color of 2 color typical applications, so have very strong dirigibility.
Step (1). the data space zero clearing of reservation being deposited output image is white;
Step (2). begin from the upper left corner of image, parameter i is a linage-counter, and parameter j is a column counter, and parameter k is an auxiliary counter, and gridSize is as step-length, and (2) set by step~(4) travel through full figure;
Step (3). confirm source (source), two types of pixels of target (destination) (pixelSou and pixelDes) position:
pixelSou=souBase+(i+k)*lineByte+(j+k)*pixelByte;
pixelDes=desBase+(i+k)*lineByte+(j+k)*pixelByte;
Wherein souBase and desBasewe are the base address of source, whole two types of pixels, and lineByte is the every capable byte number of image, and pixelByte is the every pixel words joint number of image, and i and j are corresponding line and row, and the k variation range is 0~gridSize;
Step (4). the taking-up source pixel is filled enamel, green, red data are given corresponding output pixel point
*(pixelDes)=abs(*(pixelSou));
*(pixelDes+1)=abs(*(pixelSou+1));
*(pixelDes+2)=abs(*(pixelSou+2));
Step (5). according to the position of 2 color typical applications, from image, find out their pixel data color1 respectively, color2;
Step (6). with color1 or two kinds of colors of color2 with suitable line-spacing, row apart from [for example the line-spacing dichromatism in Fig. 2 i and 2j alternately respectively is 20, and the row distance is 40.] call the MakeColorPearl template and form colored pearl.The parameter of this template is: row j, row i, the every capable byte number lineByte of image, the every pixel words joint number of image pixelByte, pearl diameter r, pearl color color (respectively with color1 or color2); [the MakeColorPearl template promptly forms colored pearl-decorated curtain template, is existing mature technology ,]
Method 4: figure image drift color method may further comprise the steps:
Step (1). according to the position of 2 color typical applications, from image, find out their pixel data (blue, green, red numerical value) respectively, note is made b1 respectively, g1, r1, and b2, g2, r2 is used in step (5) and the step (6).
Step (2). process points X, the initial coordinate of Y is made as the image upper left corner, i.e. X, Y all is made as 0;
Step (3). pursue row, advance line by line through following steps (4)~(9):
Step (4). obtain the indigo plant of a certain process points, green, red numerical value, note is made sb, sg, sr respectively;
Step (5). remember then that like abs (sb-b 1)<areaExtanDegree and abs (sg-g1)<areaExtanDegree and abs (sr-r1)<areaExtanDegree b1 is b, note g1 is g, and note r1 is r, changes step (7) and carries out the operation of figure image drift look.Otherwise, like satisfied step (8) the reservation primary colors that then changes of criterion;
Step (6). remember then that like abs (sb-b2)<areaExtanDegree and abs (sg-g2)<areaExtanDegree and abs (sr-r2)<areaExtanDegree b2 is b, note g2 is g, and note r2 is r, changes step (7) and carries out the operation of figure image drift look.Otherwise, like satisfied step (8) the reservation primary colors that then changes of criterion;
Step (7). by formula (1), (2), (3) become the YCrCb standard with the RGB standard transformation of color
Y=(257*r+504*g+98*b)/1000+16 (5)
Cr=(439*r-368*g-71*b)/1000+128 (6)
Cb=(-148*r-291*g+439*b)/1000+128(7)
According to fog concentration parameter correction Y value:
Y=Y*fog (8)
By formula (5), (6), (7) are changed to the RGB standard with the contravariant of YCrCb standard
fogB=(1.164*(Y-16)+2.017*(Cb-128)) (9)
fogG=(1.164*(Y-16)-0.813*(Cr-128)-0.392*(Cb-128)) (10)
fogR=(1.164*(Y-16)+1.596*(Cr-128)) (11)
Current pixel value is given dim yellow move look and output
*(pixelDes)=sb-(fogB*fog/10);
*(pixelDes+1)=sg-(fogG*fog/10);
*(pixelDes+2)=sr-(fogR*fog/10);
Change step (9);
Step (8). the view data of process points is exported with " remaining untouched ":
*(pixelDes)=sb;
*(pixelDes+1)=sg;
*(pixelDes+2)=s?r;
Step (9). process points Building X mark+1, as then not changeing step (4) to the image right margin; Otherwise change step (10);
Step (10). process points Building X mark is made as 0, and process points Building Y mark+1 does not then change step (4) to border, image bottom right like process points; Otherwise EOP (end of program);
Algorithm 5. monochromatizations and passivating method: call gray processing operation and image passivation operation in succession.The gray processing operation, the gray-scale value I=0.3B+0.59G+0.11R of each picture point after handling, wherein B, G, R are the original indigo plant of this pixel, green, red component value.
Passivating method is explained as follows:
Being defined as of standard one dimension medium filtering:
y k=med{x k-n,x k-n+1,...,x k,...,x k+n-1,x k+n}
In the formula, med representes to get median operation.This shows that medium filtering is (to be the x in the following formula with the gray scale of each pixel of moving window K-n, x K-n+1..., x k..., x K+n-1, x K+n) ordering from top to down, choose the representative of a value as this pixel.When moving window is big and when making moving window interior pixel a lot (being made as m), carry out sorting operation very consumes computational capacity (need do m (m-2)/2 time compare operation.Adopt quick sorting algorithm to realize passivation operation for this reason, reduced about 0.47 times of calculated amount.It is following to sketch its thinking: for ease of describing, claim that each row pixel is in 3 * 3 windows: the 0th row p .0, p 1, p 2, the 1st row p .3, p .4, p 5, the 2nd row p 6, p .7, p .8At first each row pixel in the window is calculated maximal value group, intermediate value group, minimum value group:
Maximal value group: Max 0=max [p 0, p .3, p 6], Max 1=max [p 1, p 4, p 7], Max 2=max [p 2, p 5, p 8]; Intermediate value group Med is similarly arranged 0, Med 1, Med 2And minimum value group Min 0, Min 1, Min 2Further obtain: MaxMin=min [Max 0, Max 1, Max 2], similarly obtain MedMed, MinMax; Further obtain: MED=med [MaxMin, MedMed, MinMax] is real intermediate value.

Claims (6)

1. cartoon character on mobile phone and background creative method is characterized in that, adopt any method in following five kinds of methods original image to be handled or adopted any method in the method and 5 pairs of source images hybrid processing of method in preceding 4:
Method 1: off diagonal element blanking method:
Method 2: Fuzzy and Random method;
Method 3: pearl-decorated curtain effect simulation method;
Method 4: figure image drift color method;
Method 5: monochromatization and passivating method.
2. cartoon character on mobile phone according to claim 1 and background creative method is characterized in that, the step of described off diagonal element blanking method is:
With the original image gridding, the pixel at the diagonal line place of each grid keeps color, and the pixel zero clearing of other positions is a white, promptly replaces with white pixel;
The corresponding mesh-density gridSize of gridding is less than 5 pixels; Described mesh-density is the length of side of square net.
3. cartoon character on mobile phone according to claim 2 and background creative method is characterized in that, the Fuzzy and Random method step in the method 2 is:
Step (1). with reservation deposit output image be target image the data space zero clearing for white;
Step (2). begin from the upper left corner of original image, parameter i is a linage-counter, and parameter j is a column counter, parameter i and parameter j all with gridSize as incremental steps, parameter k is an auxiliary counter, k is incremented to gridSize from 0, reaches zero clearing again behind the gridSize; (3) set by step~(4) travel through full figure, promptly accomplish the process of Fuzzy and Randomization;
Step (3). at each is in the grid of the length of side with gridSize, confirms that by following method source, whole two types of pixels are pixelSou and pixelDes position:
pixelSou=souBase+(i+k+yrand)*lineByte+(j+k+xrand)*pixelByte;
pixelDes=desBase+(i+k)*lineByte+(j+k)*pixelByte;
Wherein souBase and desBasewe are respectively the base address of source, whole two types of pixels; LineByte is the every capable byte number of image; PixelByte is the every pixel words joint number of image; I and j are the ordinal number of corresponding line and row, and yrand and xrand are random numbers, and random number is random valued between 0-gfidsize;
Step (4). the taking-up source pixel is filled enamel, green, red data are given corresponding output pixel point
*(pixelDes)=*(pixelSou);
*(pixelDes+1)=*(pixelSou+1);
*(pixelDes+2)=*(pixelSou+2)。
4. cartoon character on mobile phone according to claim 3 and background creative method is characterized in that, pearl-decorated curtain effect simulation method is:
Step 1: make the pearl-decorated curtain template: set the pearl-decorated curtain parameter and make the pelletron template, described pearl-decorated curtain parameter comprises pelletron row distance, pearl body line-spacing, pearl body diameter, pearl body connecting line diameter;
Step 2: described pearl-decorated curtain template is superimposed upon on the image that method 1 or method 2 form and obtains the final new images with pearl-decorated curtain effect as covering plate.
5. cartoon character on mobile phone according to claim 3 and background creative method is characterized in that, the step of figure image drift color method is:
Step (1). choose 2 color typical applications, according to the position of 2 color typical applications, from image, find out their corresponding indigo plant, green, the red numerical value of pixel respectively, note is made b1, g1, r1, and b2, g2, r2 respectively;
Step (2). process points X, the initial coordinate of Y is made as the image upper left corner, i.e. X, Y all is made as 0;
Step (3). through following steps (4)~(9) by row, according to pixels be that process points advances line by line:
Step (4). obtain the indigo plant of current process points, green, red numerical value, note is made sb, sg, sr respectively;
Step (5). remember then that like abs (sb-b1)<areaExtanDegree and abs (sg-g1)<areaExtanDegree and abs (sr-r1)<areaExtanDegree b1 is b, note g1 is g, and note r1 is r, changes step (7) and carries out the operation of figure image drift look; Wherein, areaExtanDegree is the area extension degree; Otherwise, like satisfied step (8) the reservation primary colors that then changes of criterion;
Step (6). remember then that like abs (sb-b2)<areaExtanDegree and abs (sg-g2)<areaExtanDegree and abs (sr-r2)<areaExtanDegree b2 is b, note g2 is g, and note r2 is r, changes step (7) and carries out the operation of figure image drift look; Otherwise, like satisfied step (8) the reservation primary colors that then changes of criterion;
Step (7). by following formula the RGB standard transformation of color is become the YCrCb standard
Y=(257*r+504*g+98*b)/1000+16;
Cr=(439*r-368*g-71*b)/1000+128;
Cb=(-148*r-291*g+439*b)/1000+128;
According to fog concentration parameter correction Y value:
Y=Y*fog;
By following formula the contravariant of YCrCb standard is changed to the RGB standard:
fogB=(1.164*(Y-16)+2.017*(Cb-128));
fogG=(1.164*(Y-16)-0.813*(Cr-128)-0.392*(Cb-128));
fogR=(1.164*(Y-16)+1.596*(Cr-128));
Current pixel value is given dim yellow move look and output
*(pixelDes)=sb-(fogB*fog/10);
*(pixelDes+1)=sg-(fogG*fog/10);
*(pixelDes+2)=sr-(fogR*fog/10);
Change step (9);
Step (8). the view data of process points is kept former data output:
*(pixelDes)=sb;
*(pixelDes+1)=sg;
*(pixelDes+2)=sr;
Step (9). process points Building X mark+1, as then not changeing step (4) to the image right margin; Otherwise change step (10);
Step (10). process points Building X mark is made as 0, and process points Building Y mark+1 does not then change step (4) to border, image bottom right like process points; Otherwise EOP (end of program).
6. according to each described cartoon character on mobile phone and background creative method of claim 1-5, it is characterized in that described monochromatization and passivating method are with dim U.S.A:
Earlier original image is carried out the monochromatization operation, promptly each pixel of image is carried out following gray processing operation: handle the gray-scale value I=0.3B+0.59G+0.11R of each picture point of back, wherein B, G, R are the original indigo plant of this pixel, green, red component value; Obtain the image after the monochromatization;
Again the image after the monochromatization is carried out passivation operation; Passivation operation as follows, for the filter window of a N*N, to each column element maximizing, intermediate value and the minimum value of this filter window; Obtain minimum M axMin, the intermediate value MedMed in all intermediate values and the maximal value MinMax in all minimum value in all maximal values again, the intermediate value that finally obtains is MED=med [MaxMin, MedMed, MinMax].
CN201110424554.0A 2011-12-16 2011-12-16 Mobile phone anime character and background creation method Active CN102521867B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110424554.0A CN102521867B (en) 2011-12-16 2011-12-16 Mobile phone anime character and background creation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110424554.0A CN102521867B (en) 2011-12-16 2011-12-16 Mobile phone anime character and background creation method

Publications (2)

Publication Number Publication Date
CN102521867A true CN102521867A (en) 2012-06-27
CN102521867B CN102521867B (en) 2014-09-17

Family

ID=46292769

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110424554.0A Active CN102521867B (en) 2011-12-16 2011-12-16 Mobile phone anime character and background creation method

Country Status (1)

Country Link
CN (1) CN102521867B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819857A (en) * 2012-07-26 2012-12-12 拓维信息系统股份有限公司 Method for creating cartoon character face in mobile phone based on whitening and skin tendering
CN103593834A (en) * 2013-12-03 2014-02-19 厦门美图网科技有限公司 Image enhancement method achieved by intelligently increasing field depth
WO2014127494A1 (en) * 2013-02-23 2014-08-28 Qualcomm Incorporated Systems and methods for interactive image caricaturing by an electronic device
CN108010108A (en) * 2017-12-02 2018-05-08 天津大行道动漫文化发展有限公司 A kind of cartoon figure's background moves inspection and processing method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1511306A (en) * 2001-05-21 2004-07-07 ���ιɷ����޹�˾ Image processing apparatus and game apparatus
CN1705371A (en) * 2004-06-02 2005-12-07 罗伯特·博世有限公司 On-screen display and privacy masking apparatus and method
US20080158224A1 (en) * 2006-12-28 2008-07-03 National Tsing Hua University Method for generating an animatable three-dimensional character with a skin surface and an internal skeleton
CN101536078A (en) * 2006-09-25 2009-09-16 奥多比公司 Improving image masks
CN102034256A (en) * 2010-11-15 2011-04-27 拓维信息系统股份有限公司 Mobile phone cartoon character creating method based on boundary tracking and pseudo-coloring

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1511306A (en) * 2001-05-21 2004-07-07 ���ιɷ����޹�˾ Image processing apparatus and game apparatus
CN1705371A (en) * 2004-06-02 2005-12-07 罗伯特·博世有限公司 On-screen display and privacy masking apparatus and method
CN101536078A (en) * 2006-09-25 2009-09-16 奥多比公司 Improving image masks
US20080158224A1 (en) * 2006-12-28 2008-07-03 National Tsing Hua University Method for generating an animatable three-dimensional character with a skin surface and an internal skeleton
CN102034256A (en) * 2010-11-15 2011-04-27 拓维信息系统股份有限公司 Mobile phone cartoon character creating method based on boundary tracking and pseudo-coloring

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819857A (en) * 2012-07-26 2012-12-12 拓维信息系统股份有限公司 Method for creating cartoon character face in mobile phone based on whitening and skin tendering
CN102819857B (en) * 2012-07-26 2014-09-24 拓维信息系统股份有限公司 Method for creating cartoon character face in mobile phone based on whitening and skin tendering
WO2014127494A1 (en) * 2013-02-23 2014-08-28 Qualcomm Incorporated Systems and methods for interactive image caricaturing by an electronic device
CN105074780A (en) * 2013-02-23 2015-11-18 高通股份有限公司 Systems and methods for interactive image caricaturing by an electronic device
US10379734B2 (en) 2013-02-23 2019-08-13 Qualcomm Incorporated Systems and methods for interactive image caricaturing by an electronic device
US10761721B2 (en) 2013-02-23 2020-09-01 Qualcomm Incorporated Systems and methods for interactive image caricaturing by an electronic device
US11526272B2 (en) 2013-02-23 2022-12-13 Qualcomm Incorporated Systems and methods for interactive image caricaturing by an electronic device
CN103593834A (en) * 2013-12-03 2014-02-19 厦门美图网科技有限公司 Image enhancement method achieved by intelligently increasing field depth
CN103593834B (en) * 2013-12-03 2017-06-13 厦门美图网科技有限公司 A kind of image enchancing method of the intelligence addition depth of field
CN108010108A (en) * 2017-12-02 2018-05-08 天津大行道动漫文化发展有限公司 A kind of cartoon figure's background moves inspection and processing method

Also Published As

Publication number Publication date
CN102521867B (en) 2014-09-17

Similar Documents

Publication Publication Date Title
CN102663766B (en) Non-photorealistic based art illustration effect drawing method
CN104392479B (en) Method of carrying out illumination coloring on pixel by using light index number
CN1057729A (en) Computergraphic animation system
CN111324334B (en) Design method for developing virtual reality experience system based on narrative oil painting works
CN110333924A (en) A kind of image morphing method of adjustment, device, equipment and storage medium
CN108933895A (en) Three dimensional particles special efficacy generation method, device and electronic equipment
CN102521867B (en) Mobile phone anime character and background creation method
CN105574914A (en) Manufacturing device and manufacturing method of 3D dynamic scene
CN106384375A (en) Coloring fusion method and device for vegetation bottom in electronic game scene
CN102819855A (en) Method and device for generating two-dimensional images
Ryffel et al. AR Museum: A mobile augmented reality application for interactive painting recoloring
CN102306389B (en) Method for realizing embossment effect of animation character and background of mobile phone
Guan et al. Visual communication design using machine vision and digital media communication technology
CN102074035B (en) Panoramic image distortion-based mobile phone cartoon character creating method
Roth et al. Universal synthesizer and window: Cellular automata as a new kind of cybernetic image
CN116485981A (en) Three-dimensional model mapping method, device, equipment and storage medium
CN102034256B (en) Mobile phone cartoon character creating method based on boundary tracking and pseudo-coloring
CN114266855A (en) Light effect simulation method and device of dot matrix screen and electronic equipment
Goodman The digital revolution: art in the computer age
CN102074042A (en) Pattern generation system capable of utilizing everyday objects to generate rich pattern effect and method thereof
CN106157313A (en) A kind of lines drawing with coloured chalk artistic style analogy method
Wang et al. Application research of CG painting in digital age
CN113192211B (en) Three-color Tang virtual coloring system and method based on 3D model
Wang et al. The Mood of the Sunlight: Visualization of the Sunlight Data for Public Art
CN112604294A (en) Rendering method and device of map resource, electronic equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant