  Generalized Fourier series with orthogonal polynomial bases have useful
applications in several fields, including differential equations, pattern
recognition, and image and signal processing. However, computing the
generalized Fourier series can be a challenging problem even for relatively
well behaved functions. In this paper a method for approximating a sparse
collection of Fourier-like coefficients is presented that uses a collocation
technique combined with an optimization problem inspired by recent results in
compressed sensing research. The discussion includes approximation error rates
and numerical examples to illustrate the effectiveness of the method. One
example displays the accuracy of the generalized Fourier series approximation
for several test functions, while the other is an application of the
generalized Fourier series approximation to rotation-invariant pattern
recognition in images.
