Use the service menu and the test for the camera.
To open the service menu at your Galaxy S5 type *#0*# at your dialing pad. A white screen with differents tiles will appear. One tile is called "camera". tap on it to check if your camera is working properly!