On iOS 8, there is a feature (Recently Deleted) allowing you to recover the accidentally deleted pics, while for older versions you will have to install an app to try finding and backing them
In the case of Android, you will definitely need an app to find the precious pictures, such as DiskDigger or Kvisoft Recovery, scanning your device according to keywords offered, finding and returning the file to the original folder