CN102663798B - Mobile phone cartoon character and background creation method based on simulation frescoes - Google Patents

Mobile phone cartoon character and background creation method based on simulation frescoes Download PDF

Info

Publication number
CN102663798B
CN102663798B CN201210124182.4A CN201210124182A CN102663798B CN 102663798 B CN102663798 B CN 102663798B CN 201210124182 A CN201210124182 A CN 201210124182A CN 102663798 B CN102663798 B CN 102663798B
Authority
CN
China
Prior art keywords
value
look
variation width
pixel
rgb
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
CN201210124182.4A
Other languages
Chinese (zh)
Other versions
CN102663798A (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 CN201210124182.4A priority Critical patent/CN102663798B/en
Publication of CN102663798A publication Critical patent/CN102663798A/en
Application granted granted Critical
Publication of CN102663798B publication Critical patent/CN102663798B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a mobile phone cartoon character and background creation method based on simulation frescoes. The method includes one or more of four methods of: method one, executing dark yellowing color shifting operation according to a brightness value Y of a pixel to be processed; method two, keeping primary colors if the difference between sample colors and colors of red, green and blue (RGB) of the current pixel is smaller than variation width, otherwise, executing dark yellowing color shifting operation; method three, replacing the RGB of the current pixel with broken colors if the difference between the sample colors and the colors of RGB of the current pixel is smaller than the preset variation width and the current pixel is located in a broken area, and otherwise, executing dark yellowing color shifting operation; and method four, subjecting the pixel to fading to white if the difference between the sample colors and the colors of RGB of the current pixel is smaller than the preset variation width, and otherwise, executing dark yellowing color shifting operation. The mobile phone cartoon character and background creation method based on the simulation frescoes is easy to operate, small in process quantity of image processing and applicable to operation in mobile phones.

Description

A kind of cartoon character on mobile phone and background creative method based on the simulation mural painting
Technical field
The invention belongs to the digital image processing techniques field based on cell phone platform, relate to a kind of cartoon character on mobile phone and background creative method based on the simulation mural painting.
Background technology
17 Sixth Plenary Session of the Party Central Committees of the Central Committee of the Communist Party of China have been passed through to promote develop on a large scale the decision of the some significant problems of large prosperity of socialist culture about deepen the reform of the system for managing cultural undertakings.Decision explicitly points out and should allow the people cross well-off plentiful material life, allows again the people enjoy healthy rich culture life.Determine to require: cultural industry will become pillars of the national economy industry, and overall strength and international competitiveness significantly strengthen; Accelerate development the strong industries such as animation game, cultural exhibitions, art creation, the Internet culture, the making of cultural product numeral;It is large flourishing that this decision will promote the socialist culture great development, further rises the socialist cultural advancement new upsurge, improves constantly the scientific level of cultural construction, for China being turned into to socialist culture power, takes a firm foundation.
This makes industry message filled with exultation show that the animation industry of China also will follow the development of the large industry of culture and enter the fast-developing phase.
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 when improving the quality of products.
Mural painting is that people directly are drawn in the picture on metope, is one of form of painting the earliest on human history.The mankind of primitive society portray various figures with the branch (charcoal) burnt, yellow earth at Dong Bishang, to record the events such as certain hunting, dancing, sacrifice and war, have formed mural painting the earliest.It is more extensive that the mural painting of Sui-Tang bines Mo kao grotto at Dunhuang shows subject matter, and scene is grander, and no matter the characteristics that color is more magnificent are character moulding, style skill, and fill in colors on a sketch and apply the color unprecedented level that all reached.It is not unique, but has its counterpart, and after Egypt enters slave society, the king has been sovereign head; the king after death; not only his corpse is wanted safekeeping, and will make them can enjoy joy same while living, so just the thing in the human world all is drawn on the tomb wall for its enjoyment.Along this train of thought, the mural art that is developing separately oneself between east and west.
The present invention aims at this long history, the extremely strong art form of expressive ability, image processing algorithm by designed, designed, take digital photograph as material, be transformed into works different styles, that there is the mural painting style, carry out the DIY operation on animation server or cellphone subscriber individual's mobile phone, create effect is peculiar, be different from traditional digital photograph cartoon character and or animation background.Fig. 1 and Fig. 2 are real mural painting and the mural painting contrast visually of this patent creation.
We not yet find that there is similar to the present invention, by image processing techniques, transform traditional digital photograph as report that this type of has the cartoon of mural painting 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 based on the simulation mural painting, cartoon character on mobile phone and the background creative method of being somebody's turn to do based on the simulation mural painting are easy to implement, image processing process quantity is little, is 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 based on the simulation mural painting adopts the combination of any one or more method in following 4 kinds of methods:
Method one: determine that according to the brightness value Y of pending pixel moving colour system counts M, carry out dim yellow and move the look operation.
Method two: by the selected model look color1 of client, color2, retain primary colors if the difference of the RGB of current pixel and model look is less than variationWidth, otherwise carry out dim yellow, moves the look operation;
Method three: the selected model look of client and damaged look, for each pixel in image, if the difference of the RGB of current pixel and model look is less than default variation width value and within damage zone be replaced by damaged look, otherwise carry out dim yellow, move the look operation;
Method four: by the selected model look color1 of client, color2; For each pixel in image, if the difference of the RGB of current pixel and model look is less than default variation width value, this pixel takes off and turns to white (replacing by white pixel), otherwise carry out dim yellow, moves the look operation;
The step that dim yellow moves the look operation is:
r out=abs(r in-(M 1*r in));
g out=abs(g in-(M 2*g in));
b out=abs(b in-(M 3*b in));
Wherein, r in, g in, b inbe respectively the original R of certain pixel, G, B color component value; r out, g out, b outbe respectively R, G, B output component value after this pixel moves look;
Moving colour system counts M and comprises three variable: M 1, M 2and M 2; M 1, M 2and M 2be nonnegative value; Y=0.257*r wherein in+ 0.504*g in+ 0.98*b in;
M 1, M 2and M 2the phase step type assignment adopt following formula:
Y<50,M 1=0.4,M 2=0.2,M 3=0.1;
50<Y<200,M 1=0.2,M 2=0.1,M 3=0.0.5;
Y>200,M 1=0.1,M 2=0.05,M 3=0.25。
The concrete steps of method one are:
According to default iterations iterativeTimes value, by integer (the subtracting 1) iterativeTimes that successively decreases at every turn, until iterativeTimes is 0; When each iterativeTimes value, carry out following steps: line by line successively to each pixel of selection area, first according to this pixel color value r by column in, g in, b incalculate Y value; Calculate the M value according to Y again, and carry out dim yellow and move the look operation, and the color component value of current pixel point is updated to and carries out the output valve that dim yellow moves the look operation.
The parameter that method two relates to is: the iterations iterativeTimes that the user arranges, the color typical application colorSamples that the variation width variationWidth that the user arranges and user select in original image; Concrete steps are:
Step (1): according to the colorSamples selected by the user, obtain model look color1 and color2; The rgb value that color1 and color2 are corresponding is respectively (r s1, g s1, b s1) and (r s2, g s2, b s2);
Step (2): according to default iterations iterativeTimes value, by integer (the subtracting 1) iterativeTimes that successively decreases at every turn, until iterativeTimes is 0; When each iterativeTimes value, carry out following steps: successively each pixel of selection area is carried out to following steps line by line by column:
The rgb value of current pixel point is (r in, g in, b in); As shown in the formula establishment:
(r in-r s1<variationWidth) ∩ (g in-g s1<variationWidth) ∩ (b in-b s1<variationWidth), the output r of this pixel out, g out, b outget initial value;
As shown in the formula establishment:
(r in-r 2<variationWidth) ∩ (g in-g s2<variationWidth) ∩ (b in-b s2<variationWidth), set up, the output r of this pixel out, g out, b outget initial value;
In formula, ∩ is the logical “and” operation;
Otherwise, first according to this pixel color value r in, g in, b incalculate Y value; Calculate the M value according to Y again, and carry out dim yellow and move the look operation, and the color component value of current pixel point is updated to and carries out the output valve that dim yellow moves the look operation.
The parameter that method three relates to is: the color typical application colorSamples that the variation width variationWidth that the user arranges and user select in original image; Concrete steps are:
Step (1): the user specifies damage zone on former figure, according to the colorSamples selected by the user, obtains model look color1 and damaged look color2; The rgb value that color1 and color2 are corresponding is respectively (r s1, g s1, b s1) and (r s2, g s2, b s2);
Step (2): successively each pixel of selection area is carried out to following steps line by line by column:
The rgb value of current pixel point is (r in, g in, b in); As current pixel point is positioned at damage zone and meets following formula:
(r in-r s1<variationWidth) ∩ (g in-g s1<variationWidth) ∩ (b in-b s1<variationWidth), the output r of this pixel out, g out, b outget damaged look, i.e. r out=r s2, g out=g s2, b out=b s2; In formula, ∩ is the logical “and” operation.
The parameter that method four relates to is: the color typical application colorSamples that the variation width variationWidth that the user arranges and user select in original image; Concrete steps are:
Step (1): the full figure gray processing is operated; To reserved data space zero clearing of depositing output image, be white; Obtain model look color1 and color2 according to the colorSamples selected by the user; The rgb value that color1 and color2 are corresponding is respectively (r s1, g s1, b s1) and (r s2, g s2, b s2);
Step (2): successively each pixel of image is carried out to following steps, the final Output rusults that the output image finally obtained is this method line by line by column:
The rgb value of current pixel point is (r in, g in, b in); As meet following formula:
(r in-r s1<variationWidth) ∩ (g in-g s1<variationWidth) ∩ (b in-b s1or meet following formula<variationWidth):
(r in-r 2<variationWidth) ∩ (g in-g s2<variationWidth) ∩ (b in-b s2<variationWidth), in formula, ∩ is the logical “and” operation, without any operation, otherwise, according to current pixel color value r in, g in, b incalculate Y value, according to Y, calculate the M value; Carry out again dim yellow and move the look operation.
The span of iterations iterativeTimes is 0~3.
The span of variation width variationWidth is 1~80.
Because there is no photo that the people expects take on mobile phone 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 (desktop computer that only is equivalent to the initial stage in this century) with respect to desk-top computer, also often makes the people step back.
In order for this special platform of mobile phone, to realize the DIY image manipulation, adopted 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 a plurality of 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 are used.
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 on wireless network, downloading application program, less application program will shorten download time greatly, and can with other application programs on equipment are compatible, move (rather than 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 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 program is 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 the usage data type by precision.Just should use boolean whenever possible, 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 taken care of the pence on mobile phone.4. reuse as far as possible.Allow and a plurality ofly quote the different time in life cycle in program and use same object.For example reuse some Large-scale array, reuse and can utilize the runtime storage distributed, use the 'inertia' instantiation.Although this does not meet the 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 guarantee that application program is when 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, when 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. use local variables more.In the desktop computer application, the developer is accustomed to setting more class data member, and less use local variable.But the class data member is actually " global variable " in class, is data dispatch, stack manipulation support frequently, is actually and consumes that CPU calculates to support.By the 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, at first its processing speed need to be considered.
Beneficial effect:
Cartoon character on mobile phone and background creative method based on the simulation mural painting of the present invention, use simple and practical Digital Image Processing algorithm, note reducing data volume and improve the 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, by what create, the method of easy operating, the former figure of number is changed into to the mural painting design sketch of various different styles on mobile phone, bring more colourful look and joy to cellphone subscriber's life.Will point out especially: realizing DIY image manipulation if one of the object of the invention is weaker than at this software and hardware resources of mobile phone on the platform of computing machine far away, is fully necessary so take in design above-mentioned a series of specific aim measure.
The accompanying drawing explanation
Fig. 1 be ancient wall (figure a), the mural painting in modern age (figure b) and with " maiden " mural painting (scheming c) comparison diagram with being formed by this patent;
Fig. 2 be the mural painting drawn of charcoal rod (figure a) and with " landscape " mural painting with being formed by this patent (figure b, figure c and scheme d) comparison diagram.Wherein in the b of Fig. 2, c, d figure, default variation width value (variationWidth) is 50;
Fig. 3 is that " maiden " former figure (schemes a) and the comparison diagram of the three different-style mural painting formed by this patent.Wherein scheming b, to establish iterations iterativeTimes be 3, and variation width value (variationWidth) is 50; It is 50 that figure c establishes variation width value (variationWidth), and figure d is after implementing the gray processing operation to former figure, and variation width value (variationWidth) is 60, therefore contrast is larger.
Fig. 4 is " handsome boy " former figure (two charcoal rod mural painting (figure b and figure c) comparison diagram of scheming a) and being formed by this patent; The variation width value (variationWidth) of figure b and figure c is respectively 70 and 80, and due to the position difference of sample point, so effect is also different.
Fig. 5 is process flow diagram of the present invention.
Embodiment
Below with reference to the drawings and specific embodiments, the present invention is described in further details:
Embodiment 1:
Cartoon character on mobile phone and background creative method based on the simulation mural painting of the present invention, be divided into 3 steps in logic, as shown in Figure 5:
Step 1. optional 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.
Step 2.
Set the parameters such as iterations, the variation degree of depth, variation width, and (two) color typical application.
1. iterations (iterativeTimes): the color of the mural painting ash that will become along with the remote of age is dim, and this patent, by selecting iterations, changes the one-tenth picture of mural painting sooner or later.Optional scope is 0~3.
2. width (variationWidth) makes a variation: selected numerical value is larger, larger via the true qualities zone of color blend typical application expansion.Optional scope is 1~80.
3. color typical application (colorSamples): the user selects the color typical application by on-the-spot What You See Is What You Get ground.The pixel that program is less than variationWidth to aberration is carried out the image co-registration operation, and pixel implementation (being defined by 1 of the definition) image that aberration is greater than to variationWidth moves the look operation.
Step 3: digital picture is simulated to mural painting and created again,
The core algorithm of this patent comprises that image co-registration and image move look two classes:
Image co-registration has realized the seamless fusion of regional area and Global picture.On algorithm, by retaining natural colour in the color blend zone definite by variationWidth, (or local turns to the optional colour of loess, the metope true qualities such as greyish white, with the local damage of simulation mural painting; Or take off and turn to white, the mural painting of drawing with simulation charcoal rod), show the visual effect of serving the design original intention.
Image moves look and is derived by following definitions 1.It makes picture along with the passing in age turns to dim Huang by beautiful taking off originally from visually simulating travel-stained effect.
There is image co-registration and image and move the fresco works of chromatic effect, referring to Fig. 3 (b), 3 (c), 3 (d).
This patent provides the mural painting creation of four kinds of styles, relates to a public program segment and four kinds of different algorithms.Wherein:
Common segment: the public image of this patent move the look program segment based on as give a definition:
Definition 1. 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, be called dim yellow when selecting non-negative coefficient and move look; Be called paleization and move look when selecting non-positive coefficient.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 infor the original color value of this pixel.
B. move colour system count M be an actual effect, with the non-negative coefficient of phase step type of brightness Y negative correlation.
C. move look output r out, g out, b outby following formula, provided;
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, the abs function is the operation that takes absolute value; M 1, M 2and M 2the phase step type assignment adopt following formula:
Y<50,M 1=0.4,M 2=0.2,M 3=0.1;
50<Y<200,M 1=0.2,M 2=0.1,M 3=0.0.5;
Y>200,M 1=0.1,M 2=0.05,M 3=0.25。
Concrete, a kind of cartoon character on mobile phone and background creative method based on the simulation mural painting adopts the combination of any one or more method in following 4 kinds of methods:
Method one: determine that according to the brightness value Y of pending pixel moving colour system counts M, carry out dim yellow and move the look operation.
Method two: by the selected model look color1 of client, color2, retain primary colors if the difference of the RGB of current pixel and model look is less than variationWidth, otherwise carry out dim yellow, moves the look operation;
Method three: the selected model look of client and damaged look, for each pixel in image, if the difference of the RGB of current pixel and model look is less than default variation width value and within damage zone be replaced by damaged look, otherwise carry out dim yellow, move the look operation;
Method four: by the selected model look color1 of client, color2; For each pixel in image, if the difference of the RGB of current pixel and model look is less than default variation width value, this pixel takes off and turns to white, otherwise carry out dim yellow, moves the look operation;
The step that dim yellow moves the look operation is:
r out=abs(r in-(M 1*r in));
g out=abs(g in-(M 2*g in));
b out=abs(b in-(M 3*b in));
Wherein, r in, g in, b inbe respectively the original R of certain pixel, G, B color component value; r out, g out, b outbe respectively R, G, B output component value after this pixel moves look;
Moving colour system counts M and comprises three variable: M 1, M 2and M 2; M 1, M 2and M 2be nonnegative value; Y=0.257*r wherein in+ 0.504*g in+ 0.98*b in;
M 1, M 2and M 2the phase step type assignment adopt following formula:
Y<50,M 1=0.4,M 2=0.2,M 3=0.1;
50<Y<200,M 1=0.2,M 2=0.1,M 3=0.0.5;
Y>200,M 1=0.1,M 2=0.05,M 3=0.25。
The concrete steps of method one are:
According to default iterations iterativeTimes value, by integer (the subtracting 1) iterativeTimes that successively decreases at every turn, until iterativeTimes is 0; When each iterativeTimes value, carry out following steps: line by line successively to each pixel of selection area, first according to this pixel color value r by column in, g in, b incalculate Y value; Calculate the M value according to Y again, and carry out dim yellow and move the look operation, and the color component value of current pixel point is updated to and carries out the output valve that dim yellow moves the look operation.
The parameter that method two relates to is: the iterations iterativeTimes that the user arranges, the color typical application colorSamples that the variation width variationWidth that the user arranges and user select in original image; Concrete steps are:
Step (1): according to the colorSamples selected by the user, obtain model look color1 and color2; The rgb value that color1 and color2 are corresponding is respectively (r s1, g s1, b s1) and (r s2, g s2, b s2);
Step (2): according to default iterations iterativeTimes value, by integer (the subtracting 1) iterativeTimes that successively decreases at every turn, until iterativeTimes is 0; When each iterativeTimes value, carry out following steps: successively each pixel of selection area is carried out to following steps line by line by column:
The rgb value of current pixel point is (r in, g in, b in); As shown in the formula establishment:
(r in-r s1<variationWidth) ∩ (g in-g s1<variationWidth) ∩ (b in-b s1<variationWidth), the output r of this pixel out, g out, b outget initial value;
As shown in the formula establishment:
(r in-r 2<variationWidth) ∩ (g in-g s2<variationWidth) ∩ (b in-b s2<variationWidth), set up, the output r of this pixel out, g out, b outget initial value;
In formula, ∩ is the logical “and” operation;
Otherwise, first according to this pixel color value r in, g in, b incalculate Y value; Calculate the M value according to Y again, and carry out dim yellow and move the look operation, and the color component value of current pixel point is updated to and carries out the output valve that dim yellow moves the look operation.
The parameter that method three relates to is: the color typical application colorSamples that the variation width variationWidth that the user arranges and user select in original image; Concrete steps are:
Step (1): the user specifies damage zone on former figure, according to the colorSamples selected by the user, obtains model look color1 and damaged look color2; The rgb value that color1 and color2 are corresponding is respectively (r s1, g s1, b s1) and (r s2, g s2, b s2);
Step (2): successively each pixel of selection area is carried out to following steps line by line by column:
The rgb value of current pixel point is (r in, g in, b in); As current pixel point is positioned at damage zone and meets following formula:
(r in-r s1<variationWidth) ∩ (g in-g s1<variationWidth) ∩ (b in-b s1<variationWidth), the output r of this pixel out, g out, b outget damaged look, i.e. r out=r s2, g out=g s2, b out=b s2; In formula, ∩ is the logical “and” operation.
The parameter that method four relates to is: the color typical application colorSamples that the variation width variationWidth that the user arranges and user select in original image; Concrete steps are:
Step (1): the full figure gray processing is operated; To reserved data space zero clearing of depositing output image, be white; Obtain model look color1 and color2 according to the colorSamples selected by the user; The rgb value that color1 and color2 are corresponding is respectively (r s1, g s1, b s1) and (r s2, g s2, b s2);
Step (2): successively each pixel of image is carried out to following steps, the final Output rusults that the output image finally obtained is this method line by line by column:
The rgb value of current pixel point is (r in, g in, b in); As meet following formula:
(r in-r s1<variationWidth) ∩ (g in-g s1<variationWidth) ∩ (b in-b s1or meet following formula<variationWidth):
(r in-r 2<variationWidth) ∩ (g in-g s2<variationWidth) ∩ (b in-b s2<variationWidth), in formula, ∩ is the logical “and” operation, without any operation, otherwise, according to current pixel color value r in, g in, b incalculate Y value, according to Y, calculate the M value; Carry out again dim yellow and move the look operation.
The span of iterations iterativeTimes is 0~3.
The span of variation width variationWidth is 1~80.

Claims (6)

1. cartoon character on mobile phone and the background creative method based on the simulation mural painting, is characterized in that, adopts any in following 4 kinds of methods:
Method one: determine that according to the brightness value Y of pending pixel moving colour system counts M, carry out dim yellow and move the look operation;
Method two: by the selected model look color1 of client, color2, if the difference of the RGB of current pixel and model look is less than variation width variation, Width retains primary colors, otherwise carry out dim yellow, moves the look operation;
Method three: the selected model look of client and damaged look, for each pixel in image, if the difference of the RGB of current pixel and model look is less than default variation width value and within damage zone be replaced by damaged look, otherwise carry out dim yellow, move the look operation;
Method four: by the selected model look color1 of client, color2; For each pixel in image, if the difference of the RGB of the RGB of current pixel and model look is less than default variation width value, this pixel takes off and turns to white, otherwise carry out dim yellow, moves the look operation;
The step that dim yellow moves the look operation is:
r out=abs(r in-(M 1*r in));
g out=abs(g in-(M 2*g in));
b out=abs(b in-(M 3*b in));
Wherein, r in, g in, b inbe respectively the original R of certain pixel, G, B color component value; r out, g out, b outbe respectively R, G, B output component value after this pixel moves look;
Moving colour system counts M and comprises three variable: M 1, M 2and M 3; M 1, M 2and M 3be nonnegative value; M is calculated by Y, wherein Y=0.257*r in+ 0.504*g in+ 0.98*b in;
The concrete steps of method one are:
According to default iterations iterative Times value, by integer (subtracting 1) the iterative Times that successively decreases at every turn, until iterative Times is 0; When each iterative Times value, carry out following steps: line by line successively to each pixel of selection area, first according to this pixel color value r by column in, g in, b incalculate Y value; Calculate the M value according to Y again, and carry out dim yellow and move the look operation, and the color component value of current pixel point is updated to and carries out the output valve that dim yellow moves the look operation;
The parameter that method two relates to is: the iterations iterative Times that the user arranges, the color typical application color Samples that the variation width variation Width that the user arranges and user select in original image; Concrete steps are:
Step (1): according to the color Samples selected by the user, obtain model look color1 and color2; The rgb value that color1 and color2 are corresponding is respectively (r s1, g s1, b s1) and (r s2, g s2, b s2);
Step (2): according to default iterations iterative Times value, by integer (subtracting 1) the iterative Times that successively decreases at every turn, until iterative Times is 0; When each iterative Times value, carry out following steps: successively each pixel of selection area is carried out to following steps line by line by column:
The rgb value of current pixel point is (r in, g in, b in); As shown in the formula establishment:
(r in-r s1<variation Width) ∩ (g in-g s1<variation Width) ∩ (b in-b s1<variation Width), the output r of this pixel out, g out, b outget initial value;
As shown in the formula establishment:
(r in-r s2<variation Width) ∩ (g in-g s2<variation Width) ∩ (b in-b s2<variation Width), the output r of this pixel out, g out, b outget initial value;
In formula, ∩ is the logical “and” operation;
Otherwise, first according to this pixel color value r in, g in, b incalculate Y value; Calculate the M value according to Y again, and carry out dim yellow and move the look operation, and the color component value of current pixel point is updated to and carries out the output valve that dim yellow moves the look operation.
According to claim 1 based on the simulation mural painting cartoon character on mobile phone and background creative method, it is characterized in that, the parameter that method three relates to is: the color typical application colorSamples that the variation width variation Width that the user arranges and user select in original image; Concrete steps are:
Step (1): the user specifies damage zone on former figure, according to the colorSamples selected by the user, obtains model look color1 and damaged look color2; The rgb value that color1 and color2 are corresponding is respectively (r s1, g s1, b s1) and (r s2, g s2, b s2);
Step (2): successively each pixel of selection area is carried out to following steps line by line by column:
The rgb value of current pixel point is (r in, g in, b in); As current pixel point is positioned at damage zone and meets following formula:
(r in-r s1<variation Width) ∩ (g in-g s1<variation Width) ∩ (b in-b s1<variation Width), the output r of this pixel out, g out, b outget damaged look, i.e. r out=r s2, g out=g s2, b out=b s2; In formula, ∩ is the logical “and” operation.
According to claim 1 based on the simulation mural painting cartoon character on mobile phone and background creative method, it is characterized in that, the parameter that method four relates to is: the color typical application color Samples that the variation width variation Width that the user arranges and user select in original image; Concrete steps are:
Step (1): the full figure gray processing is operated; To reserved data space zero clearing of depositing output image, be white; Obtain model look color1 and color2 according to the color Samples selected by the user; The rgb value that color1 and color2 are corresponding is respectively (r s1, g s1, b s1) and (r s2, g s2, b s2);
Step (2): successively each pixel of image is carried out to following steps, the final Output rusults that the output image finally obtained is this method line by line by column:
The rgb value of current pixel point is (r in, g in, b in); As meet following formula:
(r in-r s1<variation Width) ∩ (g in-g s1<variation Width) ∩ (b in-b s1or meet following formula<variation Width):
(r in-r s2<variation Width) ∩ (g in-g s2<variation Width) ∩ (b in-b s2<variation Width), in formula, ∩ is the logical “and” operation, without any operation, otherwise, according to current pixel color value r in, g in, b incalculate Y value, according to Y, calculate the M value; Carry out again dim yellow and move the look operation.
4. according to described cartoon character on mobile phone and the background creative method based on the simulation mural painting of claim 1-3 any one, it is characterized in that M 1, M 2and M 3the phase step type assignment adopt following formula:
Y<50,M 1=0.4,M 2=0.2,M 3=0.1;
50<Y<200,M 1=0.2,M 2=0.1,M 3=0.05;
Y>200,M 1=0.1,M 2=0.05,M 3=0.25。
5. cartoon character on mobile phone and the background creative method based on the simulation mural painting according to claim 1, is characterized in that, the span of iterations iterative Times is 0~3.
6. according to described cartoon character on mobile phone and the background creative method based on the simulation mural painting of claim 1-3 any one, it is characterized in that, the span of variation width variation Width is 1~80.
CN201210124182.4A 2012-04-25 2012-04-25 Mobile phone cartoon character and background creation method based on simulation frescoes Active CN102663798B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210124182.4A CN102663798B (en) 2012-04-25 2012-04-25 Mobile phone cartoon character and background creation method based on simulation frescoes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210124182.4A CN102663798B (en) 2012-04-25 2012-04-25 Mobile phone cartoon character and background creation method based on simulation frescoes

Publications (2)

Publication Number Publication Date
CN102663798A CN102663798A (en) 2012-09-12
CN102663798B true CN102663798B (en) 2014-01-01

Family

ID=46773276

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210124182.4A Active CN102663798B (en) 2012-04-25 2012-04-25 Mobile phone cartoon character and background creation method based on simulation frescoes

Country Status (1)

Country Link
CN (1) CN102663798B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102254307A (en) * 2011-07-15 2011-11-23 深圳市万兴软件有限公司 Color translation processing method and device
CN102306389A (en) * 2011-08-03 2012-01-04 湖南互动传媒有限公司 Method for realizing embossment effect of animation character and background of mobile phone

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009159284A (en) * 2007-12-26 2009-07-16 Nec Access Technica Ltd Color data conversion apparatus, color data conversion method and color data conversion program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102254307A (en) * 2011-07-15 2011-11-23 深圳市万兴软件有限公司 Color translation processing method and device
CN102306389A (en) * 2011-08-03 2012-01-04 湖南互动传媒有限公司 Method for realizing embossment effect of animation character and background of mobile phone

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JP特开2009-159284A 2009.07.16

Also Published As

Publication number Publication date
CN102663798A (en) 2012-09-12

Similar Documents

Publication Publication Date Title
US10078325B2 (en) Systems and methods for designing programmable parts for models and optimizing 3D printing
CN109427088A (en) A kind of rendering method and terminal of illumination simulation
CN108564646A (en) Rendering intent and device, storage medium, the electronic device of object
CN105631925B (en) Based on the pretreated three-dimensional scenic generation method of OSG 3 d rendering engine and device
CN108074274A (en) BIM model real-time rendering method and devices based on browser
CN107567642A (en) System, method and apparatus for the three-dimensional modeling based on voxel
CN108933895A (en) Three dimensional particles special efficacy generation method, device and electronic equipment
CN105354872A (en) Rendering engine, implementation method and producing tools for 3D web game
CN110333924A (en) A kind of image morphing method of adjustment, device, equipment and storage medium
CN105468353A (en) Implementation method and apparatus for interface animation, mobile terminal, and computer terminal
CN104392479B (en) Method of carrying out illumination coloring on pixel by using light index number
Afsari et al. Integrated generative technique for interactive design of brickworks.
CN109903365A (en) Rendering method and rendering system based on render tree
CN102306389B (en) Method for realizing embossment effect of animation character and background of mobile phone
CN103310488A (en) mental ray rendering-based virtual reality rendering method
CN102521867B (en) Mobile phone anime character and background creation method
CN105957133A (en) Method and device for loading maps
CN102663798B (en) Mobile phone cartoon character and background creation method based on simulation frescoes
CN106157353A (en) A kind of word rendering intent and word rendering device
Wang et al. Research and design of digital museum based on virtual reality
CN106780700B (en) Game personalized 3D coloring method based on VR technology
CN112150592B (en) Animation file generation method and device, storage medium and electronic equipment
Li et al. The interior environment design for entrepreneurship education under the virtual reality and artificial intelligence-based learning environment
CN113838155A (en) Method and device for generating material map and electronic equipment
Yi Computer digital art design based on 3D animation special effects

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