Image processing method and electronic device
AssigneeVivo Mobile Communication Co., Ltd.
InventorZhuojian Yang
Life of this patent
Estimating the term…
Abstract
An image processing method includes: obtaining a first image photographed by each of N1 first cameras in the M1 first cameras and a second image photographed by each of N2 second cameras in the M2 second cameras; obtaining luminance values of at least a part of pixels in the first image and luminance values of at least a part of pixels in the second image for each first image and each second image; and increasing luminance of a target image based on obtained luminance values, and using, as a photographed image of the under-display camera assembly, a target image obtained after the luminance is increased. M1, N1, M2, and N2 are all integers greater than or equal to 1.
Claims16
An image processing method, applied to an electronic device, wherein the electronic device comprises an under-display camera assembly, the under-display camera assembly comprises M1 first cameras and M2 second cameras, and the method comprises:
- obtaining a first image photographed by each of N1 first cameras in the M1 first cameras and a second image photographed by each of N2 second cameras in the M2 second cameras;
- obtaining luminance values of at least a part of pixels in the first image and luminance values of at least a part of pixels in the second image for each first image and each second image;
- and
- increasing luminance of a target image based on obtained luminance values, and using, as a photographed image of the under-display camera assembly, the target image obtained after the luminance is increased, wherein the target image is a first image photographed by one of the N1 first cameras, wherein
- M1, N1, M2, and N2 are all integers greater than or equal to 1, N1 is less than or equal to M1, and N2 is less than or equal to M2;
- wherein the obtaining luminance values of at least a part of pixels in the first image and luminance values of at least a part of pixels in the second image for each first image and each second image comprises:
- obtaining a target photographing distance between the under-display camera assembly and a target object photographed by the under-display camera assembly;
- obtaining a target area of each first image at the target photographing distance and a target area of each second image at the target photographing distance, based on a predetermined target area in an image photographed by each first camera and a predetermined target area in an image photographed by each second camera at prestored different photographing distances;
- and
- for each target area, obtaining a luminance value of each pixel in the target area,
- wherein the increasing luminance of a target image based on obtained luminance values comprises:
- using each pixel in a target area of the target image as a first target pixel;
- and
- for each first target pixel, adding a luminance value of the first target pixel and a first luminance value to obtain a first target luminance value, and increasing the luminance value of the first target pixel to the first target luminance value, and
- wherein the first luminance value is a sum of a luminance value of a pixel corresponding to the first target pixel in a target area of each first image other than the target image, and a luminance value of a pixel corresponding to the first target pixel in the target area of each second image.
An electronic device, comprising:
- an under-display camera assembly, wherein the under-display camera assembly comprises M1 first cameras and M2 second cameras;
- and
- an image processing apparatus, configured to:
- obtain a first image photographed by each of N1 first cameras in the M1 first cameras and a second image photographed by each of N2 second cameras in the M2 second cameras;
- obtain luminance values of at least a part of pixels in the first image and luminance values of at least a part of pixels in the second image for each first image and each second image;
- and increase luminance of a target image based on obtained luminance values, and use, as a photographed image of the under-display camera assembly, the target image obtained after the luminance is increased, wherein the target image is a first image photographed by one of the N1 first cameras;
- and
- M1, N1, M2, and N2 are all integers greater than or equal to 1, N1 is less than or equal to M1, and N2 is less than or equal to M2;
- wherein the image processing apparatus is configured to:
- obtain a target photographing distance between the under-display camera assembly and a target object photographed by the under-display camera assembly;
- obtain a target area of each first image at the target photographing distance and a target area of each second image at the target photographing distance, based on a predetermined target area in an image photographed by each first camera and a predetermined target area in an image photographed by each second camera at prestored different photographing distances;
- and for each target area, obtain a luminance value of each pixel in the target area;
- wherein the image processing apparatus is configured to:
- use each pixel in a target area of the target image as a first target pixel;
- and for each first target pixel, add a luminance value of the first target pixel and a first luminance value to obtain a first target luminance value, and increase the luminance value of the first target pixel to the first target luminance value, wherein the first luminance value is a sum of a luminance value of a pixel corresponding to the first target pixel in a target area of each first image other than the target image, and a luminance value of a pixel corresponding to the first target pixel in the target area of each second image.
An electronic device, comprising a processor and a memory that stores a computer program instruction, wherein the electronic device comprises an under-display camera assembly, the under-display camera assembly comprises M1 first cameras and M2 second cameras;
- and
- the computer program instruction, when executed by the processor, causes the electronic device to perform:
- obtaining a first image photographed by each of N1 first cameras in the M1 first cameras and a second image photographed by each of N2 second cameras in the M2 second cameras;
- obtaining luminance values of at least a part of pixels in the first image and luminance values of at least a part of pixels in the second image for each first image and each second image;
- and
- increasing luminance of a target image based on obtained luminance values, and using, as a photographed image of the under-display camera assembly, the target image obtained after the luminance is increased, wherein the target image is a first image photographed by one of the N1 first cameras, wherein
- M1, N1, M2, and N2 are all integers greater than or equal to 1, N1 is less than or equal to M1, and N2 is less than or equal to M2;
- wherein the computer program instruction, when executed by the processor, causes the electronic device to perform:
- obtaining a target photographing distance between the under-display camera assembly and a target object photographed by the under-display camera assembly;
- obtaining a target area of each first image at the target photographing distance and a target area of each second image at the target photographing distance, based on a predetermined target area in an image photographed by each first camera and a predetermined target area in an image photographed by each second camera at prestored different photographing distances;
- and
- for each target area, obtaining a luminance value of each pixel in the target area;
- wherein the computer program instruction, when executed by the processor, causes the electronic device to perform:
- using each pixel in a target area of the target image as a first target pixel;
- and
- for each first target pixel, adding a luminance value of the first target pixel and a first luminance value to obtain a first target luminance value, and increasing the luminance value of the first target pixel to the first target luminance value, and wherein
- the first luminance value is a sum of a luminance value of a pixel corresponding to the first target pixel in a target area of each first image other than the target image, and a luminance value of a pixel corresponding to the first target pixel in the target area of each second image.
Dependencies are inferred from the claim text.