文档库 最新最全的文档下载
当前位置:文档库 › 基于广义插值傅里叶方法的先进Radon变换直线检测法英文

基于广义插值傅里叶方法的先进Radon变换直线检测法英文

基于广义插值傅里叶方法的先进Radon变换直线检测法英文
基于广义插值傅里叶方法的先进Radon变换直线检测法英文

Advanced Radon transform using generalized interpolated Fourier method for straight line detection

Liying Zheng a ,?,Daming Shi b

a School of Computer Science and Technology,Harbin Engineering University,Harbin,Heilongjiang 150001,China

b

School of Engineering and Information Sciences,Middlesex University in London,The Burroughs,London NW44BT,UK

a r t i c l e i n f o Article history:

Received 24June 2009

Accepted 16November 2010

Available online 2December 2010

Keywords:

Radon transform

Generalized interpolated Fourier transform Straight line detection

a b s t r a c t

Straight line detection is common in computer vision.The Radon transform has received much attention for its ef?ciency and accuracy compared to the Hough transform.In this paper,a generalized interpolated Fourier transform,hereafter called GIFT,is proposed to speed up the Radon transform.Based on the GIFT,a methodology that can detect straight lines from a gray scale image without any pre-processing is imple-mented.Two contributions can be claimed.First,the recent work by Pan et al.is reinterpreted and imple-mented in a clearer way so the traditional Fourier transform can be interpolated to achieve an accurate sampling in the frequency domain.Second,the interpolated Fourier transform is further generalized with ?exible parameter determination in two dimensions when applied to 2-D images.The experiments dem-onstrate that our proposed methodology outperforms the standard Radon transform with lower compu-tational load and higher accuracy.The experiments also show that the GIFT line detector can compete against the random sample consensus,which is a robust estimator popularly used in the ?eld of com-puter vision.

ó2010Elsevier Inc.All rights reserved.

1.Introduction

Straight line detection of an image is required for many pattern recognition problems,since various natural and man-made objects can typically be identi?ed by their distinct combination of linear features.A number of line detection methods have been described in the literature in the past decades,many of which are based on the standard or variant Hough transforms (HT)[1–9]due to its sta-bility and robustness when applied to images where noise and missing data occur.However,the computational ef?ciency of the HT-based line detectors falls sharply as the image dimensions and/or resolution of the accumulator increase.It is dif?cult to achieve real-time performance with these methods.

The Radon transform (RT)is conceptually the same as the HT but more computationally ef?cient than the HT,so RT-based straight line detectors have received much attention.Deans [10]?rst described how to deduce the HT for ?nding lines in images as a special case of the RT de?ned on 2-D Euclidean space.His work implies the RT is able to transform images with lines into a domain of possible line parameters,where each line in the image will give a peak (bright line)or a valley (dark line)positioned at the corre-sponding line parameters.Subsequently,Murphy proposed an RT-based method for detecting lines in noisy radar images [11].Since then,substantial work has been completed to improve the quality of the RT-based linear feature detectors [12–20].

In most cases,the computational ef?ciency of the RT is achieved based on the projection-slice theorem,in which Cartesian to polar coordinate mapping is a necessary step.Thus,interpolation error in Cartesian to polar coordinate mapping strongly in?uences the ?nal results.Ho et https://www.wendangku.net/doc/e88921661.html,ed a zero padding and cropping technique to de-crease the interpolation error [16,18].According to their method,an input image is padded with zeros increasing the image size from N ?N to (N ?2b )?(N ?2b ),prior to being transformed.Any zero padding is then removed after the stage of 1-D discrete Fourier transform (DFT).Although they have shown this strategy can ef?-ciently eliminate aliasing,it is time consuming.Suppose the size of an image is N ?N ,then the computational complexity of the 2-D DFT required for the fast Fourier transform is O {N 2log(N )}implying that if b is not equal to zero,the computational cost will be dramat-ically increased (a factor of approximately 4b ).In this paper,we propose a generalized interpolated Fourier transform (GIFT)to realize a fast RT.

One point must be highlighted is that we generalize the inter-polated Fourier transform proposed by Pan et al.by adopting dif-ferent scale factors in horizontal and vertical https://www.wendangku.net/doc/e88921661.html,pared with the original uniform parameter for both x -axis and y -axis,the two parameters introduced in this research make the transform more ?exible and practical.In this paper,the term ‘‘interpolated Fourier transform’’is adopted instead of ‘‘multilayer fractional Fourier transform (MLFFT)’’used in the previous papers

1077-3142/$-see front matter ó2010Elsevier Inc.All rights reserved.doi:10.1016/j.cviu.2010.11.009

?Corresponding author.

E-mail addresses:

heuzhengliying@https://www.wendangku.net/doc/e88921661.html, ,

heuzhengliying@https://www.wendangku.net/doc/e88921661.html, (L.Zheng).

[19,20],since the term of fractional Fourier transform is not quite appropriate and can be confused with the traditional fractional Fourier transform(FrFT)that is intimately related to time–frequency distribution of a signal.However,either the MLFFT in [19]or the GIFT in this paper provides no spatial information but only frequency information when applied to an image.

The remainder of this paper is organized as follows.Section2 gives the technical details of the GIFT.In Section3,the implemen-tation of the proposed GIFT algorithm is clari?ed.The experimental results and analyses are given in Section4,followed by conclusions in Section5.

2.Generalized interpolated Fourier transform(GIFT)

The DFT of{f(n)|n=àN/2,...,0,...N/2à1}is de?ned as

FekT?

X

N=2à1

n?àN=2

fenTexpeàj2p kn=NTe1T

where exp(á)is the exponential function and j?

???????

à1

p

.Note that the

N frequencies of F(k)are distributed uniformly in[àp,p].

The following equation can be obtained from Eq.(1),

F aekT?

X

N=2à1

n?àN=2

fenTexpeàj2p kn a=NTe2T

where0

Based on Eq.(2),Pan et al.[19]proposed the following2-D transform which they called‘‘multilayer fractional Fourier trans-form’’(MLFFT)

F aek1;k2T?

X

N=2à1

n1?àN=2

X

N=2à1

n2?àN=2

fen1;n2Texpeàj2pen1a k1tn2a k2T=NTe3T

where f fen1;n2TjàN=26n1;n26N=2à1g is a2-D discrete signal. The N?N frequencies of F aek1;k2Tare scattered in ?àa p;a p ??àa p;a p .

It is easy to prove that

F aek1;k2T?Fea k1;a k2T;for0

Further,we noticed that the distribution of the interpolation grid obtained by Eq.(3)is limited due to the uniform scale factors of x-axis and y-axis.For example,if k1={à2,à1,0,1,2}and k2={à2,à1,0,1,2},then the frequency at(0.2,0.3)cannot be computed directly.According to Eq.(4),one can select a?f0:2;0:3g or some other values and perform two transforms to get frequencies at(0.2,0.2)and(0.3,0.3),and then compute the frequency at(0.2,0.3)with some interpolation method,such as nearest interpolation or bilinear interpolation.

To address the above problem,we propose the following gener-alized interpolated Fourier transform(GIFT):

F a1;a2ek1;k2T?

X

N=2à1

n1?àN=2

X

N=2à1

n2?àN=2

fen1;n2Texpeàj2pen1a1k1tn2a2k2T=NT

e5T

where0

Similar to the MLFFT,the resolution of the grid of the GIFT de-pends on two parameters:the number of approaching layers,L, and the approximating set,Cut,which is de?ned as:

Cut?fea1i;a2iTj i?1;...L;0

e6TThe interpolation grid on the frequency domain is de?ned as

P?

