Photograph processing method and system
First Claim
1. A photograph processing method, comprising:
- performing face detection on a photograph to obtain a detected human face;
performing alignment on the detected human face, so as to obtain contour points of a left eye and a right eye of the detected human face;
separately calculating a left eye area, being an area of the left eye, and a right eye area, being an area of the right eye, according to the contour points of the left eye and the right eye;
performing color-stretching transformation on each pixel in the left eye area and the right eye area to generate a color-stretched left eye area and a color-stretched right eye area, comprising;
decomposing each pixel in the left eye area and the right eye area into a plurality of color attribute values corresponding to a plurality of color channels of the photograph, wherein each color attribute value of a pixel corresponds to one color channel; and
performing color-stretching transformation on each pixel by adjusting the color attribute values of each pixel using a transformation function to generate the color-stretched left eye area and the color-stretched right eye area, wherein the transformation function is configured to recolor a center area of an eye by scaling up the corresponding color attribute values and recolor an edge area of the eye by scaling down the corresponding color attribute values so that the left eye and the right eye appear rounder and brighter; and
performing histogram equalization processing on the color-stretched left eye area and the color-stretched right eye area, so as to generate a processed photograph.
1 Assignment
0 Petitions
Accused Products
Abstract
Embodiments of the present invention provide a photograph processing method and system. The method includes: performing face detection on a photograph to obtain a detected human face; performing alignment on the detected human face, so as to obtain contour points of a left eye and a right eye of the detected human face; separately calculating a left eye area, being an area of the left eye, and a right eye area, being an area of the right eye, according to the contour points of the left eye and the right eye; performing stretching transformation on each pixel in the left eye area and the right eye area to generate a stretched left eye area and a stretched right eye area; and performing histogram equalization processing on the stretched left eye area and the stretched right eye area, so as to generate a processed photograph.
15 Citations
20 Claims
-
1. A photograph processing method, comprising:
-
performing face detection on a photograph to obtain a detected human face; performing alignment on the detected human face, so as to obtain contour points of a left eye and a right eye of the detected human face; separately calculating a left eye area, being an area of the left eye, and a right eye area, being an area of the right eye, according to the contour points of the left eye and the right eye; performing color-stretching transformation on each pixel in the left eye area and the right eye area to generate a color-stretched left eye area and a color-stretched right eye area, comprising; decomposing each pixel in the left eye area and the right eye area into a plurality of color attribute values corresponding to a plurality of color channels of the photograph, wherein each color attribute value of a pixel corresponds to one color channel; and performing color-stretching transformation on each pixel by adjusting the color attribute values of each pixel using a transformation function to generate the color-stretched left eye area and the color-stretched right eye area, wherein the transformation function is configured to recolor a center area of an eye by scaling up the corresponding color attribute values and recolor an edge area of the eye by scaling down the corresponding color attribute values so that the left eye and the right eye appear rounder and brighter; and performing histogram equalization processing on the color-stretched left eye area and the color-stretched right eye area, so as to generate a processed photograph. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A photograph processing system, comprising:
-
a memory storing instructions; and a processor coupled to the memory and, when executing the instructions, configured for; performing face detection on a photograph to obtain a detected human face; performing alignment on the detected human face, so as to obtain contour points of a left eye and a right eye of the detected human face; separately calculating a left eye area, being an area of the left eye, and a right eye area, being an area of the right eye, according to the contour points of the left eye and the right eye; performing color-stretching transformation on each pixel in the left eye area and the right eye area to generate a color-stretched left eye area and a color-stretched right eye area, comprising; decomposing each pixel in the left eye area and the right eye area into a plurality of color attribute values corresponding to a plurality of color channels of the photograph, wherein each color attribute value of a pixel corresponds to one color channel; and performing color-stretching transformation on each pixel by adjusting the color attribute values of each pixel using a transformation function to generate the color-stretched left eye area and the color-stretched right eye area, wherein the transformation function is configured to recolor a center area of an eye by scaling up the corresponding color attribute values and recolor an edge area of the eye by scaling down the corresponding color attribute values so that the left eye and the right eye appear rounder and brighter; and performing histogram equalization processing on the color-stretched left eye area and the color-stretched right eye area, so as to generate a processed photograph. - View Dependent Claims (11, 12, 13, 14, 15, 16)
-
-
17. A non-transitory computer-readable storage medium containing computer-executable instructions for, when executed by a processor, performing a photograph processing method, the method comprising:
-
performing face detection on a photograph to obtain a detected human face; performing alignment on the detected human face, so as to obtain contour points of a left eye and a right eye of the detected human face; separately calculating a left eye area, being an area of the left eye, and a right eye area, being an area of the right eye, according to the contour points of the left eye and the right eye; performing color-stretching transformation on each pixel in the left eye area and the right eye area to generate a color-stretched left eye area and a color-stretched right eye area, comprising; decomposing each pixel in the left eye area and the right eye area into a plurality of color attribute values corresponding to a plurality of color channels of the photograph, wherein each color attribute value of a pixel corresponds to one color channel; and performing color-stretching transformation on each pixel by adjusting the color attribute values of each pixel using a transformation function to generate the color-stretched left eye area and the color-stretched right eye area, wherein the transformation function is configured to recolor a center area of an eye by scaling up the corresponding color attribute values and recolor an edge area of the eye by scaling down the corresponding color attribute values so that the left eye and the right eye appear rounder and brighter; and performing histogram equalization processing on the color-stretched left eye area and the color-stretched right eye area, so as to generate a processed photograph. - View Dependent Claims (18, 19, 20)
-
Specification