Assuming it’s done in a gentlemanly manner, I don’t see anything wrong with a man who spots an attractive woman politely introducing himself. Good manners of course dictate that if she appears bothered or uninterested he should abort with all haste. As long as the initial overture is made in a respectful manner, though, I don’t see the harm in taking a shot, low-percentage as it may be, to see if the woman is receptive to a little conversation.
In my time in Japan I’ve even seen a few instances of men and women who just met on the train chatting happily with each other, then exchanging phone numbers or email addresses before one gets off. Still, even I draw the line somewhere, and it’s at a point well before suddenly planting your lips on a woman you’ve never spoken to, as one man recently did while riding the rails in Wakayama Prefecture.