[L

t?1

P ie7TP i?fea i1k1;a i2k2TjàN=26k1;k26N=2à1;ea i1;a i2T2Cute8T

Since the GIFT has two adjustable parameters a1and a2besides L,it is more?exible than MLFFT.Fig.1illustrates how a three-layer interpolated grid is constructed through a3-layer GIFT.

The GIFT described above has the following important properties.

(1)When a1i=a2i for i=1,2,...L,it is degraded to the original

MLFFT.

(2)When a1=a2=1,it is equivalent to the traditional2-D DFT.

(3)When0

N?N frequencies that are scatted uniformly in ?àa1p;a1p ??àa2p;a2p in the frequency domain.

(4)For0

According to properties(3)and(4)as well as Eqs.(7)and(8), combining the GIFT with different a1and a2results in a high-resolution grid(see Fig.1).Property(4)means that one can compute the frequencies of any coordinate grid.Thus,with some special steps,an accurate Fourier spectrum can be obtained.

3.Straight line detection based on the GIFT

3.1.Projection-slice theorem

The RT of a2-D function f(x,y)is de?ned as the integral projec-tion of the function onto an axis,making angle h with the x-axis [10]:

keq;hT?RDN h?fex;yT eqT

?

Z

feq cos hày0sin h;q sin hty0cos hTdy0

?

Z Z

fex;yTdeqàx cos hày sin hTdxdye9T

L.Zheng,D.Shi/Computer Vision and Image Understanding115(2011)152–160153

where RDN is the Radon operator and d (á)is the 1-D Dirac delta function.To obtain the full transformation,it is understood that h and q vary so that k is determined for arbitrary values of h and q .Let SLC h be the operator of the slice of 2-D function f (x ,y )at an-gle h through the relationship

SLC h ?f ex ;y T ex 0T?f ex 0cos h ;x 0sin h T

e10T

Then we have

Z

RDN h ?f ex ;y T eq Texp eàj 2p q v Td q ?Z Z Z f ex ;y Td eq àx cos h ày sin h T

?exp eàj 2p q m Td q dxdy

?Z Z

f ex ;y TZ d eq àx cos h ày sin h Texp eàj 2p q v Td q dxdy ?Z Z f ex ;y TTexp ?àj 2p ex v cos h ty v sin h T dxdy

?SLC h

Z Z f ex ;y TTexp ?àj 2p ex v ty v T dxdy

ev Te11T

Let F 1and F 2be 1-D and 2-D Fourier operators,respectively,then Eq.(11)can be rewritten as

F 1RDN h ?f ex ;y T f gev T?SLC h F 2?f ex ;y T el ;g Tf gev T

e12T

Eq.(12)is the projection-slice theorem:The 1-D Fourier transform of the integral projection at angle h is equal to the slice of the 2-D Fourier transform at the same angle.In order to compute the RT,it is therefore necessary to perform the following three steps [11]:(1)Compute the 2-D Fourier transform of f (x ,y ).

(2)Interpolate the 2-D Fourier transform to obtain a set of func-tions f K ev ;h T?F 1?k eq ;h T g ,each de?ned in the frequency domain along a radial line orientated at an angle h .

(3)Compute the inverse Fourier transform of each function

K (v ,h )along v ,resulting in a set of projection functions k (q ,h )that together constitute the RT of the image.Based on the above three steps,Ho et al.described the details of implementing straight line detection by using the RT [16].They adopted a strategy of zero padding and cropping to solve the prob-lem of interpolation error.Accordingly,the input image is ?rst pad-ded with zeros to avoid aliasing effects;then a Cartesian to polar coordinate transformation is carried out to get the 1-D Fourier transformation of k eq ;h T.After that,a 1-D ?ltering is performed to enhance the edges and to improve the peak structure in the sinogram.The resampled data are then conjugate mirrored before a 1-D inverse DFT of the ?ltered and resampled 1-D Fourier spectrum is obtained.Any zero padding is then removed and the maxima in the Radon space are located from the cropped data.Finally straight lines corresponding to the maxima are detected.One advantage of the RT-based line detector over the conceptu-ally similar HT approach is the increase in computational ef?ciency that it affords.Another one is that some image enhancement operations can be easily completed in the Fourier domain prior to the 1-D inverse Fourier transform of K ev ;h T.As mentioned,how-ever,the procedures of zero padding and cropping result in a huge increase in computing time,so it is necessary to adopt a substitute technique to further accelerate the RT-based straight line detector.3.2.GIFT algorithm for straight line detection

Fig.2summarizes the major stages required for the GIFT-based straight line detector.The original input image is a gray scale im-age.A 2-D accurate Fourier spectrum of size s 0?r 0(s 0and r 0are

related to the approximating set Cut )is obtained by applying an

L -layer GIFT to the input image.Note that the zero padding opera-tion is omitted.The top half of the 2-D accurate Fourier spectrum is then converted from a Cartesian x –y grid to a polar v –h grid of size m ?n (here,we assume m =0.5r )by computing the location of each v –h pixel on the Cartesian grid at ex ?v cos h ;y ?v sin h Tand interpolating from surrounding pixels.

Obviously,for the application of straight line detection,the pre-cision of the interpolation in high frequencies is more important than in other frequencies,because the edges are more important than other parts.Thus at the stages of GIFT and Cartesian to polar mapping,the following steps are employed:

(1)Set the adjustable parameters L and Cut of GIFT.Since high

frequencies are more important,we assume

Cut ?fea 1i ;a 2i Tj 0:5

(2)Perform the L -layer GIFT to get an accurate Fourier

spectrum.

(3)Let h ={h ,D h ,2D h ,...,p },D h =p /(n à1),where n must be

high to ensure optimum pixel coverage.(4)Let v ?0;D v ;2D v ;...?????????r 2ts

2p 2

.(5)Use an interpolation scheme,such as nearest or bilinear

interpolation,to compute the frequency at position (x =v cos h ,y =v sin h ).After above ?ve steps,m ?n resampled Fourier spectrum K (v ,h )is obtained.Next,a 1-D ?ltering is performed to enhance the edges.Here,the 1-D difference of Gaussian (DOG)?lter given in Eq.(13)is adopted,since it is both an edge detector and a peak structure enhancer [16].

K h ev ;h T?exp eàv 2=d 2

e Tàexp eàv 2=d 2

i T

e13T

where d e ;i ?1

????2p p r e ;i

,r e and r i are the excitatory and inhibitory stan-dard deviations of the two Gaussian functions.

Finally,by applying a conjugate mirror and a 1-D DFT along each row of K ev ;h T,the enhanced sinogram of the input image is obtained.Then,by locating the local peaks of the sinogram,the straight lines in the original image can be detected.One advantage of the GIFT-based line detector is its ability to detect straight lines in a gray scale image without any pre-processing,such as image thinning required for HT-based methods.

According to the above description,there is a total of six param-eters,i.e.L ,Cut ,n ,D v ,d e and d i ,to be speci?ed in the GIFT-based line detector.Among them,L and Cut specify the interpolation grids.Generally speaking,the larger the L ,the less is the interpola-tion error.Considering the interpolating error and the time con-suming,L =3is appropriate according to our experimental results.The choice of Cut is critical.Here,the following searching scheme is adopted.First,20combinations of Cut whose compo-nents are belong to {0.5,0.6,0.7,0.8,0.9,1}are randomly pro-duced.Then,the one that minimizes the following objective function is chosen:

J ?

X

i ;j

dis grid er i ;h j Te14T

where dis_grid is the Euclidian distance between the actual interpo-lation point and the closet point in the interpolating grids.

Parameters n and D v are related to the resolution of the sino-gram.The bigger n and the smaller D v ,the ?ner the sinogram is.Parameters d e and d i are related to the peak structure of the sino-gram.The butter?y effect with the sinogram can be greatly re-duced by the suitable choice of d e and d i .

154L.Zheng,D.Shi /Computer Vision and Image Understanding 115(2011)152–160

4.Experimental results and analyses

In this section,three types of images,namely,a mixed-shape image,multi-line images with and without noises,and real-world images are used to test the GIFT-based straight line detector.The image size is 128?128.The results obtained are consistent with our application ?owchart in Fig.2.In terms of detecting peaks in a sinogram,we adopted an iterative identi?cation–removal proce-dure:When a peak is identi?ed,it is removed from the sinogram along with its surrounding peaks.In the following experiments,we assume that the number of straight lines is known,and these lines can be detected with a speci?ed number of identi?cation–removal iterations [21].

4.1.Parameter speci?cation and peak detection in the GIFT

A mixed-shape image shown in Fig.3is used to measure the in?uence of different parameter settings on the proposed method.Set L =1,2,and 3,respectively,without any ?ltering operation.According to the major steps introduced in Section 3.2,besides L and Cut ,there are two parameters needed to be chosen prior to the Cartesian to polar mapping,i.e.,the number of angular samples n ,and the radial sampling increment D v .

Firstly,set n =256and D v ????2p .The nearest interpolation is employed.The results are shown in Fig.4,in which the values of From Fig.4,one can see that the sinogram (a)exhibits some ali-asing as a result of ignoring zero padding as well as the large radial sampling increment.Fig.4b and c demonstrate that the aliasing is reduced ef?ciently by using the GIFT which can be computed in parallel and is thus much faster than zero supplementation.Fig.4also indicates that the more layers of the GIFT,the less alias-ing is in the sinogram.The reason is that more layers mean a higher resolution of interpolation grid (see Fig.1)and thus smaller inter-polation error.

Fig.5shows that increasing n cannot reduce https://www.wendangku.net/doc/e88921661.html,rger n makes the sinogram more legible,but will increase the computing time.In a trade-off between computing time and legibility,setting n =256or n =512is suitable in most cases.

Fig.6shows that decreasing D v leads to not only a clear sino-gram but relieved aliasing.The result with Cut ={(0.7,0.8),(1,1)}(Fig.6b)has no aliasing,similar to that with Cut ={(0.8,0.9),(0.9,0.7),(1,1)}).Decreasing D v by a factor of 0.5leads to double computing time for the Cartesian to polar mapping.Considering that the GIFT can be computed in parallel,we suggest increase the layers of GIFT instead of using a very small D v to achieve the same purpose.

