First things first :
You should NOT write to the device, as it can overwrite deleted files. Shut down the machine as soon as possible, and restart it from a LiveCD or LiveUSB.
To recover your pictures you will need photorec, this software is inside the testdisk package and that’s a good news. The testdisk package is available in the repository of Ubuntu. To install it open a terminal window and type:
sudo apt-get install testdisk
Now run photorec like this :
sudo photorec
… and follow menus.