Is there any chance they just aren't wearing their glasses/contacts? Some people are very vain and pretend they don't need them, but actually can't recognise you unless you always wear eg a bright red coat.
Otherwise, I think you must live in an area of very rude people! If so, just smile and say hello and remind yourself it's them who are the weird ones, not you.
I am scratching my head as to why some people choose not to make an acknowledgment, ignore and pretend they are a stranger when they evidently are not. I've checked to see if I have BO or spinach in my teeth, I doubt its personal but it seems to happen a lot, school runs, pick ups, particularly. There seems to be a culture of locals pretending not to know people when clearly they do, BFF one minute, act like you have poo on your shoes the next. What is this blowing hot and cold business about can someone enlighten me. I play a guessing game with some people, its pot luck if they smile and say Hi back after I do, dont understand anyone in same boat?