Bar strengths in spiral galaxies estimated from 2MASS images