The "CAFADIS" camera is a plenoptic camera developed by the University of La Laguna (Spain). CAFADIS stands (in Spanish) for phase-distance camera, since it can be used for distance and optical wavefront estimation. From a single shot it can produce several images refocused at different distances, depth maps, all-in-focus images and stereo pairs. A similar optical design can also be used in adaptive optics in astrophysics, in order to correct the aberrations caused by atmospheric turbulence in telescope images. In order to perform these tasks, different algorithms, running on GPU and FPGA, operate on the raw image captured by the camera.