An image processing method, comprising: obtaining a to-be-processed image with ghost reflection (901, 902, 1001, 1101, 1102); calculating an image gradient of the to-be-processed image; calculating a gradient magnitude of each pixel in the to-be-processed image according to the image gradient; determining a gradient value of each pixel in a target image based on the gradient magnitude of each pixel in the to-be-processed image, wherein the determining comprising: determining, in the to-be-processed image, a first-type pixel of which the gradient magnitude is less than a magnitude threshold and a second-type pixel of which the gradient magnitude is greater than or equal to the magnitude threshold; setting a gradient value of the first-type pixel to 0, to obtain an updated gradient value of the first-type pixel; and using the updated gradient value of the first-type pixel and a gradient value of the second-type pixel as the gradient value of each pixel in the target image; determining the gradient of the target image according to the gradient value of each pixel in the target image; and generating the target image based on the gradient of the target image; wherein generating the target image based on the gradient of the target image comprises: determining a gradient matrix of the to-be-processed image; determining a first element corresponding to the ghost reflection (901, 902, 1001, 1101, 1102) in the to-be-processed image according to values of elements in the gradient matrix, presetting the gradient matrix by using the first element, and using a processed gradient matrix as a gradient matrix of the target image; determining a Laplace transform result for a divergence of the gradient matrix of the target image; and restoring the target image by using the Laplace transform result and the to-be-processed image. obtaining a to-be-processed image with ghost reflection (901, 902, 1001, 1101, 1102); calculating an image gradient of the to-be-processed image; calculating a gradient magnitude of each pixel in the to-be-processed image according to the image gradient; determining a gradient value of each pixel in a target image based on the gradient magnitude of each pixel in the to-be-processed image, wherein the determining comprising: determining, in the to-be-processed image, a first-type pixel of which the gradient magnitude is less than a magnitude threshold and a second-type pixel of which the gradient magnitude is greater than or equal to the magnitude threshold; setting a gradient value of the first-type pixel to 0, to obtain an updated gradient value of the first-type pixel; and using the updated gradient value of the first-type pixel and a gradient value of the second-type pixel as the gradient value of each pixel in the target image; determining the gradient of the target image according to the gradient value of each pixel in the target image; and generating the target image based on the gradient of the target image; wherein generating the target image based on the gradient of the target image comprises: determining a gradient matrix of the to-be-processed image; determining a first element corresponding to the ghost reflection (901, 902, 1001, 1101, 1102) in the to-be-processed image according to values of elements in the gradient matrix, presetting the gradient matrix by using the first element, and using a processed gradient matrix as a gradient matrix of the target image; determining a Laplace transform result for a divergence of the gradient matrix of the target image; and restoring the target image by using the Laplace transform result and the to-be-processed image. determining, in the to-be-processed image, a first-type pixel of which the gradient magnitude is less than a magnitude threshold and a second-type pixel of which the gradient magnitude is greater than or equal to the magnitude threshold; setting a gradient value of the first-type pixel to 0, to obtain an updated gradient value of the first-type pixel; and using the updated gradient value of the first-type pixel and a gradient value of the second-type pixel as the gradient value of each pixel in the target image; determining the gradient of the target image according to the gradient value of each pixel in the target image; and generating the target image based on the gradient of the target image; wherein generating the target image based on the gradient of the target image comprises: determining a gradient matrix of the to-be-processed image; determining a first element corresponding to the ghost reflection (901, 902, 1001, 1101, 1102) in the to-be-processed image according to values of elements in the gradient matrix, presetting the gradient matrix by using the first element, and using a processed gradient matrix as a gradient matrix of the target image; determining a Laplace transform result for a divergence of the gradient matrix of the target image; and restoring the target image by using the Laplace transform result and the to-be-processed image. determining a gradient matrix of the to-be-processed image; determining a first element corresponding to the ghost reflection (901, 902, 1001, 1101, 1102) in the to-be-processed image according to values of elements in the gradient matrix, presetting the gradient matrix by using the first element, and using a processed gradient matrix as a gradient matrix of the target image; determining a Laplace transform result for a divergence of the gradient matrix of the target image; and restoring the target image by using the Laplace transform result and the to-be-processed image.