Quick question for those who are experiencing this problem. What steps have you done to trouble shoot this problem.
Might I suggest if you have access to a Samsung experience store. Go in and have them reflashed the software on the phone. It shouldn't wipe the phone but you should also back it up before hand.
Does this problem occur if you say use the Google camera port. Does it happen when you use any other app that uses the camera like snap chat, Instagram, video chat, bixby ect.
Have you done a partition cache wipe, cleared app data and cache in the camera app. Have you done a factory reset.
Does it happen with the different photo sizes, does it do with auto HDR on or off.