An algorithm is developed to design all-pass filters that best approximate in the

, sense a prescribed group delay response. This algorithm can be used for both the cases of one- and two-dimensional filters. To illustrate the method, several examples for designing one- and two-dimensional filters are solved.