Summary of the invention
The present invention is directed to above-mentioned the deficiencies in the prior art,, proposed the method for a kind of high-quality, the synthetic rainbow hologram of quick true color, can on ordinary individual's computing machine, realize the synthetic rainbow hologram making of true color according to the characteristics of synthetic hologram.
Concrete technical scheme of the present invention is:
The method for making of the synthetic colour rainbow hologram of a kind of computing mechanism is characterized in that this method may further comprise the steps:
Step 1, three-dimensional body sequence view is gathered: be divided into actual three-dimensional body or three-dimensional modeling object view and gather two kinds, the photo that uses camera to take successively along horizontal direction to get three-dimensional body is as the sequence view or adopt rotation platform, fixing camera position, object places on the rotation platform, rotate a low-angle and take a view, finally obtain view sequence, or make the three-dimensional model along continuous straight runs by modeling software and play up and obtain the sequence view, the position of determining each view and a little watch window then concerns;
Step 2, parameter setting: set object in the xoy plane the y direction and the dimension of x direction be I
oAnd W
o, holographic facet up-sampling interval delta u obtains the holographic facet up-sampling M that counts
o* N
OSet three primary colours reference light wavelength λ
r, λ
g. λ
bAnd thing ginseng angle theta, obtain frequency shift amount in the frequency domain;
Step 3, the three primary colours frequency band is synthetic: set each little watch window size, carry out the three primary colours color separation for each view, according to pairing watch window of this view and frequency domain relation thereof, calculate the frequency domain scope, obtain the sampling number in this frequency domain scope, according to sampling number the triple channel data of view are carried out interpolation then, carry out Fourier transform respectively, calculate the data in its corresponding frequency domain scope; All views are handled successively, finally the synthetic frequency spectrum of synthetic three primary colours;
Step 4, the calculating of hologram fringe: respectively the three primary colours frequency spectrum is carried out line direction one dimension inverse Fourier transform; Set up a full null matrix M then
O* N
O, the frequency shift amount of obtaining according to (14) is put into the correspondence position of the matrix of setting up with three results of line direction inverse Fourier transform, carries out column direction one dimension inverse Fourier transform, obtains real part, adds that a biasing component guarantees that the hologram fringe transmissivity is more than or equal to 0;
Further, this method for making is made up of following steps:
Three-dimensional body sequence view is gathered: be divided into actual three-dimensional body or three-dimensional modeling object view and gather two kinds, use camera to take the photo of getting three-dimensional body successively along horizontal direction and adopt rotation platform as sequence view person, fixing camera position, object places on the rotation platform, rotate a low-angle and take a view, finally obtain view sequence, or make the three-dimensional model along continuous straight runs by modeling software and play up and obtain the sequence view, the position of determining each view and a little watch window then concerns;
Parameter setting: set object in the xoy plane the y direction and the dimension of x direction be I
oAnd W
o, holographic facet up-sampling interval delta u can obtain the holographic facet up-sampling according to (13) formula and count; Set three primary colours reference light wavelength λ
r, λ
g. λ
bAnd thing ginseng angle theta, can obtain frequency shift amount in the frequency domain according to (14) formula,
Frequency band is synthetic: for each view that is obtained, carry out the three primary colours color separation, set the watch window size of each view correspondence, calculate frequency domain position according to (10) and (12) formula, calculate the three-channel sampling number of view according to (15) formula, view triple channel image is carried out interpolation by the sampling number that calculates, carry out Fourier transform then respectively, obtain three primary colours frequency spectrum with the pairing frequency domain position of this view; Successively all views are handled, three frequency bands of finally synthetic three primary colours thing light in frequency domain distribute,
The calculating of synthetic rainbow holography striped: concrete calculation procedure is:
1) line direction one dimension inverse Fourier transform is carried out in synthetic three primary colours frequency band distribution respectively;
2) the step 1) result calculated being equally divided into N part along the ξ direction, is that example describes with first part, creates a M
0The null matrix of * n according to frequency shift amount, is inserted the matrix correspondence position with the result after the one-dimensional Fourier transform of red, green, blue three primary colours frequency spectrum, carry out one dimension column direction inverse Fourier transform, get real part, preserve file file1 by name, obtain real part maximal value and minimum value; Successively follow-up N-1 part is handled, file designation is file2-fileN;
3〉hologram fringe calculates, and calculates step 2) in maximal value and the minimum value mi and the ma of each part maximal value and the minimum value of preserving, as normalized parameter, successively file1 is read in internal memory to fileN, carry out normalized, splice the last hologram of composition;
The normalization formula is as follows:
i=1:N (18)
Data wherein
iBe the data of i file.
Further, the calculating of synthetic rainbow holography striped: concrete calculation procedure is:
1) line direction one dimension inverse Fourier transform is carried out in synthetic three primary colours frequency band distribution respectively;
2) the step 1) result calculated is equally divided into N part along the ξ direction, the N equal portions are adopted N processor parallel computation.With first part is that example describes, and creates a M
0The null matrix of * n, according to frequency shift amount, result after the one-dimensional Fourier transform of red, green, blue three primary colours frequency spectrum inserted the matrix correspondence position, in first processor, carry out column direction one dimension inverse Fourier transform, get real part, preserve file file1 by name, obtain the real part maximal value and the minimum value of this part of correspondence local data; Other N-1 part is handled on other processor respectively simultaneously, and file designation is file2-fileN;
3) hologram fringe calculates, from step 2) maximal value ma and the minimum value mi that calculates corresponding all data in all local maximums and the minimum value that preserve, as normalized parameter, successively the file f ile1 after N the processor processing is read in internal memory to fileN, carry out normalized, last hologram is formed in splicing;
The normalization formula is as follows:
i=1:N (18)
Data wherein
iBe the data of i file.
Further, this method for making may further comprise the steps:
Step 1, three-dimensional body sequence view is gathered: adopts camera on x direction and y direction, to take pictures, obtains the view of the whole visual field of three-dimensional body,
Step 2 is carried out the three primary colours color separation to each view, according to the relation of watch window and frequency domain, can obtain three spectrum distribution,
Step 3, the method that adopts frequency spectrum to merge is made Fourier Transform Hologram, three spectrum distribution in the step 2 are introduced reference light and are encoded to three Fourier transform holograms, this Fourier transform hologram adopts two-dimentional inverse Fourier transform method can obtain having the image plane holographic of horizontal parallax and vertical parallax, perhaps obtains having the image plane holographic of level and vertical parallax by the method for optical photographing.
The synthetic colour rainbow hologram fabrication process of computing mechanism of the present invention compared with prior art, have the little and little characteristics of hardware-dependence of calculated amount, be a kind of high-quality, the synthetic rainbow hologram method for making of true color fast, can on ordinary individual's computing machine, realize the synthetic rainbow hologram making of true color.
Synthetic rainbow holography principle during formation of hologram, is provided with a slit as shown in Figure 1 in some way in the space, comprise a plurality of watch windows in the slit, and the viewed image of each little watch window is corresponding to the image at a visual angle of three-dimensional body.During the reconstruction of hologram, eyes are observed near a pair of watch window and are reproduced picture, because the binocular parallax of human eye produces three-dimensional sensation.In Fig. 1, human eye is positioned at O
lAnd O
rBefore the window, A
l, A
rAnd B
l, B
rDiffraction enters right and left eyes, AA
rWith AA
lIntersection point A and BB
rWith BB
lIntersection points B be sentient two object points of human eye, the A point is in the holographic facet back, the B point is in for before the holographic facet.When eyes were observed along slit is laterally mobile, human eye was seen the information of object different visual angles.Because slit restriction, the reproduction picture of different wave length are separately, when human eye can see when slit vertically moves up and down that along observing the object that color gradually changes from red to blue reproduces picture.Synthetic rainbow holography is a kind of image plane holographic, and holographic facet is positioned on the plane in space, three-dimensional body position, and this plane is equivalent to the imaging plane of the view sequence back projection that will gather along watch window.
The synthetic rainbow holography method for making of prior art computing mechanism is the window's position according to the observation usually, calculate the COMPLEX AMPLITUDE of the view of the three-dimensional body corresponding to this watch window with this watch window, oppositely diffraction is calculated the thing recovery distribution of amplitudes that is positioned on the holographic facet then, and total thing light is distributed as the complex amplitude sum of the reverse diffraction of all watch windows on the holographic facet; Introduce the reference light interference at last and obtain calculating synthetic rainbow holography.The colour rainbow hologram will carry out three times and calculate, and obtains the rainbow hologram of corresponding red, green, blue three primary colours, and superposeing obtains.It is huge adopting this method to calculate synthetic rainbow holography calculated amount.
The present invention draws the method that adopts frequency spectrum shift and realizes calculating the principle of synthetic colour rainbow holography earlier from the striped specificity analysis of rainbow hologram.The corresponding relation of analysis and observation window and its frequency plane carries out the three primary colours color separation to the view that obtains respectively then, and interpolation is carried out Fourier transform.Window and frequency domain relation according to the observation, complex optical spectrum in frequency domain carries out frequency spectrum shift at last and obtains the holographic frequency spectrum of synthetic colour rainbow.Adopt inverse fourier transform to obtain the synthetic colour rainbow holography of computing mechanism.Having realized the synthetic colour rainbow hologram of computing mechanism of actual object and dummy object, is a kind of method with synthetic colour rainbow holography of computing mechanism of practical value.
Below be that the present invention synthesizes colour rainbow holographic fringes specificity analysis to computing mechanism:
Suppose that the view distribution of amplitudes that n primary colors is c is A
Nc(x, y), it is in the COMPLEX AMPLITUDE of corresponding form position:
K in the formula
cBe the wave number that corresponding color is calculated wavelength,
It is random phase.(x
w, y
w) be the slit areas volume coordinate, Δ X
wBe form at the directions X width, Δ Y
wBe the width of form in the Y direction.The order of view as shown in Figure 2.
In stereoscopic rainbow hologram, for n view, the thing light wave on its " image planes " is:
Following formula is written as the COMPLEX AMPLITUDE form:
A then
Nc(x, y) and φ
Nc(x y) is the distribution of amplitudes and the PHASE DISTRIBUTION of the thing light wave of n view respectively.For all views, total thing light wave is:
Primary colors is that the plane reference light wavelength of c is λ
c, thing ginseng angle is θ, is described as:
Then the interference fringe of primary colors c on holographic facet distributes and can be written as:
For the true color rainbow hologram, primary colors c comprises red, green, blue three primary colours c=r, g, and b, then synthetic rainbow hologram can be expressed as:
τ is a biasing component, makes I more than or equal to 0, A
c(c=r, g b) are three primary colours thing light amplitude on the holographic facet,
For three primary colours thing light phase distributes.Do not consider the component of setovering, (7) carried out Fourier transform, obtain:
(8) the formula first three items is a red, green, blue three primary colours thing light because the spectrum distribution in the frequency domain that do not coexist of wavelength has been carried out frequency displacement, and frequency shift amount is
By ginseng thing angle theta and three primary colours wavelength X
cDecision.By above-mentioned analysis, can draw: obtain the colour rainbow hologram, obtain three primary colours thing light respectively in the spectrum distribution of observing under the slit restriction, in frequency domain, carry out frequency displacement then respectively, adopt inverse Fourier transform afterwards, get the real part of transformation results, add once the biasing component passable.
Thing optical spectrum synthesis analysis is as follows:
The synthetic synoptic diagram of monochromatic thing optical spectrum as shown in Figure 2, three-dimensional body is centered close in the xoy plane, is l in the dimension of x direction and y direction
oAnd w
o, shown in the figure frame of broken lines.Apart from xoy plane z
eThe place is provided with a slit, and slit length and width are respectively l
sAnd w
sThe spatial frequency spectrum face is positioned at z
fIn the plane, because the slit restriction, the thing light in frequency plane distributes and is limited in the ABCD of rectangular area.
Fig. 3 provides the corresponding relation of a little watch window (camera camera site) and frequency domain.The wide of watch window is w
s, long is l
Ss, its center is about the y rotational symmetry, and centre coordinate is (x0,0, z
e), corresponding frequency domain scope is A ' B ' C ' D '.
Simple in order to analyze, figure three is decomposed into two planimetric maps analyzes, as Fig. 4 (a) with (b): in the x direction.Object length is l
oAbout former point symmetry, apart from object z
eIt is l that a length is arranged
SsSlit, centre coordinate is x
0As shown in the figure, (coordinate is x for the object leftmost side and the rightmost side two somes A and B
AAnd x
B) light wave that sends limits by slit, propagate into two terminal A of slit ' and B'.The light wave that two end points of object send and the angle of x axle are θ
1What θ
2The lighting light wave wavelength is λ
c, then corresponding A ' and the spatial frequency at B' place be:
According to geometric relationship, release:
On the y direction, object width is w
o, about the center symmetry, apart from object z
eIt is w that a width is arranged
s, centre coordinate is 0.As shown in the figure, object reaches bottom two some C and D topmost (coordinate is y
CAnd y
D) light wave that sends limits by slit, propagates into two end points C' of slit and D'.The light wave that two end points of object send and the angle of y axle are ζ
1What ζ
2The lighting light wave wavelength is λ
c, the spatial frequency at then corresponding C' and D' place is:
According to geometric relationship, obtain:
Above-mentioned analysis as can be known, after watch window was determined, the scope in frequency domain had also been determined one by one;
Holographic facet sampling and frequency displacement are analyzed as follows:
Sampling interval on the holographic facet supposes that by the holographic output system resolution decision of reality the holographic facet sampling interval is Δ u, and the object length and width are respectively l
o, w
oThe sampling interval in the hologram frequency domain and the sampling number of holographic facet are respectively:
In the frequency domain frequency displacement of three primary colours frequency band count into:
Can determine the sampling number of thing light in frequency domain according to (10) and (12) formula:
Fig. 5 provides frequency displacement synoptic diagram in the frequency domain, and corresponding in the empty frame is that the synthetic frequency band of thing light in frequency domain by watch window distributes.Red, green, blue three primary colours frequency band carries out frequency displacement according to reference light and thing ginseng angle.The total frequency spectrum that is synthesized distributes corresponding with (8) formula first three items.Synthetic total frequency spectrum is adopted fast two-dimensional fourier transformation, get the real part of transformation results, add that a biasing component obtains the synthetic true color rainbow hologram of computing mechanism.
Calculation procedure is as follows:
1〉view collection: the view collection can be divided into actual three-dimensional body or three-dimensional modeling object view is gathered two kinds;
For actual three-dimensional body, the view collection can be according to the method for synoptic diagram 6, camera moves according to a fixed step size under horizontal guide rail control, when camera is in the B position, take pictures form and object over against, when camera moves to left or move to right, to the form adjustment of taking pictures, guarantee form always with shot object over against, institute take in the photo, object always is in the photo center, and this camera model of taking pictures is called and shears camera model (shear camera geometry); Perhaps the person adopts rotation platform, fixing camera position, and object places on the rotation platform, rotates a low-angle and takes a view, finally obtains view sequence.When total rotation angle range hour similar substantially with the result of preceding a kind of acquisition mode.
For three-dimensional virtual object, can adopt software such as 3D-MAX to handle, three-dimensional model is played up along horizontal direction, obtain the different sequence views of object.
2〉parameter setting: set object size w
o, l
o, holographic facet up-sampling interval delta u (by holographic output system resolution decision) can obtain the holographic facet up-sampling according to (13) formula and count; Set three primary colours reference light wavelength λ
r, λ
g. λ
bAnd thing ginseng angle theta, can obtain frequency shift amount in the frequency domain according to (14) formula;
3〉frequency band is synthetic: for each view that is obtained, carry out the three primary colours color separation, set the watch window size of each view correspondence, calculate frequency domain position according to (10) and (12) formula, calculate the three-channel sampling number of view according to (15) formula, view triple channel image is carried out interpolation according to the sampling number that calculates, carry out Fourier transform then respectively, obtain three primary colours frequency spectrum with the pairing frequency domain position of this view.Successively all views are handled, three frequency bands of finally synthetic three primary colours thing light in frequency domain distribute;
4〉calculating of synthetic rainbow holography striped:
By analyzing discovery to two-dimentional inverse Fourier transform and to the distribution of hologram frequency domain, at first carry out one dimension line direction inverse Fourier transform and can save a large amount of computing times, for whole frequency domain, when carrying out one dimension line direction inverse Fourier transform, except the photodistributed frequency band of three primary colours thing calculates the result of calculation that is of practical significance, other parts all are 0 of interpolation, and carrying out the line direction Fourier transform all is 0; When carrying out the column direction Fourier transform, carried out the piecemeal processing, the calculating of various piece is separate, can adopt the method for parallel computing to handle.Adopt parallel computation can further reduce the computing time of synthetic hologram.
Concrete calculation procedure is:
1〉one dimension line direction inverse Fourier transform is carried out in synthetic three primary colours frequency band distribution respectively;
2〉first step result calculated being equally divided into N part along the ξ direction, is that example describes with first part, creates a M
0The null matrix of * n according to frequency shift amount, is inserted the matrix correspondence position with the result after the one-dimensional Fourier transform of red, green, blue three primary colours frequency spectrum, carry out one dimension column direction inverse Fourier transform, get real part, preserve file file1 by name, obtain real part maximal value and minimum value.Successively follow-up N-1 part is handled, file designation is file2-fileN;
3〉the 3rd step: hologram fringe calculates.Calculate maximal value and the minimum value mi and the ma of each part maximal value and the minimum value of preserving in second step, as normalized parameter, successively file1 is read in internal memory to fileN, carry out normalized, last hologram is formed in splicing.The normalization formula is as follows:
i=1:N (18)
Data wherein
iBe the data of i file.
Further, the synthetic concrete calculation procedure of rainbow holography striped can be described as:
1) line direction one dimension inverse Fourier transform is carried out in synthetic three primary colours frequency band distribution respectively;
2) the step 1) result calculated is equally divided into N part along the ξ direction, the N equal portions are adopted N processor parallel computation.With first part is that example describes, and creates a M
0The null matrix of * n, according to frequency shift amount, result after the one-dimensional Fourier transform of red, green, blue three primary colours frequency spectrum inserted the matrix correspondence position, in first processor, carry out column direction one dimension inverse Fourier transform, get real part, preserve file file1 by name, obtain the real part maximal value and the minimum value of this part of correspondence local data; Other N-1 part is handled on other processor respectively simultaneously, and file designation is file2-fileN;
3) hologram fringe calculates, from step 2) maximal value ma and the minimum value mi that calculates corresponding all data in all local maximums and the minimum value that preserve, as normalized parameter, successively the file f ile1 after N the processor processing is read in internal memory to fileN, carry out normalized, last hologram is formed in splicing;
The normalization formula is as follows:
i=1:N (18)
Data wherein
iBe the data of i file.