At the end of this subsection,different interpolation schemes are evaluated.Here,we ?x n =256,D v ????

2p ,and Cut ={(0.8,0.9),(0.9,0.7),(1,1)},the results with the nearest,the bilinear,and the spline interpolations are shown in Figs.4c and 7,https://www.wendangku.net/doc/e88921661.html,paring Figs.4c and 7,one can see that the legibility of the sin-ogram has been improved with a more complicated interpolating https://www.wendangku.net/doc/e88921661.html,prising the computing complex and the sinogram quality,the bilinear interpolation is employed in the rest of this research.

4.2.Evaluation on synthetic images

4.2.1.Multi-line images

Here,the testing images are composed of K lines and a circle,where K =2,3,4,5and 6,respectively.The slope and intersect of each line are randomly selected.So do the diameter and the posi-tion of the circle.There are 10instances for each K .Fig.8shows the 10images for K =3.

The parameter settings of the GIFT method are L =3,Cut ={(0.8,0.9),(0.9,0.7),(1,1)},n =256,and D v ????2p .In addition,the 1-D DOG ?lter of Eq.(13)with (d e ,d i )=(180,105)is applied after the stage of Cartesian to polar mapping.Considering two

(0,0)

r'*s'

1-DFourier Local peaks of the straight line Fig.3.Mixed-shape image.

L.Zheng,D.Shi /Computer Vision and Image Understanding 115(2011)152–160155

facts:(1)our method has a close relation to the RT and(2)the ran-dom sample consensus(RANSAC)[22–24]is a popular robust esti-mator in the?eld of computer vision,a comparison between the GIFT-based line detector,the RT,and the RANSAC method is per-formed.We set the angular resolution of the RT to p/256.For the RANSAC,set the number of samples to100,and the distance

Fig.4.Sinograms with n=256,D v=

???

2

p

