This is a legend from Kagawa prefecture, and is one of several legends about someone out for a walk who runs into a mysterious band on the road, and dies as a result.
The Seven Pilgrims cannot be seen under normal circumstances. According to legend, only those with the ability to wiggle their ears can see them unaided. Everyone else has to look beneath the legs of a cow in order to make the invisible visible. Cows in particular are said to be sensitive to the presence of the Seven Pilgrims. If a farmer is out walking with his cows, and they come to a sudden stop at a crossroads, the wise farmer bends down and peeks from between his cows’ legs until he is sure the coast is clear. But, if he sees seven dark pilgrims walking single file, then his time to die has come.