A powerful 7.5 magnitude earthquake has struck off northern Japan, injuring 23 people and triggering a tsunami.