CN103810732B - A kind of dynamic texture generation method - Google Patents
A kind of dynamic texture generation method Download PDFInfo
- Publication number
- CN103810732B CN103810732B CN201410067051.6A CN201410067051A CN103810732B CN 103810732 B CN103810732 B CN 103810732B CN 201410067051 A CN201410067051 A CN 201410067051A CN 103810732 B CN103810732 B CN 103810732B
- Authority
- CN
- China
- Prior art keywords
- texture image
- isotropism
- texture
- dynamic
- field picture
- 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.)
- Expired - Fee Related
Links
- 239000011159 matrix material Substances 0.000 claims abstract description 14
- 238000006073 displacement reaction Methods 0.000 claims abstract description 6
- 238000000034 method Methods 0.000 claims description 8
- 210000001215 Vagina Anatomy 0.000 claims description 5
- 108010063499 Sigma Factor Proteins 0.000 claims description 2
- 241001466460 Alveolata Species 0.000 description 3
- 239000011435 rock Substances 0.000 description 3
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 3
- 235000007926 Craterellus fallax Nutrition 0.000 description 2
- 240000007175 Datura inoxia Species 0.000 description 2
- 235000020127 ayran Nutrition 0.000 description 2
- 238000010192 crystallographic characterization Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000000875 corresponding Effects 0.000 description 1
- 239000006185 dispersion Substances 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000001228 spectrum Methods 0.000 description 1
- 230000010415 tropism Effects 0.000 description 1
Abstract
The invention provides a kind of dynamic texture generation method, the method comprises the steps: that S1. definition generates size x*y and picture number n of texture image;S2. several obediences of stochastic generation alpha Stable distritation SαThe stationary increment X of (σ, β, μ);S3. choose from the stationary increment X of stochastic generation in the 2 dimension matrixes that x*y variable write pre-sets, utilize random midpoint displacement method that this matrix is processed, obtain the isotropism texture image that size is x*y;S4. step S2 S3 is repeated, until generating n frame isotropism texture image;S5. n two field picture write video file step S4 obtained, generates isotropism dynamic texture.Isotropism texture image input structure wave filter can also be obtained anisotropic texture image, and then generates anisotropy dynamic texture in the present invention.The method of the invention can generate more rich dynamic texture.
Description
Technical field
The invention belongs to field of virtual reality, be specifically related to a kind of dynamic texture generation method.
Background technology
Texture is the natural surface that a class is complicated, and what it was expressed it is critical only that the mathematics to texture is built
Mould.At present, the texture that manually generated texture predominantly produces based on FBM model, FBM mould
Type assumes that texture has preferable self-similarity, its increment Gaussian distributed, and has each
To the feature of the same sex.
But, during actual natural texture is analyzed, find the most eurypalynous texture not
There is the statistical property of FBM model, such as rock surface, carry alveolate sea water background etc., only
Minority such as hydrothermal solution texture is had to meet FBM model.The FBM model that has its source in of problem is assumed:
The increment Gaussian distributed of texture, this makes it that description of texture is confined to certain scope
In, it is impossible to widely texture is described.
Summary of the invention
For the deficiencies in the prior art, the present invention provides a kind of dynamic texture generation method, it is possible to
Generate abundant dynamic texture.
For achieving the above object, the present invention is achieved by the following technical programs:
A kind of dynamic texture generation method, the method comprises the steps:
S1. definition generates size x*y and picture number n of texture image;
S2. several obediences of stochastic generation alpha Stable distritation SαThe stationary increment X of (σ, β, μ),
Wherein α is characterized the factor, σ is scale parameter, β is position skew centered by the deflection factor, μ
Parameter;
S3. from the stationary increment X of stochastic generation, choose x*y variable write 2 pre-set
In dimension matrix, utilizing random midpoint displacement method to process this matrix, obtaining size is x*y
Isotropism texture image;
S4. step S2-S3 is repeated, until generating n frame isotropism texture image;
S5. n two field picture write video file step S4 obtained, generates the dynamic stricture of vagina of isotropism
Reason.
Wherein, described utilizing random midpoint displacement method to process this matrix, obtaining size is
The isotropism texture image of x*y is:
Take the meansigma methods of four end points pixel values in matrix and add the random file amount pre-set
As central point pixel value, all points in matrix are processed in a manner described, i.e. obtains
Size is the isotropism texture image of x*y, and the random file amount wherein pre-set is obeyed
Alpha Stable distritation.
Wherein, include after step s4 n two field picture is done normalized so that it is pixel value
For [0,255].
Wherein, before step S5, include that n two field picture does dependency to be processed.
Further, the method also includes:
S6. every frame isotropism texture image input structure wave filter step S4 generated, obtains
N frame anisotropic texture image;
S7. n two field picture write video file step S6 obtained, generates the dynamic stricture of vagina of anisotropy
Reason.
Wherein, described step S6 includes:
If the system function of Structure Filter is:
Hφ(ωx,ωy)=(1+ α-2 α cos2(ωθ-θ0))-1,
Whereinθ0For deflection parameter, α is intensive parameter;
The n frame isotropism texture image utilizing 2 dimension FFT step S4 to be generated becomes successively
Change to frequency domain, and be designated as SI(ωx,ωy);
Every frame isotropism texture image is input to Structure Filter, obtains anisotropic texture
Image SA(ωx,ωy), wherein SA(ωx,ωy)=SI(ωx,ωy)Hφ(ωx,ωy);
By SA(ωx,ωy) converted by the IFFT of 2 dimensions, obtain the anisotropic texture image of time domain.
Wherein, include n two field picture is done normalized after step S6 so that it is pixel value
For [0,255].
Wherein, before step S7, include that n two field picture does dependency to be processed.
The present invention at least has a following beneficial effect:
The dynamic texture generation method that the present invention provides, it is possible to generate more horn of plenty and fine and smooth from
So texture, such as rock surface or carry isotropism or the anisotropy such as alveolate sea water background
Natural texture, for traditional texture that can not generate based on FBM model, the present invention provides
A kind of new mode carries out the generation of complex texture, meets the needs of people.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below
The accompanying drawing used required in embodiment or description of the prior art will be briefly described, aobvious and
Easily insight, the accompanying drawing in describing below is some embodiments of the present invention, common for this area
From the point of view of technical staff, on the premise of not paying creative work, it is also possible to according to these accompanying drawings
Obtain other accompanying drawing.
Fig. 1 is the flow chart of dynamic texture generation method in the embodiment of the present invention;
Fig. 2 is the isotropism texture that dynamic texture generation method described in the embodiment of the present invention generates
Schematic diagram;
Fig. 3 is the anisotropic texture that dynamic texture generation method described in the embodiment of the present invention generates
Schematic diagram.
Detailed description of the invention
For making the purpose of the embodiment of the present invention, technical scheme and advantage clearer, below will knot
Close the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear,
Complete description, it is clear that described embodiment be a part of embodiment of the present invention rather than
Whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art are not having
Make the every other embodiment obtained under creative work premise, broadly fall into present invention protection
Scope.
The embodiment of the present invention proposes a kind of dynamic texture generation method, sees Fig. 1, including following
Step:
Step 101: definition generates size x*y and picture number n of texture image.
In this step, definition generates size x*y and picture number n of texture image, such as, define
The texture image size generated is 128*128, altogether 129 frame.
Step 102: stochastic generation several obediences alpha Stable distritation SαThe steady increasing of (σ, β, μ)
Amount X.
Usually, the probability density function of alpha Stable distritation, in addition to minority special case, does not exist and closes
Formula is expressed, and typically describes its distribution character with characteristic function.It is steady that stochastic variable X obeys alpha
Fixed distribution, then its characteristic function form is:
Wherein, sign θ is sign function, 0 < α≤2, σ >=0 ,-1≤β≤1 and real number μ.
Meet four parameters that this characteristic function is expressed, the canonical parameter of referred to as alpha Stable distritation
System.Wherein, four parameters are respectively: characterization factor α, scale parameter σ, deflection factor-beta,
Centre position deviation parameter μ, alpha Stable distritation is abbreviated as Sα(σ,β,μ)。
In this step, several obediences of stochastic generation alpha Stable distritation Sα(σ, β, μ's) is steady
Increment X.Here with average (scale parameter) for 0, dispersion degree (Centre position deviation parameter)
As a example by being the alpha Stable distritation of 1, it also has two parameters, is characterization factor α respectively,
Deflection factor-beta, is designated as Sα(1, β, 0), concrete generating mode is as follows:
Making γ is the equally distributed stochastic variable on (-pi/2, pi/2), W be an average be 1
Exponential random variable, and γ and W is separate, when α ≠ 1, obeys alpha stable
Distribution SαThe stationary increment X of (0, β, 1) can be described as:
X obeys Sα(1, β, 0) is distributed, whereinK (α) is sign function,
As α > 1, K (α)=α;As α < 1, K (α)=α-2.
When α=1, obey alpha Stable distritation SαThe stationary increment X of (0, β, 1) can be described as:
In the present embodiment, the parameter taking alpha Stable distritation is α=1.7, and therefore β=0 gives birth to
Become to obey alpha Stable distritation S1.7The stationary increment of (1,0,0), due to when α ≠ 1,
WhereinK (α) is sign function, as α > 1, and K (α)=α,
Several stationary increments are calculated, the stationary increment calculated here according to the expression formula of above-mentioned X
Number is greater than x*y.
Step 103: choose x*y variable from the stationary increment X of stochastic generation and write in advance
In the 2 dimension matrixes arranged, utilize random midpoint displacement method that this matrix is processed, obtain big
The little isotropism texture image for x*y.
In this step, from the stationary increment X of stochastic generation, x*y variable write is chosen pre-
In the 2 dimension matrixes first arranged, then take the meansigma methods of four end points pixel values in matrix and add
All in matrix as central point pixel value, are pressed above-mentioned by the random file amount pre-set
Mode processes, and i.e. obtains the isotropism texture image that size is x*y, sets the most in advance
The random file amount put obeys alpha Stable distritation.Finally the data texturing generated is carried out yardstick
All pixel values are changed to [0,255] by change.
Step 104: judge whether to need to generate anisotropic texture, if desired, perform step
105, otherwise perform step 106.
Step 105: isotropism texture image is generated anisotropic texture by Structure Filter
Image.
In this step, described Structure Filter is for characterizing anisotropic Structure Filter, complete
Entirely feature the anisotropic character of texture, be mapped to anisotropic texture from isotropism texture,
Can be equivalent to isotropism texture by a Structure Filter meeting ad hoc structure function.
Anisotropic texture FA(x y) can be considered isotropism texture FI(x, y) by wave filter h, (u v) obtains
Arrive, it may be assumed that
FA(x, y)=∫ FI(x-u,y-v)h(u,v)d(u,v);
Corresponding frequency spectrum designation is:
SA(ωx,ωy)=SI(ωx,ωy)Hφ(ωx,ωy),
Wherein, Hφ(ωx,ωy) it is the frequency domain representation of wave filter, Structure Filter concrete form is:
Hφ(ωx,ωy)=(1+ α-2 α cos2(ωθ-θ0))-1, wherein,Parameter alpha ∈ [0,1] is
The intensity of anisotropic texture, parameter θ0∈ [0, π] is the direction of anisotropic texture.
Structure Filter does not change the autocorrelation of texture, simply changes its Direction Distribution Characteristics,
The deflection parameter of setting structure wave filter in the present embodimentIntensive parameter α=0.7.
First with 2 dimension FFT, the isotropism texture image obtained is transformed to frequency domain,
And it is designated as SI(ωx,ωy).Anisotropic texture can be considered each tropism texture sound by Structure Filter
Should, every frame isotropism texture image is input to Structure Filter, obtains anisotropic texture
Image SA(ωx,ωy), wherein SA(ωx,ωy)=SI(ωx,ωy)Hφ(ωx,ωy);
By SA(ωx,ωy) converted by the IFFT of 2 dimensions, obtain the anisotropic texture image of time domain;
Finally, the data texturing generated is carried out dimensional variation, all pixel values are changed to
[0,255]。
Step 106: judge that the number of the texture image generated, whether equal to n, if being equal to, performs
Step 107, otherwise performs step 102.
Step 107: n frame texture image is done dependency and processes.
In this step, in order to make the texture more continuity of generation, need to increase image sequence
Dependency each other, concrete operations be adjacent some two field pictures summation is averaged after make
It is a two field picture (such as 5 adjacent two field picture summations being averaged), in this manner to all
Image increases dependency successively.
Step 108: n frame texture image is write video file, generates dynamic texture.
In this step, the image write video file after dependency is processed, generate dynamic stricture of vagina
Reason.
The dynamic texture generation method that the embodiment of the present invention provides, it is possible to generate more horn of plenty with thin
Greasy natural texture, such as rock surface or carry the isotropism such as alveolate sea water background or each
Heterotropic natural texture, for traditional texture that can not generate based on FBM model, this
Bright provide a kind of new mode and carry out the generation of complex texture, meet the needs of people.
Above example is merely to illustrate technical scheme, is not intended to limit;Although
With reference to previous embodiment, the present invention is described in detail, those of ordinary skill in the art
It is understood that the technical scheme described in foregoing embodiments still can be modified by it,
Or wherein portion of techniques feature is carried out equivalent;And these amendments or replacement, do not make
The essence of appropriate technical solution departs from the spirit and scope of various embodiments of the present invention technical scheme.
Claims (8)
1. a dynamic texture generation method, it is characterised in that the method comprises the steps:
S1. definition generates size x*y and picture number n of texture image;
S2. several obediences of stochastic generation alpha Stable distritation SαThe stationary increment X of (σ, β, μ),
Wherein α is characterized the factor, σ is scale parameter, β is position skew centered by the deflection factor, μ
Parameter;
S3. from the stationary increment X of stochastic generation, choose x*y variable write 2 pre-set
In dimension matrix, utilizing random midpoint displacement method to process this matrix, obtaining size is x*y
Isotropism texture image;
S4. step S2-S3 is repeated, until generating n frame isotropism texture image;
S5. n two field picture write video file step S4 obtained, generates the dynamic stricture of vagina of isotropism
Reason.
Method the most according to claim 1, it is characterised in that the random midpoint of described utilization
This matrix is processed by displacement method, obtains the isotropism texture image that size is x*y and is:
Take the meansigma methods of four end points pixel values in matrix and add the random file amount pre-set
As central point pixel value, all points in matrix are processed in a manner described, i.e. obtains
Size is the isotropism texture image of x*y, and the random file amount wherein pre-set is obeyed
Alpha Stable distritation.
Method the most according to claim 2, it is characterised in that wrap after step s4
Include and n two field picture is done normalized so that it is pixel value is [0,255].
Method the most according to claim 3, it is characterised in that wrapped before step S5
Include and n two field picture is done dependency process.
Method the most according to claim 4, it is characterised in that the method also includes:
S6. every frame isotropism texture image input structure wave filter step S4 generated, obtains
N frame anisotropic texture image;
S7. n two field picture write video file step S6 obtained, generates the dynamic stricture of vagina of anisotropy
Reason.
Method the most according to claim 5, it is characterised in that described step S6 includes:
The system function of described Structure Filter is:
Hφ(ωx,ωy)=(1+ α-2 α cos2(ωθ-θ0))-1,
Whereinθ0For deflection parameter, α is intensive parameter, ωx、ωyPoint
Do not represent two dimensional filter frequency in the two directions x and y;
The n frame isotropism texture image utilizing 2 dimension FFT step S4 to be generated becomes successively
Change to frequency domain, and be designated as SI(ωx,ωy);
Every frame isotropism texture image is input to Structure Filter, obtains anisotropic texture
Image SA(ωx,ωy), wherein SA(ωx,ωy)=SI(ωx,ωy)Hφ(ωx,ωy);
By SA(ωx,ωy) converted by the IFFT of 2 dimensions, obtain the anisotropic texture image of time domain.
Method the most according to claim 6, it is characterised in that wrap after step S6
Include and n two field picture is done normalized so that it is pixel value is [0,255].
Method the most according to claim 7, it is characterised in that wrapped before step S7
Include and n two field picture is done dependency process.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410067051.6A CN103810732B (en) | 2014-02-26 | A kind of dynamic texture generation method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410067051.6A CN103810732B (en) | 2014-02-26 | A kind of dynamic texture generation method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103810732A CN103810732A (en) | 2014-05-21 |
CN103810732B true CN103810732B (en) | 2016-11-30 |
Family
ID=
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102074050A (en) * | 2011-03-01 | 2011-05-25 | 哈尔滨工程大学 | Fractal multi-resolution simplified method used for large-scale terrain rendering |
CN102568032A (en) * | 2010-12-09 | 2012-07-11 | 中国科学院软件研究所 | Method for generation of reality surface deformation model |
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102568032A (en) * | 2010-12-09 | 2012-07-11 | 中国科学院软件研究所 | Method for generation of reality surface deformation model |
CN102074050A (en) * | 2011-03-01 | 2011-05-25 | 哈尔滨工程大学 | Fractal multi-resolution simplified method used for large-scale terrain rendering |
Non-Patent Citations (3)
Title |
---|
Fabric Pattern Modeling by Fractional Levy Stable Motion;Lifeng Jia et al.;《2nd International Symposium on Systems and Control in Aerospace and Astronautics》;20081210;第1-5页 * |
Fractional Levy Stable Motion for Modeling Speckle Image;Xutao Li et al.;《Electronic Imaging and Multimedia Technology V》;20071128;第6833卷;第1-10页 * |
各向异性多尺度自相似随机场与地形构建;李旭涛 等;《中国图象图形学报》;20070731;第12卷(第7期);第1286-1290页 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Bhat et al. | On the derivation of the bayesian information criterion | |
CN101950365B (en) | Multi-task super-resolution image reconstruction method based on KSVD dictionary learning | |
RU2008110951A (en) | METHOD FOR PROCESSING IMAGES, PROGRAM FOR PROCESSING IMAGES AND DEVICE FOR PROCESSING IMAGES | |
CN103839292B (en) | Method for sampling contour surface and generating high-quality triangular mesh | |
CN105374007A (en) | Generation method and generation device of pencil drawing fusing skeleton strokes and textural features | |
CN103295192B (en) | The image real-time super-resolution method for reconstructing accelerating based on GPU | |
CN109146061A (en) | The treating method and apparatus of neural network model | |
CN103810756A (en) | Adaptive Loop subdivision surface drawing method based on irregular region | |
CN104268923A (en) | Illumination method based on picture level images | |
Lin et al. | Continuous dependence on the Soret coefficient for double diffusive convection in Darcy flow | |
CN105095581A (en) | Generation method for defect images in casting shrinkage | |
CN113096015B (en) | Image super-resolution reconstruction method based on progressive perception and ultra-lightweight network | |
CN103810732B (en) | A kind of dynamic texture generation method | |
CN109993701A (en) | A method of the depth map super-resolution rebuilding based on pyramid structure | |
CN104216882B (en) | File mask method and device | |
CN103325086B (en) | A kind of deformation method of the three-dimensional picture based on tetrahedral coordinate system | |
CN103646012A (en) | Method for constructing block orthogonal symmetric toeplitz matrices (OSTM) compression measurement matrix | |
CN103632375A (en) | Image scrambling evaluation method and image scrambling evaluation device | |
JP2009100231A5 (en) | ||
CN106021228A (en) | Method and system for performing text analysis by utilizing knowledge topographic map | |
JP6961527B2 (en) | Information processing equipment, learning methods, and programs | |
CN116823647A (en) | Image complement method based on fast Fourier transform and selective attention mechanism | |
CN110991462A (en) | Privacy protection CNN-based secret image identification method and system | |
Demaret et al. | Anisotropic triangulation methods in adaptive image approximation | |
CN103646376A (en) | Digital watermark image generation method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20161130 Termination date: 20190226 |