The luminosity function for field galaxies in the infrared