I have tried with PhotoRec, a free program, although a bit tricky to use.
It was the best performing one of the programs I tried, so it has high chances of recovering your pictures, if the sd card wasn't encrypted.
For example, some cellphones might encrypt the sd card under some circumstances. In that case, it wouldn't be recoverable.