Quantitative connection between the nanoscale electronic inhomogeneity and the pseudogap of Bi2Sr2CaCu2O8+δ superconductors