The two women shouted at him and blocked him.
The court heard he tapped one child on the head before moving away and appearing to talk into a smart watch.
He told staff at the park he had not been taking photos and said he did not have a phone and his smart watch was not charged.
He said he was looking for a job, that he was married with children in Bangladesh, but he was homeless in the UK.
The police were called and he was taken from the park to Cardiff City Centre where he was released.
The following day Janu was seen in the reception area of a nursery in Bridgend county where 17 children were being cared for.
When he was approached by a member of staff, he pushed past and tried to get to the children in a locked area by pushing numbers into a keypad on the wall.
Lockdown procedures were started at the nursery and Janu remained in the hallway and outside for 15 minutes before leaving.
He was arrested nearby.
In a victim impact statement, the mother of one of the children at the Cardiff park told the court she believed “he would have taken her if he’d had the opportunity”.
The mother of the other child said: “A strange man tried to take my child in front of me without registering what he was doing was wrong.”
She added she had been “afraid this man would come and get my child from my own home” and said that she was concerned her increased anxiety would affect her child in the future.
The court heard Janu had a history of mental illness.