Camera line's problem
Try some software troubleshooting:
Make sure your phone's firmware version is:
Next check under safe mode:
Hold power button for 5 seconds => When the screen flashes with option => Press & hold power option => You will get an option to restart in safe mode
If above doesn't work you can probably factory reset your phone & try re calibrating your camera.
If still the results are same do visit the service center.
Can you go through the comments in the below link and let me know if you have the same issue
It started with this symptom for me and then phone started rebooting everytime I open camera app. Factory reset did not help either. Turned out to be a motherboard issue. Got it replaced at service center under warranty.
Can you please tell me how many days it took for the replacement and how old was your phone when you took it to the service center