We establish that by choosing a smooth local perturbation of the boundary of a planar quantum waveguide, we can create an eigenvalue near any given threshold of the continuous spectrum and the corresponding trapped wave exponentially decaying at infinity. Based on an analysis of an auxiliary object, a unitary augmented scattering matrix, we asymptotically interpret Wood's anomalies, the phenomenon of fast variations in the diffraction pattern due to variations in the near-threshold wave frequency.Keywords: quantum waveguide, regular perturbation of the boundary, asymptotic expansion of eigenvalue on the continuous spectrum, Wood's anomalies