Can publishing photos of people who are unaware that they are being taken can hold legal binding in court? If so how and under what statutes?

It's probably legal because bank robbers caught on the bank's TV cameras can be convicted on the basis of these images.