I used a version of this once. She was in a car (parked btw) and I said 'Hey, nice shoes' to get her attention and then I introduced myself. It broke the ice.
It was the timing, how I said it and my attitude. I was also lucky she found it funny. It wouldn't have worked on someone else.