The media cards act just like any disk drive, there is a directory, File Allocation Table (FAT),and data space. Computers access the data just like a disk drive and delete files just like a a computer have the active/deleted byte set to xE5, one only need to modify this code to x00 and the file directory becomes active again and the data links are reestablished. This opens the possibility that the data space used by the original file/image could also be used another image and both images could be corrupted. Recovery software uses this method as a first approach for recovery and checks for cross linked files. The recovery software can also go through the FAT and reestablish the links within a file and possibly reconstruct an image.
The camera has no feature to recover a deleted file.
For the best chance of recovery, one can not write any new data to the media card. If data is written to the card there is the possibility that the data spaced used by the deleted file might now be used by the new data.
It is also possible to unformat a media card as long as no data has been written to it because only certain data bytes on the media card are changed to indicate that the card's directory and data space have no entries.
Life is just a lot easier not having to recover lost files.
Every wonder how the forensic scientist recover lost data? Reread the above.