The optical density of a material relates to the sluggish tendency of the atoms of a material to maintain the absorbed energy of an electromagnetic wave in the form of vibrating electrons before reemitting it as a new electromagnetic disturbance. The more optically dense that a material is, the slower that a wave will move through the material.
Refraction is the bending of the path of a light wave as it passes from one material to another material. The refraction occurs at the boundary and is caused by a change in the speed of the light wave upon crossing the boundary
so they are not same