Temperature dependence of electronic structure on the ferroelectric phase transition of BaTiO3