A NAVAL police officer set up a "nanny cam" in the hope of catching his stepdaughter drinking alcohol or taking illegal drugs.

But the 39-year-old man found himself in a Sydney court yesterday on child porn charges after police discovered several seconds of naked footage of the girl on a computer hard drive.

In a decision likely to spark debate on just how appropriate it is to video-spy on your kids, the man had charges of producing and possessing child pornography dismissed but not before being slammed by the magistrate.

Hornsby Local Court Magistrate Lisa Stapleton found he had not filmed her for the purpose of "sexual gratification" even though the footage included a few seconds of the girl, then aged 15, completely naked.

The man, who pleaded not guilty to both offences, told the court he had hidden a camera on a desk in the teenager's bedroom because he had "strong and very real suspicions" she was drinking alcohol in her bedroom and he wanted to catch her.

The court heard he told his family of his plan, with his sister advising him against it because it was "an invasion of privacy".

He also said that, once he saw footage of the now 17-year-old walking into her room after a shower and dropping her towel, he deleted it from the camera.

He admitted he had sneaked into her room to place the camera, only 4cm in length and 1cm in width, on her desk but denied the prosecution's allegation he knew she'd been in the shower at the time and would be walking into the room with only a towel on.

He was arrested at his home near Hornsby in April after police found the footage on a hard drive during a search warrant.

The man, who is still employed by the ADF, told police it had unintentionally transferred over from the camera's memory stick and he had planned to delete it.