Hi siromani. Which phone are you using? If you are using an Android phone with a removable battery, try removing the battery for a few minutes. It worked on Samsung Galaxy Grand Prime.
Reference: How to fix camera problem on the Samsung Galaxy Grand Prime?