They were among a group of 10 foreign nationals arrested over images showing a tour group apparently demonstrating sexual positions while clothed during a pub crawl game in Siem Reap.
Yim Srang, a court spokesman, said the court decided that the seven who were freed on bail last week could no longer stay in Cambodia.
Ouch Sopheaktra, one of the group's lawyers, said the seven Westerners - four Britons, two Canadians and one New Zealander - left Cambodia from Wednesday through Friday last week.
"The seven have been ordered to leave Cambodia temporarily and now they have already arrived in their home countries," Ouch Sopheaktra said.
He said no money had been deposited for their release on bail and that the charges against them remain active.
The remaining three - one Briton, one Dutch and one Norwegian - have been denied bail.
The only women among the detainees, Canadians Eden Kazoleas and Jessica Drolet, arrived by plane in Toronto on Friday night, and spoke briefly to the press.
"I'm very happy to be home, I'm grateful to be in Canada," said Ms Kazoleas, a 19-year-old from Alberta.
"I look forward to seeing my family and my parents, who have done absolutely everything they could to bring me home."
She thanked Cambodian authorities for their "understanding" during the incident.
"I did not know, nor did I think attending a pool party would be offensive in Cambodian culture," Ms Kazoleas said.
"I apologise to anyone who thinks it was, but... when I attended the party I was not taking part in any pornographic dancing or anything the media suggests I was doing and I am very disappointed in the way I was represented."
"I was lucky to have Jessica in there with me," she added. "As much as I wish she didn't have to go through it, I couldn't have done it without her."
Police said those caught in the raid had been "dancing pornographically" and offended Cambodian standards of morality.
Offenders face up to a year in jail if convicted of posting allegedly pornographic photos.