Accidents happen, and deleting the contents of an SD memory card is a relatively simple mistake to make. However, in many cases it is not an irreversible one. Many devices do not clear the card when erasing data, so it is possible to recover lost items with care.
Do not use the card for any other purpose before attempting to recover data. Further use of the card will destroy any remaining files the card contains and will render the data unrecoverable. Immediately write-protect the card according to the manufacturer's instructions.
Download card recovery software. There are a multitude of utilities available for this (see Resources). Some are free; others cost money. Try a free program or see if a free trial is available. These utilities make it possible to see the files that have not yet been overwritten on your SD card.
Insert the card into your card reader or device, and run the card recovery software. The software will scan your device for the files and alert you to any complete, recoverable files available. Recover the images according to the program instructions. Some programs charge a fee per file to be recovered.