It happened to me once that I accidentally hit the Delete All button on my Casio Exilim digital camera when browsing through the photos I had taken previously to delete the ones that I did not want to keep. Accidents happen but this one put me off-guard for a moment as I was not sure if I could recover the photos. Then I discovered Digital Image Recovery by Zero Assumption and used the program to recover all deleted photos on the digital camera's flash drive.
The developers have created a list of supported digital camera models which you may want to check before you download and install the program on your system. You can access the list on the home page. There are models on the list that are known to be not working with the application, so make sure you check it to be on the safe side. I'd probably still use the program to try and recover the images on an unsupported camera model, but that is up to you to decide.
You need to connect the camera to your PC, which you usually do via USB or insert the memory card into a card reader that is connected to your PC. Once the camera or flash card is readable on the computer start the image recovery software to see if it can help you recover deleted photos on your camera.
Select Image Recovery from the options menu and pick the memory card or camera from the list of connected storage devices. The recovery scans the flash card which may take a while depending on the size of the storage. This is an automated process so stay put and wait for it to complete.
A file browser is then opened in the end that you can use to preview and recover photos.