  We have investigated the accuracy and reliability of six methods used to
determine the length of stellar bars in galaxies or N-body simulations. All
these methods use ellipse fitting and Fourier decomposition of the surface
brightness. We have applied them to N-body simulations that include stars, gas,
star formation, and feedback. Stellar particles were photometrically calibrated
to make B and K-band mock images. Dust absorption is also included. We discuss
the advantages and drawbacks of each method, the effects of projection and
resolution, as well as the uncertainties introduced by the presence of dust.
The use of N-body simulations allows us to compare the location of Ultra
Harmonic Resonance (UHR or 4/1) and corotation (CR) with measured bar lengths.
We show that the minimum of ellipticity located just outside the bulk of the
bar is correlated with the corotation, whereas the location of the UHR can be
approximated using the phase of the fitted ellipses or the phase of the m=2
Fourier development of the surface brightness. We give evidence that the
classification of slow/fast bars, based on the ratio R = Rcr/Rbar could
increase from 1 (fast bar) to 1.4 (slow bar) just by a change of method. We
thus conclude that one has to select the right bar-length estimator depending
on the application, since these various estimators do not define the same
physical area.