.(a)Cut={(1,1)}.(b)Cut={(0.7,0.8),(1,1)}.(c)Cut={(0.8,0.9),(0.9,0.7),(1,

Fig.5.Sinograms with n=512,D v=

???

2

p

.(a)Cut={(1,1)}.(b)Cut={(0.8,0.9),(0.9,0.7),(1,1)}.

Fig.6.Sinograms with n=256,D v=0:5

???

2

p

.(a)Cut={(1,1)}.(b)Cut={(0.7,0.8),(1,1)}.

threshold to2.Since neither the RT nor the RANSAC can process gray scale images,the Sobel operator was used for producing a bin-ary image.Considering that the RANSAC method cannot?nd two or more lines per time,we detect lines one by one.After detecting a line,we save it and delete all points from the data set contribut-ing to this line,and then repeat the process with the reduced image until K lines have been detected.The above three methods have been implemented in Matlab.The average correct rates of line extraction,the average angular errors,and the average computing time for each method are listed in Tables1–3,respectively.

Firstly,Tables1–3indicate that the GIFT is better than the RT with higher correct rate,lower average angular error and computa-tional load.Secondly,Table1shows the GIFT can compete against the RANSAC.Thirdly,Table2implies accuracy of the GIFT is better than that of the RANSAC.Finally,Table3shows the computing time of the GIFT has a little relation to the number of lines to be detected which is not true for the RANSAC.Though Table3also shows that the GIFT is faster than the RANSAC,one should note the fact that the fast Fourier transformation used by the GIFT is implemented in C language,while all codes of the RANSAC are in Matlab.So,we cannot say which one is faster,but from this table we can deduce that the speed of the GIFT can,at least,compete against that of the RANSAC,especially when one implements the GIFT in parallel and for detecting multi-lines.The good perfor-mance of the GIFT resulted from the following two advantages. First,it is more accurate,because more frequencies obtained through the interpolation of the Fourier spectrum.Second,it is fas-ter,since the proposed method ignores both of the zero padding and the edge detection.

4.2.2.Noisy images

In this section,some images are generated based on Fig.8to verify the performance of our proposed methodology with respect to robustness to noise.To generate a noisy image,a Gaussian noise with zero mean and different variance r is added to the image that consists of randomly positioned three lines and a circle.The parameters of each method are the same as those in Section4.2.1, and the correct rates are listed in Table4.From this table,one can see that the robustness to noise of the GIFT-based straight line detector is better than that of the RT and close to that of the RANSAC.

Fig.7.The results with bilinear(a)and spline(b)interpolations.

Fig.8.Ten images for K=3.

Table1

The correct rate of line extraction(%).

K method23456

RT10010092.59080

GIFT10096.797.59895

RANSAC10096.71009295

Table2

The average angular error for the extracted lines(degree).

K method23456

RT 2.30 2.46 1.93 2.34 2.31

GIFT 1.74 2.11 1.83 1.65 2.05

RANSAC 1.72 2.20 2.42 2.13 2.47

Table3

the average computing time(second).

K method23456

RT0.3350.3410.3480.3490.351 GIFT0.2480.2490.2520.2510.251 RANSAC0.2910.3170.3420.3770.421Table4

The correct rate of line extraction for noisy images(%).

r method0.050.090.100.110.120.140.15

RT93909596.7909090 GIFT with DOG96.796.796.796.396.793.393.3 RANSAC10010010096.793.396.796.7

The results on real images.From left to right are gray scale images,sinograms obtained with GIFT,images with lines extracted by GIFT,and images with lines extracted Radon.

5.Conclusions

After reinterpreting the MLFFT,we proposed a generalized interpolated Fourier transform (GIFT)in this paper,based on which the advanced version of the RT-based line detector is realized.The computational cost of our line detector is less because of the adop-tion of the GIFT from which an accurate Fourier spectrum can be obtained,even without zero padding.The simulation results show that the GIFT-based method outperforms the RT with lower com-puting load and better accuracy.The results also indicate that our proposed methodology can compete against the RANSAC in terms of computational time,correct line detection rate and angu-

lar errors.In addition,another advantage of the GIFT-based meth-od over the SHT,the RT,or the RANSAC is that it is capable of detecting lines from gray-level images without pre-requisite edge detection.

Acknowledgments

The work of this paper is supported by the National Natural Sci-ence Foundation of China (Grant No.61003128)and the Funda-mental Research Funds for the Central Universities (Grant No.

HEUCFZ1010).

The results on real images.From left to right are gray scale images,sinograms obtained with GIFT,images with lines extracted by GIFT,and images with extracted by Radon.

References

[1]P.V.C.Hough,Method and means for recognizing complex patterns,1962.

[2]R.O.Duda,P.E.Hart,Use of Hough transform to detect lines and curves in

pictures,Communications of ACM15(1)(1972)11–15.

[3]T.Tuytelaars,M.Proesmans,L.V.Gool,The cascade Hough transform,in:

International Conference on Image Processing(ICIP),1998.

[4]J.Matas,Robust detection of lines using the progressive probabilistic Hough

transform,Computer Vision and Image Understanding78(2000)119–137. [5]N.Aggarwal,W.C.Karl,Line detection in images through regularized Hough

transform,IEEE Transactions on Image Processing15(2006)582–591.

[6]J.Cha,R.H.Cofer,S.P.Kozaitis,Extended Hough transform for linear feature

detection,Pattern Recognition39(2006)1034–1043.

[7]S.Ei Mejdani,R.Egil, F.Dubeau,Old and new straight-line detectors:

description and comparison,Pattern Recognition41(2008)1845–1866. [8]Y.Mochizuki,A.Torii,A.Imiya,N-point Hough transform for line detection,

Journal of Visual Communication and Image Representation20(4)(2009)242–253.

[9]L.Xu,E.Oja,Randomized Hough transform-Basic mechanisms,algorithms,and

computational complexities,GVGIP:Image Understanding57(2)(1993)131–154.

[10]S.R.Deans,Hough transform from the Radon transform,IEEE Transactions on

Pattern Analysis and Machine Intelligence PAMI-3(1981)185–188.

[11]L.M.Murphy,Linear feature detection and enhancement in noisy images via

the Radon transform,Pattern Recognition Letters4(1986)79–284.

[12]J.B.Burns, A.R.Hanson, E.M.Riseman,Extracting straight lines,IEEE

Transactions on Pattern Analysis and Machine Intelligence8(1986)425–455.

[13]V.F.Leavers,J.Boyce,The Radon transform and its application to shape

parameterization in machine vision,Image and Vision Computing5(1987) 161–166.[14]V.F.Leavers,Shape detection in computer vision using the Hough transform,

Springer-Verlag,Berlin,1992.

[15]W.A.Gotz,H.J.Druckmuller,A fast digital Radon transform–an ef?cient

means for evaluating the Hough transform,Pattern Recognition29(1996) 711–718.

[16]C.G.Ho et al.,A fast Hough transform for the parameterisation of straight lines

using Fourier methods,Real-Time Imaging6(2000)113–127.

[17]M.Ginkel,H.C.L.Luengo,L.J.Vliet,A short introduction to the Radon and

Hough transform and how they relate to each other,in:Technical Report QI-2004-01,Quantitative Imaging Group,DElft University of Technology,2004.

[18]C.G.Ho,A hough transform rapid prototyping system using the matlab

embedded target for the TI TMS320DM642EVM,in:Proceedings of International Conference on Acoustics,Speech,and Signal Processing (ICASSP),2007.

[19]W.Pan,K.Qin,Y.Chen,An adaptable-multilayer fractional Fourier transform

approach for image registration,IEEE Transactions on Pattern Analysis and Machine Intelligence31(3)(2009)400–413.

[20]D.Shi,L.Zheng,J.Liu,Advanced Hough transform using a multilayer fractional

Fourier method,IEEE Transactions on Image Processing19(6)(2010)1558–1566.

[21]M.Fiala,Identify and remove Hough transform method,in:Proceedings of

International Conference on Vision Interface,2003.

[22]M.A.Fischler,R.C.Bolles,Random sample consensus:a paradigm for model

?tting with applications to image analysis and automated cartography, Communications of the ACM24(6)(1981)381–395.

[23]R.Liu,Z.Ruan,S.Wei,Line detection algorithm based on random sample

theory,in:Proceedings of Second International Conference on Image and Graphics,2002.

[24]C.G.Ali,J.H.McClellan,S.J.W.R.,Feature detection in highly noisy images using

random sample theory,in:Proceedings of the15th International Conference on Digital Signal Processing,Wales,UK,2007.

160L.Zheng,D.Shi/Computer Vision and Image Understanding115(2011)152–160

常用函数傅里叶变换

信号与系统的基本思想:把复杂的信号用简单的信号表示,再进行研究。 怎么样来分解信号?任何信号可以用Delta 函数的移位加权和表示。只有系统是线性时不变系统,才可以用单位冲激函数处理,主要讨论各个单位冲激函数移位加权的响应的叠加能得到总的响应。 线性系统(齐次性,叠加定理) 时不变系统 对一个系统输入单位冲激函数,得到的响应为h(t).表征线性时不变系统的非常重要的东西,只要知道了系统对单位冲击函数的响应,就知道了它对任何信号的响应,因为任何信号都可以表示为单位冲激函数的移位加权和。 例如:d(t)__h(t) 那么a*d(t-t0)__a*h(t-t0) -()= ()(t-)d f t f τδττ∝∝? 的响应为-y()=()(-)t f h t d τττ∝ ∝ ? 记为y(t)=f(t)*h(t),称为f(t)和h(t)的卷积 总结为两点:对于现行时不变系统,任何信号可以用单位冲激信号的移位加权和表示,任何信号的响应可以用输入函数和单位冲激函数响应的卷积来表示 连续时间信号和系统的频域分析 时域分析的重点是把信号分解为单位冲激函数的移位加权和,只讨论系统对单位冲激函数的响应。而频域的分析是把信号分解为各种不同频率的正弦函数的加权和,只讨论系统对sinwt 的响应。都是把信号分解为大量单一信号的组合。

周期函数可以展开为傅里叶级数,将矩形脉冲展开成傅里叶级数,得到傅里叶级数的系数 n A sin F = T x x τ 其中0=2 nw x τ。 取样函数sin ()=x S a x 。产生一种震荡,0点的值最大,然后渐渐衰减直至0 第一:对于傅里叶级数的系数,n 是离散的,所以频谱也是离散状的每条谱线都出现在基波频率的整数倍上,其包络是取样函数。 第二:谱线的间距是0w .。零点是0=2nw x τ,02w =T π是谱的基波频率。如果τ不变,T 增大,那么0w 减小,当T 非常大的时候,0w 非常小,谱线近似连续,越来越密,幅度越来越小。 傅里叶变换:非周期函数 正变换:--F jw)= ()iwt f t e dt ∝ ∝?( 反变换:-1()=()2jnwt f t F jw e dw π ∝∝ ? 常用函数的傅里叶变换(典型非周期信号的频谱)

数值计算方法比较

有限差分方法(FDM:Finite Difference Method)是计算机数值模拟最早采用的方法,至今仍被广泛运用。该方法将求解域划分为差分网格,用有限个网格节点代替连续的求解域。有限差分法以Taylor级数展开等方法,把控制方程中的导数用网格节点上的函数值的差商代替进行离散,从而建立以网格节点上的值为未知数的代数方程组。有限差分法主要集中在依赖于时间的问题(双曲型和抛物型方程)。有限差分法方面的经典文献有Richtmeyer & Morton的《Difference Methods for Initial-Value Problems》;R. LeVeque《Finite Difference Method for Differential Equations》;《Numerical Methods for C onservation Laws》。 注:差分格式: (1)从格式的精度来划分,有一阶格式、二阶格式和高阶格式。 (2)从差分的空间形式来考虑,可分为中心格式和逆风格式。 (3)考虑时间因子的影响,差分格式还可以分为显格式、隐格式、显隐交替格式等。 目前常见的差分格式,主要是上述几种形式的组合,不同的组合构成不同的差分格式。差分方法主要适用于有结构网格,网格的步长一般根据实际地形的情况和柯朗稳定条件来决定。 构造差分的方法: 构造差分的方法有多种形式,目前主要采用的是泰勒级数展开方法。其基本的差分表达式主要有三种形式:一阶向前差分、一阶向后差分、一阶中心差分和二阶中心差分等,其中前两种格式为一阶计算精度,后两种格式为二阶计算精度。通过对时间和空间这几种不同差分格式的组合,可以组合成不同的差分计算格式。 有限差分法的不足:由于采用的是直交网格,因此较难适应区域形状的任意性,而且区分不出场函数在区域中的轻重缓急之差异,缺乏统一有效的处理自然边值条件和内边值条件的方法,难以构造高精度(指收敛阶)差分格式,除非允许差分方程联系更多的节点(这又进一步增加处理边值条件韵困难)。另外它还有编制不出通用程序的困难。 有限差分法的优点:该方法是一种直接将微分问题变为代数问题的近似数值解法,数学概念 直观,表达简单,精度可选而且在一个时间步内,对于一个给定点来说其相关的空间点只是 与该相邻的几点,而不是全部的空间点。是发展较早且比较成熟的数值方法 广义差分法(有限体积法)(GDM:Generalized Difference Method):1953年,Mac—Neal 利用积分插值法(也称积分均衡法)建立了三角网格上的差分格 式,这就是以后通称的不规划网格上的差分法.这种方法的几何误差小,特别是给出了处理自然边值条件(及内边值条件)的有效方法,堪称差分法的一大进步。1978年,李荣华利用有限元空间和对偶单元上特征函数的推广——局部Taylor展式的公项,将积分插值法改写成广义Galerkin法形式,从而将不规则网格差分法推广为广义差分法.其基本思路是,将计算区域划分为一系列不重复的控制体积,并使每个网格点周围有

计算方法 课内实验 插值法与函数逼近

《计算方法》课内实验报告 学生姓名:张学阳1009300132 及学号: 学院: 理学院 班级: 数学101 课程名称:计算方法 实验题目:插值法与函数逼近 指导教师 宋云飞讲师 姓名及职称: 朱秀丽讲师 尚宝欣讲师 2012年10月15日

目录 一、实验题目.......................................................... 错误!未定义书签。 二、实验目的.......................................................... 错误!未定义书签。 三、实验内容.......................................................... 错误!未定义书签。 四、实现结果.......................................................... 错误!未定义书签。 五、实验体会或遇到问题 (6)

插值法与函数逼近 二、实验目的 1.熟悉matlab 编写及运行数值计算程序的方法。 2.进一步理解插值法及函数逼近方法的理论基础。 3.进一步掌握给定数据后应用插值法及函数逼近方法进行数据处理并给出图示结果的实际操作过程。 三、实验内容 1.已知函数在下列各点的值为 试用4次牛顿插值多项式)(4x P 及三次样条函数)(x S (自然边界条件)对数据进行插值。给出求解过程,并用图给出 (){},10,1,0),()(,08.02.0,,4 ===+=i x S y x P y i x y x i i i i i 及。 2.下列数据点的插值 可以得到平方根函数的近似。 (1)用这9个点作8次多项式插值)(8x L 。 (2)用三次样条(第一类边界条件)插值给出)(x S 。 给出求解过程,在区间[0,64]上作图,从得到的结果看,在区间[0,64]上哪种插值结果更精确?在区间[0,1]上两种插值哪个更精确? 3.由实验给出数据表 试求3次、4次多项式的曲线拟合,再根据数据曲线形状,求一个另外函数的拟合曲线。给出求解过程,用图表示实验数据曲线及三种拟合曲线。

(完整版)傅里叶变换分析

第一章 信号与系统的基本概念 1.信号、信息与消息的差别? 信号:随时间变化的物理量; 消息:待传送的一种以收发双方事先约定的方式组成的符号,如语言、文字、图像、数据等 信息:所接收到的未知内容的消息,即传输的信号是带有信息的。 2.什么是奇异信号? 函数本身有不连续点或其导数或积分有不连续点的这类函数统称为奇异信号或奇异函数。例如: 单边指数信号 (在t =0点时,不连续), 单边正弦信号 (在t =0时的一阶导函数不连续)。 较为重要的两种奇异信号是单位冲激信号δ(t )和单位阶跃信号u(t )。 3.单位冲激信号的物理意义及其取样性质? 冲激信号:它是一种奇异函数,可以由一些常规函数的广义极限而得到。 它表达的是一类幅度很强,但作用时间很短的物理现象。其重要特性是筛选性,即: ()()()(0)(0)t x t dt t x dt x δδ∞ ∞ -∞ -∞ ==? ? 4.什么是单位阶跃信号? 单位阶跃信号也是一类奇异信号,定义为: 10()00t u t t >?=?

12()()()x t ax t bx t =+,其中a 和b 是任意常数时, 输出信号()y t 是1()y t 和2()y t 的线性叠加,即:12()()()y t ay t by t =+; 且当输入信号()x t 出现延时,即输入信号是0()x t t -时, 输出信号也产生同样的延时,即输出信号是0()y t t -。 其中,如果当12()()()x t x t x t =+时,12()()()y t y t y t =+,则称系统具有叠加性; 如果当1()()x t ax t =时,1()()y t ay t =则称系统具有均匀性。 线性时不变系统是最基本的一类系统,是研究复杂系统,如非线性、时变系统的基础。 6.线性时不变系统的意义与应用? 线性时不变系统是我们本课程分析和研究的主要对象,对线性时不变性进行推广,可以得到线性时不变系统具有微分与积分性质,假设系统的输入与输出信号分别为()x t 和()y t ,则 当输入信号为 ()dx t dt 时,输出信号则为() dy t dt ; 或者当输入信号为()t x d ττ-∞ ?时,输出信号则为()t y d ττ-∞ ?。 另外,线性时不变系统对信号的处理作用可以用冲激响应(或单位脉冲响应)、系统函数或频率响应进行描述。而且多个系统可以以不同的方式进行连接,基本的连接方式为:级联和并联。 假设两个线性时不变系统的冲激响应分别为:1()h t 和2()h t , 当两个系统级联后,整个系统的冲激响应为:12()()*()h t h t h t =; 当两个系统并联后,整个系统的冲激响应为:12()()()h t h t h t =+; 当0t <时,若()0h t =, 则此系统为因果系统; 若|()|h t dt ∞ -∞<∞?, 则此系统为稳定系统。 第二章 连续时间系统的时域分析 1.如何获得系统的数学模型? 数学模型是实际系统分析的一种重要手段,广泛应用于各种类型系统的分析和控制之中。 不同的系统,其数学模型可能具有不同的形式和特点。对于线性时不变系统,其数学模型

数值分析插值算法源程序

#include #include float f(float x) //计算ex的值 { return (exp(x)); } float g(float x) //计算根号x的值 { return (pow(x,0.5)); } void linerity () //线性插值 { float px,x; float x0,x1; printf("请输入x0,x1的值\n"); scanf("%f,%f",&x0,&x1); printf("请输入x的值: "); scanf("%f",&x); px=(x-x1)/(x0-x1)*f(x0)+(x-x0)/(x1-x0)*f(x1); printf("f(%f)=%f \n",x,px); } void second () //二次插值 { float x0,x1,x2,x,px; x0=0; x1=0.5; x2=2; printf("请输入x的值:"); scanf("%f",&x); px=((x-x1)*(x-x2))/((x0-x1)*(x0-x2))*f(x0)+((x-x0)*(x-x2))/((x1-x0)*(x1-x2))*f(x1)+((x-x0)* (x-x1))/((x2-x0)*(x2-x1))*f(x2);

printf("f(%f)=%f\n",x,px); } void Hermite () //Hermite插值 { int i,k,n=2; int flag1=0; printf("Hermite插值多项式H5(x)="); for(i=0;i<=n;i++) { int flag=0; flag1++; if(flag1==1) { printf("y%d[1-2(x-x%d)*(",i,i); } else { printf("+y%d[1-2(x-x%d)*(",i,i); } for(k=0;k<=n;k++) { if(k!=i) { flag++; if(flag==1) { printf("(1/x%d-x%d)",i,k); } else { printf("+(1/x%d-x%d)",i,k);

常用傅立叶变换表

时域信号 弧频率表示的 傅里叶变换 注释 1 线性 2 时域平移 3 频域平移, 变换2的频域对应4 如果值较大,则会收缩 到原点附近,而会扩 散并变得扁平. 当 | a | 趋向 无穷时,成为 Delta函数。 5 傅里叶变换的二元性性质。通过 交换时域变量和频域变量 得到. 6 傅里叶变换的微分性质 7 变换6的频域对应 8 表示和的卷积—这

9 矩形脉冲和归一化的sinc 函数 10 变换10的频域对应。矩形函数是理想的低通滤波器,sinc 函数是这类滤波器对反因果冲击的响应。 11 tri 是三角形函数 12 变换12的频域对应 13 高斯函数 exp( ? αt 2) 的傅里叶变换是他本身. 只有当 Re(α) > 0时,这是可积的。 14 15 16 a>0 17 变换本身就是一个公式

18 δ(ω) 代表狄拉克δ函数分布. 这 个变换展示了狄拉克δ函数的重要 性:该函数是常函数的傅立叶变换 19 变换23的频域对应 20 由变换3和24得到. 21 由变换1和25得到,应用了欧拉公 式: cos(at) = (e iat + e?iat) / 2. 22 由变换1和25得到 23 这里, n是一个自然数. δ(n)(ω) 是狄拉克δ函数分布的n阶微分。这 个变换是根据变换7和24得到的。 将此变换与1结合使用,我们可以变 换所有多项式。 24 此处sgn(ω)为符号函数;注意此变 换与变换7和24是一致的. 25 变换29的推广. 26 变换29的频域对应. 27 此处u(t)是单位阶跃函数; 此变换 根据变换1和31得到.

计算方法实验

算方法实验指导 姓名学号院系专业哈尔滨工业大学

计算方法实验指导 根据实际问题建立的数学模型,一般不能求出所谓的解析解,必须针对数学模型 的特点确定适当的计算方法,编制出计算机能够执行的计算程序,输入计算机,进行 调试,完成运算,如果计算结果存在问题或不知是否正确,还需要重新确定新的计算 方法,再编制出计算程序,输入计算机,重新调试,完成运算,直至获得正确的计算 结果,这就是数值计算的全部过程。 学生在学习“计算方法”和“高级语言”等课程时普遍存在的问题是:只会套用 教科书中的标准程序进行数值计算,很少有人能够独立地将学过的数值算法编制成计 算机程序,至于灵活应用已经掌握的算法求解综合性较大的课题,则更是困难的事情。 编写《计算方法实验指导》的目的是:突出数值计算程序结构化的思想。提高学 生的编程能力,加深对“计算方法”课程内容的理解和掌握,为”计算方法“课程的 教学服务,进一步奠定从事数值计算工作的基础。具体地 1. 根据“计算方法”课程内容的特点,给出五个典型算法的分析流程,学生可以 利用所掌握的 “高级语言”顺利地编制出计算机程序,上机实习,完成实验环节的教 学要求。 2. 所有的计算实习题目都经过任课教师逐一检验,准确无误。 3. 充分利用循环的思想、 迭代的思想, 给出算法结构描述和程序语言的对应关系, 有利于学生编 制相应的程序。 4. 结合实习题目,提出实验要求,要求学生按规范格式写出相应的实验报告,实 验报告成绩记入 期末总成绩。需要提醒学生:不能简单地套用现成的标准程序完成实 验题目,应当把重点放在对算法的理解、程序的优化设计、上机调试和计算结果分析 上,否则就失去实验课的目的啦。 5. 五个具体的实验题目是: 实验题目 实验题目 实验题目 实验题目 实验题目 要求必须完 成其中三个(如果全部完成更好) 。 1 拉格朗日 (Lagrange) 插值 2 龙贝格 (Romberg) 积分法 3 四阶龙格—库塔 (Runge — Kutta) 方法 4 牛顿 (Newton) 迭代法 5 高斯 (Gauss) 列主元消去法

计算方法-插值方法实验

实验一插值方法 一. 实验目的 (1)熟悉数值插值方法的基本思想,解决某些实际插值问题,加深对数值插值方法 的理解。 (2)熟悉Matlab 编程环境,利用Matlab 实现具体的插值算法,并进行可视化显示。 二. 实验要求 用Matlab 软件实现Lagrange 插值、分段线性插值、三次Hermite 插值、Aitken 逐步插值算法,并用实例在计算机上计算和作图。 三. 实验内容 1. 实验题目 (1 ) 已 知概 率积 分dx e y x x ?-= 2 2 π 的数据表 构造适合该数据表的一次、二次和三次Lagrange 插值公式,输出公式及其图形,并计算x =0.472时的积分值。 答: ①一次插值公式: 输入下面内容就可以得到一次插值结果 >> X=[0.47,0.48];Y=[0.4937452,0.5027498]; >> x=0.472; >> (x-X(2))/(X(1)-X(2))*Y(1)+(x-X(1))/(X(2)-X(1))*Y(2) ans =0.495546120000000 >> ②两次插值公式为: 输入下面内容就可以得到两次插值结果 >> X=[0.46,0.47,0.48];Y=[0.4846555,0.4937452,0.5027498]; >> x=0.472; >>(x-X(2))*(x-X(3))/((X(1)-X(2))*(X(1)-X(3)))*Y(1)+(x-X(1))*(x-X(3))/((X(2)-X(1))*(X(2)-X(3)))*Y(2)+(x-X(2))*(x-X(1))/((X(3)-X(2))*(X(3)-X(1)))*Y(3) i 0 1 2 3 x 0.46 047 0.48 0.49 y 0.4846555 0.4937452 0.5027498 0.5116683

第七章 傅里叶变换.

第七章 傅里叶变换 1.求下列函数的傅氏变换: (1)1,10, ()1, 01,0,; t f t t --<? 解: (1)[()]()j t F f t f t e dt ω+∞--∞ =? 1 101 10 1 1 22sin cos | 2(1cos ).j t j t j t j t e dt e dt e dt e dt j i tdt t j ωωωωωωω ωω -----=-+=-+=-= =- -????? (2) ()()j t F f t e dt ωω+∞--∞ =? 0(1)(1)0 11|.11t j t j t j t e e dt e dt e j j ωωωωω ---∞ -∞ --∞====--?? 6.求下列函数的傅氏变换 (1) 1,0,sgn 1,0;t t t -? (2) ()sin(5).3f t t π =+ 解: (1)已知 1 [()](),[1]2(),F u t F j πδωπδωω = +=由sgn 2()1t u t =-有 12[sgn ]2( ())2().F t j j πδωπδωωω =+-= (2) 由于 1()sin(5)sin 5cos5,322f t t t t π=+=+ 故 [()][(5)(5)](5)(5)].2j F f t πδωδωδωδω= +--++- 7.已知00()[()()]F ωπδωωδωω=++-为函数()f t 的傅氏变换,求().f t

