Option 1: Clear cached data and camera
One of the easiest tests is to enter directly into the terminal settings and go to Applications. In there we select the tab that says all then seek the Camera application.
Once entered in the application and click Force Quit button and then click the Clear Cache option and click Clear Data. Once I have done restart the terminal and look if the error persists. This method does not delete photos or videos which will have no problem to try it, just have to reset the camera preferences but if it does not have to go to the next method. You can also try another camera application like Google chamber.
Option 2: Factory Reset to Galaxy S4
If you want to continue to try to recover the camera without much danger in this program you will erase everything you have in the terminal so if you have something important in it must keep pace. Once this is done we'll Settings -> Backup and Restore and select the option Factory data reset.
This option will delete all files and settings, restart the phone and try to see if the problem has been solved, in the event that you not only have one option.