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

Mobile phone anime character and background creation method Download PDF

Info

Publication number
CN102521867B
CN102521867B CN201110424554.0A CN201110424554A CN102521867B CN 102521867 B CN102521867 B CN 102521867B CN 201110424554 A CN201110424554 A CN 201110424554A CN 102521867 B CN102521867 B CN 102521867B
Authority
CN
China
Prior art keywords
image
pixeldes
pixel
value
pearl
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201110424554.0A
Other languages
Chinese (zh)
Other versions
CN102521867A (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

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 at present animation multimedia message, four lattice mobile phone cartoons, flash and turn-based mobile phone games etc.They have the dual nature of cultural product and information products concurrently: need undoubtedly to follow the principle of generality of socialist culture product as cultural product, but unsuitable blunt preach, and will teach through lively activities; Wish to introduce as much as possible advanced computer technology as information products, to improve its production efficiency in improving the quality of products.
Dim on 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 be but difficult to express by words that has.If true color digital photograph is analogized to Chinese realistic painting birds and flowers in traditional Chinese Painting, is noble woman with heavy makeup, so various dim works similarly are the landscape painting done with splashes of ink in traditional Chinese Painting, be the young woman in village who does not execute woman, be really: " 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 pursues, will leave the infinite imagination space of spectators for.
Not yet find that there is at present the report that this type of similar to the present invention has the cartoon of chromatography or black and white hazy picture works effect.
Summary of the invention
Technical matters to be solved by this invention is to provide 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 for moving on mobile phone.
The technical solution of invention is as follows:
A kind of cartoon character on mobile phone and background creative method, adopt any method in following Lung biopsy to process original image or adopt in front 4 any method in method and method 5 to source images hybrid processing:
Method 1: off diagonal element blanking method:
Method 2: Random-fuzzy method;
Method 3: pearl-decorated curtain effect simulation method;
Method 4: image moves color method;
Method 5: monochromatization and passivating method.
The step of described off diagonal element blanking method is:
By original image gridding, the pixel at the diagonal line place of each grid retains color, and the pixel zero clearing of other positions is white, replaces by white pixel;
Mesh-density gridSize corresponding to gridding is for being less than 5 pixels; Described mesh-density is the length of side of square net.
Random-fuzzy method step in method 2 is:
Step (1). be that the data space zero clearing of target image is white by the reserved output image of depositing;
Step (2). from the upper left corner of original image, parameter i is linage-counter, and parameter j is column counter, parameter i and parameter j are all using gridSize as incremental steps, parameter k is auxiliary counter, and k is incremented to gridSize from 0, reaches zero clearing again after gridSize; By step (3)~(4) traversal full figure, complete the process of Random-fuzzy;
Step (3). in the grid at each taking gridSize as the length of side, determine that by the following method source, whole two class 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 class pixels, lineByte is the every row 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, yrand and xrand are random numbers, and random number is random value between 0-gridsize;
Step (4). 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 pearl-decorated curtain template: set pearl-decorated curtain parameter and make pelletron template, described pearl-decorated curtain parameter comprises pelletron row distance, pearl body line-spacing, pearl body diameter, pearl body connecting line diameter [in example, 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 that image moves color method is:
Step (1). choose 2 color typical applications, according to the position of 2 color typical applications, from image, find out respectively their corresponding indigo plant, green, the red numerical value of pixel, be denoted as respectively b1, g1, r1, and b2, g2, r2;
Step (2). process points X, the initial coordinate of Y is made as the image upper left corner, i.e. X, Y is all made as 0;
Step (3). be according to pixels that process points advances by column, line by line by following steps (4)~(9):
Step (4). obtain the indigo plant of current process points, green, red numerical value, be denoted as respectively sb, sg, sr;
Step (5). as abs (sb-b1) < areaExtanDegree and abs (sg-g1) < areaExtanDegree and abs (sr-r1) < areaExtanDegree remember that b1 is b, note g1 is g, note r1 is r, goes to step (7) and carries out image and move look operation; Wherein, areaExtanDegree is area extension degree; Otherwise, go to step (8) reservation primary colors as criterion does not meet; [move look operation and can bring the effect that there is something in the wind: because during there is something in the wind, typical application is to be taken in sky (or massif), this judgement is the scope of measuring sky (or massif).Because in RGB color standard, RGB value is less, and color relation is darker.For example RGB tri-looks be all 0 o'clock be exactly black.The essence of moving look operation of step 7 is the values that reduce RGB, thereby the colour of sky of making (or color of massif) is dimmed, reaches the effect that there is something in the wind]
Step (6). as abs (sb-b2) < areaExtanDegree and abs (sg-g2) < areaExtanDegree and abs (sr-r2) < areaExtanDegree remember that b2 is b, note g2 is g, note r2 is r, goes to step (7) and carries out image and move look operation; Otherwise, go to step (8) reservation primary colors as criterion does not meet;
Step (7). as follows the RGB standard transformation of color is become to 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 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 to dim yellow and move look output
*(pixelDes)=sb-(fogB*fog/10);
*(pixelDes+1)=sg-(fogG*fog/10);
*(pixelDes+2)=sr-(fogR*fog/10);
Go to step (9);
Step (8). the view data of process points is kept to former data output:
*(pixelDes)=sb;
*(pixelDes+1)=sg;
*(pixelDes+2)=sr;
Step (9). process points Building X mark+1, as do not gone to step (4) to image right margin; Otherwise go to step (10);
Step (10). process points Building X mark is made as 0, and process points Building Y mark+1, as process points does not go to step (4) to border, image bottom right; Otherwise EOP (end of program).
Described monochromatization and passivating method are:
First original image is carried out to monochromatization operation, each pixel of image is carried out to following gray processing operation:
The gray-scale value I=0.3B+0.59G+0.11R of each picture point after processing, wherein B, G, R are the original indigo plant of this pixel, green, red component value; Obtain the image after monochromatization;
Again the image after monochromatization is carried out to 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 intermediate value MedMed in minimum M axMin, all intermediate values in all maximal values and the maximal value MinMax in all minimum value, the intermediate value finally obtaining is MED=med[MaxMin, MedMed, MinMax again].
Because there is no people expect can be on mobile phone taking the photo of I (or friend) as material, carry out DIY and operate to create cartoon character on mobile phone or animation background; Particularly consider that mobile phone is far the computing power of weak (being only equivalent to the desktop computer at initial stage in this century) with respect to desk-top computer, also often makes people step back.
In order to realize DIY image manipulation for this special platform of mobile phone, adopt in design following series of measures, particularly reduce the memory requirements of application program:
A. application program is more simply better.We become Midlet by each establishment of component as far as possible, and multiple Midlet used are encapsulated in Midlet bag, and this makes the Program Manager of mobile phone can manage more frugally the resource that Midlet and Midlet use.
B. application program is the smaller the better.Delete the assembly of temporarily not using in application program, reduce unnecessary information, to reduce the volume of whole program as far as possible.When download application program on wireless network time, less application program will shorten download time greatly, and can move with other application program compatibilities on equipment (instead of exclusive).
C. reduce the total memory requirements of application program as far as possible.Major measure has: 1. use less object type, 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 is when an object, system will be on operation heap allocation space, so should be about to reallocate it while using this object in application program, instead of program be all distributed while starting.And, once program no longer needs this object, will be just null to the equal assignment of quoting of this object.3. need usage data type by precision.Just should use whenever possible boolean, byte, the data types such as short replace int.This details is very micro-on the impact of desktop computer program, but will be with producing the impact taking care of the pence on mobile phone.4. reuse as far as possible.Allow multiple different times of quoting in program life cycle use same object.For example reuse some Large-scale array, reuse and can utilize the runtime storage having distributed, use 'inertia' instantiation.Although this does not meet soft project principle, be applicable to the reality of the very weak computing equipment of this ability of mobile phone.5. avoid creating object in circulation.6. running check storer service condition.Relevant method has: freeMemory and totalMemory.OutMemoryError mistake by oneself.Should ensure that application program is in the time that internal memory overflows, have a predetermined routine that exits to manage this, and do not leave operating system for.7. timely releasing resource.To file, network connection etc. resource, in the time no longer needing to use, 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 application, developer is accustomed to setting more class data member, and less use local variable.But class data member is actually " global variable " in class, be data dispatch, stack manipulation support frequently, be actually and consume CPU and calculate to support.By local variable assignment, eliminate the additional step of the data member of access classes, can reduce the CPU treatment capacity of application program.Encapsulate data although lost like this benefit of bringing in class,, for the application program of moving, need mass data on this microminiature computing equipment of mobile phone, first its processing speed need to be considered.
Beneficial effect:
Cartoon character on mobile phone of the present invention and background creative method, adopt image processing algorithm, taking digital photograph as 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 DIY operation, create the 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 CPU operational efficiency, make the restricted mobile phone cartoon works on mobile phone screen size and mobile phone computing power can be with cheap creation cost and operational effect fast, for all ages and classes, different levels, cellphone subscriber in different time sections, electronics information serious and comical at the same time, different-style is provided, brings more colourful look and joy to cellphone subscriber's life.Will point out especially: one of the object of the invention is to realize DIY image manipulation on this software and hardware resources of mobile phone is weaker than the platform of computing machine far away, be completely necessary so take in design above-mentioned a series of specific aim measure.
Brief description of the drawings
Fig. 1 is the schematic diagram of off diagonal element blanking method; (the step-length step in Fig. 1 is gridSize))
The design sketch that the former figure of Fig. 2 digital photograph and 5 kinds of methods of employing obtain (wherein, (a)~(d) be former figure, (e), (f) for adopting the design sketch (also can be called visually " fine gauze is unrestrained graceful " design sketch) of off diagonal element blanking method, (g), (h) for adopting the design sketch (also can be called visually random dim design sketch) of Random-fuzzy method, (i), (j) for the design sketch that adopts the processing of pearl-decorated curtain effect simulation method (also can be called " pearl-decorated curtain flickers " design sketch visually, (k), (l) for adopting image to move the design sketch of color method, (also can be called visually " there is something in the wind " design sketch, (m), (n) for adopting the design sketch of monochromatization and passivating method, (also can be called visually " scribbling sketch is enjoyable " design sketch).
Embodiment
Below with reference to the drawings and specific embodiments, the present invention is described in further details:
The invention provides five kinds of artistic creation gimmicks such as " fine gauze is unrestrained graceful ", " dim at random ", " pearl-decorated curtain flickers ", " there is something in the wind " and " scribbling sketch is enjoyable ".Wherein " fine gauze is unrestrained graceful " creation technique is realized with " off diagonal element blanking " algorithm of original creation; Superpose on the basis of the blanking random pixel output of " dim at random " creation technique; " pearl-decorated curtain flickers " creation technique pearl-decorated curtain effect simulation that superposes on the basis of blanking; And the basis of " scribbling sketch is enjoyable " is monochromatization and passivation." but there is something in the wind " creation technique not blanking, and the image of having applied original creation moves look algorithm, and with following definitions 2 statements.
Define 1. as certain image is divided and divides some grids into, and then, by certain rule, some pixel in each grid is concealed, be called picture blanking.Picture blanking can reach fine gauze mist, indistinct effect.Especially, when the pictorial element only retaining on diagonal line, be called degree of depth blanking or off diagonal element blanking
(referring to Fig. 1); Otherwise, as retained the pictorial element on off-diagonal, be called shallow degree blanking or diagonal entry blanking.
Can realize indistinct visual effect by picture blanking technology (particularly degree of depth blanking).For example,, in the time that grid length and width are gridSize, as adopted degree of depth blanking only to retain gridSize pixel on diagonal line; As adopt shallow degree blanking by the individual pixel of gridSize* (gridSize-1) retaining on off-diagonal;
Definition 2. as by the color correct of certain pixel for its original value deducts it and the product of non-negative (or just non-) coefficient, be called this pixel enforcement image moved to look.Especially, in the time selecting non-negative coefficient, be called dim yellow and move look; In the time selecting non-positive coefficient, 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)
Wherein r in, g in, b infor 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 outprovided 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)
In formula, abs function is the operation that takes absolute value.
Embodiment 1:
Implement cartoon character on mobile phone of the present invention and background creative method, first will set a parameter as follows:
1. yarn curtain density is mesh-density (gridSize): yarn curtain density is answered < 5.
2. fog concentration (fog): fog concentration should be between 1.0~2.0.
3 color typical applications (colorSamples): user selects 2 color typical applications by on-the-spot What You See Is What You Get ground, program with regard to atomization the atomization region of being determined by area extension degree, there is the visual effect that fog is dim.And the color of making pearl-decorated curtain according to the color of 2 color typical applications, so the color of pearl-decorated curtain is flexible and changeable.
4. area extension degree (areaExtanDegree): selected numerical value is larger, via the expansion of the dim typical application of color to move look region larger.Optional scope is 1~100.
Different background and personage's hazy picture works, referring to Fig. 2.
Method 1: " off diagonal element blanking " method is first white to reserved data space zero clearing of depositing output image, then, the pictorial element on off-diagonal is concealed, and also, only the pictorial element on diagonal line is stayed.Particularly, make linage-counter and column counter to have set when the setup parameter before gridSize[: yarn curtain density (gridSize): yarn curtain density is answered < 5.] travel through full figure for step-length " jump ", and jump when further when linage-counter or column counter, because started another grid, auxiliary counter changes to gridSize by 0, thereby only the image copy on source images diagonal line is gone to target image.By this minority that stays, the algorithm that conceals large portion reaches fine gauze mist, indistinct effect.Fig. 1 is the diagram of " off diagonal element blanking " algorithm.
Step (1). be white to reserved data space zero clearing of depositing output image;
Step (2). from the upper left corner of image, parameter i is linage-counter, and parameter j is column counter, and gridSize is as step-length, and parameter k is auxiliary counter, by step (3)~(4) traversal full figure;
Step (3). determine the position (pixelSou and pixelDes) of source (source), target (destination) two class pixels:
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 class pixels, and lineByte is the every row 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 k variation range is 0~gridSize;
Be white to reserved data space zero clearing of depositing output image; If so do not have data to output to this pixel, it is exactly white, therefore just produce the effect of blanking.
Can understand like this, by view picture figure gridding, the pixel at grid diagonal line place be retained, the pixel of other points is all made as white.
Method 2: realize Random-fuzzy.The basis of Random-fuzzy method is also " off diagonal element blanking " algorithm.Be characterized in linage-counter and column counter or travel through full figure taking gridSize as step-length " jump ", but add random number in the auxiliary counter that affects source address.Wherein,
(1) linage-counter and the column counter that form source pointer are progressively leaped, auxiliary counter has 2 variablees, one is k (changing to gridSize by 0), and another is that the scope of random number yrand or xrand[random number is random between 0-gridsize] thus copying the source images of assigned address to target image gets on;
(2) linage-counter and the column counter that form object pointer are progressively leaped, and auxiliary counter only has 1 variable k (changing to gridSize by 0).
Step (1). be white to reserved data space zero clearing of depositing output image;
Step (2). from the upper left corner of image, parameter i is linage-counter, and parameter j is column counter, and parameter k is auxiliary counter, and gridSize is as step-length, by step (3)~(4) traversal full figure;
Step (3). determine source (source), whole (destination) two class 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 class pixels, lineByte is the every row byte number of image, and pixelByte is the every pixel words joint number of image, and i and j are corresponding line and row, k variation range is 0~gridSize, and yrand and xrand are random numbers;
Step (4). 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 pearl-decorated curtain effect.The basis of pearl-decorated curtain effect simulation method is also " off diagonal element blanking " algorithm.Linage-counter and column counter travel through full figure " jump " taking gridSize as step-length.Wherein, linage-counter and column counter jump when further, and auxiliary counter changes to gridSize by 0, thereby by the off diagonal element blanking in 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 there is very strong dirigibility.
Step (1). be white to reserved data space zero clearing of depositing output image;
Step (2). from the upper left corner of image, parameter i is linage-counter, and parameter j is column counter, and parameter k is auxiliary counter, and gridSize is as step-length, by step (2)~(4) traversal full figure;
Step (3). determine source (source), target (destination) two class pixels (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 class pixels, and lineByte is the every row 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 k variation range is 0~gridSize;
Step (4). 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 respectively their pixel data color1, color2;
Step (6). with color1 or two kinds of colors of color2 taking suitable line-spacing, row for example, apart from [the line-spacing dichromatism in Fig. 2 i and 2j is alternately respectively as 20, and row are apart from being 40.] call MakeColorPearl template and form colored pearl.The parameter of this template is: row j, line number i, the every row byte number of image lineByte, the every pixel words joint number of image pixelByte, pearl diameter r, pearl color color (respectively with color1 or color2); [MakeColorPearl template, forms colored pearl-decorated curtain template, is existing mature technology ,]
Method 4: image moves color method, comprises the following steps:
Step (1). according to the position of 2 color typical applications, from image, find out respectively their pixel data (blue, green, red numerical value), be denoted as respectively b1, g1, r1, and b2, g2, r2, is used in step (5) and step (6).
Step (2). process points X, the initial coordinate of Y is made as the image upper left corner, i.e. X, Y is all made as 0;
Step (3). by following steps (4)~(9) by column, line by line advance:
Step (4). obtain the indigo plant of a certain process points, green, red numerical value, be denoted as respectively sb, sg, sr;
Step (5). as abs (sb-b 1) < areaExtanDegree and abs (sg-g1) < areaExtanDegree and abs (sr-r1) < areaExtanDegree remember that b1 is b, note g1 is g, note r1 is r, goes to step (7) and carries out image and move look operation.Otherwise, go to step (8) reservation primary colors as criterion does not meet;
Step (6). as abs (sb-b2) < areaExtanDegree and abs (sg-g2) < areaExtanDegree and abs (sr-r2) < areaExtanDegree remember that b2 is b, note g2 is g, note r2 is r, goes to step (7) and carries out image and move look operation.Otherwise, go to step (8) reservation primary colors as criterion does not meet;
Step (7). press formula (1), (2), the RGB standard transformation of color is become YCrCb standard by (3)
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)
Press formula (5), (6), the contravariant of YCrCb standard is changed to RGB standard by (7)
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 to dim yellow and move look output
*(pixelDes)=sb-(fogB*fog/10);
*(pixelDes+1)=sg-(fogG*fog/10);
*(pixelDes+2)=sr-(fogR*fog/10);
Go to step (9);
Step (8). the view data of process points " is remained untouched " and exported:
*(pixelDes)=sb;
*(pixelDes+1)=sg;
*(pixelDes+2)=s r;
Step (9). process points Building X mark+1, as do not gone to step (4) to image right margin; Otherwise go to step (10);
Step (10). process points Building X mark is made as 0, and process points Building Y mark+1, as process points does not go to step (4) to border, image bottom right; Otherwise EOP (end of program);
Algorithm 5. monochromatizations and passivating method: in succession call gray processing operation and image passivation operation.Gray processing operation, the gray-scale value I=0.3B+0.59G+0.11R of each picture point after processing, wherein B, G, R are the original indigo plant of this pixel, green, red component value.
Passivating method is described as follows:
Standard one dimension medium filtering is defined as:
y k=med{x k-n,x k-n+1,...,x k,...,x k+n-1,x k+n}
In formula, med represents to get median operation.As can be seen here, medium filtering is (to be the x in above formula by the gray scale of each pixel of moving window k-n, x k-n+1..., x k..., x k+n-1, x k+n) sequence from top to down, select the representative of intermediate value as this pixel.When moving window compared with large and make in moving window pixel a lot (while being made as m), carry out sorting operation very consumes computational capacity (need to do m (m-2)/2 time compare operation.Adopt quick sorting algorithm to realize passivation operation for this reason, reduced approximately 0.47 times of calculated amount.Sketch its thinking as follows: for ease of describing, claim that in 3 × 3 windows, each row pixel is: 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 .8.First each row pixel in window is calculated to 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]; Similarly there is intermediate value group Med 0, Med 1, Med 2, and minimum value group Min 0, Min 1, Min 2.Further obtain: MaxMin=min[Max 0, Max 1, Max 2], similarly obtain MedMed, MinMax; Further obtain: MED=med[MaxMin, MedMed, MinMax] be real intermediate value.

Claims (1)

1. cartoon character on mobile phone and a background creative method, is characterized in that, adopts any method in front 4 kinds of methods and method 5 to source images hybrid processing:
Method 1: off diagonal element blanking method:
Method 2: Random-fuzzy method;
Method 3: pearl-decorated curtain effect simulation method;
Method 4: image moves color method;
Method 5: monochromatization and passivating method;
The step of described off diagonal element blanking method is:
By original image gridding, the pixel at the diagonal line place of each grid retains color, and the pixel zero clearing of other positions is white, replaces by white pixel;
Mesh-density gridSize corresponding to gridding is for being less than 5 pixels; Described mesh-density is the length of side of square net;
Random-fuzzy method step in method 2 is:
Step (1). be that the data space zero clearing of target image is white by the reserved output image of depositing;
Step (2). from the upper left corner of original image, parameter i is linage-counter, and parameter j is column counter, parameter i and parameter j are all using gridSize as incremental steps, parameter k is auxiliary counter, and k is incremented to gridSize from 0, reaches zero clearing again after gridSize; By step (3)~(4) traversal full figure, complete the process of Random-fuzzy;
Step (3). in the grid at each taking gridSize as the length of side, determine that by the following method source, whole two class 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 desBase are respectively the base address of source, whole two class pixels, lineByte is the every row 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, yrand and xrand are random numbers, and random number is random value between 0-gridsize;
Step (4). 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 pearl-decorated curtain template: set pearl-decorated curtain parameter and make 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;
The step that image moves color method is:
Step (1). choose 2 color typical applications, according to the position of 2 color typical applications, from image, find out respectively their corresponding indigo plant, green, the red numerical value of pixel, be denoted as respectively b1, g1, r1, and b2, g2, r2;
Step (2). process points x, y initial coordinate is made as the image upper left corner, i.e. x, y is all made as 0;
Step (3). be according to pixels that process points advances by column, line by line by following steps (4)~(9):
Step (4). obtain the indigo plant of current process points, green, red numerical value, be denoted as respectively sb, sg, sr;
Step (5). as abs (sb-b1) <areaExtanDegree and abs (sg-g1) <areaExtanDegree and abs (sr-r1) <areaExtanDegree remember that b1 is b, note g1 is g, note r1 is r, goes to step (7) and carries out image and move look operation; Wherein, areaExtanDegree is area extension degree; Otherwise, go to step (8) reservation primary colors as criterion does not meet; In formula, abs function is the operation that takes absolute value;
Step (6). as abs (sb-b2) <areaExtanDegree and abs (sg-g2) <areaExtanDegree and abs (sr-r2) <areaExtanDegree remember that b2 is b, note g2 is g, note r2 is r, goes to step (7) and carries out image and move look operation; Otherwise, go to step (8) reservation primary colors as criterion does not meet;
Step (7). as follows the RGB standard transformation of color is become to 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; Wherein, fog is fog concentration, and value is between 1.0~2.0;
By following formula, the contravariant of YCrCb standard is changed to 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 to dim yellow and move look output
*(pixelDes)=sb–(fogB*fog/10);
*(pixelDes+1)=sg–(fogG*fog/10);
*(pixelDes+2)=sr–(fogR*fog/10);
Go to step (9);
Step (8). the view data of process points is kept to former data output:
*(pixelDes)=sb;
*(pixelDes+1)=sg;
*(pixelDes+2)=sr;
Step (9). process points x coordinate+1, as do not gone to step (4) to image right margin; Otherwise go to step (10);
Step (10). process points x coordinate is made as 0, and process points y coordinate+1, as process points does not go to step (4) to border, image bottom right; Otherwise EOP (end of program);
Described monochromatization and passivating method are:
First original image is carried out to monochromatization operation, each pixel of image is carried out to following gray processing operation:
The gray-scale value I=0.3B+0.59G+0.11R of each picture point after processing, wherein B, G, R are the original indigo plant of this pixel, green, red component value; Obtain the image after monochromatization;
Again the image after monochromatization is carried out to 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 intermediate value MedMed in minimum M axMin, all intermediate values in all maximal values and the maximal value MinMax in all minimum value, the intermediate value finally obtaining is MED=med[MaxMin, MedMed, MinMax again].
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 CN102521867A (en) 2012-06-27
CN102521867B true 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)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819857B (en) * 2012-07-26 2014-09-24 拓维信息系统股份有限公司 Method for creating cartoon character face in mobile phone based on whitening and skin tendering
US10379734B2 (en) 2013-02-23 2019-08-13 Qualcomm Incorporated Systems and methods for interactive image caricaturing by an electronic device
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

Citations (4)

* 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
CN102034256A (en) * 2010-11-15 2011-04-27 拓维信息系统股份有限公司 Mobile phone cartoon character creating method based on boundary tracking and pseudo-coloring

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Patent Citations (4)

* 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
CN102034256A (en) * 2010-11-15 2011-04-27 拓维信息系统股份有限公司 Mobile phone cartoon character creating method based on boundary tracking and pseudo-coloring

Also Published As

Publication number Publication date
CN102521867A (en) 2012-06-27

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
US20130127898A1 (en) Separating Water from Pigment in Procedural Painting Algorithms
CN102521867B (en) Mobile phone anime character and background creation method
CN104463954B (en) A kind of analogy method and system of 3-D view surface details
CN108933895A (en) Three dimensional particles special efficacy generation method, device and electronic equipment
CN111324334B (en) Design method for developing virtual reality experience system based on narrative oil painting works
CN104063888B (en) A kind of wave spectrum artistic style method for drafting based on feeling of unreality
CN102496180A (en) Method for automatically generating wash landscape painting image
CN105184843B (en) A kind of three-dimensional animation manufacturing method based on OpenSceneGraph
CN105809733A (en) SketchUp-based campus three-dimensional hand-drawn map construction method
CN104091366B (en) Three-dimensional intelligent digitalization generation method and system based on two-dimensional shadow information
CN110333924A (en) A kind of image morphing method of adjustment, device, equipment and storage medium
CN110197525B (en) Window light control method and device for virtual building model, processor and terminal
CN105574914A (en) Manufacturing device and manufacturing method of 3D dynamic scene
CN104103091A (en) 3D intelligent modeling method and system and a flexible manufacturing system of 3D model
CN105096358A (en) Line enhanced simulation method for pyrography artistic effect
CN106384375A (en) Coloring fusion method and device for vegetation bottom in electronic game scene
CN102306389B (en) Method for realizing embossment effect of animation character and background of mobile phone
CN109308380B (en) Embroidery artistic style simulation method based on non-photorealistic sense
CN112258621B (en) Method for observing three-dimensional rendering two-dimensional animation in real time
CN106157313A (en) A kind of lines drawing with coloured chalk artistic style analogy method
CN106384373A (en) Character display method and device
CN106780700B (en) Game personalized 3D coloring method based on VR technology
CN102034256B (en) Mobile phone cartoon character creating method based on boundary tracking and pseudo-coloring

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