Yes cameras that can hide in glasses or a hat have been around for a long, long time.
There are legitimate uses. I remember a TV news expose where a reporter wore a hidden camera into a series of chiropractic appointments to show what kind of quackery goes on. The footage was obscured to protect identities but the content of it was damning. That was good journalism.