In the UK, the law was recently changed to outlaw non-consensual upskirting – without consent is crucial. Canada does not appear to have such a specific law, but the Voyeurism law covers some of that ground. What you are not allowed to do is:
surreptitiously, observe — including by mechanical or electronic
means — or make a visual recording of a person who is in
circumstances that give rise to a reasonable expectation of privacy,
if (a) the person is in a place in which a person can reasonably be
expected to be nude, to expose his or her genital organs or anal
region or her breasts, or to be engaged in explicit sexual activity;
(b) the person is nude, is exposing his or her genital organs or anal
region or her breasts, or is engaged in explicit sexual activity, and
the observation or recording is done for the purpose of observing or
recording a person in such a state or engaged in such an activity; or
(c) the observation or recording is done for a sexual purpose.
This blog article looks at the difficulty of knowing where one has an "expectation of privacy", since this is a new law with little case history behind it. R v Jarvis seems to be it as far as case law goes. The court allows that many things may go into a reasonable expectation of privacy for this law.
Relevant considerations may include (1) the location the person was in
when she was observed or recorded, (2) the nature of the impugned
conduct (whether it consisted of observation or recording), (3)
awareness of or consent to potential observation or recording, (4) the
manner in which the observation or recording was done, (5) the subject
matter or content of the observation or recording, (6) any rules,
regulations or policies that governed the observation or recording in
question, (7) the relationship between the person who was observed or
recorded and the person who did the observing or recording, (8) the
purpose for which the observation or recording was done, and (9) the
personal attributes of the person who was observed or recorded. This
list of considerations is not exhaustive and not every consideration
will be relevant in every case.
The line that the Canadian court drew is extremely fine. There is no absolute exemption for consensual acts, instead the courts would engage in a holistic balancing act. The fact that consent was included as a mere factor suggests that consent is not a safe harbor.