Method and apparatus for processing image, electronic device and storage medium
AssigneeBeijing Xiaomi Mobile Software Co., Ltd.
InventorZifei Dou
Life of this patent
Estimating the term…
Abstract
A method, an electronic device, and a storage medium are provided for processing an image. The method includes: at least one first image frame is acquired based on a first pixel arrangement pattern when receiving a photographing instruction, where a pixel in the first pixel arrangement pattern includes sub-pixels of the same color component distributed in a square array in a photosensitive element; at least one second image frame is acquired based on a second pixel arrangement pattern, where the second pixel arrangement pattern is a standard Bayer arrangement pattern; and the at least one first image frame and the at least one second image frame are fused to obtain the image to be displayed.
Claims14
A method for processing an image, comprising:
- acquiring at least one first image frame based on a first pixel arrangement pattern when receiving a photographing instruction, wherein a pixel in the first pixel arrangement pattern includes sub-pixels of the same color component distributed in a square array in a photosensitive element;
- acquiring at least one second image frame based on a second pixel arrangement pattern, wherein the second pixel arrangement pattern is a standard Bayer arrangement pattern;
- detecting a light intensity of ambient light;
- determining a preset resolution based on the light intensity, a first resolution and a second resolution;
- and
- fusing the at least one first image frame and the at least one second image frame to obtain the image to be displayed by:
- enlarging each of the at least one first image frame from the first resolution to the preset resolution to obtain at least one third image frame;
- reducing each of the at least one second image frame from the second resolution to the preset resolution to obtain at least one fourth image frame;
- and
- fusing the at least one third image frame and the at least one fourth image frame to obtain the image to be displayed.
An electronic device, comprising:
- a processor;
- and
- a memory configured to store processor executable instructions,
- wherein the processor is configured to execute:
- acquiring at least one first image frame based on a first pixel arrangement pattern when receiving a photographing instruction, wherein a pixel in the first pixel arrangement pattern includes sub-pixels of the same color component distributed in a square array in a photosensitive element;
- acquiring at least one second image frame based on a second pixel arrangement pattern by:
- obtaining data of at least one raw image frame collected by the photosensitive element;
- with regard to the data of each of the at least one raw image frame,
- subjecting the data of the raw image frame to pixel rearrangement;
- determining a third color component corresponding to each of first pixels in the re-arranged data of the raw image frame;
- determining a fourth color component corresponding to each of at least one second pixel adjacent to the first pixel;
- and
- determining three primary color components corresponding to the first pixel based on the third color component and the fourth color component corresponding to each of the at least one second pixel, to obtain a second image frame corresponding to the data of the raw image frame;
- wherein the second pixel arrangement pattern is a standard Bayer arrangement pattern;
- and
- fusing the at least one first image frame and the at least one second image frame to obtain the image to be displayed.
A non-transitory computer readable storage medium storing computer instructions, when invoking the computer instructions, a processor is configured to execute:
- acquiring at least one first image frame based on a first pixel arrangement pattern when receiving a photographing instruction, wherein a pixel in the first pixel arrangement pattern includes sub-pixels of the same color component distributed in a square array in a photosensitive element;
- acquiring at least one second image frame based on a second pixel arrangement pattern, wherein, the second pixel arrangement pattern is a standard Bayer arrangement pattern;
- detecting a light intensity of ambient light;
- determining a preset resolution based on the light intensity, a first resolution and a second resolution;
- and
- fusing the at least one first image frame and the at least one second image frame to obtain the image to be displayed by:
- enlarging each of the at least one first image frame from the first resolution to the preset resolution to obtain at least one third image frame;
- reducing each of the at least one second image frame from the second resolution to the preset resolution to obtain at least one fourth image frame;
- and
- fusing the at least one third image frame and the at least one fourth image frame to obtain the image to be displayed.
Dependencies are inferred from the claim text.