People wearing samurai costumes and carrying torches have recreated a centuries-old spectacle in western Japan.