WO2019037739A1 - 图像处理参数获取方法、可读存储介质和计算机设备 - Google Patents

图像处理参数获取方法、可读存储介质和计算机设备 Download PDF

Info

Publication number
WO2019037739A1
WO2019037739A1 PCT/CN2018/101723 CN2018101723W WO2019037739A1 WO 2019037739 A1 WO2019037739 A1 WO 2019037739A1 CN 2018101723 W CN2018101723 W CN 2018101723W WO 2019037739 A1 WO2019037739 A1 WO 2019037739A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
value
image processing
preset
acquiring
Prior art date
Application number
PCT/CN2018/101723
Other languages
English (en)
French (fr)
Inventor
曾元清
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2019037739A1 publication Critical patent/WO2019037739A1/zh

Links

Images

Classifications

    • G06T5/60
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Definitions

  • the present application relates to the field of computer technology, and in particular, to an image processing parameter acquisition method, a readable storage medium, and a computer device in an ROI region to region region or a face region.
  • the image processing technology of the image processing technology may include various modes, such as whitening, dermabrasion, freckle, eye enlargement, face-lifting, slimming, and the like.
  • Each image processing mode in the image processing sets a fixed parameter value, and the image can be processed correspondingly according to the fixed parameter value in the image processing mode.
  • an image processing parameter acquisition method a readable storage medium, and a computer device are provided.
  • An image processing parameter acquisition method includes:
  • a computer device comprising a memory and a processor, wherein the memory stores computer readable instructions, and when the instructions are executed by the processor, the processor performs an operation of: acquiring a preset area in an original image a first set of quantized values; acquiring a second set of quantized values of the preset area in the target image corresponding to the preset area in the original image; acquiring, by the preset model, the set of the first quantized value to the second quantizing A collection of image processing parameters for a set of values.
  • FIG. 1 is a schematic diagram showing the internal structure of a mobile terminal in an embodiment
  • FIG. 2 is a flowchart of an image processing parameter acquisition method in an embodiment
  • FIG. 3 is a schematic diagram of acquiring a preset area of a face image in an original image in one embodiment
  • FIG. 4 is a flow chart of obtaining a set of image processing parameters by using a gradient descent algorithm in one embodiment
  • FIG. 5 is a schematic diagram of obtaining an image processing parameter set according to a gradient descent algorithm in an embodiment
  • FIG. 6 is a flowchart of an image processing parameter acquisition method in another embodiment
  • FIG. 7 is a structural block diagram of an image processing parameter acquiring apparatus in an embodiment
  • FIG. 8 is a structural block diagram of the first obtaining module 702 of FIG. 7 in an embodiment
  • FIG. 9 is a structural block diagram of the second obtaining module 704 of FIG. 7 in an embodiment
  • FIG. 10 is a structural block diagram of the calculation module 706 of FIG. 7 in an embodiment
  • FIG. 11 is a block diagram showing the structure of an image processing parameter acquiring device in another embodiment
  • Figure 12 is a schematic illustration of an image processing circuit in one embodiment.
  • first, second and the like may be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another.
  • the first acquisition module may be referred to as a second acquisition module without departing from the scope of the present application, and similarly, the second acquisition module may be referred to as a first acquisition module. Both the first acquisition module and the second acquisition module are acquisition modules, but they are not the same acquisition module.
  • FIG. 1 is a schematic diagram showing the internal structure of a mobile terminal 10 in an embodiment.
  • the mobile terminal 10 includes a processor, a non-volatile storage medium, an internal memory and a network interface, a display screen, and an input device connected by a system bus.
  • the non-volatile storage medium of the mobile terminal 10 stores an operating system and computer readable instructions.
  • the computer readable instructions are executed by a processor to implement an image processing method.
  • the processor is used to provide computing and control capabilities to support the operation of the entire mobile terminal 10.
  • the internal memory in the mobile terminal 10 provides an environment for the operation of computer readable instructions in a non-volatile storage medium.
  • the network interface is used for network communication with the server.
  • the display screen of the mobile terminal 10 may be a liquid crystal display or an electronic ink display screen.
  • the input device may be a touch layer covered on the display screen, or may be a button, a trackball or a touchpad provided on the outer casing of the mobile terminal 10. It can be an external keyboard, trackpad or mouse.
  • the mobile terminal 10 can be a cell phone, a tablet or a personal digital assistant or a wearable device or the like.
  • FIG. 1 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation of the mobile terminal 10 to which the solution of the present application is applied, and the specific mobile terminal. 10 may include more or fewer components than shown in the figures, or some components may be combined, or have different component arrangements.
  • an image processing parameter acquisition method includes operations 202 through 206. among them:
  • Operation 202 Acquire a first set of quantized values of a preset area in the original image.
  • the original image refers to an image containing a face that has not been processed by an image, and the acquired image can be directly captured by the imaging device. Further, the original image may be a user's selfie, a face, and the like.
  • the processor can adopt human feature recognition technology, which can divide the face in the image according to skin color, skin type, age, gender, etc., and divide the image into different types. After the processor divides the image into different dimensions, one image or multiple images can be selected from one type of image as the original image.
  • the processor uses an image probe to obtain a preset area of the face image in the original image.
  • the image probe is a face template pre-stored in the computer device, and the image probe includes a plurality of preset areas, such as a whitening area, Freckle area and so on.
  • the preset area in the image probe is located in a fixed area on the face image.
  • the parameters of the preset region of the face image in the original image can be qualitatively analyzed. As shown in FIG. 3, an image probe is added to the face image 30 in the original image, and the image probe includes a whitening region 302 and a freckle region 304.
  • the whitening area 302 is in the chin area of the face, and the freckle area 304 is in the left face area of the face.
  • the skin color of the whitening region 302 can be qualitatively analyzed as white, white, yellow, black, and the like.
  • the skin state of the freckle region 304 is qualitatively analyzed as smooth, general, rough, etc. by identifying fine lines, pores, and the like of the skin of the freckle region 304.
  • the processor can quantitatively analyze the parameter values in the preset area in the original image, that is, quantize the parameter values of the preset area in the original image.
  • the skin color, skin state, and the like of the preset area may be represented by color values, edge information, edge intensity, and the like.
  • the sharpness of the original image, the contrast, and the curve of the face contour in the original image can be quantified.
  • the color values of an image can be represented by a color space.
  • Commonly used color spaces include RGB (Red, Green, Blue, red, green, and blue colors), CMYK (Cyan, Magenta, Yellow, KeyPlate, print four-color mode), Lab (L for brightness Luminosity, a for magenta to green)
  • the range, b represents the range from yellow to blue) and the like.
  • the edge information of an image refers to a set of pixels whose gradation of the surrounding pixels in the image changes abruptly, and the edge information of the image is a basic feature of the image.
  • the processor performs edge detection on the image to obtain edge information of the image.
  • Edge detection of images can use a variety of edge detection operators, such as Roberts Cross operator, Prewitt operator, Sobel operator, Kirsch operator, compass operator and so on.
  • Edge detection of an image can include the following operations:
  • the edge detection algorithm is mainly based on the first-order and second-order derivatives of the image intensity, but the noise in the image will cause the calculation error of the derivative to be large.
  • the filter can reduce the error caused by the noise in the image to the edge detection.
  • Enhancement The enhancement algorithm highlights points in the image where the neighborhood (or local) intensity values vary significantly, and the edge enhancement of the image can be performed by calculating the gradient magnitude of the image.
  • the processor can detect edge points in the image based on the gradient magnitude threshold.
  • the processor can obtain the position or orientation of the edge pixels according to the sub-pixel resolution.
  • the processor may further acquire the edge intensity of the image.
  • the edge intensity of an image refers to the magnitude of the gradient of the pixels at the edge of the image.
  • the gradient of the image edge pixel is a first derivative based on the brightness of the image, that is, the gradient of the original data brightness in the image. Amplitude is the maximum absolute value of a data change over a period.
  • the sharpness of an image is the contrast of the edges of the image, and the available brightness is expressed as the derivative of the space.
  • the contrast of an image refers to the measurement of different brightness levels between the brightest white and the darkest black in the image.
  • the curve of the contour of the image face is a curve obtained by the processor after the face is recognized according to the face feature, the contour of the face is extracted, and the contour of the face is fitted.
  • the first set of quantized values of the preset area in the original image may include a color value, edge information, edge intensity, and a curve of the face contour. Further, the first set of quantized values may further include a sharpness value, a contrast value, and the like.
  • Operation 204 Acquire a second set of quantized values of the preset area in the target image corresponding to the preset area in the original image.
  • the target image is an image obtained by performing image processing on the original image.
  • the target image may be an image obtained by using a third-party software for automatic retouching (such as an image obtained by using a third-party software to perform one-click image processing on the original image); the target image may also be manually repaired by using third-party software.
  • the processor may add an image probe to the target image, and acquire the same preset area as the original image, and then obtain the target image.
  • a second set of quantized values of the preset area may include a curve of color values, edge information, edge intensity, and face contour.
  • the second set of quantized values may further include a sharpness value, a contrast value, and the like.
  • the method for obtaining the color value, the edge information, the edge intensity, the curve of the face contour, the sharpness value, and the contrast value is the same as the method in operation 202, and details are not described herein again.
  • the image probes corresponding to different original images are the same or different from the image probes corresponding to the original images, that is, the preset regions in different original images are the same or different.
  • the original image is identical to the image probe corresponding to the target image.
  • Operation 206 Acquire an image processing parameter set from the first quantized value set to the second quantized value set according to the preset model.
  • the preset model can be an artificial neural network model, a deep learning model, or a gradient descent algorithm model.
  • the image processing parameter set is a collection of a plurality of image processing parameters that process the original image into a target image. According to the above image processing parameter set, the computer device can process the original image into a target image by a minimum number of iterative operations, that is, the image processing parameter set is an optimal image processing parameter set that processes the original image as a target image.
  • the artificial neural network model is an operational model composed of a large number of nodes connected to each other. Each node represents a specific output function, which can be referred to as an excitation function.
  • the connection signal for every two nodes may represent a weighted value, ie a weight value, for the signal passing through the connection.
  • the artificial neural network model has different ways of network connection, and its corresponding weight value and excitation function are different. Among them, the feedback artificial neural network set for a specific problem can quickly find the optimal solution. For example, for a feedback-type artificial neural network set for image processing parameters, the processor can acquire a set of image processing parameters that can process the original image as a minimum iterative operation of the target image.
  • the deep learning model is a model based on the representation learning of data in machine learning. Observations can be represented in a variety of ways (such as an image can be represented as a vector of each pixel intensity value in the image, or a series of edges, or a specific shape of the region, etc.), using some specific representation methods to learn from the examples task. Based on the deep learning model, the computer device can learn the process of manually debugging the parameters to obtain the image processing parameters, and then obtain the image processing parameter set that can process the original image into the minimum iterative operation of the target image.
  • the gradient descent algorithm model is a model based on the gradient descent algorithm.
  • the gradient descent algorithm is an optimization algorithm and one of the simplest algorithms for solving unconstrained optimization problems.
  • the image processing parameters can be obtained by the gradient descent algorithm model.
  • the operation of obtaining the image processing parameters by using the gradient descent algorithm includes:
  • the processor can determine the fitting function and the loss function of the sample.
  • the loss function is a function used to evaluate the fit of a fitted function to a sample.
  • the processor can determine the algorithm step size.
  • the algorithm step size refers to the length of each step along the negative direction of the gradient during the iterative process of the gradient descent.
  • the processor can multiply the algorithm step size by the gradient of the loss function to obtain a distance value at which the initial value decreases.
  • the processor may acquire a parameter corresponding to the maximum distance value of the initial value drop as an image processing parameter.
  • the processor may repeat the above operations (3) to (6) as the initial value of the next round until the target value is the preset target value.
  • the acquisition of image processing parameters relies on manual debugging.
  • the efficiency of selecting the image processing parameters is relatively low.
  • the image processing parameter obtaining method in the embodiment of the present application quantizes the parameter value of the preset area of the original image, quantizes the parameter value of the preset area of the target image, and then uses the preset model to obtain the image processing of processing the original image into the target image.
  • a collection of parameters. By quantizing the image into parameter values, the image processing parameters can be automatically debugged by the computer device, which avoids the problem that the image processing parameters are not accurate due to manual debugging.
  • the acquired image processing parameters are more accurate, and the way of selecting image processing parameters is faster, which improves the efficiency of selecting image processing parameters.
  • the processor divides the image into different dimensions and selects one image or multiple images in one type of image.
  • the processor can obtain an optimal image processing parameter set for the original image, and is advantageous for performing image processing on a type of image represented by the original image according to the obtained optimal image processing parameter set.
  • the preset model is a gradient descent algorithm model; and the obtaining 206 the image processing parameter set from the first set of quantized values to the second set of quantized values according to the preset model includes:
  • Operation 402 obtaining a fitting function according to the first set of quantized values and the second set of quantized values.
  • Operation 404 obtaining a preset algorithm step size.
  • Operation 406 sequentially acquiring image processing parameters in the step according to the gradient descent algorithm, and obtaining an image processing parameter set, wherein the image processing parameter set is used to process the original image into a target image.
  • the processor may use the gradient descent algorithm to obtain the set of image processing parameters of the first set of quantized values to the second set of quantized values.
  • the first set of quantized values can be represented as a point in the multidimensional space
  • the second set of quantized values can be represented as a point in the multidimensional space.
  • the two points corresponding to the first set of quantized values and the second set of quantized values are known, and the processor can adjust the coefficient values of a known function to make the difference between the above functions and the known two points (minimum The difference in the meaning of the square is the smallest, then the above function is a fitting function of two points known, and the above fitting function may be a straight line or a curve.
  • the processor may perform fitting according to multiple known points to obtain multiple quantizations. The fitting function of the set of values.
  • FIG. 5 is a schematic diagram of obtaining an image processing parameter set according to a gradient descent algorithm in one embodiment.
  • the gradient descent algorithm is compared to the process of going downhill, and the distance value of each step is constant.
  • the height value corresponding to the first set of quantized values is A
  • the height corresponding to the second set of quantized values is B.
  • the processor may use the gradient descent algorithm to obtain the image processing parameter set of the first set of quantized values to the second set of quantized values, that is, to obtain the least number of steps from a point on the hillside having a height value of A to a point having a height value of B. path.
  • the operation of finding the path with the fewest steps from point A to point B is as follows:
  • the processor can obtain a fitting function according to points A and B.
  • the processor can obtain the algorithm step size, that is, obtain the distance value of each step.
  • the processor can randomly initialize the function and run the gradient descent algorithm to obtain the optimal parameters of the current value. That is, a point in which the same distance is randomly taken from the point A in each direction, and the step with the largest drop height is selected to obtain the corresponding parameter.
  • the processor may use the value obtained by running the optimal parameter as the current value as the current value of the next round, and repeat the above operation (3) to obtain the optimal parameter set. That is, the point A falls along the highest step of the descending height and reaches the point C, and then the point C randomly jumps to the same distance step in each direction, and the step with the largest drop height is selected until the point B is finally reached, and the obtained path is The path with the fewest steps.
  • Path 502 in Figure 5 is the route with the fewest steps from point A to point B, i.e., the set of image processing parameters from the first set of quantized values to the second set of quantized values.
  • the first set of quantized values may be subjected to a minimum number of iterative operations to obtain a second set of quantized values.
  • the processor can use the derivative of the function to represent the magnitude of the drop in the value of the function.
  • the gradient initialization algorithm runs the random initialization parameter to obtain the image processing parameters corresponding to the current value
  • the image processing parameters corresponding to the current value are stored.
  • the first set of quantized values includes a curve of color values, edge information, edge intensity, and face contour
  • the second set of quantized values includes curves of color values, edge information, edge intensity, and face contour.
  • the processor can use the color difference value ⁇ E to represent the difference between the two colors; in the RGB color space, the processor can calculate the difference between the two colors RGB to represent the difference between the two colors; in the YUV color space The processor can calculate the difference between the two colors UV to represent the difference between the two colors.
  • the difference in image edges can be calculated based on the encoded edge information processor.
  • the processor can calculate the difference in image edges based on the difference in edge strength.
  • the difference between the two curves can be expressed according to the degree of dispersion of the curve.
  • the gradient descent algorithm is used to obtain the image processing parameter set from the first quantized value set to the second quantized value set, thereby improving the efficiency of obtaining the image processing parameter, and obtaining the image processing.
  • the parameters are more accurate, making it more efficient for computer equipment to process images using image processing parameter sets, saving system resources.
  • the processor may also obtain image processing parameters by using random initialization parameters and multi-parameter traversal to obtain an optimal solution.
  • the obtaining, by the operation 202, the first set of quantized values of the preset area in the original image comprises:
  • the processor can identify the face region in the original image, and obtain the first face feature information of the face region in the original image, and the first face feature information processor can determine the corresponding face region in the original image.
  • An image processing area An image processing area.
  • the processor can acquire the value of the preset parameter of the image in the first image processing area.
  • the processor can recognize the face region in the original image according to the face recognition technology.
  • the face recognition technology can be based on a person's facial features.
  • the processor can determine whether there is a human face on the image. If the image has a human face, the position and size of the face in the image and the position of the facial organ in the face (such as a person) are acquired. The position of the eyes, nose, and mouth in the face).
  • the processor can acquire the face feature information of the face region in the original image, that is, the first face feature information.
  • the face feature information is information capable of identifying a face (such as a facial part of a face, etc.).
  • the processor may add an image probe on the face region of the original image, and the image probe includes a preset region. After the image probe is added to the face region in the original image, the preset region in the image probe is the first image processing region corresponding to the face region in the original image.
  • the preset parameters of the image in the first image processing area include a color value, edge information, edge intensity, sharpness, contrast, and a curve of the face contour. The value of the above preset parameter can be specifically determined by the specific operation in operation 202.
  • the image processing process can be quantized by quantizing the parameter values of the preset regions in the original image.
  • the image processing process is converted from manual debugging to automatic operation of the algorithm, which improves efficiency.
  • the operation 204 acquires a second set of quantized values of the preset area in the target image corresponding to the original image, including:
  • the processor can identify the face region in the target image, and acquire the second face feature information of the face region in the target image, and the second face feature information processor can determine the corresponding face region in the target image. Two image processing areas.
  • the processor can acquire the value of the preset parameter of the image in the second image processing area.
  • the processor may acquire the target image corresponding to the original image, that is, the image obtained after the original image is processed by the image.
  • the face recognition region is used to identify the face region in the target image, and the processor can acquire the face feature information of the face region in the target image, that is, the second face feature information.
  • an image probe can be added to the face region in the target image.
  • the preset region in the image probe is the second image processing region corresponding to the face region in the target image.
  • the preset parameters of the image in the second image processing area include a color value, edge information, edge intensity, sharpness, contrast, and a curve of the face contour.
  • the value of the above preset parameter can be specifically determined by the specific operation in operation 202.
  • the image processing process can be quantized by quantizing the parameter values of the preset regions in the target image.
  • the image processing process is converted from manual debugging to automatic algorithm operation, which improves efficiency.
  • the first quantized value includes a first color value and a first shape curve
  • the second quantized value includes a second color value and a second shape curve
  • the processor can obtain the first color value and the second color value The color difference between the two, and the degree of dispersion of the first shape curve and the second shape curve.
  • the color values of an image can be represented by a color space. Commonly used color spaces are RGB, CMYK, Lab, etc. In a different color space, a single color can be represented by a unique value. In different color spaces, the color difference values of the two colors can be calculated, and the above color difference values can represent the difference in color.
  • the outline of the face in the image can be acquired by face recognition technology.
  • the face area is obtained, and the contour of the face can be obtained according to information such as skin color and face depth value.
  • the processor can further extract the contour curve of the face.
  • the contour curve of the face refers to the curve in which the face of the image is not covered by the hair.
  • the processor can fit the contour curve of the face to obtain a fitting curve.
  • the difference of the contour of the face can be obtained by calculating the degree of curve dispersion of the fitting curve corresponding to the face in different images.
  • the processor can change the contour of the face by performing face-lifting processing on the image, and the degree of dispersion of the fitting curve corresponding to the face of the original image and the face of the target image can be expressed.
  • the image processing parameter acquisition method in the embodiment of the present application quantizes the color in the image and the contour of the face in the image. By quantifying the parameters in the image, the difference between the original image and the target image can be obtained by mathematical calculation, that is, the difference value between the original image and the target image is quantized. The way to get image processing parameters is smarter and faster.
  • an image processing parameter acquisition method includes operations 602 to 618. among them:
  • Operation 602 selecting a preset area in the target image.
  • the target image is an image obtained by image processing of the original image, and an image probe is added to the target image to obtain a preset region of the target image.
  • Operation 604 quantizing the parameter values of the preset regions in the target image.
  • the above parameter values may include color values, edge information, edge strength, curves of face contours, sharpness, contrast, and the like.
  • the quantization operation is specifically referred to operation 202.
  • Operation 608 randomly initializing the image processing parameters, and running the image processing program to perform image processing on the original image.
  • the original image is subjected to image processing according to image processing parameters obtained by random initialization, and an image processed image is obtained.
  • Operation 610 acquiring a preset area in which the processed image is the same as the target image.
  • An image probe is added to the image after the image processing to obtain the same preset area as the target image.
  • Operation 612 quantizing the parameter values of the preset regions in the processed image.
  • the above parameter values may include color values, edge information, edge strength, curves of face contours, sharpness, contrast, and the like.
  • the quantization operation is specifically referred to operation 202.
  • Operation 614 obtaining an image processing parameter using a gradient descent algorithm.
  • the gradient descent algorithm is used to obtain the optimal image processing parameters, that is, after the original image is processed by the above image processing parameters, the difference between the processed image and the target image is the smallest.
  • Operation 618 obtaining a set of image processing parameters.
  • the image processing program is used to image the original image, and the difference between the processed image and the target image is compared according to the gradient descent algorithm, and the minimum difference parameter between the processed image and the target image is selected as the image processing parameter. .
  • the image processing parameter set is obtained by the above method, the efficiency of image processing on the image can be improved.
  • FIG. 7 is a block diagram showing the structure of an image processing parameter obtaining apparatus in an embodiment.
  • an image processing parameter obtaining apparatus includes a first obtaining module 702, a second obtaining module 704, and a calculating module 706.
  • the first obtaining module 702 is configured to acquire a first set of quantized values of the preset area in the original image.
  • the second obtaining module 704 is configured to acquire a second set of quantized values of the preset area in the target image corresponding to the preset area in the original image.
  • the calculating module 706 is configured to acquire, according to the preset model, an image processing parameter set from the first set of quantized values to the second set of quantized values.
  • FIG. 8 is a structural block diagram of the first obtaining module 702 of FIG. 7 in an embodiment. As shown in FIG. 8, the first obtaining module 702 includes:
  • the first identifying unit 802 is configured to identify a face region in the original image, acquire first face feature information of the face region in the original image, and determine, according to the first face feature information, a first image corresponding to the face region in the original image. Processing area.
  • the first obtaining unit 804 is configured to acquire a value of a preset parameter of the image in the first image processing area.
  • FIG. 9 is a structural block diagram of the second obtaining module 704 of FIG. 7 in an embodiment. As shown in FIG. 9, the second obtaining module 704 includes:
  • the second identifying unit 902 identifies a face region in the target image, acquires second face feature information of the face region in the target image, and determines a second image processing region corresponding to the face region in the target image according to the second face feature information. .
  • the second obtaining unit 904 acquires a value of a preset parameter of the image in the second image processing area.
  • FIG. 10 is a structural block diagram of the calculation module 706 of FIG. 7 in an embodiment. As shown in FIG. 10, the calculation module 706 includes:
  • the fitting unit 1002 is configured to obtain a fitting function according to the first set of quantized values and the second set of quantized values.
  • the calculating unit 1004 is configured to obtain a preset algorithm step size, and sequentially acquire image processing parameters in the step length according to the gradient descent algorithm to obtain an image processing parameter set, where the image processing parameter set is used to process the original image into a target image.
  • the first quantized value comprises a first color value and a first shape curve
  • the second quantized value comprises a second color value and a second shape curve.
  • Figure 11 is a block diagram showing the structure of an image processing parameter obtaining device in another embodiment.
  • an image processing parameter obtaining apparatus includes a first obtaining module 1102, a second obtaining module 1104, a calculating module 1106, and a difference module 1108.
  • the first obtaining module 1102, the second obtaining module 1104, and the calculating module 1106 have the same functions as the corresponding modules in FIG. 7.
  • the difference module 1108 is configured to obtain a color difference value between the first color value and the second color value, and a degree of dispersion of the first shape curve and the second shape curve.
  • each module in the above image processing parameter acquisition device is for illustrative purposes only. In other embodiments, the image processing parameter acquisition device may be divided into different modules as needed to complete all or part of the image processing parameter acquisition device.
  • the embodiment of the present application also provides a computer readable storage medium.
  • One or more non-transitory computer readable storage media containing computer executable instructions that, when executed by one or more processors, cause the processor to:
  • the processor can acquire a first set of quantized values of a preset area in the original image.
  • the processor may acquire a second set of quantized values of the preset area in the target image corresponding to the original image.
  • the processor may acquire the image processing parameter set from the first quantized value set to the second quantized value set according to the preset model.
  • the preset model is a gradient descent algorithm model
  • (3) acquiring the image processing parameter set from the first set of quantized values to the second set of quantized values according to the preset model comprises: the processor may be according to the first quantification The set of values and the set of second quantized values obtain a fitting function; the processor may obtain a preset algorithm step size; sequentially obtain image processing parameters within the step length according to the gradient descent algorithm, and obtain an image processing parameter set, and the image processing parameter set is used for The original image is processed as a target image.
  • the obtaining (1) acquiring the first set of quantized values of the preset region in the original image comprises: the processor can identify the face region in the original image, and acquire the first facial feature of the face region in the original image
  • the information may be determined by the first face feature information processor to determine a first image processing region corresponding to the face region in the original image; the processor may obtain a value of the preset parameter of the image in the first image processing region.
  • the obtaining (2) acquiring the second set of quantized values of the preset area in the target image corresponding to the original image comprises: the processor can identify the face area in the target image, and the processor can acquire the face in the target image a second face feature information of the region, and determining a second image processing region corresponding to the face region in the target image according to the second face feature information; the processor may acquire a value of the preset parameter of the image in the second image processing region.
  • the first quantized value includes a first color value and a first shape curve
  • the second quantized value includes a second color value and a second shape curve
  • the processor can obtain the first color value and the second color value The color difference between the two, and the degree of dispersion of the first shape curve and the second shape curve.
  • the embodiment of the present application further provides a computer device.
  • the above computer device includes an image processing circuit, and the image processing circuit may be implemented by hardware and/or software components, and may include various processing units defining an ISP (Image Signal Processing) pipeline.
  • Figure 9 is a schematic illustration of an image processing circuit in one embodiment. As shown in FIG. 9, for convenience of explanation, only various aspects of the image processing technique related to the embodiment of the present application are shown.
  • the embodiment of the present application further provides a computer device.
  • the above computer device includes an image processing circuit, and the image processing circuit may be implemented by hardware and/or software components, and may include various processing units defining an ISP (Image Signal Processing) pipeline.
  • Figure 12 is a schematic illustration of an image processing circuit in one embodiment. As shown in FIG. 12, for convenience of explanation, only various aspects of the image processing technique related to the embodiment of the present application are shown.
  • the image processing circuit includes an ISP processor 1240 and a control logic 1250.
  • the image data captured by imaging device 1210 is first processed by ISP processor 1240, which analyzes the image data to capture image statistics that can be used to determine and/or control one or more control parameters of imaging device 1210.
  • Imaging device 1210 can include a camera having one or more lenses 1212 and image sensors 1214.
  • Image sensor 1214 may include a color filter array (such as a Bayer filter) that may acquire light intensity and wavelength information captured with each imaging pixel of image sensor 1214 and provide a set of primitives that may be processed by ISP processor 1240 Image data.
  • a sensor 1220 such as a gyroscope, can provide acquired image processing parameters, such as anti-shake parameters, to the ISP processor 1240 based on the sensor 1220 interface type.
  • the sensor 1220 interface may utilize a SMIA (Standard Mobile Imaging Architecture) interface, other serial or parallel camera interfaces, or a combination of the above.
  • SMIA Standard Mobile Imaging Architecture
  • image sensor 1214 can also transmit raw image data to sensor 1220, sensor 1220 can provide raw image data to ISP processor 1240 based on sensor 1220 interface type, or sensor 1220 can store raw image data into image memory 1230.
  • the ISP processor 1240 processes the raw image data pixel by pixel in a variety of formats.
  • each image pixel can have a bit depth of 8, 10, 12, or 14 bits, and the ISP processor 1240 can perform one or more image processing operations on the raw image data, collecting statistical information about the image data. Among them, image processing operations can be performed with the same or different bit depth precision.
  • ISP processor 1240 can also receive image data from image memory 1230.
  • sensor 1220 interface transmits raw image data to image memory 1230, which is then provided to ISP processor 1240 for processing.
  • Image memory 1230 can be part of a memory device, a storage device, or a separate dedicated memory within an electronic device, and can include DMA (Direct Memory Access) features.
  • DMA Direct Memory Access
  • the ISP processor 1240 can perform one or more image processing operations, such as time domain filtering.
  • the processed image data can be sent to image memory 1230 for additional processing prior to being displayed.
  • the ISP processor 1240 can also receive processing data from the image memory 1230 for image data processing in the original domain and in the RGB and YCbCr color spaces.
  • the processed image data can be output to display 1280 for viewing by a user and/or further processed by a graphics engine or GPU (Graphics Processing Unit). Additionally, the output of ISP processor 1240 can also be sent to image memory 1230, and display 1280 can read image data from image memory 1230.
  • image memory 1230 can be configured to implement one or more frame buffers. Additionally, the output of ISP processor 1240 can be sent to encoder/decoder 1270 to encode/decode image data. The encoded image data can be saved and decompressed before being displayed on the display 1280 device.
  • the ISP processor 1240 processes the image data by performing VFE (Video Front End) processing and CPP (Camera Post Processing) processing on the image data.
  • VFE processing of the image data may include correcting the contrast or brightness of the image data, modifying the digitally recorded illumination state data, performing compensation processing on the image data (such as white balance, automatic gain control, gamma correction, etc.), and performing image data.
  • CPP processing of image data may include scaling the image, providing a preview frame and a recording frame to each path. Among them, CPP can use different codecs to process preview frames and record frames.
  • the image data processed by the ISP processor 1240 can be sent to the image processing module 1260 for image processing of the image prior to being displayed.
  • the image processing performed by the image processing module 1260 on the image data may include whitening, freckle, dermabrasion, face-lifting, acne, eye enlargement, and the like.
  • the image processing module 1260 can be a CPU (Central Processing Unit), a GPU, a coprocessor, or the like in the mobile terminal.
  • the processed data by image processing module 1260 can be sent to encoder/decoder 1270 for encoding/decoding image data.
  • the encoded image data can be saved and decompressed before being displayed on the display 1280 device.
  • the image processing module 1260 can also be located between the encoder/decoder 1270 and the display 1280, that is, the image processing module 1260 performs image processing on the imaged image.
  • the encoder/decoder 1270 described above may be a CPU, a GPU, a coprocessor, or the like in a mobile terminal.
  • the statistics determined by the ISP processor 1240 can be sent to the control logic 1250 unit.
  • the statistical data may include image sensor 1214 statistical information such as auto exposure, auto white balance, auto focus, flicker detection, black level compensation, lens 1212 shading correction, and the like.
  • Control logic 1250 can include a processor and/or a microcontroller that executes one or more routines (such as firmware) that can determine control parameters of imaging device 1210 and ISP processing based on received statistical data.
  • Control parameters of the device 1240 may include sensor 1220 control parameters (eg, gain, integration time for exposure control), camera flash control parameters, lens 1212 control parameters (eg, focus or zoom focal length), or a combination of these parameters.
  • the ISP control parameters may include gain levels and color correction matrices for automatic white balance and color adjustment (eg, during RGB processing), as well as lens 1212 shading correction parameters.
  • the following is an operation for realizing the image processing parameter acquisition method by using the image processing technology in FIG. 12:
  • the processor can acquire a first set of quantized values of a preset area in the original image.
  • the processor may acquire a second set of quantized values of the preset area in the target image corresponding to the original image.
  • the processor may acquire the image processing parameter set from the first quantized value set to the second quantized value set according to the preset model.
  • the preset model is a gradient descent algorithm model
  • (3) acquiring the image processing parameter set from the first set of quantized values to the second set of quantized values according to the preset model comprises: the processor may be according to the first quantification The set of values and the set of second quantized values obtain a fitting function; the processor may obtain a preset algorithm step size; the processor may sequentially acquire image processing parameters within the step length according to the gradient descent algorithm, and obtain an image processing parameter set, and an image processing parameter set. Used to process the original image as a target image.
  • the obtaining (1) acquiring the first set of quantized values of the preset region in the original image comprises: the processor can identify the face region in the original image, and acquire the first facial feature of the face region in the original image
  • the information may be determined by the first face feature information processor to determine a first image processing region corresponding to the face region in the original image; the processor may obtain a value of the preset parameter of the image in the first image processing region.
  • the obtaining (2) acquiring the second set of quantized values of the preset area in the target image corresponding to the original image comprises: the processor can identify the face area in the target image, and the processor can acquire the face in the target image a second face feature information of the region, and determining a second image processing region corresponding to the face region in the target image according to the second face feature information; the processor may acquire a value of the preset parameter of the image in the second image processing region.
  • the first quantized value includes a first color value and a first shape curve
  • the second quantized value includes a second color value and a second shape curve
  • the processor can obtain the first color value and the second color value The color difference between the two, and the degree of dispersion of the first shape curve and the second shape curve.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or the like.

