I've been nabbed by police in China for walking in the wrong area with a camera. It's not the end of the world when it happens, they just have to make sure you're not some smart-ass intelligence agent trying to pull one over them. They're generally quite nice and just doing their job. I suspect the US and UK would be less lenient. China's actually surprisingly relaxed as long as you're a little bit adaptable.