A method for capturing an image during video recording, applied to an electronic device, wherein the method comprises: receiving, by the electronic device, a first operation of a user, wherein the first operation is used to trigger the electronic device to start recording a video; collecting, by a camera of the electronic device, a first image in response to the first operation, and displaying, by the electronic device, a first screen, wherein the first screen is a viewfinder screen on which the electronic device is recording a video, the first screen comprises a preview image obtained based on the first image, the first screen further comprises a snapshot shutter, and the snapshot shutter is configured to trigger the electronic device to capture an image to obtain a photo; buffering, by the electronic device in a first buffer queue, the first image collected by the camera, wherein n frames of first images collected by the camera are buffered in the first buffer queue, n≥2, and n is an integer; selecting, by the electronic device based on additional information of the first image in response to a second operation performed by the user on the snapshot shutter, a second image from the n frames of first images buffered in the first buffer queue, wherein the additional information of the first image comprises at least one of contrast of the first image, and an angular velocity at which the camera collects the first image; and running a preset raw domain image processing algorithm, by the electronic device by using m frames of first images that are in the n frames of first images and that comprise the second image as an input, to obtain a third image, and encoding the third image to generate a captured photo, wherein m≥2, m is an integer, and the preset RAW domain image processing algorithm has a function of improving image quality, wherein running the preset RAW domain image processing algorithm comprises performing long-short frame fusion in a high dynamic range scenario, the m frames and a plurality of long and short frames are used as the input for the long-short frame fusion, and the long and short frames are additionally exposed and output by an image sensor of the camera and comprise a long-exposure long frame and a short-exposure short frame. receiving, by the electronic device, a first operation of a user, wherein the first operation is used to trigger the electronic device to start recording a video; collecting, by a camera of the electronic device, a first image in response to the first operation, and displaying, by the electronic device, a first screen, wherein the first screen is a viewfinder screen on which the electronic device is recording a video, the first screen comprises a preview image obtained based on the first image, the first screen further comprises a snapshot shutter, and the snapshot shutter is configured to trigger the electronic device to capture an image to obtain a photo; buffering, by the electronic device in a first buffer queue, the first image collected by the camera, wherein n frames of first images collected by the camera are buffered in the first buffer queue, n≥2, and n is an integer; selecting, by the electronic device based on additional information of the first image in response to a second operation performed by the user on the snapshot shutter, a second image from the n frames of first images buffered in the first buffer queue, wherein the additional information of the first image comprises at least one of contrast of the first image, and an angular velocity at which the camera collects the first image; and running a preset raw domain image processing algorithm, by the electronic device by using m frames of first images that are in the n frames of first images and that comprise the second image as an input, to obtain a third image, and encoding the third image to generate a captured photo, wherein m≥2, m is an integer, and the preset RAW domain image processing algorithm has a function of improving image quality, wherein running the preset RAW domain image processing algorithm comprises performing long-short frame fusion in a high dynamic range scenario, the m frames and a plurality of long and short frames are used as the input for the long-short frame fusion, and the long and short frames are additionally exposed and output by an image sensor of the camera and comprise a long-exposure long frame and a short-exposure short frame.