Patent attributes
An image compensation method is provided, which includes: acquiring a Hall value of an electronic device that is provided with a first camera and a second camera, at least one of the first camera and the second camera is provided with an optical image stabilization system; acquiring a lens bias corresponding to the Hall value; calculating an image bias corresponding to the lens bias according to a preset OIS calibration function; and performing image compensation by using the image bias on at least one of a first image captured by the first camera and a second image captured by the second camera at the same time. An electronic device is also provided.