Method, apparatus, and device for processing image, and storage medium
AssigneeBoe Technology Group Co., Ltd.
InventorYanhong Wu
Life of this patent
Estimating the term…
Abstract
Provided is a method for processing an image. The method comprises: determining a target processing mode corresponding to a first image to be processed; determining, based on the target processing mode, image processing parameters corresponding to the first image; determining, based on the image processing parameters and an initial pixel value of a pixel in the first image, a target pixel value of the pixel point from pixel values corresponding to a plurality of alternative colors; and acquiring a second image by converting the initial pixel value of the pixel in the first image into the target pixel value.
Claims17
A method for processing an image, comprising:
- determining a target processing mode corresponding to a first image to be processed;
- determining, based on the target processing mode, image processing parameters corresponding to the first image, wherein the image processing parameters further comprise a contrast enhancement ratio;
- performing, based on the contrast enhancement ratio, contrast enhancement processing on the first image;
- determining, based on the image processing parameters and an initial pixel value of a pixel in the first image, a target pixel value of the pixel from pixel values corresponding to a plurality of alternative colors;
- and
- acquiring a second image by converting the initial pixel value of the pixel in the first image into the target pixel value;
- wherein said performing, based on the contrast enhancement ratio, contrast enhancement processing on the first image comprises:
- transforming the first image from an RGB color space to an HSV color space;
- acquiring first brightness by determining a mean value of V components of pixels in the first image;
- performing, based on a gamma transformation parameter corresponding to the contrast enhancement ratio, gamma transformation on the V component of each of the pixels;
- acquiring second brightness by determining a mean value of the V components of the pixels after gamma transformation;
- acquiring the first image with an enhanced contrast in the HSV color space by keeping H components and S components of the pixels unchanged and adding a difference between the first brightness and the second brightness on the V components of the pixels after gamma transformation;
- and
- acquiring the first image with an enhanced contrast by transforming the first image with the enhanced contrast in the HSV color space to the RGB space.
An apparatus for processing an image, comprising:
- a processor;
- and
- a memory configured to store one or more instructions executable by the processor;
- wherein the processor, when loading and executing the one or more instructions, is caused to perform;
- determining a target processing mode corresponding to a first image to be processed;
- determining, based on the target processing mode, image processing parameters corresponding to the first image, wherein the image processing parameters further comprise a contrast enhancement ratio;
- performing, based on the contrast enhancement ratio, contrast enhancement processing on the first image;
- determining, based on the image processing parameters and an initial pixel value of a pixel in the first image, a target pixel value of the pixel from pixel values corresponding to a plurality of alternative colors;
- and
- acquiring a second image by converting the initial pixel value of the pixel in the first image into the target pixel value;
- wherein said performing, based on the contrast enhancement ratio, contrast enhancement processing on the first image comprises:
- transforming the first image from an RGB color space to an HSV color space;
- acquiring first brightness by determining a mean value of V components of pixels in the first image;
- performing, based on a gamma transformation parameter corresponding to the contrast enhancement ratio, gamma transformation on the V component of each of the pixels;
- acquiring second brightness by determining a mean value of the V components of the pixels after gamma transformation;
- acquiring the first image with an enhanced contrast in the HSV color space by keeping H components and S components of the pixels unchanged and adding a difference between the first brightness and the second brightness on the V components of the pixels after gamma transformation;
- and
- acquiring the first image with an enhanced contrast by transforming the first image with the enhanced contrast in the HSV color space to the RGB space.
Dependencies are inferred from the claim text.