Abstract

一种图像处理参数获取方法、可读存储介质和计算机设备。包括:获取原始图像中预设区域的第一量化值集合;获取与原始图像中预设区域对应的目标图像中预设区域的第二量化值集合;根据预设模型获取由第一量化值集合到所述第二量化值集合的图像处理参数集合。

Description

图像处理参数获取方法、可读存储介质和计算机设备
相关申请的交叉引用
本申请要求于2017年08月24日提交中国专利局、申请号为201710737480.3、发明名称为“美颜参数获取方法、装置、可读存储介质和计算机设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,特别是涉及一种在兴趣区域ROI(region of interest)区域或人脸区域的图像处理参数获取方法、可读存储介质和计算机设备。
背景技术
随着智能移动终端的发展,采用智能移动终端进行自拍的技术越来越成熟。用户在采用智能移动终端进行自拍后,可采用图像处理技术对拍摄获取的图像进行美化。其中,图像处理技术对图像的图像处理处理可包括多种模式,如美白、磨皮、祛斑、增大眼睛、瘦脸、瘦身等。图像处理中每种图像处理模式均设定固定的参数值,根据图像处理模式中固定参数值可对图像进行相应的图像处理。
发明内容
根据本申请的各种实施例,提供一种图像处理参数获取方法、可读存储介质和计算机设备。
一种图像处理参数获取方法,包括:
获取原始图像中预设区域的第一量化值集合;
获取与所述原始图像中预设区域对应的目标图像中预设区域的第二量化值集合;
根据预设模型获取由所述第一量化值集合到所述第二量化值集合的图像处理参数集合。
一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,当所述计算机可执行指令被一个或多个处理器执行时,使得所述处理器执行以下操作:获取原始图像中预设区域的第一量化值集合;获取与所述原始图像中预设区域对应的目标图像中预设区域的第二量化值集合;根据预设模型获取由所述第一量化值集合到所述第二量化值集合的图像处理参数集合。
一种计算机设备,包括存储器及处理器,所述存储器中储存有计算机可读指令,所述指令被所述处理器执行时,使得所述处理器执行以下操作:获取原始图像中预设区域的第一量化值集合;获取与所述原始图像中预设区域对应的目标图像中预设区域的第二量化值集合;根据预设模型获取由所述第一量化值集合到所述第二量化值集合的图像处理参数集合。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为一个实施例中移动终端的内部结构示意图;
图2为一个实施例中图像处理参数获取方法的流程图;
图3为一个实施例中获取原始图像中人脸图像的预设区域的示意图;
图4为一个实施例中采用梯度下降算法求取图像处理参数集合的流程图;
图5为一个实施例中根据梯度下降算法求取图像处理参数集合的示意图;
图6为另一个实施例中图像处理参数获取方法的流程图;
图7为一个实施例中图像处理参数获取装置的结构框图;
图8为一个实施例中图7中第一获取模块702的结构框图;
图9为一个实施例中图7中第二获取模块704的结构框图;
图10为一个实施例中图7中计算模块706的结构框图;
图11为另一个实施例中图像处理参数获取装置的结构框图;
图12为一个实施例中图像处理电路的示意图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
可以理解,本申请所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。举例来说,在不脱离本申请的范围的情况下,可以将第一获取模块称为第二获取模块,且类似地,可将第二获取模块称为第一获取模块。第一获取模块和第二获取模块两者都是获取模块,但其不是同一获取模块。
以计算机设备为移动终端为例。图1为一个实施例中移动终端10的内部结构示意图。如图1所示,该移动终端10包括通过系统总线连接的处理器、非易失性存储介质、内存储器和网络接口、显示屏和输入装置。其中,移动终端10的非易失性存储介质存储有操作系统和计算机可读指令。该计算机可读指令被处理器执行时以实现一种图像处理方法。该处理器用于提供计算和控制能力,支撑整个移动终端10的运行。移动终端10中的内存储器为非易失性存储介质中的计算机可读指令的运行提供环境。网络接口用于与服务器进行网络通信。移动终端10的显示屏可以是液晶显示屏或者电子墨水显示屏等,输入装置可以是显示屏上覆盖的触摸层,也可以是移动终端10外壳上设置的按键、轨迹球或触控板,也可以是外接的键盘、触控板或鼠标等。该移动终端10可以是手机、平板电脑或者个人数字助理或穿戴式设备等。本领域技术人员可以理解,图1中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的移动终端10的限定,具体的移动终端10可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
图2为一个实施例中图像处理参数获取方法的流程图。如图2所示,一种图像处理参数获取方法,包括操作202至操作206。其中:
操作202,获取原始图像中预设区域的第一量化值集合。
原始图像是指未经图像处理的包含人脸的图像,可为摄像设备直接拍摄获取的图像。进一步的,原始图像可为用户的自拍照、人脸照等。处理器可以采用人类特征辨别技术,可对图像中的人脸按肤色、肤质、年龄、性别等进行划分,将图像划分为不同类型。处理器将图像按不同维度划分后,可从一类图像中挑选一张图像或多张图像作为原始图像。
处理器采用图像探针可获取原始图像中人脸图像的预设区域,上述图像探针是预存于计算机设备中的人脸模板,图像探针中包括多个预设区域,如:美白区域、祛斑区域等。其中,图像探针中预设区域位于人脸图像上的固定区域。通过在原始图像中的人脸图像上添加图像探针,可定性分析原始图像中人脸图像的预设区域的参数。如图3所示,在原始图像中人脸图像30上添加图像探针,上述图像探针包括美白区域302和祛斑区域304。其中,美白区域302在人脸的下巴区域,祛斑区域304在人脸的左脸区域。通过识别美白 区域302的肤色,可将美白区域302的肤色定性分析为白、偏白、黄、黑等。通过识别祛斑区域304皮肤的细纹和毛孔等,将祛斑区域304的皮肤状态定性分析为光滑、一般、粗糙等。
在原始图像的人脸图像上添加图像探针后,处理器可定量分析原始图像中预设区域内的参数值,即将原始图像中预设区域的参数值量化。其中,预设区域的肤色、皮肤状态等可用色彩值、边缘信息、边缘强度等表示。除量化原始图像的色彩值、边缘信息、边缘强度外,还可量化原始图像的锐度、对比度和原始图像中人脸轮廓的曲线等。
图像的色彩值可用色彩空间表示。常用的色彩空间包括RGB(Red、Green、Blue,红绿蓝色彩模式)、CMYK(Cyan、Magenta、Yellow、KeyPlate,印刷四色模式)、Lab(L表示亮度Luminosity,a表示从洋红色至绿色的范围,b表示从黄色至蓝色的范围)等。在不同的色彩空间中,单一色彩均可用唯一数值表示。例如,在RGB色彩空间中,{R=255,G=255,B=255}代表白色。
图像的边缘信息是指图像中周围像素灰度急剧变化的像素的集合,图像的边缘信息是图像的基本特征。处理器对图像进行边缘检测可获取图像的边缘信息。图像的边缘检测可采用多种边缘检测算子,如Roberts Cross算子,Prewitt算子,Sobel算子,Kirsch算子,罗盘算子等。图像的边缘检测可包括以下几个操作:
(1)滤波。边缘检测算法主要是基于图像强度的一阶和二阶导数,但图像中噪声会造成导数的计算误差较大,采用滤波器可减小图像中噪声给边缘检测带来的误差。
(2)增强。增强算法可突出显示图像中邻域(或局部)强度值有显著变化的点,通过计算图像的梯度幅度可进行图像的边缘增强。
(3)检测。处理器可以根据梯度幅值阈值来检测图像中的边缘点。
(4)定位。处理器可以根据子像素分辨率来获取边缘像素的位置或方向。
在获取到图像的边缘信息后,处理器可以进一步获取图像的边缘强度。图像的边缘强度是指图像边缘像素的梯度的幅值。其中,图像边缘像素的梯度为对图像基于亮度的一阶导数,即图像中原始数据亮度的梯度。幅值是指在一个周期内,数据变化的最大绝对值。
图像的锐度是指图像边缘的对比度,可用亮度对于空间的导数幅度来表示。图像的对比度是指图像中最亮的白和最暗的黑之间不同亮度层级的测量。图像人脸轮廓的曲线是处理器根据人脸特征识别人脸后,提取人脸轮廓,对人脸轮廓进行拟合得到的曲线。
上述原始图像中预设区域的第一量化值集合可包括色彩值、边缘信息、边缘强度和人脸轮廓的曲线。进一步的,第一量化值集合还可包括锐度值、对比度值等。
操作204,获取与原始图像中预设区域对应的目标图像中预设区域的第二量化值集合。
目标图像为对原始图像进行图像处理后的图像。例如,目标图像可为采用第三方软件进行自动修图后得到的图像(如采用第三方软件对原始图像进行一键图像处理后得到的图像);目标图像也可为采用第三方软件进行手动修图后得到的图像。处理器在获取通过摄像头采集的原始图像中预设区域的第一量化值集合后,处理器可以在目标图像上添加图像探针,并获取与原始图像相同的预设区域,再获取目标图像中预设区域的第二量化值集合。上述第二量化值集合可包括色彩值、边缘信息、边缘强度和人脸轮廓的曲线。进一步的,第二量化值集合还可包括锐度值、对比度值等。获取色彩值、边缘信息、边缘强度、人脸轮廓的曲线、锐度值和对比度值的方法与操作202中方法相同,在此不再赘述。其中,不同原始图像对应的图像探针相同或不同原始图像对应给的图像探针不同,即不同原始图像中预设区域相同或不同。原始图像和目标图像对应的图像探针相同。
操作206,根据预设模型获取由第一量化值集合到第二量化值集合的图像处理参数集合。
预设模型可为人工神经网络模型、深度学习模型或梯度下降算法模型。图像处理参数集合是将原始图像处理为目标图像的多个图像处理参数的集合。根据上述图像处理参数集 合,计算机设备可通过最少次数的迭代运算将原始图像处理为目标图像,即上述图像处理参数集合为将原始图像处理为目标图像的最优图像处理参数集合。
人工神经网络模型是一种运算模型,由大量的节点相互连接构成。每个节点代表一种特定的输出函数,上述输出函数可称为激励函数。每两个节点的连接信号可代表对通过该连接信号的加权值,即权重值。人工神经网络模型中网络连接的方式不同,其对应的权重值和激励函数不同。其中,针对某一具体问题设置的反馈型人工神经网络,可快速寻找到最优解。例如,针对图像处理参数设置的反馈型人工神经网络,处理器可以获取可将原始图像处理为目标图像的最少次迭代运算的图像处理参数集合。
深度学习模型是机器学习中一种基于对数据进行表征学习的模型。观测值可采用多种方式表示(如一张图像可表示为图像中每个像素强度值的向量,或一系列边、或特定形状的区域等),使用某些特定的表示方法可从实例中学习任务。基于深度学习模型,计算机设备可以学习人工调试参数获取图像处理参数的过程,进而获取可将原始图像处理为目标图像的最少次迭代运算的图像处理参数集合。
梯度下降算法模型是基于梯度下降算法的模型。梯度下降算法是一种最优化算法,是求解无约束优化问题最简单的算法之一。通过梯度下降算法模型可求取图像处理参数。其中,采用梯度下降算法求取图像处理参数的操作包括:
(1)处理器可以确定样本的拟合函数和损失函数。损失函数是指用于评估拟合函数对样本拟合程度的函数。
(2)处理器可以确定算法步长。算法步长是指在梯度下降迭代的过程中,每一步沿梯度负方向前进的长度。
(3)初始化参数,获取初始值的损失函数的梯度,上述初始值为预设的已知值。
(4)处理器可以将算法步长与损失函数的梯度相乘,得到初始值下降的距离值。
(5)处理器可以获取初始值下降的最大距离值对应的参数作为图像处理参数。
(6)在初始值下降最大距离值得到目标值后,处理器可以将上述目标值作为下一轮的初始值重复上述操作(3)至(6),直到目标值为预设的目标值。
传统技术中,图像处理参数的获取依靠人工调试。通过人工多次迭代调试参数后再判断图像的差异,再选取图像处理参数,选取图像处理参数效率较为低下。
本申请实施例中图像处理参数获取方法,量化原始图像的预设区域的参数值、量化目标图像的预设区域的参数值,再采用预设模型求取将原始图像处理为目标图像的图像处理参数集合。通过将图像中量化成参数值的方式,使得图像处理参数可通过计算机设备自动调试获取,避免了人工调试导致获取图像处理参数不精准的问题。获取的图像处理参数更准确,且选取图像处理参数的方式更快速,提高了选取图像处理参数的效率。
处理器将图像按不同维度划分后,挑选一类图像中一张图像或多张图像。处理器可以对原始图像求取最优图像处理参数集合,有利于根据求取的最优图像处理参数集合对原始图像代表的一类图像进行图像处理。
在一个实施例中,预设模型为梯度下降算法模型;操作206根据预设模型获取由第一量化值集合到第二量化值集合的图像处理参数集合包括:
操作402,根据第一量化值集合和第二量化值集合获取拟合函数。
操作404,获取预设的算法步长。
操作406,根据梯度下降算法依次获取步长内图像处理参数,得到图像处理参数集合,图像处理参数集合用于将原始图像处理为目标图像。
在获取到第一量化值集合和第二量化值集合后,处理器可以采用梯度下降算法获取第一量化值集合到第二量化值集合的图像处理参数集合。其中,第一量化值集合可表示为多维空间中一个点、第二量化值集合可表示为多维空间中一个点。在多维空间中,已知第一量化值集合和第二量化值集合对应的两个点,处理器可以通过调整某已知函数的系数值, 使得上述函数与已知两个点的差别(最小二乘意义上差别)最小,则上述函数为已知两个点的拟合函数,上述拟合函数可为直线或曲线。在一个实施例中,若获取到多个(两个以上)量化值集合,即在多维空间中存在多个已知点,则处理器可以根据多个已知点进行拟合,获取多个量化值集合的拟合函数。
图5为一个实施例中根据梯度下降算法求取图像处理参数集合的示意图。如图5所示,将梯度下降算法比拟为下山的过程,每步的距离值一定。第一量化值集合对应的高度值为A,第二量化值集合对应的高度值为B。处理器可以采用梯度下降算法求取第一量化值集合到第二量化值集合的图像处理参数集合即为求取由山坡上高度值为A的点到高度值为B的点的步数最少的路径。其中,求取由点A到点B的步数最少的路径的操作如下:
(1)处理器可以根据点A和点B获取拟合函数。
(2)处理器可以获取算法步长,即获取每一步的距离值。
(3)处理器可以随机初始化函数,并运行梯度下降算法,求取当前值的最优参数。即由点A随机向各个方向跨出相同距离的一步,选取下降高度最大的一步,获取对应的参数。
(4)处理器可以将当前值运行最优参数后得到的值作为下一轮的当前值,重复上述操作(3)得到最优参数集合。即由点A沿下降高度最高的一步下降后到达点C后,再由点C随机向各个方向跨出相同距离的一步,选取下降高度最大的一步,直到最终到达点B,则获取的路径为步数最少的路径。
图5中路径502为由点A到点B的步数最少的路线,即由第一量化值集合到第二量化值集合的图像处理参数集合。根据上述图像处理参数集合可将第一量化值集合经过最少次数的迭代运算得到第二量化值集合。
在梯度下降算法中,处理器可以采用函数的导数表示函数值下降的幅度。在随机初始化参数运行梯度下降算法求取到当前值对应的图像处理参数后,将当前值对应的图像处理参数存储。其中,第一量化值集合包括色彩值、边缘信息、边缘强度和人脸轮廓的曲线;第二量化值集合包括色彩值、边缘信息、边缘强度和人脸轮廓的曲线。在Lab色彩空间中,处理器可以采用色差值ΔE表示两种色彩的差异;在RGB色彩空间中,处理器可以计算两种色彩RGB的差值表示两种色彩的差异;在YUV色彩空间中,处理器可以计算两种色彩UV的差值表示两种色彩的差异。根据编码后的边缘信息处理器可以计算图像边缘的差异。根据边缘强度的差值处理器可以计算图像边缘的差异。根据曲线的离散程度可表示两条曲线的差异。
本申请实施例中图像处理参数获取方法,采用梯度下降算法求取由第一量化值集合到第二量化值集合的图像处理参数集合,提高了求取图像处理参数的效率,求取的图像处理参数更加准确,使得计算机设备采用图像处理参数集合处理图像的效率更高,节省了系统资源。
在一个实施例中,处理器还可以采用随机初始化参数、多参数遍历求取最优解的方式求取图像处理参数。
在一个实施例中,操作202获取原始图像中预设区域的第一量化值集合包括:
(1)处理器可以识别原始图像中人脸区域,并获取原始图像中人脸区域的第一人脸特征信息,根据第一人脸特征信息处理器可以确定原始图像中人脸区域对应的第一图像处理区域。
(2)处理器可以获取第一图像处理区域内图像的预设参数的数值。
在获取到原始图像后,处理器可以根据人脸识别技术识别原始图像中人脸区域。人脸识别技术可基于人的脸部特征,处理器可以对图像判别是否存在人脸,若图像存在人脸,再获取图像中人脸的位置、大小和人脸中面部器官的位置(如人脸中眼睛、鼻子、嘴巴的位置)。在通过人脸识别技术识别到原始图像中人脸区域后,处理器可以获取原始图像中 人脸区域的人脸特征信息,即第一人脸特征信息。人脸特征信息为能够标识人脸的信息(如人脸的面部器官等)。根据上述第一人脸特征信息,处理器可以在原始图像的人脸区域上添加图像探针,上述图像探针包括预设区域。将上述图像探针添加到原始图像中人脸区域后,图像探针中预设区域即为原始图像中人脸区域对应的第一图像处理区域。第一图像处理区域内图像的预设参数包括色彩值、边缘信息、边缘强度、锐度、对比度和人脸轮廓的曲线。上述预设参数的数值具体可通过操作202中具体操作求取。
本申请实施例中图像处理参数获取方法,通过将原始图像中预设区域的参数值量化,使得图像处理过程可量化。将图像处理过程由人工调试转换为算法自动运行,提高了效率。
在一个实施例中,操作204获取与原始图像对应的目标图像中预设区域的第二量化值集合包括:
(1)处理器可以识别目标图像中人脸区域,并获取目标图像中人脸区域的第二人脸特征信息,根据第二人脸特征信息处理器可以确定目标图像中人脸区域对应的第二图像处理区域。
(2)处理器可以获取第二图像处理区域内图像的预设参数的数值。
在获取原始图像中第一图像处理区域内图像的预设参数的数值后,处理器可以获取与原始图像对应的目标图像,即原始图像经过图像处理后得到的图像。通过人脸识别技术识别目标图像中人脸区域,处理器可以获取目标图像中人脸区域的人脸特征信息,即第二人脸特征信息。根据上述第二人脸特征信息处理器可以在目标图像中人脸区域添加图像探针。在目标图像中人脸区域添加图像探针后,图像探针中预设区域即为目标图像中人脸区域对应的第二图像处理区域。第二图像处理区域内图像的预设参数包括色彩值、边缘信息、边缘强度、锐度、对比度和人脸轮廓的曲线。上述预设参数的数值具体可通过操作202中具体操作求取。
本申请实施例中图像处理参数获取方法,通过将目标图像中预设区域的参数值量化,使得图像处理过程可量化。将图像处理过程由人工调试转换为算法自动运算,提高了效率。
在一个实施例中,第一量化值包括第一色彩值和第一形状曲线;第二量化值包括第二色彩值和第二形状曲线;处理器可以获取第一色彩值与第二色彩值之间的色差值,以及第一形状曲线与第二形状曲线的离散程度。
图像的色彩值可用色彩空间表示。常用的色彩空间有RGB、CMYK、Lab等。在不同的色彩空间中,单一色彩均能用唯一数值表示。在不同色彩空间中,均可计算两种色彩的色差值,上述色差值可表示色彩的差异。
图像中人脸的轮廓可采用人脸识别技术获取。在人脸识别技术出图像中人脸区域,根据肤色、人脸景深值等信息可获取人脸的轮廓。在获取人脸的轮廓后处理器可以进一步提取人脸的轮廓曲线。其中,人脸的轮廓曲线是指图像中人脸未被头发遮盖部分的曲线。在获取到人脸的轮廓曲线后,处理器可以对人脸的轮廓曲线进行拟合,获取拟合曲线。通过计算不同图像中人脸对应的拟合曲线的曲线离散程度即可得到人脸轮廓的差异。在对图像进行图像处理时,处理器可以通过对图像进行瘦脸处理可使人脸轮廓发生变化,原始图像人脸对应的拟合曲线与目标图像人脸对应的拟合区域的离散程度即可表示对原始图像人脸进行瘦脸的程度。
本申请实施例中图像处理参数获取方法,将图像中色彩量化、图像中人脸轮廓量化。通过对图像中参数的量化,可通过数学计算的方式求取原始图像与目标图像的差异,即将原始图像与目标图像的差异值量化。获取图像处理参数的方式更智能、更快捷。
图6为另一个实施例中图像处理参数获取方法的流程图。如图6所示,一种图像处理参数获取方法,包括操作602至操作618。其中:
操作602,选取目标图像中预设区域。目标图像为原始图像经过图像处理后得到的图像,在目标图像上添加图像探针,即可得到目标图像的预设区域。
操作604,量化目标图像中预设区域的参数值。上述参数值可包括色彩值、边缘信息、边缘强度、人脸轮廓的曲线、锐度和对比度等。量化操作具体参考操作202。
操作606,选取原始图像。
操作608,随机初始化图像处理参数,运行图像处理程序对原始图像进行图像处理。根据随机初始化得到的图像处理参数对原始图像进行图像处理,得到图像处理后图像。
操作610,获取处理后图像与目标图像相同的预设区域。在图像处理后图像上添加图像探针,得到与目标图像相同的预设区域。
操作612,量化处理后图像中预设区域的参数值。上述参数值可包括色彩值、边缘信息、边缘强度、人脸轮廓的曲线、锐度和对比度等。量化操作具体参考操作202。
操作614,采用梯度下降算法获取图像处理参数。采用梯度下降算法获取最优图像处理参数,即通过上述图像处理参数处理原始图像后,处理后图像与目标图像的差异最小。
操作616,判断梯度下降算法是否结束。若是,进入操作618;若否,返回操作608。
操作618,获取图像处理参数集合。
本申请实施例中图像处理参数获取方法,采用图像处理程序对原始图像进行图像处理,根据梯度下降算法比较处理后图像与目标图像的差异,选取处理后图像与目标图像差异最小参数作为图像处理参数。通过上述方法获取图像处理参数集合后,可提高对图像进行图像处理的效率。
图7为一个实施例中图像处理参数获取装置的结构框图。如图7所示,一种图像处理参数获取装置,包括第一获取模块702、第二获取模块704和计算模块706。
第一获取模块702,用于获取原始图像中预设区域的第一量化值集合。
第二获取模块704,用于获取与原始图像中预设区域对应的目标图像中预设区域的第二量化值集合。
计算模块706,用于根据预设模型获取由第一量化值集合到第二量化值集合的图像处理参数集合。
图8为一个实施例中图7中第一获取模块702的结构框图。如图8所示,第一获取模块702包括:
第一识别单元802,用于识别原始图像中人脸区域,获取原始图像中人脸区域的第一人脸特征信息,根据第一人脸特征信息确定原始图像中人脸区域对应的第一图像处理区域。
第一获取单元804,用于获取第一图像处理区域内图像的预设参数的数值。
图9为一个实施例中图7中第二获取模块704的结构框图。如图9所示,第二获取模块704包括:
第二识别单元902,识别目标图像中人脸区域,获取目标图像中人脸区域的第二人脸特征信息,根据第二人脸特征信息确定目标图像中人脸区域对应的第二图像处理区域。
第二获取单元904,获取第二图像处理区域内图像的预设参数的数值。
图10为一个实施例中图7中计算模块706的结构框图。如图10所示,计算模块706包括:
拟合单元1002,用于根据第一量化值集合和第二量化值集合获取拟合函数。
计算单元1004,用于获取预设的算法步长;根据梯度下降算法依次获取步长内图像处理参数,得到图像处理参数集合,图像处理参数集合用于将原始图像处理为目标图像。
在一个实施例中,第一量化值包括第一色彩值和第一形状曲线;第二量化值包括第二色彩值和第二形状曲线。图11为另一个实施例中图像处理参数获取装置的结构框图。如图11所示,一种图像处理参数获取装置,包括第一获取模块1102、第二获取模块1104、计算模块1106和差值模块1108。其中,第一获取模块1102、第二获取模块1104、计算模块1106与图7中对应的模块功能相同。
差值模块1108,用于获取第一色彩值与第二色彩值之间的色差值,以及第一形状曲线与第二形状曲线的离散程度。
上述图像处理参数获取装置中各个模块的划分仅用于举例说明,在其他实施例中,可将图像处理参数获取装置按照需要划分为不同的模块,以完成上述图像处理参数获取装置的全部或部分功能。
本申请实施例还提供了一种计算机可读存储介质。一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,当计算机可执行指令被一个或多个处理器执行时,使得处理器执行以下操作:
(1)处理器可以获取原始图像中预设区域的第一量化值集合。
(2)处理器可以获取与原始图像对应的目标图像中预设区域的第二量化值集合。
(3)处理器可以根据预设模型获取由第一量化值集合到第二量化值集合的图像处理参数集合。
在一个实施例中,预设模型为梯度下降算法模型;操作(3)根据预设模型获取由第一量化值集合到第二量化值集合的图像处理参数集合包括:处理器可以根据第一量化值集合和第二量化值集合获取拟合函数;处理器可以获取预设的算法步长;根据梯度下降算法依次获取步长内图像处理参数,得到图像处理参数集合,图像处理参数集合用于将原始图像处理为目标图像。
在一个实施例中,操作(1)获取原始图像中预设区域的第一量化值集合包括:处理器可以识别原始图像中人脸区域,并获取原始图像中人脸区域的第一人脸特征信息,根据第一人脸特征信息处理器可以确定原始图像中人脸区域对应的第一图像处理区域;处理器可以获取第一图像处理区域内图像的预设参数的数值。
在一个实施例中,操作(2)获取与原始图像对应的目标图像中预设区域的第二量化值集合包括:处理器可以识别目标图像中人脸区域,处理器可以获取目标图像中人脸区域的第二人脸特征信息,并根据第二人脸特征信息确定目标图像中人脸区域对应的第二图像处理区域;处理器可以获取第二图像处理区域内图像的预设参数的数值。
在一个实施例中,第一量化值包括第一色彩值和第一形状曲线;第二量化值包括第二色彩值和第二形状曲线;处理器可以获取第一色彩值与第二色彩值之间的色差值,以及第一形状曲线与第二形状曲线的离散程度。
本申请实施例还提供一种计算机设备。上述计算机设备中包括图像处理电路,图像处理电路可以利用硬件和/或软件组件实现,可包括定义ISP(Image Signal Processing,图像信号处理)管线的各种处理单元。图9为一个实施例中图像处理电路的示意图。如图9所示,为便于说明,仅示出与本申请实施例相关的图像处理技术的各个方面。
本申请实施例还提供一种计算机设备。上述计算机设备中包括图像处理电路,图像处理电路可以利用硬件和/或软件组件实现,可包括定义ISP(Image Signal Processing,图像信号处理)管线的各种处理单元。图12为一个实施例中图像处理电路的示意图。如图12所示,为便于说明,仅示出与本申请实施例相关的图像处理技术的各个方面。
如图12所示,图像处理电路包括ISP处理器1240和控制逻辑器1250。成像设备1210捕捉的图像数据首先由ISP处理器1240处理,ISP处理器1240对图像数据进行分析以捕捉可用于确定和/或成像设备1210的一个或多个控制参数的图像统计信息。成像设备1210可包括具有一个或多个透镜1212和图像传感器1214的照相机。图像传感器1214可包括色彩滤镜阵列(如Bayer滤镜),图像传感器1214可获取用图像传感器1214的每个成像像素捕捉的光强度和波长信息,并提供可由ISP处理器1240处理的一组原始图像数据。传感器1220(如陀螺仪)可基于传感器1220接口类型把采集的图像处理的参数(如防抖参数)提供给ISP处理器1240。传感器1220接口可以利用SMIA(Standard Mobile Imaging Architecture,标准移动成像架构)接口、其它串行或并行照相机接口或上述接口的组合。
此外,图像传感器1214也可将原始图像数据发送给传感器1220,传感器1220可基于传感器1220接口类型把原始图像数据提供给ISP处理器1240,或者传感器1220将原始图像数据存储到图像存储器1230中。
ISP处理器1240按多种格式逐个像素地处理原始图像数据。例如,每个图像像素可具有8、10、12或14比特的位深度,ISP处理器1240可对原始图像数据进行一个或多个图像处理操作、收集关于图像数据的统计信息。其中,图像处理操作可按相同或不同的位深度精度进行。
ISP处理器1240还可从图像存储器1230接收图像数据。例如,传感器1220接口将原始图像数据发送给图像存储器1230,图像存储器1230中的原始图像数据再提供给ISP处理器1240以供处理。图像存储器1230可为存储器装置的一部分、存储设备、或电子设备内的独立的专用存储器,并可包括DMA(Direct Memory Access,直接直接存储器存取)特征。
当接收到来自图像传感器1214接口或来自传感器1220接口或来自图像存储器1230的原始图像数据时,ISP处理器1240可进行一个或多个图像处理操作,如时域滤波。处理后的图像数据可发送给图像存储器1230,以便在被显示之前进行另外的处理。ISP处理器1240还可从图像存储器1230接收处理数据,对所述处理数据进行原始域中以及RGB和YCbCr颜色空间中的图像数据处理。处理后的图像数据可输出给显示器1280,以供用户观看和/或由图形引擎或GPU(Graphics Processing Unit,图形处理器)进一步处理。此外,ISP处理器1240的输出还可发送给图像存储器1230,且显示器1280可从图像存储器1230读取图像数据。在一个实施例中,图像存储器1230可被配置为实现一个或多个帧缓冲器。此外,ISP处理器1240的输出可发送给编码器/解码器1270,以便编码/解码图像数据。编码的图像数据可被保存,并在显示于显示器1280设备上之前解压缩。
ISP处理器1240处理图像数据的操作包括:对图像数据进行VFE(Video Front End,视频前端)处理和CPP(Camera Post Processing,摄像头后处理)处理。对图像数据的VFE处理可包括修正图像数据的对比度或亮度、修改以数字方式记录的光照状态数据、对图像数据进行补偿处理(如白平衡,自动增益控制,γ校正等)、对图像数据进行滤波处理等。对图像数据的CPP处理可包括对图像进行缩放、向每个路径提供预览帧和记录帧。其中,CPP可使用不同的编解码器来处理预览帧和记录帧。ISP处理器1240处理后的图像数据可发送给图像处理模块1260,以便在被显示之前对图像进行图像处理。图像处理模块1260对图像数据进行的图像处理可包括:美白、祛斑、磨皮、瘦脸、祛痘、增大眼睛等。其中,图像处理模块1260可为移动终端中CPU(Central Processing Unit,中央处理器)、GPU或协处理器等。图像处理模块1260处理后的数据可发送给编码器/解码器1270,以便编码/解码图像数据。编码的图像数据可被保存,并在显示于显示器1280设备上之前解压缩。其中,图像处理模块1260还可位于编码器/解码器1270与显示器1280之间,即图像处理模块1260对已成像的图像进行图像处理。上述编码器/解码器1270可为移动终端中CPU、GPU或协处理器等。
ISP处理器1240确定的统计数据可发送给控制逻辑器1250单元。例如,统计数据可包括自动曝光、自动白平衡、自动聚焦、闪烁检测、黑电平补偿、透镜1212阴影校正等图像传感器1214统计信息。控制逻辑器1250可包括执行一个或多个例程(如固件)的处理器和/或微控制器,一个或多个例程可根据接收的统计数据,确定成像设备1210的控制参数以及ISP处理器1240的控制参数。例如,成像设备1210的控制参数可包括传感器1220控制参数(例如增益、曝光控制的积分时间)、照相机闪光控制参数、透镜1212控制参数(例如聚焦或变焦用焦距)、或这些参数的组合。ISP控制参数可包括用于自动白平衡和颜色调整(例如,在RGB处理期间)的增益水平和色彩校正矩阵,以及透镜1212阴影校正参数。
以下为运用图12中图像处理技术实现图像处理参数获取方法的操作:
(1)处理器可以获取原始图像中预设区域的第一量化值集合。
(2)处理器可以获取与原始图像对应的目标图像中预设区域的第二量化值集合。
(3)处理器可以根据预设模型获取由第一量化值集合到第二量化值集合的图像处理参数集合。
在一个实施例中,预设模型为梯度下降算法模型;操作(3)根据预设模型获取由第一量化值集合到第二量化值集合的图像处理参数集合包括:处理器可以根据第一量化值集合和第二量化值集合获取拟合函数;处理器可以获取预设的算法步长;处理器可以根据梯度下降算法依次获取步长内图像处理参数,得到图像处理参数集合,图像处理参数集合用于将原始图像处理为目标图像。
在一个实施例中,操作(1)获取原始图像中预设区域的第一量化值集合包括:处理器可以识别原始图像中人脸区域,并获取原始图像中人脸区域的第一人脸特征信息,根据第一人脸特征信息处理器可以确定原始图像中人脸区域对应的第一图像处理区域;处理器可以获取第一图像处理区域内图像的预设参数的数值。
在一个实施例中,操作(2)获取与原始图像对应的目标图像中预设区域的第二量化值集合包括:处理器可以识别目标图像中人脸区域,处理器可以获取目标图像中人脸区域的第二人脸特征信息,并根据第二人脸特征信息确定目标图像中人脸区域对应的第二图像处理区域;处理器可以获取第二图像处理区域内图像的预设参数的数值。
在一个实施例中,第一量化值包括第一色彩值和第一形状曲线;第二量化值包括第二色彩值和第二形状曲线;处理器可以获取第一色彩值与第二色彩值之间的色差值,以及第一形状曲线与第二形状曲线的离散程度。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一非易失性计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (21)

  1. 一种图像处理参数获取方法,包括:
    获取原始图像中预设区域的第一量化值集合;
    获取与所述原始图像中预设区域对应的目标图像中预设区域的第二量化值集合;及
    根据预设模型获取由所述第一量化值集合到所述第二量化值集合的图像处理参数集合。
  2. 根据权利要求1所述的方法,其特征在于,所述第一量化值集合包括色彩值、边缘信息、边缘强度、人脸轮廓的曲线、锐度值和对比度值;所述第二量化值集合包括色彩值、边缘信息、边缘强度和人脸轮廓的曲线。
  3. 根据权利要求1所述的图像处理参数获取方法,其特征在于,所述预设模型为梯度下降算法模型;
    所述根据预设模型获取由所述第一量化值集合到所述第二量化值集合的图像处理参数集合,包括:
    根据所述第一量化值集合和所述第二量化值集合获取拟合函数;
    获取预设的算法步长;及
    根据梯度下降算法依次获取所述步长内图像处理参数,得到所述图像处理参数集合,所述图像处理参数集合用于将所述原始图像处理为所述目标图像。
  4. 根据权利要求3所述的图像处理参数获取方法,其特征在于,所述根据预设模型获取由所述第一量化值集合到所述第二量化值集合的图像处理参数集合,还包括:
    选取所述目标图像中预设区域;
    选取原始图像,并对所述原始图像进行图像处理,得到处理后图像;
    获取与所述目标图像中预设区域相同的所述处理后图像中预设区域;
    量化所述处理后图像中预设区域的参数值;
    根据所述处理后图像中预设区域的参数值采用梯度下降算法获取图像处理参数;及
    当所述梯度下降算法结束时,获取图像处理参数集合。
  5. 根据权利要求1所述的图像处理参数获取方法,其特征在于,所述获取原始图像中预设区域的第一量化值集合,包括:
    识别所述原始图像中人脸区域,获取所述原始图像中人脸区域的第一人脸特征信息,根据所述第一人脸特征信息确定所述原始图像中人脸区域对应的第一图像处理区域;及
    获取所述第一图像处理区域内图像的预设参数的数值。
  6. 根据权利要求1所述的图像处理参数获取方法,其特征在于,所述获取与所述原始图像中预设区域对应的目标图像中预设区域的第二量化值集合,包括:
    识别所述目标图像中人脸区域,获取所述目标图像中人脸区域的第二人脸特征信息,根据所述第二人脸特征信息确定所述目标图像中人脸区域对应的第二图像处理区域;及
    获取所述第二图像处理区域内图像的预设参数的数值。
  7. 根据权利要求1至6中任一项所述的图像处理参数获取方法,其特征在于:
    所述第一量化值包括第一色彩值和第一形状曲线;所述第二量化值包括第二色彩值和第二形状曲线;及
    获取所述第一色彩值与所述第二色彩值之间的色差值,以及第一形状曲线与第二形状曲线的离散程度。
  8. 一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,存储有计算机可读指令,当所述计算机可执行指令被一个或多个处理器执行时,使得所述处理器执行以下操作:
    获取原始图像中预设区域的第一量化值集合;获取与所述原始图像中预设区域对应的目标图像中预设区域的第二量化值集合;根据预设模型获取由所述第一量化值集合到所述 第二量化值集合的图像处理参数集合。
  9. 根据权利要求8所述的计算机可读存储介质,其特征在于,所述第一量化值集合包括色彩值、边缘信息、边缘强度、人脸轮廓的曲线、锐度值和对比度值;所述第二量化值集合包括色彩值、边缘信息、边缘强度和人脸轮廓的曲线。
  10. 根据权利要求8所述的计算机可读存储介质,其特征在于,所述预设模型为梯度下降算法模型;所述计算机可读指令被所述处理器执行所述根据预设模型获取由所述第一量化值集合到所述第二量化值集合的图像处理参数集合时,使得所述处理器还执行以下操作:
    根据所述第一量化值集合和所述第二量化值集合获取拟合函数;获取预设的算法步长;根据梯度下降算法依次获取所述步长内图像处理参数,得到所述图像处理参数集合,所述图像处理参数集合用于将所述原始图像处理为所述目标图像。
  11. 根据权利要求10所述的计算机可读存储介质,其特征在于,所述计算机可读指令被所述处理器执行所述根据预设模型获取由所述第一量化值集合到所述第二量化值集合的图像处理参数集合时,使得所述处理器还执行以下操作:
    选取所述目标图像中预设区域;选取原始图像,并对所述原始图像进行图像处理,得到处理后图像;获取与所述目标图像中预设区域相同的所述处理后图像中预设区域;量化所述处理后图像中预设区域的参数值;根据所述处理后图像中预设区域的参数值采用梯度下降算法获取图像处理参数;当所述梯度下降算法结束时,获取图像处理参数集合。
  12. 根据权利要求8所述的计算机可读存储介质,其特征在于,所述计算机可读指令被所述处理器执行所述获取原始图像中预设区域的第一量化值集合时,使得所述处理器还执行以下操作:
    识别所述原始图像中人脸区域,获取所述原始图像中人脸区域的第一人脸特征信息,根据所述第一人脸特征信息确定所述原始图像中人脸区域对应的第一图像处理区域;获取所述第一图像处理区域内图像的预设参数的数值。
  13. 根据权利要求8所述的计算机可读存储介质,其特征在于,所述计算机可读指令被所述处理器执行所述获取与所述原始图像中预设区域对应的目标图像中预设区域的第二量化值集合时,使得所述处理器还执行以下操作:
    识别所述目标图像中人脸区域,获取所述目标图像中人脸区域的第二人脸特征信息,根据所述第二人脸特征信息确定所述目标图像中人脸区域对应的第二图像处理区域;获取所述第二图像处理区域内图像的预设参数的数值。
  14. 根据权利要求8至13任一所述的计算机可读存储介质,其特征在于,当所述计算机可执行指令被一个或多个处理器执行时,使得所述处理器还执行以下操作:
    所述第一量化值包括第一色彩值和第一形状曲线;所述第二量化值包括第二色彩值和第二形状曲线;获取所述第一色彩值与所述第二色彩值之间的色差值,以及第一形状曲线与第二形状曲线的离散程度。
  15. 一种计算机设备,包括存储器及处理器,所述存储器中储存有计算机可读指令,所述指令被所述处理器执行时,使得所述处理器执行以下操作:
    获取原始图像中预设区域的第一量化值集合;获取与所述原始图像中预设区域对应的目标图像中预设区域的第二量化值集合;根据预设模型获取由所述第一量化值集合到所述第二量化值集合的图像处理参数集合。
  16. 根据权利要求15所述的计算机设备,其特征在于,所述第一量化值集合包括色彩值、边缘信息、边缘强度、人脸轮廓的曲线、锐度值和对比度值;所述第二量化值集合包括色彩值、边缘信息、边缘强度和人脸轮廓的曲线。
  17. 根据权利要求15所述的计算机设备,其特征在于,所述预设模型为梯度下降算法模型;所述计算机可读指令被所述处理器执行所述根据预设模型获取由所述第一量化值 集合到所述第二量化值集合的图像处理参数集合时,使得所述处理器还执行以下操作:
    根据所述第一量化值集合和所述第二量化值集合获取拟合函数;获取预设的算法步长;根据梯度下降算法依次获取所述步长内图像处理参数,得到所述图像处理参数集合,所述图像处理参数集合用于将所述原始图像处理为所述目标图像。
  18. 根据权利要求17所述的计算机设备,其特征在于,所述计算机可读指令被所述处理器执行所述根据预设模型获取由所述第一量化值集合到所述第二量化值集合的图像处理参数集合时,使得所述处理器还执行以下操作:
    选取所述目标图像中预设区域;选取原始图像,并对所述原始图像进行图像处理,得到处理后图像;获取与所述目标图像中预设区域相同的所述处理后图像中预设区域;量化所述处理后图像中预设区域的参数值;根据所述处理后图像中预设区域的参数值采用梯度下降算法获取图像处理参数;当所述梯度下降算法结束时,获取图像处理参数集合。
  19. 根据权利要求15所述的计算机设备,其特征在于,所述计算机可读指令被所述处理器执行所述获取原始图像中预设区域的第一量化值集合时,使得所述处理器还执行以下操作:
    识别所述原始图像中人脸区域,获取所述原始图像中人脸区域的第一人脸特征信息,根据所述第一人脸特征信息确定所述原始图像中人脸区域对应的第一图像处理区域;获取所述第一图像处理区域内图像的预设参数的数值。
  20. 根据权利要求15所述的计算机设备,其特征在于,所述计算机可读指令被所述处理器执行所述获取与所述原始图像中预设区域对应的目标图像中预设区域的第二量化值集合时,使得所述处理器还执行以下操作:
    识别所述目标图像中人脸区域,获取所述目标图像中人脸区域的第二人脸特征信息,根据所述第二人脸特征信息确定所述目标图像中人脸区域对应的第二图像处理区域;获取所述第二图像处理区域内图像的预设参数的数值。
  21. 根据权利要求15至20任一所述的计算机设备,其特征在于,当所述计算机可执行指令被一个或多个处理器执行时,使得所述处理器还执行以下操作:
    所述第一量化值包括第一色彩值和第一形状曲线;所述第二量化值包括第二色彩值和第二形状曲线;获取所述第一色彩值与所述第二色彩值之间的色差值,以及第一形状曲线与第二形状曲线的离散程度。
