Hardware test: go over to your dial pad and type in *#0*#, this will bring up a number of tests.
Front Camera: Select Front Cam, align your phone and tap to take a photo. Review the quality of the photo and let us know the results. You can then tap the screen to return to the LCD test screen.
Back Camera: Select Mega Cam. Align your phone and tap the ‘capture’ icon to take a photo. Verify that the flash works during this as well. Review the photo and let us know the results.
Let me know if your cameras focus correctly in this mode. If they do, then it highlights a software issue, if not, then I'd recommend popping into a Service Location to have your phones looked at by a trusty engineer at a Samsung Experience Store or Samsung Service Centre location"