How much of that is in your head though? I learned a lot from a friend of mine who is completely and entirely unabashed when it comes to talking to anyone and everyone in public. Most people responded positively. My friend would compliment random people's clothing, ask random questions to people point stuff out randomly. Any time i'm out with this friend we end up talking to random people and 99% of the time it ends positively.
I take public transit a lot and I always see people start random conversations with strangers over little things. People usually don't even respond too badly to the crazy people who talk to everyone. Unless they're being rude or agressive the worst reaction I tend to see is people politely ignoring people like that.
I also have random people come up and talk to me fairly regularly, i've had some great conversations with random people i've met.
My dad gave me a piece of advice he got from a friend of his when he was young about interacting with people in public. It helps to remember most people are just as nervous and afraid of you as you are of them, but at the same time, most people are looking for someone to talk to.
Paying attention to people's body language and reactions helps. If you pay attention you can usually tell the difference between someone who's nervous and someone who just doesn't want to talk.
People really aren't so bad. You gotta remember humans are social animals interacting with eachother is something we naturally do. Today's society may make it difficult, but those drives for human companionship are there.