CN104091025B - Smoking effect reality sense simulation method - Google Patents

Smoking effect reality sense simulation method Download PDF

Info

Publication number
CN104091025B
CN104091025B CN201410331612.9A CN201410331612A CN104091025B CN 104091025 B CN104091025 B CN 104091025B CN 201410331612 A CN201410331612 A CN 201410331612A CN 104091025 B CN104091025 B CN 104091025B
Authority
CN
China
Prior art keywords
sootiness
brightness decay
region
brightness
vertical direction
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
CN201410331612.9A
Other languages
Chinese (zh)
Other versions
CN104091025A (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.)
Tsinghua University
Original Assignee
Tsinghua University
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 Tsinghua University filed Critical Tsinghua University
Priority to CN201410331612.9A priority Critical patent/CN104091025B/en
Publication of CN104091025A publication Critical patent/CN104091025A/en
Application granted granted Critical
Publication of CN104091025B publication Critical patent/CN104091025B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a smoking effect reality sense simulation method. The method includes the steps that first, a smoking area is selected in an HSV image, and the brightness decay factor of any point in the smoking area is the product of a horizontal direction brightness decay factor and a vertical direction brightness decay factor; second, the brightness of the smoking area is changed by interactively adjusting the value of the horizontal direction brightness decay factor and the value of the vertical direction brightness decay factor; third, whether the brightness of the smoking area achieves the expected smoking effect or not is judged, it yes, operations are stopped, and if not, the operations from the first step to the third step are performed on the smoking area again till the smoking effect is achieved. According to the method, the smoking effect is simulated by decaying the brightness in the HSV color space, the whole smoking process from the brand new state to the thorough sooting effect can be represented when the brightness decays from the original value to 0, the smoking distribution and the smoking intensity can be interactively adjusted in the two orthogonal directions including the horizontal direction and the vertical direction, the expected smoking effect can be generated through simple and effective adjustment, and the sense of reality is strong.

Description