PCT/CN2018/101723 2017-08-24 2018-08-22 图像处理参数获取方法、可读存储介质和计算机设备 WO2019037739A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710737480.3 2017-08-24
CN201710737480.3A CN107563976B (zh) 2017-08-24 2017-08-24 美颜参数获取方法、装置、可读存储介质和计算机设备

Publications (1)

Publication Number Publication Date
WO2019037739A1 true WO2019037739A1 (zh) 2019-02-28

Family

ID=60976205

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/101723 WO2019037739A1 (zh) 2017-08-24 2018-08-22 图像处理参数获取方法、可读存储介质和计算机设备

Country Status (2)

Country Link
CN (1) CN107563976B (zh)
WO (1) WO2019037739A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115050065A (zh) * 2022-04-26 2022-09-13 杭州缦图摄影有限公司 一种基于曲线的皮肤滤镜建模方法

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107563976B (zh) * 2017-08-24 2020-03-27 Oppo广东移动通信有限公司 美颜参数获取方法、装置、可读存储介质和计算机设备
CN110020990B (zh) * 2018-01-10 2023-11-07 中兴通讯股份有限公司 一种移动终端的全局美肤方法、装置、设备及存储介质
CN110717209B (zh) * 2018-06-27 2023-04-18 西安海平方网络科技有限公司 设计方案的量化结果获取方法、装置、设备和存储介质
CN109255331B (zh) * 2018-09-18 2019-08-09 北京达佳互联信息技术有限公司 图片处理方法、装置、电子设备及存储介质
CN109165700B (zh) * 2018-10-18 2022-09-06 广州智颜科技有限公司 一种美容液的挤出控制方法、装置及系统
CN109918985B (zh) * 2018-12-17 2020-10-09 福建大红鹰卫浴发展有限公司 一种自动调节温度的智能旋转龙头系统
CN109859299B (zh) * 2019-03-27 2020-12-22 腾讯科技(深圳)有限公司 人像图片处理方法、装置、计算机可读存储介质和计算机设备
CN110110778B (zh) * 2019-04-29 2023-04-25 腾讯科技(深圳)有限公司 图像处理方法、装置、电子设备和计算机可读存储介质
CN110248104B (zh) * 2019-07-22 2021-03-19 联想(北京)有限公司 一种图像处理方法、装置及电子设备
CN111445383B (zh) * 2020-03-20 2024-02-13 北京迈格威科技有限公司 影像参数的调节方法、装置及系统

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104899905A (zh) * 2015-06-08 2015-09-09 深圳市诺比邻科技有限公司 人脸图像处理方法及装置
CN105205779A (zh) * 2015-09-15 2015-12-30 厦门美图之家科技有限公司 一种基于图像变形的眼部图像处理方法、系统及拍摄终端
CN105825486A (zh) * 2016-04-05 2016-08-03 北京小米移动软件有限公司 美颜处理的方法及装置
CN106657793A (zh) * 2017-01-11 2017-05-10 维沃移动通信有限公司 一种图像处理方法及移动终端
CN106998423A (zh) * 2016-01-26 2017-08-01 宇龙计算机通信科技(深圳)有限公司 图像处理方法及装置
CN107563976A (zh) * 2017-08-24 2018-01-09 广东欧珀移动通信有限公司 美颜参数获取方法、装置、可读存储介质和计算机设备

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521807B (zh) * 2011-12-02 2013-09-25 中国科学院自动化研究所 利用颜色空间分布对颜色进行传递的方法
CN103605975B (zh) * 2013-11-28 2018-10-19 小米科技有限责任公司 一种图像处理的方法、装置及终端设备
CN105450907B (zh) * 2014-07-31 2018-10-16 北京展讯高科通信技术有限公司 智能终端及其视频稳像系统模型参数的标定方法及装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104899905A (zh) * 2015-06-08 2015-09-09 深圳市诺比邻科技有限公司 人脸图像处理方法及装置
CN105205779A (zh) * 2015-09-15 2015-12-30 厦门美图之家科技有限公司 一种基于图像变形的眼部图像处理方法、系统及拍摄终端
CN106998423A (zh) * 2016-01-26 2017-08-01 宇龙计算机通信科技(深圳)有限公司 图像处理方法及装置
CN105825486A (zh) * 2016-04-05 2016-08-03 北京小米移动软件有限公司 美颜处理的方法及装置
CN106657793A (zh) * 2017-01-11 2017-05-10 维沃移动通信有限公司 一种图像处理方法及移动终端
CN107563976A (zh) * 2017-08-24 2018-01-09 广东欧珀移动通信有限公司 美颜参数获取方法、装置、可读存储介质和计算机设备

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115050065A (zh) * 2022-04-26 2022-09-13 杭州缦图摄影有限公司 一种基于曲线的皮肤滤镜建模方法

