An automatic white balance method based on gray world model