A miniaturized hyperspectral device has been developed as an add-on for a standard camera, and could be used to repurpose a camera for generating hyperspectral images and videos for a range of applications. The device uses compressive sampling techniques to capture signals and images from much fewer samples or measurements than the traditional sampling theorem that has been used for decades.