CPC G06T 5/80 (2024.01) [G06T 5/40 (2013.01); G06T 5/50 (2013.01); G06T 2207/10024 (2013.01); G06T 2207/20221 (2013.01); G06T 2207/20224 (2013.01)] | 15 Claims |
1. A method for processing an image, comprising:
acquiring a first image of a target object, a second image of the target object, and a third image of the target object, exposure of the first image being less than exposure of the second image, the exposure of the second image being less than exposure of the third image;
acquiring a fourth image by increasing brightness of the first image;
acquiring a second reference frame by performing ghost elimination on the second image and taking the fourth image as a first reference frame; and
acquiring a fifth image by performing ghost elimination on the third image based on the second reference frame;
wherein acquiring the second reference frame by performing the ghost elimination on the second image and taking the fourth image as the first reference frame comprises:
acquiring the second reference frame by fusing the fourth image and the second image and taking the fourth image as the first reference frame, a location of the target object in the second reference frame being identical to a location of the target object in the first image;
wherein acquiring the fifth image by performing the ghost elimination on the third image based on the second reference frame comprises:
acquiring the fifth image by fusing the second reference frame and the third image, a location of the target object in the fifth image being identical to the location of the target object in the first image;
wherein the method further comprises:
acquiring the first image, the second image, the third image, and the fourth image in a YUV format by performing format conversion on the first image, the second image, the third image, and the fourth image in a RAW format,
wherein acquiring the second reference frame by fusing the fourth image and the second image and taking the fourth image as the first reference frame further comprises:
converting the fourth image and the second image in the YUV format into the fourth image and the second image in an RGB format;
processing pixel values of the fourth image and the second image in the RGB format, and acquiring a single-channel difference image in the RGB format;
determining a weight of a pixel value in the single-channel difference image; and
acquiring the second reference frame by fusing the fourth image and the second image based on the weight.
|