计算方法实验报告 插值

实验名称:插值计算 1引言 在生产和科研中出现的函数是多种多样的。常常会遇到这样的情况:在某个实际问题中,虽然可以断定所考虑的函数f(x)在区间[a,b]上存在且连续,但却难以找到它的解析表达式,只能通过实验和观测得到在有限个点上的函数值。用这张函数表来直接求出其他点的函数值是非常困难的,在有些情况下,虽然可以写出f(x)的解析表达式,但由于结构十分复杂,使用起来很不方便。面对这些情况,构造函数P(x)作为f(x)的近似,插值法是解决此类问题比较古老却目前常用的方法,不仅直接广泛地应用与生产实际和科学研究中,而且是进一步学习数值计算方法的基础。 设函数y=f(x)在区间[a,b]上连续,且在n+1个不同的点a≤x0,x1……,xn≤b上分别取值y0,y1……,yn. 插值的目的就是要在一个性质优良、便于计算的函数φ中,求一简单函数P(x),使P(xi)=yi(i=0,1…,n)而在其他点x≠xi上,作为f(x)的近似。 通常,称区间[a,b]为插值区间,称点x0,x1,…,xn为插值节点,上式为插值条件,称函数类φ为插值函数类,称P(x)为函数f(x)在节点x0,x1,…,xn处的插值函数,求插值函数P(x)的方法称为插值法。 2实验目的和要求 用matlab定义分段线性插值函数、分段二次插值函数、拉格朗日插值函数,输入所给函 数表,并利用计算机选择在插值计算中所需的节点,计算f(0.15),f(0.31),f(0.47)的近似值。

