A duo seen swinging their naked genitals around in front of a young family have been branded "a pair of idiots" in court.