Single-pixel imaging employs structured illumination to record images with very simple light detectors. It can be an alternative to conventional imaging in certain applications such as imaging with radiation in exotic spectral regions, multidimensional imaging, imaging with low light levels, 3D imaging or imaging through scattering media. In most cases, the measurement process is just a basis transformation which depends on the functions used to codify the light patterns. Sampling the object with a different basis of functions allows us to transform the object directly onto a different space. The more common functions used in single-pixel imaging belong to the Hadamard basis or the Fourier basis, although random patterns are also frequently used, particularly in ghost imaging techniques. In this work we compare the performance of different alternative sampling functions for single pixel imaging, all of them codified with a digital micromirror device (DMD). In particular, we analyze the performance of the system with Hadamard, cosine, Fourier and noiselet patterns. Some of these functions are binary, some others real and other complex functions. However, all of them are codified with the same DMD by using different approaches. We perform both numerical and experimental tests with the different sampling functions and we compare the performance in terms of the efficiency and the signal-to-noise ratio (SNR) of the final images.