Search

CN-121981896-A - Image processing method and device

CN121981896ACN 121981896 ACN121981896 ACN 121981896ACN-121981896-A

Abstract

The application relates to an image processing method and device, the method comprises the steps of obtaining multi-frame images acquired by an image sensor, determining key frames from the multi-frame images, writing image data of the key frames into a memory, wherein frames except the key frames in the multi-frame images are non-key frames, the image data of the non-key frames are not written into the memory, aiming at each non-key frame, reading the image data of the key frames from the memory, comparing the image data of the current non-key frames with the image data of the key frames, generating motion estimation information corresponding to the current non-key frames, and fusing the key frames with the non-key frames based on the motion estimation information generated by the non-key frames and the image data of the key frames, so as to generate a fused target image. Therefore, the interaction times and the data writing quantity with the memory can be greatly reduced, so that the memory bandwidth can be remarkably saved, the system power consumption can be reduced, and the image processing efficiency can be improved.

Inventors

  • ZHANG JIANGTAO
  • JIN YAN

Assignees

  • 北京紫光展锐通信技术有限公司

Dates

Publication Date
20260505
Application Date
20251225

Claims (10)

  1. 1. An image processing method, the method comprising: acquiring multi-frame images acquired by an image sensor; Determining a key frame from the multi-frame image, and writing image data of the key frame into a memory, wherein frames except the key frame in the multi-frame image are non-key frames, and the image data of the non-key frames are not written into the memory; For each non-key frame, reading the image data of the key frame from the memory, and performing difference comparison on the image data of the current non-key frame and the image data of the key frame to generate motion estimation information corresponding to the current non-key frame; and fusing the key frames with the non-key frames based on the motion estimation information generated by the non-key frames and the image data of the key frames, and generating a fused target image.
  2. 2. The method of claim 1, wherein determining a key frame from the multi-frame image comprises: respectively detecting the definition of the multi-frame images; And determining a frame of image with highest definition from the multi-frame images, and taking the frame of image with highest definition as a key frame.
  3. 3. The method of claim 1, wherein prior to writing the image data of the key frame to memory, the method further comprises: And carrying out downsampling processing on the image data of the key frame.
  4. 4. The method of claim 1, wherein the performing the difference comparison between the image data of the current non-key frame and the image data of the key frame to generate the motion estimation information corresponding to the current non-key frame comprises: calculating the brightness difference of the corresponding pixels between the current non-key frame and the key frame to generate a brightness difference graph; comparing the brightness difference value of each pixel in the brightness difference graph with a preset threshold value to obtain a comparison result; and generating a binarization mask or a weight mask for identifying a motion area in the image based on the comparison result, and taking the binarization mask or the weight mask as motion estimation information.
  5. 5. The method of claim 1, wherein the fusing the key frames with the non-key frames based on the motion estimation information generated by the non-key frames and the image data of the key frames comprises: writing the motion estimation information into the memory; And reading the motion estimation information from the memory, and controlling the fusion weight of the key frame and each non-key frame in the corresponding pixel area based on the motion estimation information so as to perform time domain noise reduction fusion.
  6. 6. The method of claim 1, wherein after the acquiring the multi-frame image acquired by the image sensor, the method further comprises: and carrying out preprocessing operation on the multi-frame image, wherein the preprocessing operation comprises at least one of black level correction, lens shading correction and dead pixel correction.
  7. 7. An image processing apparatus, characterized in that the apparatus comprises: The image acquisition module is used for acquiring multi-frame images acquired by the image sensor; The image writing module is used for determining a key frame from the multi-frame image and writing image data of the key frame into a memory, wherein frames except the key frame in the multi-frame image are non-key frames, and the image data of the non-key frames are not written into the memory; The image comparison module is used for reading the image data of the key frames from the memory for each non-key frame, and performing difference comparison on the image data of the current non-key frame and the image data of the key frames to generate motion estimation information corresponding to the current non-key frames; And the image fusion module is used for fusing the key frames with the non-key frames based on the motion estimation information generated by the non-key frames and the image data of the key frames to generate a fused target image.
  8. 8. An electronic device, comprising: At least one processor; a memory for storing the at least one processor-executable instruction; Wherein the at least one processor is configured to execute the instructions to implement the method of any of claims 1-6.
  9. 9. A computer readable storage medium, characterized in that instructions in the computer readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method of any one of claims 1-6.
  10. 10. A computer program product comprising a computer program which, when executed by a processor, implements the method of any of claims 1-6.

Description

Image processing method and device Technical Field The present application relates to the field of image processing technologies, and in particular, to an image processing method and apparatus. Background In the field of multi-frame image processing, particularly in photographing scenes of devices such as smart phones and digital cameras, multi-frame fusion technology is widely used for improving image quality, for example, achieving a high dynamic range or excellent noise reduction effect. The related art generally requires capturing a plurality of pictures in succession and estimating motion information in a scene by comparing differences between the pictures to avoid ghost images generated at the time of fusion. However, the massive image data in the related art requires frequent interaction with the memory, so that the memory access bandwidth becomes a key bottleneck for limiting the processing efficiency and the power consumption, resulting in lower image processing efficiency in the related art. Disclosure of Invention The embodiment of the application provides an image processing method and device. According to a first aspect of an embodiment of the present application, there is provided an image processing method including: acquiring multi-frame images acquired by an image sensor; Determining a key frame from the multi-frame image, and writing image data of the key frame into a memory, wherein frames except the key frame in the multi-frame image are non-key frames, and the image data of the non-key frames are not written into the memory; For each non-key frame, reading the image data of the key frame from the memory, and performing difference comparison on the image data of the current non-key frame and the image data of the key frame to generate motion estimation information corresponding to the current non-key frame; and fusing the key frames with the non-key frames based on the motion estimation information generated by the non-key frames and the image data of the key frames, and generating a fused target image. According to a second aspect of an embodiment of the present application, there is provided an image processing apparatus including: The image acquisition module is used for acquiring multi-frame images acquired by the image sensor; The image writing module is used for determining a key frame from the multi-frame image and writing image data of the key frame into a memory, wherein frames except the key frame in the multi-frame image are non-key frames, and the image data of the non-key frames are not written into the memory; The image comparison module is used for reading the image data of the key frames from the memory for each non-key frame, and performing difference comparison on the image data of the current non-key frame and the image data of the key frames to generate motion estimation information corresponding to the current non-key frames; And the image fusion module is used for fusing the key frames with the non-key frames based on the motion estimation information generated by the non-key frames and the image data of the key frames to generate a fused target image. According to a third aspect of embodiments of the present application, there is provided an electronic device. The electronic device comprises a memory and a processor, the memory having stored thereon a computer program, the processor implementing the method as described above when executing the program. According to a fourth aspect of embodiments of the present application, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the above-described method of the present application. According to a fifth aspect of embodiments of the present application, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the above-described method of the present application. According to the image processing method and device provided by the embodiment of the application, the multi-frame image acquired by the image sensor is acquired, the key frame is determined from the multi-frame image, the image data of the key frame is written into the memory, and the image data of the non-key frame is not written into the memory. For each non-key frame, image data of the key frame is read from the memory, and difference comparison is carried out on the image data of the current non-key frame and the image data of the key frame to generate motion estimation information corresponding to the current non-key frame, so that the key frame and each non-key frame can be fused based on the motion estimation information generated by each non-key frame and the image data of the key frame to generate a fused target image. Since the embodiment only writes the image data of the key frame into the memory after determining the key frame, the non-key frame generates the motion estimation information by dire