Also Published As

Publication number Publication date
CN107563976B (zh) 2020-03-27
CN107563976A (zh) 2018-01-09

Similar Documents

Publication Publication Date Title
WO2019037739A1 (zh) 图像处理参数获取方法、可读存储介质和计算机设备
EP3477931B1 (en) Image processing method and device, readable storage medium and electronic device
JP7027537B2 (ja) 画像処理方法および装置、電子機器、ならびにコンピュータ可読記憶媒体
CN107451969B (zh) 图像处理方法、装置、移动终端及计算机可读存储介质
CN107424198B (zh) 图像处理方法、装置、移动终端及计算机可读存储介质
US20190164257A1 (en) Image processing method, apparatus and device
CN107509031B (zh) 图像处理方法、装置、移动终端及计算机可读存储介质
CN107730446B (zh) 图像处理方法、装置、计算机设备及计算机可读存储介质
US9344636B2 (en) Scene motion correction in fused image systems
CN107862659B (zh) 图像处理方法、装置、计算机设备及计算机可读存储介质
CN107395991B (zh) 图像合成方法、装置、计算机可读存储介质和计算机设备
CN107481186B (zh) 图像处理方法、装置、计算机可读存储介质和计算机设备
CN107911625A (zh) 测光方法、装置、可读存储介质和计算机设备
CN107493432A (zh) 图像处理方法、装置、移动终端及计算机可读存储介质
CN107862658B (zh) 图像处理方法、装置、计算机可读存储介质和电子设备
JP7362297B2 (ja) 画像処理装置、画像処理方法、及びプログラム
WO2019015477A1 (zh) 图像矫正方法、计算机可读存储介质和计算机设备
CN107704798B (zh) 图像虚化方法、装置、计算机可读存储介质和计算机设备
WO2019223513A1 (zh) 图像识别方法、电子设备和存储介质
CN107945106B (zh) 图像处理方法、装置、电子设备及计算机可读存储介质
CN107392870B (zh) 图像处理方法、装置、移动终端及计算机可读存储介质
CN107424134B (zh) 图像处理方法、装置、计算机可读存储介质和计算机设备
CN107578372B (zh) 图像处理方法、装置、计算机可读存储介质和电子设备
CN107770447B (zh) 图像处理方法、装置、计算机可读存储介质和电子设备
CN107392871B (zh) 图像去雾方法、装置、移动终端及计算机可读存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18848207

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18848207

Country of ref document: EP

Kind code of ref document: A1