3算法描述 1.分段线性插值流程图

2.分段二次插值流程图

3.拉格朗日插值流程图

4程序代码及注释 1.分段线性插值

插值与多项式逼近的数组计算方法实验讲解

插值与多项式逼近的数组计算方法实验 郑发进 2012042020022 【摘要】计算机软件中经常要用到库函数,如) cos,x e,它们 (x (x sin,) 是用多项式逼近来计算的。虽然目前最先进的逼近方法是有理函数(即多项式的商),但多项式逼近理论更适于作为数值分析的入门课程。在已知数据具有高精度的情况下,通常用组合多项式来构造过给定数据点的多项式。构造组合多项式的方法有许多种,如线性方程求解、拉格朗日系数多项式以及构造牛顿多项式的方分和系数表。 关键字泰勒级数、拉格朗日插值法、牛顿插值法、帕德逼近 一、实验目的 1.通过具体实验,掌握泰勒级数、拉格朗日插值法、牛顿插值法、帕德逼近的编程技巧。 2.比较各插值方法的优劣并掌握。 二、实验原理 1.泰勒级数 在数学中,泰勒级数(英语:Taylor series)用无限项连加式——级数来表示一个函数,这些相加的项由函数在某一点的导数求得。 如果在点x=x 具有任意阶导数,则幂级数 称为在点x 处的泰勒级数。 =0,得到的级数 在泰勒公式中,取x 称为麦克劳林级数。函数的麦克劳林级数是x的幂级数,那么这种展开

是唯一的,且必然与的麦克劳林级数一致。 2.拉格朗日插值法 如对实践中的某个物理量进行观测,在若干个不同的地方得到相应的观测值,拉格朗日插值法可以找到一个多项式,其恰好在各个观测的点取到观测到的值。这样的多项式称为拉格朗日(插值)多项式。数学上来说,拉格朗日插值法可以给出一个恰好穿过二维平面上若干个已知点的多项式函数。 在平面上有(x 1,y 1)(x 2,y 2)...(x n ,y n )共n 个点,现作一条函数f (x )使其图像经过这n 个点。 作n 个多项式p i (x),i=1,2,3...,n,使得 最后可得 3.牛顿插值法 插值法利用函数f (x)在某区间中若干点的函数值,作出适当的特定函数,在这些点上取已知值,在区间的其他点上用这特定函数的值作为函数f (x)的近似值。如果这特定函数是多项式,就称它为插值多项式。利用插值基函数很容易得到拉格朗日插值多项式,公式结构紧凑,在理论分析中甚为方便,但当插值节点增减时全部插值基函数均要随之变化,整个公式也将发生变化, 这在实际计算中是很不方便的,为了克服这一缺点,提出了牛顿插值。 牛顿插值通过求各阶差商,递推得到的一个公式: 10121()()()()()()N N N N P x P x a x x x x x x x x --=+---- 牛顿插值与拉格朗日插值具有唯一性。 4.帕德逼近 它不仅与逼近论中其他许多方法有着密切的关系,而且在实际问题特别是许多物理问题中有着广泛的应用。设是在原点某邻域内收敛的、具有复系数的麦克劳林级数。欲确定一个有理函数,式中,使得前次方的系数为0,即使得 此处约定qk =0(k>n )。虽然所求得的Pm(z)和Qn(z)不惟一,但是比式却总是惟一的。有理函数称为F(z)的(m,n)级帕德逼近,记为(m/n)。由(m/n)所形成的阵列称为帕德表。

傅里叶变换

1.课题综述 第一章中我们主要学习了信号、测试、测控、信号分析处理的概念、测试技术的应用情况、测试技术的发展动态及主要信号测试仪器生产厂商。信号是指那些代表一定意义的现象,比如声音、动作、旗语、标志、光线等,它们可以用来传递人们想表达的事情。从广泛意义上来说,信号是指事物运动变化的表现形式,它代表事物运动变化的特征。信号采集测量系统由传感器、中间变换装置和显示记录装置三部分组成,如今传感器技术越来越趋向于新型化和智能化。在工程领域,科学实验、产品开发、生产监督、质量控制等,都离不开测试技术。测试技术应用涉及到航天、机械、电力、石化和海洋运输等每一个工程领域。 第二章我们主要学习了信号分类方法、信号时域波形分析方法、信号时差域相关分析方法、信号频域频谱分析方法及其它信号分析方法。首先学习了信号的分类,其主要是依据信号波形特征来划分的,从信号描述上分可分为确定性信号与非确定性信号;从信号的幅值和能量上分可分为能量信号与功率信号;从分析域上分可分为时域与频域;从连续性上分可分为连续时间信号与离散时间信号;从可实现性上分可分为物理可实现信号与物理不可实现信号。 信号的时域波形分析,信号的时域波形分析是最常用的信号分析手段,用示波器、万用表等普通仪器直接显示信号波形,读取特征参数。可以求得信号的均值、均方值、方差以及概率密度函数等参数。信号的时差域相关分析,用相关函数来描述与时间有关的变量τ、x(t)和y(t),三者之间的函数关系,相关函数表征了x、y之间的关联程度。信号频域分析是采用傅立叶变换将时域信号x(t)变换为频域信号X(f),频域分析能明确揭示信号的频率组成和各频率分量大小。 第三章我们主要学习了传感器的分类、常用传感器测量原理及传感器测量电路。传感器是借助检测元件将一种形式的信息转换成另一种信息的装置。传感器由敏感器件与辅助器件组成。敏感器件的作用是感受被测物理量,并对信号进行转换输出。辅助器件则是对敏感器件输出的电信号进行放大、阻抗匹配,以便于后续仪表接入。主要有电阻式、电容式、电感式、磁电式、压电式传感器,磁敏、热敏和气敏元件传感器,以及超声波、光电及半导体敏感元件传感器,光纤传感器等。 第四章我们主要学习了自动化工程机械分类、工程机械控制器及发展趋势、

数值分析常用的插值方法

数值分析报告 班级: 专业: 流水号: 学号: 姓名:

常用的插值方法 序言 在离散数据的基础上补插连续函数,使得这条连续曲线通过全部给定的离散数据点。插值是离散函数逼近的重要方法,利用它可通过函数在有限个点处的取值状况,估算出函数在其他点处的近似值。 早在6世纪,中国的刘焯已将等距二次插值用于天文计算。17世纪之后,牛顿、拉格朗日分别讨论了等距和非等距的一般插值公式。在近代,插值法仍然是数据处理和编制函数表的常用工具,又是数值积分、数值微分、非线性方程求根和微分方程数值解法的重要基础,许多求解计算公式都是以插值为基础导出的。 插值问题的提法是:假定区间[a,b〕上的实值函数f(x)在该区间上n+1个互不相同点x0,x1……x n处的值是f(x0),……f(x n),要求估算f(x)在[a,b〕中某点的值。其做法是:在事先选定的一个由简单函数构成的有n+1个参数C0, C1,……C n的函数类Φ(C0,C1,……C n)中求出满足条件P(x i)=f(x i)(i=0,1,……n)的函数P(x),并以P(x)作为f(x)的估值。此处f(x)称为被插值函数,x0,x1,……xn 称为插值结(节)点,Φ(C0,C1,……C n)称为插值函数类,上面等式称为插值条件,Φ(C0,……C n)中满足上式的函数称为插值函数,R(x)=f(x)-P(x)称为插值余项。

求解这类问题,它有很多种插值法,其中以拉格朗日(Lagrange)插值和牛顿(Newton)插值为代表的多项式插值最有特点,常用的插值还有Hermit 插值,分段插值和样条插值。 一.拉格朗日插值 1.问题提出: 已知函数()y f x =在n+1个点01,,,n x x x L 上的函数值01,,,n y y y L ,求任意一点 x '的函数值()f x '。 说明:函数()y f x =可能是未知的;也可能是已知的,但它比较复杂,很难计算其函数值()f x '。 2.解决方法: 构造一个n 次代数多项式函数()n P x 来替代未知(或复杂)函数()y f x =,则 用()n P x '作为函数值()f x '的近似值。 设()2012n n n P x a a x a x a x =++++L ,构造()n P x 即是确定n+1个多项式的系数 012,,,,n a a a a L 。 3.构造()n P x 的依据: 当多项式函数()n P x 也同时过已知的n+1个点时,我们可以认为多项式函数 ()n P x 逼近于原来的函数()f x 。根据这个条件,可以写出非齐次线性方程组: 20102000 20112111 2012n n n n n n n n n n a a x a x a x y a a x a x a x y a a x a x a x y ?++++=?++++=?? ? ?++++=?L L L L L 其系数矩阵的行列式D 为范德萌行列式: ()20 0021110 2111n n i j n i j n n n n x x x x x x D x x x x x ≥>≥= = -∏L L M M M M L

计算方法--插值法与拟合实验

实验三 插值法与拟合实验 一、实验目的 1. 通过本实验学会利用程序画出插值函数,并和原图形相比较 2. 通过本实验学会拟合函数图形的画法,并会求平方误差 二、实验题目 1. 插值效果的比较 实验题目:区间[]5,5-10等分,对下列函数分别计算插值节点k x 的值,进行不同类型的插值,作出插值函数的图形并与)(x f y =的图形进行比较: 2 11)(x x f +=; x x f arctan )(=; 4 41)(x x x f += (1) 做拉格朗日插值; (2) 做三次样条插值. 2. 拟合多项式实验 实验题目:给定数据点如下表所示: 分别对上述数据作三次多项式和五次多项式拟合,并求平方误差,作出离散函数),(i i y x 和拟合函数的图形. 三、实验原理 本实验应用了拉格朗日插值程序、三次样条插值程序、多项式拟合程序等实验原理. 四、实验内容 1(1) figure x=-5:0.2:5; y=1./(1+x.^2); plot(x,y,'r'); hold on %拉格朗日插值 x1=-5:1:5; y1=1./(1+x1.^2); xx=-4.5:0.5:4.5; yy=malagr(x1,y1,xx); plot(xx,yy,'+') %三次样条插值 dy0=1./(1+25); dyn=1./(1+25);

m=maspline(x1,y1,dy0,dyn,xx); plot(xx,m,'ok') 1(2) x=-5:0.2:5; y=atan(x); plot(x,y,'r'); hold on %拉格朗日插值 x1=-5:1:5; y1=atan(x1); xx=-4.5:0.5:4.5; yy=malagr(x1,y1,xx); plot(xx,yy,'+') %三次样条插值 dy0=1./(1+25); dyn=1./(1+25); m=maspline(x1,y1,dy0,dyn,xx); plot(xx,m,'ok') 1(3) x=-5:0.2:5; y=x.^2./(1+x.^4); plot(x,y,'r'); hold on %拉格朗日插值 x1=-5:1:5; y1=x1.^2./(1+x1.^4); xx=-4.5:0.5:4.5; yy=malagr(x1,y1,xx); plot(xx,yy,'+') %三次样条插值 dy0=1./(1+25); dyn=1./(1+25); m=maspline(x1,y1,dy0,dyn,xx); plot(xx,m,'ok') 2. x=[-1.5 -1.0 -0.5 0.0 0.5 1.0 1.5]'; y=[-4.45 -0.45 0.55 0.05 -0.44 0.54 4.55]'; plot(x,y,'or'); hold on %三次多项式拟合 p1=mafit(x,y,3);

用快速傅里叶变换对信号进行频谱分析

实验二 用快速傅里叶变换对信号进行频谱分析 一、实验目的 1.理解离散傅里叶变换的意义; 2.掌握时域采样率的确定方法; 3.掌握频域采样点数的确定方法; 4.掌握离散频率与模拟频率之间的关系; 5.掌握离散傅里叶变换进行频谱分析时,各参数的影响。 二、实验原理 序列的傅里叶变换结果为序列的频率响应,但是序列的傅里叶变换是频率的连续函数,而且在采用计算机计算时,序列的长度不能无限长,为了便于计算机处理,作如下要求:序列x (n )为有限长,n 从0~N -1,再对频率ω在0~2π范围内等间隔采样,采样点数为N ,采样间隔为2π/N 。第k 个采样点对应的频率值为2πk /N 。可得离散傅里叶变换及其逆变换的定义为 ∑-=-=1 02)()(N n n N k j e n x k X π (1) ∑-==1 02)(1)(N k k N n j e k X N n x π (2) 如果把一个有限长序列看作是周期序列的一个周期,则离散傅里叶变换就是傅里叶级数。离散傅里叶变换也是周期的,周期为N 。 数字频率与模拟频率之间的关系为 s f f /2πω=,即s s T f f πωπω22== (3) 则第k 个频率点对应的模拟频率为 N kf NT k T N k f s s s k ==?=ππ212 (4) 在用快速傅里叶变换进行频谱分析时,要确定两个重要参数:采样率和频域采样点数,采样率可按奈奎斯特采样定理来确定,采样点数可根据序列长度或频率分辨率△f 来确定 f N f s ?≤,则f f N s ?≥ (5) 用快速傅里叶变换分析连续信号的频谱其步骤可总结如下: (1)根据信号的最高频率,按照采样定理的要求确定合适的采样频率f s ; (2)根据频谱分辨率的要求确定频域采样点数N ,如没有明确要求频率分辨率,则根据实际需要确定频率分辨率; (3)进行N 点的快速傅里叶变换,最好将纵坐标根据帕塞瓦尔关系式用功率来表示,

计算方法上机实验报告——拉格朗日插值问题

计算方法上机实验报告——拉格朗日插值问题 一、方法原理 n次拉格朗日插值多项式为:Ln(x)=y0l0(x)+y1l1(x)+y2l2(x)+…+ynln(x) n=1时,称为线性插值,L1(x)=y0(x-x1)/(x0-x1)+y1(x-x0)/(x1-x0)=y0+(y1-x0)(x-x0)/(x1-x0) n=2时,称为二次插值或抛物线插值,精度相对高些 L2(x)=y0(x-x1)(x-x2)/(x0-x1)/(x0-x2)+y1(x-x0)(x-x2)/(x1-x0)/(x1-x 2)+y2(x-x0)(x-x1)/(x2-x0)/(x2-x1) 二、主要思路 使用线性方程组求系数构造插值公式相对复杂,可改用构造方法来插值。 对节点xi(i=0,1,…,n)中任一点xk(0<=k<=n)作一n次多项式lk(xk),使它在该点上取值为1,而在其余点xi(i=0,1,…,k-1,k+1,…,n)上为0,则插值多项式为Ln(x)=y0l0(x)+y1l1(x)+y2l2(x)+…+ynln(x) 上式表明:n个点xi(i=0,1,…,k-1,k+1,…,n)都是lk(x)的零点。可求得lk 三.计算方法及过程:1.输入节点的个数n 2.输入各个节点的横纵坐标 3.输入插值点 4.调用函数,返回z 函数语句与形参说明 程序源代码如下: 形参与函数类型 参数意义 intn 节点的个数 doublex[n](double*x) 存放n个节点的值 doubley[n](double*y) 存放n个节点相对应的函数值 doublep 指定插值点的值 doublefun() 函数返回一个双精度实型函数值,即插值点p处的近似函数值 #include #include usingnamespacestd; #defineN100 doublefun(double*x,double*y,intn,doublep); voidmain() {inti,n; cout<<"输入节点的个数n:"; cin>>n;

实验应用快速傅里叶变换对信号进行频谱分析

实验二、应用快速傅里叶变换对信号进行频谱分析 一、 实验目的 1、 加深对DFT 算法原理和基本性质的理解,熟悉FFT 算法原理。 2、 掌握应用FFT 对信号进行频谱分析的方法。 3、 通过本实验进一步掌握频域采样定理。 4、 了解应用FFT 进行信号频谱分析过程中可能出现的问题,以便在实际中 正确应用FFT 。 二、 实验原理 1、 一个连续时间信号()a x t 的频谱可以用它的傅里叶变换表示为: ()()j t a a X j x t e dt +∞ -Ω-∞ Ω=? 如果对信号进行理想采样,得: ()()a x n x nT =, 其中,T 为采样周期。对()x n 进行Z 变换,得: ()()n n X Z x n z +∞ -=-∞ = ∑ 当jwt z e -=时,我们便得到序列傅氏变换SFT : ()()jw jwn n X e x n e +∞ -=-∞ = ∑ 其中w 称为数字角频率:/s w T F =Ω=Ω。

2、12()[()]jw a m w m X e X j T T T π+∞=-∞=-∑,序列的频谱是 原模拟信号频谱的周期延拓,这样,可以通过分析序列的频谱,得到相应连续信号的频谱。 3、离散傅里叶变换(DFT )能更好的反映序列的频域特性。 当序列()x n 的长度为N 时,它的离散傅氏变换为: 1 0()[()]()N kn N n X k DFT X n x n W -===∑ 它的反变换为: 10 1()[()]()N kn N n x n IDFT X k X k W N --===∑ 比较Z 变换式和DFT 式,令k N z W -=,则 10 ()|()[()]k N N kn N z W n X z x n W DFT X n --====∑ 因此有 ()()|k N z W X k X z -== 即k N W -是z 平面单位圆上幅角为2/w k N π=的点,也即是将单位圆 N 等分后的第k 点。所以()X k 是()x n 的Z 变换在单位圆上的 等距采样,或者说是序列傅氏变换的等距采样。 三、 如何提高估计精度 增大做FFT 运算的点数 四、 幅频特性曲线及结果分析

傅里叶变换分析信号的缺点

傅里叶变换分析信号的缺点 基于傅里叶(Fourier)变换的信号频域表示,揭示了时间函数和频谱函数之间的内在联系,在传统的平稳信号分析和处理中发挥了极其重要的作用,很多理论研究和应用研究都把傅里叶变换当作最基本的经典工具来使用.但是傅里叶变换存在着严重的缺点:用傅里叶变换的方法提取信号频谱时,需要利用信号的全部时域信息,这是一种整体变换,缺少时域定位功能,因此必须对其加以改进. 傅里叶变换的特点及其局限性 设函数f(t)在(-,+)内有定义,且使广义积分 都收敛,则称(1)式定义的广义积分为函数f(t)的傅里叶变换,记为F{f(t)},(2)式定义的广义积分为逆傅里叶变换,记为{F()}。傅里叶变换可以完成从时域到频域的转换(正变换),也可以完成从频域到时域的转换(逆变换),但不能同时具有时域和频域信息。其核函数是,由于三角函数具有填满整个空间的特性,其在物理空间中是双向无限延伸的正弦波,在积分变换中体现为积分范围从+到-。因此,傅里叶变换是先天的非局限性,它对信号f(t)中体现任何局部信息处理都是相同的。而事实上,工程技术中的许多信号,如:语音信号、地震信号、心电图和各种电脉冲,他们的信号值只出现在一个短暂的时间间隔t内,以后快速减为零,t以外是未知的,可能为零,也可能是背景噪音,如果

用(1)式从信号中提取谱信号F(),就要取无限的时间量,使用过去的及将来的信号只为计算单个频谱,不能反映出随时间变化的频率,实际上我们需要的是确定的某个时间间隔内的频谱。这就使人们想到改进傅里叶变换使其能用来处理某个确定时间范围内的信号。Gabor提出的窗口傅里叶变换就是一个有效的方法。 另外,傅里叶变换之所得到广泛应用与透镜能实现傅里叶变换是分不开的。由公式 其中物平面为(,),焦平面为(),d0为物距,d1为象平面。要使=F{(,)},即准确实现傅里叶光学变换,只有在==f 时才能实现,否则将出现位相弯曲。并且,只有正透镜才能实现傅里叶变换,这些限制给工程技术中无疑增加了困难。这使得人们不得不寻求新得的方法,分数傅立叶变换不要求严频谱面,可根据需要在既包含空域信息也包括空频域信息的平面上进行处理,这使光学信息处理更具灵活性。 1傅里叶变换缺乏时间和频率的定位功能 傅里叶变换及其逆变换表示如下

傅里叶变换公式

第2章信号分析 本章提要 信号分类 周期信号分析--傅里叶级数非周期信号分析-- 傅里叶变换脉冲函数及其性质 信号:反映研究对象状态和运动特征的物理量信号分析:从信号中提取有用信息的方法和手段 § 2—1 信号的分类 两大类:确定性信号,非确定性信号确定性信号:给定条件下取值是确定的。 进一步分为:周期信号, 非周期信号。

x(t) Acos J% ° m 非确定性信号 (随机信号): 给定条件下 取值是不确定的 按取值情况分类:模拟信号,离散信 号 数字信号:属于离散信号,幅值离散, 并用二进制表示。 信号描述方法 时域描述 如简谐信号 简谐信号及其三个要素 质量—弹簧系 统的力学模型

频域描述 以信号的频率结构来描述信号的方法:将信号看成许多谐波(简谐信号)之和,每一个谐波称作该信号的一 个频率成分,考察信号含有那些频率的谐波,以及各 谐波的幅值和相角。 vpage break〉 § 2-2 周期信号与离散频谱 一、周期信号傅里叶级数的三角函数 形式 周期信号时域表达式 T:周期。注意n的取值:周期信号“无始无终” # 傅里叶级数的三角函数展开式 x(t) a0(a n cosn 0t b n sinn 0t) n 1

(n =1,2, 3 ,…) 傅立叶系数: a 。 1 T T 2 T x(t)dt 2 T 2 2 o tdt a n T T x(t)cos n 2 T 2 2 b n T T x(t)sin n o tdt 2 式中T --周期;0--基频,o =2 /T o 三角函数展开式的另一种形式: 次谐波的幅值 次谐波的频率 信号的均值,直流分量 N 次谐波的相角

相关文档