Calibration of the total infrared luminosity of nearby galaxies from Spitzer and Herschel bands