If you see two police on the corner and think...
Not to speak highly of the NYPD - but it is the character of most violent criminals to refrain from attacking you when police officers are standing close at hand.
There's a famous video of an apple store robbery and the thief walks past a cop on the way out. Police don't do anything anymore.
Depends on the violent crime. I've been nearly run over in crosswalks dozens of times in view of police, sometimes when they're in traffic as well and could easily pull over the perpetrator. It's never happened.