Sootiness effect sense of reality analogy method
Technical field
The present invention relates to technical field of image processing, particularly to sootiness effect sense of reality analogy method.
Background technology
The simulation of sootiness effect sense of reality be a kind of technology based on computer disposal image so as to present due to making a fire, The sootiness effect that the many reasons such as light a lamp, go to temple to pray, burning lead to, can be simulated to arts work such as mural painting, oil paintings, in art The fields such as the virtual reparation of product, digital art creation have important theoretical research and actual application value.
At present, the simulation of sootiness effect sense of reality mainly includes following two methods (with to mural painting sootiness effect sense of reality mould It is intended to be example):
First method be using the image softwares such as PhotoShop carry out sootiness effect sense of reality simulation, its core be One layer of sootiness figure layer is covered on the figure layer of normal picture.Basic procedure:First, select sootiness region;Then, newly-built figure layer 1, if Putting foreground is Lycoperdon polymorphum Vitt, and setting suitable " Feather Radius " is sprouted wings, and makes transition inside and outside sootiness region natural, simultaneously in figure layer In panel, " mixed model " is set to " color burn ", according to circumstances adjusts opacity;Subsequently, duplicate layer 1 is as figure Layer 2, " mixed model " is set to " bottom folded by positive ", according to circumstances arranges opacity;Finally, select " the figure in menu Picture>Adjustment>Form and aspect/saturation ", are adjusted simulating sootiness effect as needed.
Second method is to carry out the simulation of sootiness figure trace using fire disaster simulation software, and its core is that simulated fire occurred Journey, intercepts the image in sootiness region from scene after terminating.The most frequently used fire disaster simulation software is FDS (Fire Dynamics Simulator, fire kinetic-simulator), basic procedure:First, conflagration area size is set, places construction material and indoor thing Product;Then, point of origin is set, starts fire disaster simulation;Finally, fire disaster simulation is stopped according to combustion case, intercept desired zone Sootiness vestige.
But above two method carries out sootiness effect simulation all existing defects, specific as follows:
(1) limited by the scope of application:First method lacks theoretical basiss, only has application in terms of virtual sootiness adornment at present, But sootiness mural painting is with sootiness adornment and incomplete same, so cannot reflect that smoke particle is attached to wall painting surface using the method The true effect presenting afterwards.Although second method is set up on smog movement and attachment theoretical basiss, generate Sootiness mural painting is to suffer from fire to intercept, after destroying, the result that sootiness vestige obtains again in mural painting, and fire is neither the master of sootiness mural painting Want the origin cause of formation, and be not unique origin cause of formation, sootiness mural painting the origin cause of formation such as is also gone to temple to pray except fire, carries out sootiness simulation in this way The suitability is extremely limited.
(2) do not meet truth:The sootiness region that first method generates is completed by feathering operation, leads to its sootiness Intensity gradually weakens from center to edge, but under practical situation, the sootiness intensity distributions in sootiness region are simultaneously irregular, therefore, the party Method cannot accurately describe the sootiness intensity distributions under practical situation it is impossible to obtain the sootiness effect having compared with high realism.Second The method of kind is generally used for fire disaster simulation and genetic analysis, represents that smog divides using from indigo plant to red continuous color in simulation process Cloth is strong and weak, and the generation result of the method is the cigarette trace for describing crock distribution characteristicss, is substantially in fire disaster simulation scene Individual section, its surface color and polish is also the subset from indigo plant to red continuous color, and therefore, the color that the method generates result does not meet cigarette The real conditions of smoked mural painting.
(3) operating process is loaded down with trivial details and is difficult to grasp:Both approaches are required for arranging quantity of parameters, and between parameter also There is many associations, second method also needs to according to practical situation design and builds scene of fire, operates comparatively laborious, Need operator to possess certain experience and skill, be difficult to grasp.
In sum, prior art carries out there is sense of reality poor lacking during sootiness effect simulation to arts work such as mural paintings Fall into.
Content of the invention
(1) technical problem to be solved
The technical problem to be solved in the present invention is how to improve the sense of reality of sootiness effect simulation.
(2) technical scheme
For solving above-mentioned technical problem, the invention provides sootiness effect sense of reality analogy method, including:
S1, in HSV image select sootiness region, in described sootiness region the brightness decay factor of any point be level side Product to the brightness decay factor and the vertical direction brightness decay factor;
S2, by the value of the interactive adjustment horizontal direction brightness decay factor and the vertical direction brightness decay factor to change State the brightness in sootiness region;
S3, judging whether the brightness in sootiness region reaches expected sootiness effect, if reached, stopping, otherwise to described The operation of sootiness region repeat step S1~S3, till reaching.
Optionally, also include before described step S1:
Image is converted to the array in hsv color space in the array of RGB color, obtains HSV image.
Optionally, also include before described step S2:
The initialization horizontal direction brightness decay factor and the vertical direction brightness decay factor are so as to value at any point is equal For 1, corresponding horizontal direction brightness decay adjustment curve and vertical direction brightness decay adjustment curve are straight line.
Optionally, in described sootiness region after described step S2 any point (x, y) brightness V'(x, y)=V (x, y) × HBVal (h) × VBVal (v), wherein x and y represent abscissa and vertical coordinate respectively, and V (x, y) is sootiness area before step S2 The brightness in domain any point (x, y), HBVal (h) is value at h for the horizontal direction brightness decay factor, and h is that described horizontal direction is bright Abscissa with (x, y) corresponding point on degree Attenuation adjustable curve, VBVal (v) is the vertical direction brightness decay factor at v Value, v is the abscissa on described vertical direction brightness decay adjustment curve with (x, y) corresponding point.
Optionally, described horizontal direction brightness decay adjustment curve and described vertical direction brightness decay adjustment curve are Bezier.
Optionally, described Bezier is 3 Beziers, and function expression is:
B (t)=P0(1-t)3+3P1t(1-t)2+3P2t2(1-t)+P3t3, t ∈ [0,1], wherein B (t) are data point, P0、 P1、P2、P3For 4 control point on described Bezier.
Optionally, described sootiness region be shaped as rectangle.
Optionally, after described step S2, also include before step S3:
Set up described horizontal direction brightness decay adjustment curve, described vertical direction brightness decay adjustment curve and described cigarette The corresponding relation in smoked region;
The upper left corner in described sootiness region, bottom right angular coordinate are (Left, Top), (Right, Bottom) respectively, described water Square to brightness decay adjustment curve abscissa scope be [Hmin,Hmax], then described horizontal direction brightness decay adjustment curve Upper any point h ∈ [Hmin,Hmax] in described sootiness region line correspondenceDescribed perpendicular Nogata is [V to brightness decay adjustment curve abscissa scopemin,Vmax], then on described vertical direction brightness decay adjustment curve Any point v ∈ [Vmin,Vmax] in described sootiness region line correspondence
Optionally, the irregular figure of the generally circular in shape or closing in described sootiness region.
(3) beneficial effect
Sootiness effect sense of reality analogy method provided in an embodiment of the present invention, declines using to brightness in hsv color space Subtract to simulate sootiness effect so that the brightness of HSV image decays to 0 from original value and just can show from brand-new to thorough sooting Whole smoking process, and using the horizontally and vertically distribution of two orthogonal direction interactive adjustment sootiness and power, can be by simple Effectively sootiness effect expected from regulative mode generation, sense of reality is stronger, and control method simply it is easy to operation, is easy to repair simultaneously Change, there is repeatability.
Brief description
Fig. 1 is the flow chart of steps of the sootiness effect sense of reality analogy method providing in the embodiment of the present invention;
Fig. 2 is the initialized schematic diagram of horizontal direction brightness decay adjustment curve in the embodiment of the present invention;
Fig. 3 is the initialized schematic diagram of vertical direction brightness decay adjustment curve in the embodiment of the present invention;
Fig. 4 is the schematic diagram of horizontal direction brightness decay adjustment curve after regulation in the embodiment of the present invention;
Fig. 5 is the schematic diagram of vertical direction brightness decay adjustment curve after regulation in the embodiment of the present invention;
Fig. 6 is present invention flow chart so that mural painting is carried out with the simulation of sootiness effect sense of reality as a example.
Specific embodiment
With reference to the accompanying drawings and examples, the specific embodiment of the present invention is described in further detail.Hereinafter implement Example is used for the present invention is described, but is not limited to the scope of the present invention.
The art work () suffers from the destructive process of sootiness taking mural painting as a example, is the mistake that smoke particle constantly adheres in wall painting surface Journey.From color characteristics, wall painting pigment reflection and its color identical light, so human eye can experience the abundant of mural painting color Property, but black smoke particle absorbs the light of shades of colour.So, for the grid of any pixel of mural painting image place, with cigarette The increase of mist granule adhesion amount, the light (energy) that it reflects gradually weakens, due to not introducing other colors, so reflection Color category be not changed in, but brightness is gradually lowered.Therefore, in hsv color space, the relatively normal mural painting of sootiness mural painting For, it is considered as tone H and saturation S does not change, brightness V occurs the result of decay.For mural painting image, keep H and S of each pixel is constant, and V is gradually lowered to 0, can show the cigarette by brand-new state to thorough sooting for the mural painting well Smoked overall process.It follows that the simulation of sootiness mural painting sense of reality is carried out according to hsv color Space Theory, there is the preferable suitability.
Based on above-mentioned principle, the invention provides sootiness effect sense of reality analogy method, steps flow chart is as shown in figure 1, have Body comprises the following steps:
Step S1, in HSV image select sootiness region, in sootiness region the brightness decay factor of any point be level side Product to the brightness decay factor and the vertical direction brightness decay factor.
Step 2, changed by the value of the interactive adjustment horizontal direction brightness decay factor and the vertical direction brightness decay factor Become the brightness in sootiness region.
Step S3, judging whether the brightness in sootiness region reaches expected sootiness effect, if reached, stopping, otherwise right The operation of sootiness region repeat step S1~S3, till reaching.
Above-mentioned steps can be to selected sootiness region, by two orthogonal direction brightness decay adjustment curves of interactive adjustment Shape, thus adjusting the value of the brightness decay factor on correspondence direction.Comprehensive use level direction brightness decay factor and vertically Direction brightness decay factor, can adjust the brightness of any point in two-dimentional HSV image, be achieved in sootiness effect.
Optionally, also include before step S1 in the present embodiment:Image is converted to HSV in the array of RGB color The array of color space, obtains HSV image.
Hsv color space is a kind of user oriented color model, and tone H (Hue) therein represents color information, i.e. institute The position of the spectral color at place, this parameter is represented with angular metric, and span is 0 °~360 °, starts by counterclockwise from redness Direction calculating, redness is 0 °, green is 120 °, blueness is 240 °;Their complementary color is:Yellow is 60 °, cyan is 180 °, product Red is 300 °;Saturation S (Saturation) represents the purity of color, scope from 0 to 1, it be expressed as selected color purity and Ratio between this color maximum purity, during S=0, only gray scale, during S=1, purity highest;Brightness V (Value) represents color Light levels, scope is from 0 (black) to 1 (white).Array P preserves image PicorigIn the data of RGB color, this number Group element Pi,jIt is the structure that length is 3, preserve image PicorigIn the rgb value at point (i, j) place, that is,:Pi,j={ Ri,j,Gi,j, Bi,j, i=1 ... ..., M, j=1 ... ..., N, wherein Ri,j、Gi,j、Bi,jIt is respectively the redness at point (i, j) place for the image pixel value Component, green component and blue component.
If Ri,j,Gi,j,Bi,jIn maximum, minima be respectively MaxPi,jAnd MinPi,j, according to formula 1 by Pi,jConversion Data Q for hsv color spacei,j={ Hi,j,Si,j,Vi,j}:
Wherein Hi,j、Si,j、Vi,jThe respectively tone of image, saturation and brightness, i=1 ... ..., M, j=1 ... ..., N, M and N is respectively the image-region size with vertical direction in the horizontal direction.
Optionally, also include before step S2:
The initialization horizontal direction brightness decay factor and the vertical direction brightness decay factor are so as to value at any point is equal For 1, corresponding horizontal direction brightness decay adjustment curve and vertical direction brightness decay adjustment curve are straight line, that is, before adjusting Article two, brightness decay adjustment curve is all in the horizontal linear of the top, as shown in Figures 2 and 3, now HSV image is not done Any decay.Wherein Fig. 2 is the initialized schematic diagram of horizontal direction brightness decay adjustment curve, and abscissa is represented with h, vertical coordinate Represent horizontal direction brightness decay factor HBVal (h), size is at the beginning of vertical direction brightness decay adjustment curve from 0~1, Fig. 3 The schematic diagram of beginningization, abscissa is represented with v, and vertical coordinate represents horizontal direction brightness decay factor Ⅴ BVal (v), and size is from 0~1.
Optionally, the horizontal direction brightness decay adjustment curve in the present embodiment and vertical direction brightness decay adjustment curve It is Bezier.Bezier is made up of with node line segment, and node is the fulcrum that can drag, and line segment is as telescopic skin Muscle.Bezier is considerable parameter curve in computer graphicss, and the pen tool in drawing tool software is general For making Bezier.
In sootiness simulation process, the brightness how changing pending image all pixels point effectively in real time is the present invention Key, therefore the present invention adopt orthogonal interactive adjustment method.Because Bezier is easy to adjustment, interactivity by force, so this The brightness decay adjustment curve on horizontally and vertically direction is represented respectively using two Beziers, using two in embodiment Bezier interacts, thus realizing more accurate brightness regulation, improves the sense of reality of sootiness effect simulation.
The brightness decay factor of any for normal picture pixel is considered as horizontally and vertically on two orthogonal directions the method The product of the brightness decay factor, just can be controlled by the brightness decay factor in interactive adjustment horizontally and vertically two orthogonal directions The brightness decay factor of entire image processed, thus complicated two-dimensional brightness decay factor interactive adjustment is converted to simply one-dimensional Brightness decay factor interactive adjustment;During the often regulation of the one-dimensional brightness decay factor, by the way of pulling adjustment curve Change the brightness decay factor.Sootiness effect directly can be produced on normal picture using orthogonal interactive adjustment method, speed is relatively Hurry up;And it is easy to modification, vision smoothness, the sootiness effect of requirement can be met.
Optionally, the Bezier in the present embodiment is 3 Beziers, and function expression is:
B (t)=P0(1-t)3+3P1t(1-t)2+3P2t2(1-t)+P3t3,t∈[0,1] (2)
Wherein B (t) is data point, P0、P1、P2、P3For 4 control point on Bezier.The offset of Bezier Put it was determined that still the form of Bezier to be determined by control point, so also needing to by data point reverse control point.If Data point B0、B1、B2、B3It is that horizontally or vertically equally spaced 4 points of abscissa are (i.e. public on direction brightness Attenuation adjustable curve In formula (2), parameter t takes corresponding point when 0,1/3,2/3,1 respectively), then 4 obtaining control point is respectively:
Optionally, when being shaped as rectangle of sootiness region in the present embodiment, after step S2, also includes before step S3:
Set up horizontal direction brightness decay adjustment curve, vertical direction brightness decay adjustment curve corresponding with sootiness region Relation.
Specifically, the smokiness in sootiness region is with horizontally and vertically both direction brightness decay adjustment curve change of shape And change, if sootiness regional extent is { (x, y) | Left≤x≤Right, Top≤y≤Bottom }, i.e. the upper left in sootiness region Angle, bottom right angular coordinate are (Left, Top), (Right, Bottom) respectively.
The scope of horizontal direction brightness decay adjustment curve abscissa is [Hmin,Hmax], then horizontal direction brightness decay is adjusted Any point h ∈ [H on pitch curvemin,Hmax] in sootiness region line correspondence
Vertical direction brightness decay adjustment curve abscissa scope is [Vmin,Vmax], then vertical direction brightness decay is adjusted Any point v ∈ [V on curvemin,Vmax] in sootiness region line correspondence
Optionally, in sootiness region after step S2 any point (x, y) brightness:
V'(x, y)=V (x, y) × HBVal (h) × VBVal (v) (4)
Wherein x and y represents abscissa and vertical coordinate respectively, and V (x, y) is sootiness region any point (x, y) before step S2 Brightness, HBVal (h) is value at h for the horizontal direction brightness decay factor, and h is horizontally oriented on brightness decay adjustment curve The abscissa of point corresponding with (x, y), VBVal (v) is value at v for the vertical direction brightness decay factor, and v is that vertical direction is bright Abscissa with (x, y) corresponding point on degree Attenuation adjustable curve, the value of h and v is as follows respectively:
It should be noted that the shape in sootiness region, in addition to can be for rectangle, can also be circle in the present embodiment Or the irregular figure of closing, it is also by adjusting the Bezier of two orthogonal directions, the sootiness effect in sootiness region to be entered Row simulation, principle is similar with calculating, and here is omitted.
Provide specific examples below in the present embodiment, using said method, the simulation of mural painting sootiness effect sense of reality is entered Row illustrates, flow process is as shown in fig. 6, specifically include:
Step S10, reads original mural painting image, is shown in designated area.
Select the original mural painting image Pic that size is M × Norig, it is read pixel-by-pixel in two-dimensional structure body array P. The size of original mural painting image is not fixed, but display area size is fixed, so also needing to according to practical situation to original wall Draw as carrying out scaling process.If image Aspect Ratio is identical with viewing area Aspect Ratio, directly zoom in and out; But in most of the cases, image Aspect Ratio and viewing area Aspect Ratio may be different, so image is in viewing area After display, may there is extraneous region in the two ends in horizontal or vertical direction.Need accurately to calculate image zooming ratio so as to complete Whole be shown in viewing area after, level (vertical) direction is filled, and vertical (horizontal) direction allows there is extraneous region.If display Area size is M' × N', then horizontal direction scaling, than ScaleH=M'/M, vertical direction scaling than ScaleV=N'/N, uses two In person, minima Scale=Min { ScaleH, ScaleV } is to image PicorigCarry out scaling, the image ShowPic obtainingorigCan To meet above-mentioned requirements.
Step S20, image obtained in the previous step is converted to hsv color space by RGB color, obtains arrayAnd preserve image PicorigData in hsv color space.
Step S30, selects sootiness region, the initialization horizontal direction brightness decay factor and vertical direction according to preset need The brightness decay factor is so as to value at any point is 1.Specifically, carry out to exist by mouse during sootiness regional choice Image PicorigOn chosen, and determine the scope in region according to the mouse event in operating process.
Taking determine rectangular area using mouse as a example, its flow process is as follows:First, setting area selection marker is True, opens Begin to select sootiness region;Then, mouse is moved to image-region, press left mouse button, if mouse pointer and viewing area are left Coordinate under screen coordinate system for the upper angle is respectively (MouX, MouY), (ShowLeft, ShowTop), and viewing area is vertical The height (width) of (horizontal) direction extraneous region is Delta, then sootiness region starting point is in normal mural painting image coordinate system Position (StartX, StartY) is as shown in Equation 6:
Continue to move to mouse pointer, then sootiness region also changes therewith, if left mouse button properly, is unclamped in region, If now coordinate under screen coordinate system for the mouse pointer is (MouX', MouY'), then sootiness region final point is in normal mural painting The position (EndX, EndY) of image coordinate system is as shown in Equation 7:
According to starting point (StartX, StartY) and end point (EndX, EndY) it is possible to determine sootiness region.If cigarette The upper left corner in smoked region, bottom right angular coordinate are (Left, Top), (Right, Bottom) respectively, then obtain:
Certainly, selecting can also be using the mode beyond mouse, simply with conventional Mus in the present embodiment during sootiness region It is designated as example to illustrate.Sootiness region therein can be the irregular figure of rectangle, circle or closing.
Step S40, by pulling horizontal direction brightness decay adjustment curve and vertical direction brightness decay adjustment curve Mode adjusts the brightness in sootiness region, thus obtaining different degrees of sootiness effect.
Every brightness decay adjustment curve has 4 data points, and mouse pointer is moved to regulation window, presses mouse left Mouse pointer coordinate can be mapped to, by executing the operation such as the viewport transform, back projection, the world's seat adjusting window place by key In mark system.If mouse pointer coordinate and certain data point distance are near enough, then just can move this by pulling mouse pointer Data point, thus change the shape of brightness decay adjustment curve.Initialize horizontal direction brightness decay regulation song by adjusting Fig. 2 Line and Fig. 3 initialize the shape of vertical direction brightness decay adjustment curve, the horizontal direction brightness decay adjustment curve obtaining and Vertical direction brightness decay adjustment curve is respectively as shown in Figure 4 and Figure 5.While pulling brightness decay adjustment curve, permissible The brightness of synchronized update sootiness region each point, thus represent the smokiness situation of change in sootiness region well.
Step S50, judges whether sootiness effect reaches expected requirement (i.e. expected sootiness effect).Basis for estimation is mainly Whether true to nature observe the sootiness mural painting generating, if sense of reality meets needs, jump to step S60;Otherwise jump to step S30 proceeds sootiness simulation, till meeting requirement.
Step S60, preserves the sootiness mural painting image obtaining, concrete operations are open file dialogs, selects suitable road Footpath, file type and filename, the sootiness mural painting of generation is preserved.
In sum, the sootiness effect sense of reality analogy method that the present invention provides has following three aspect advantages:
(1) strong sense of reality.The present invention adopts brightness decay to simulate sootiness effect, meets brightness after mural painting is destroyed by sootiness The practical situation of decay;Additionally, also by the brightness decay curve in interactive adjustment horizontally and vertically two orthogonal directions, permissible Obtain the sootiness mural painting under various sootiness intensity distributions forms, meet mural painting and be subject to sootiness destroyed area sootiness intensity distributions irregular Truth.
(2) step is simply and readily grasped.Traditional method generally requires 3~4 basic steps, and each basic step is also wrapped If containing dry run, some complex operations also will continue to segment, so complex steps.The present invention only has 2 basic steps:Select cigarette Smoked region, dragging brightness decay adjustment curve, are all conventional operations, need not continue to segment, therefore the present invention drastically reduce the area The operating procedure of traditional sootiness analogy method, operation is fairly simple, for example:Regional choice, curve adjustment etc., are easily typically used Family is grasped.
(3) widely applicable.The present invention sets up and is formed on model basis in the sootiness mural painting based on brightness decay, is independent of In specific sector application, there is stronger versatility.
Embodiment of above is merely to illustrate the present invention, and not limitation of the present invention, common about technical field Technical staff, without departing from the spirit and scope of the present invention, can also make a variety of changes and modification, therefore all Equivalent technical scheme falls within scope of the invention, and the scope of patent protection of the present invention should be defined by the claims.

Claims (8)

1. sootiness effect sense of reality analogy method is it is characterised in that include:
S1, in HSV image select sootiness region, in described sootiness region the brightness decay factor of any point be horizontal direction bright Degree decay factor and the product of the vertical direction brightness decay factor;
S2, described cigarette is changed by the value of the interactive adjustment horizontal direction brightness decay factor and the vertical direction brightness decay factor The brightness in smoked region;
S3, judging whether the brightness in sootiness region reaches expected sootiness effect, if reached, stopping, otherwise to described sootiness The operation of region repeat step S1~S3, till reaching;
Wherein, after described step S2, also include before step S3:
Set up described horizontal direction brightness decay adjustment curve, described vertical direction brightness decay adjustment curve and described sootiness area The corresponding relation in domain;
The upper left corner in described sootiness region, bottom right angular coordinate are (Left, Top), (Right, Bottom) respectively, described level side It is [H to the scope of brightness decay adjustment curve abscissamin,Hmax], then described horizontal direction brightness decay adjustment curve is taken up an official post 1 point of h ∈ [Hmin,Hmax] in described sootiness region line correspondenceDescribed vertical side It is [V to brightness decay adjustment curve abscissa scopemin,Vmax], then arbitrary on described vertical direction brightness decay adjustment curve Point v ∈ [Vmin,Vmax] in described sootiness region line correspondence
2. sootiness effect sense of reality analogy method according to claim 1 is it is characterised in that also wrap before described step S1 Include:
Image is converted to the array in hsv color space in the array of RGB color, obtains HSV image.
3. sootiness effect sense of reality analogy method according to claim 1 is it is characterised in that also wrap before described step S2 Include:
Initialize the horizontal direction brightness decay factor and the vertical direction brightness decay factor so as to value at any point is 1, Corresponding horizontal direction brightness decay adjustment curve and vertical direction brightness decay adjustment curve are straight line.
4. sootiness effect sense of reality analogy method according to claim 3 is it is characterised in that described after described step S2 The brightness V'(x of any point (x, y) in sootiness region, y)=V (x, y) × HBVal (h) × VBVal (v), wherein x and y are respectively Represent abscissa and vertical coordinate, V (x, y) is the brightness in sootiness region any point (x, y) before step S2, HBVal (h) is level Value at h for the direction brightness decay factor, h is on described horizontal direction brightness decay adjustment curve and (x, y) corresponding point Abscissa, VBVal (v) is value at v for the vertical direction brightness decay factor, and v is that described vertical direction brightness decay adjusts song Abscissa with (x, y) corresponding point on line.
5. the sootiness effect sense of reality analogy method according to claim 3 or 4 is it is characterised in that described horizontal direction is bright Degree Attenuation adjustable curve and described vertical direction brightness decay adjustment curve are Bezier.
6. sootiness effect sense of reality analogy method according to claim 5 is it is characterised in that described Bezier is 3 Secondary Bezier, function expression is:
B (t)=P0(1-t)3+3P1t(1-t)2+3P2t2(1-t)+P3t3, t ∈ [0,1], wherein B (t) are data point, P0、P1、P2、 P3For 4 control point on described Bezier.
7. sootiness effect sense of reality analogy method according to claim 1 is it is characterised in that the shape in described sootiness region For rectangle.
8. sootiness effect sense of reality analogy method according to claim 1 is it is characterised in that the shape in described sootiness region For circular or closing irregular figure.
CN201410331612.9A 2014-07-11 2014-07-11 Smoking effect reality sense simulation method Active CN104091025B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410331612.9A CN104091025B (en) 2014-07-11 2014-07-11 Smoking effect reality sense simulation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410331612.9A CN104091025B (en) 2014-07-11 2014-07-11 Smoking effect reality sense simulation method

Publications (2)

Publication Number Publication Date
CN104091025A CN104091025A (en) 2014-10-08
CN104091025B true CN104091025B (en) 2017-02-15

Family

ID=51638741

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410331612.9A Active CN104091025B (en) 2014-07-11 2014-07-11 Smoking effect reality sense simulation method

Country Status (1)

Country Link
CN (1) CN104091025B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104599293B (en) * 2015-02-06 2017-07-07 清华大学 The analogy method of sootiness mural painting dynamic formation process

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1571011A (en) * 2003-11-21 2005-01-26 友达光电股份有限公司 Method for displaying image on optical display device with discrepancy brightness attenuation pixel
CN101674390A (en) * 2008-09-12 2010-03-17 致伸科技股份有限公司 Method for adjusting brightness of image
CN101815158A (en) * 2009-02-20 2010-08-25 华晶科技股份有限公司 Compensation method for improving color shadow in digital images

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1571011A (en) * 2003-11-21 2005-01-26 友达光电股份有限公司 Method for displaying image on optical display device with discrepancy brightness attenuation pixel
CN101674390A (en) * 2008-09-12 2010-03-17 致伸科技股份有限公司 Method for adjusting brightness of image
CN101815158A (en) * 2009-02-20 2010-08-25 华晶科技股份有限公司 Compensation method for improving color shadow in digital images

Also Published As

Publication number Publication date
CN104091025A (en) 2014-10-08

Similar Documents

Publication Publication Date Title
CN106056658B (en) A kind of virtual objects rendering method and device
CN105719326A (en) Realistic face generating method based on single photo
Lou A Virtual Reality Teaching System for Graphic Design Course.
CN104463938A (en) Three-dimensional virtual make-up trial method and device
CN103489224B (en) A kind of interactive three-dimensional point cloud color edit methods
CN109035381B (en) Cartoon picture hair rendering method and storage medium based on UE4 platform
JP3141245B2 (en) How to display images
CN105809733A (en) SketchUp-based campus three-dimensional hand-drawn map construction method
CN105118076B (en) Based on over-segmentation and the local image colorization method with global coherency
CN104091366B (en) Three-dimensional intelligent digitalization generation method and system based on two-dimensional shadow information
CA2286365A1 (en) Methods and apparatus for changing a color of an image
CN106384375A (en) Coloring fusion method and device for vegetation bottom in electronic game scene
CN107273622A (en) Digital yarn emulation mode based on fiber
CN110349261A (en) The method for generating three-dimensional thermodynamic chart based on GIS
CN104091025B (en) Smoking effect reality sense simulation method
CN109308380B (en) Embroidery artistic style simulation method based on non-photorealistic sense
CN105096359A (en) Drawing method of cucurbit pyrography artistic style
Kim et al. VR Color Picker: Three-Dimensional Color Selection Interfaces
CN106683165A (en) Four-dimensional visualizations method of cultural heritage
CN102074042A (en) Pattern generation system capable of utilizing everyday objects to generate rich pattern effect and method thereof
TWI722794B (en) Method for three-dimension graphics imaging
CN110264564A (en) A kind of video display style emulation mode based on colour atla mapping and Histogram Mapping
CN103400410B (en) A kind of scab pattern outline interactive rendering intent and device
Mian et al. Generating Method of Planting Map for Three-Dimensional Rice Field Painting Based on Fixed Point Perspective
Wang et al. IdiotPencil: an interactive system for generating pencil drawings from 3D polygonal models

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