  Elastic cross sections are calculated and compared with the data on
$\pi^{\pm}$ scattering on $^{28}$Si, $^{40}$Ca, $^{58}$Ni, $^{208}$Pb nuclei in
the energy range from 130 to 290 MeV. To this end, both the folding optical
potential (OP) and the local modified Kisslinger-type OP were calculated, and
then the $\pi A$ cross sections were obtained by solving the Klein-Gordon
equation to account for the relativization and distortion wave effects. In the
folding OPs, the parameters of the elementary $\pi N$ amplitude were fitted
when describing the $\pi A$ scattering data, and thus the essential in-medium
effect on the parameters of the $\pi N$ amplitude was established since the
pion is scattered not on a free but on a bound nuclear nucleon. Fairly good
agreement with experimental data was obtained for both models of optical
potentials and their forms turn out to be in coincidence in the region of their
surfaces.
