A 44-year-old man who set up a mobile phone in a shower to film a teenage girl has been spared jail.
But a judge told Paul Canning, of Bradley, that he wished he had been able to give him a custodial sentence.
Instead Canning of Staynton Crescent, was given a three-year community order and ordered to sign the sex offenders’ register.
Canning was questioned about the incident earlier this year after the 14-year-old victim, who cannot be identified for legal reasons, discovered the phone while she was using the shower last November.
Canning, a former electrician who is now on incapacity benefit, admitted a charge of voyeurism before Huddersfield magistrates and his case was sent to Bradford Crown Court where he could have been jailed for a maximum of two years.
Yesterday, Judge Jonathan Durham Hall QC told Canning that he had displayed worrying paedophile tendencies and his case merited a very tough order.
"You know what the court’s view is. Grown men and women must leave alone the children of this society," said Judge Durham Hall.
"They are our key asset and they will be protected at all costs."
The judge said he would have jailed Canning if he had planned to sell the images or show them to others, but he said the guidance in such cases prevented him from passing a custodial sentence.
"Had I a free hand I think I should lock you up for six months, but I cannot do that and as it happens, reflecting your frank guilty plea, I can put you on a very tough alternative course which will protect not just (the victim), but other children in the future."
As part of the three-year community order Canning will have to take part in sex offender treatment programme and he must also register as a sex offender with the police for the next five years.