AUTOMATED COLOR SELECTION FOR FOCUS PEAKING HIGHLIGHTING
Systems and methods are disclosed for automated color selection for focus peaking highlighting. For example, methods may include accessing a color image including a first component image, a second component image, and a third component image that each encode a dimension of a color space used to encode the color image; selecting pixels of the color image for focus peaking highlighting based on pixel values of the first component image; and determining a color for focus peaking highlighting based on the second component image and on the third component image.
1 . A method, comprising:
accessing a color image including a first component image, a second component image, and a third component image that each encode a dimension of a color space used to encode the color image;
selecting pixels of the color image for focus peaking highlighting based on pixel values of the first component image; and
determining a color for focus peaking highlighting based on the second component image and on the third component image.
2 . The method of claim 1 , wherein determining the color for focus peaking highlighting comprises:
determining a first average for pixel values of the second component image;
determining a second average for pixel values of the third component image;
determining an angle based on the first average and the second average; and
determining the color for focus peaking highlighting based on the angle.
3 . The method of claim 2 , wherein the color for focus peaking highlighting is determined to be rotated 180 degrees from the angle in a plane of the color space with dimensions corresponding to the second component image and the third component image.
4 . The method of claim 2 , wherein the color for focus peaking highlighting is determined to be rotated 90 degrees from the angle in a plane of the color space with dimensions corresponding to the second component image and the third component image.
5 . The method of claim 2 , wherein the angle is quantized to a nearest angle from a discrete set of supported angles in a plane of the color space with dimensions corresponding to the second component image and the third component image and each supported angle is mapped to a color for focus peaking highlighting that contrasts well with the colors corresponding to the angle.
6 . The method of claim 2 , wherein only the selected pixels of the color image are used to compute the first average and the second average.
7 . The method of claim 1 , further comprising:
applying focus peaking highlighting, of the color for focus peaking highlighting, to the selected pixels of the color image to obtain a highlighted image.
8 . The method of claim 1 , wherein the color image is a frame video in a sequence of frames of video, and further comprising:
applying focus peaking highlighting, of a color determined based on an earlier frame in the sequence of frames of video, to the selected pixels of the color image to obtain a first highlighted frame of video; and
applying focus peaking highlighting, of the color for focus peaking highlighting, to selected pixels of a later frame in the sequence of frames of video to obtain a second highlighted frame of video.
9 . The method of claim 1 , wherein the first component image encodes luminance pixel values, the second component image encodes a first chrominance channel of the color image, and the third component image encodes a second chrominance channel of the color image.
10 . A system, comprising:
an image sensor, and
a processing apparatus configured to:
access a color image, captured using the image sensor, including a first component image, a second component image, and a third component image that each encode a dimension of a color space used to encode the color image;
select pixels of the color image for focus peaking highlighting based on pixel values of the first component image; and
determine a color for focus peaking highlighting based on the second component image and on the third component image.
11 . The system of claim 10 , wherein the processing apparatus is configured to:
determine a first average for pixel values of the second component image;
determine a second average for pixel values of the third component image;
determine an angle based on the first average and the second average; and
determine the color for focus peaking highlighting based on the angle.
12 . The system of claim 11 , wherein the color for focus peaking highlighting is determined to be rotated 180 degrees from the angle in a plane of the color space with dimensions corresponding to the second component image and the third component image.
13 . The system of claim 11 , wherein the color for focus peaking highlighting is determined to be rotated 90 degrees from the angle in a plane of the color space with dimensions corresponding to the second component image and the third component image.
14 . The system of claim 11 , wherein the angle is quantized to a nearest angle from a discrete set of supported angles in a plane of the color space with dimensions corresponding to the second component image and the third component image and each supported angle is mapped to a color for focus peaking highlighting that contrasts well with the colors corresponding to the angle.
15 . The system of claim 11 , wherein only the selected pixels of the color image are used to compute the first average and the second average.
16 . The system of claim 10 , further comprising a display, and wherein the processing apparatus is configured to:
apply focus peaking highlighting, of the color for focus peaking highlighting, to the selected pixels of the color image to obtain a highlighted image; and
present the highlighted image using the display.
17 . The system of claim 10 , further comprising a display, and wherein the color image is a frame video in a sequence of frames of video, and wherein the processing apparatus is configured to:
apply focus peaking highlighting, of a color determined based on an earlier frame in the sequence of frames of video, to the selected pixels of the color image to obtain a first highlighted frame of video;
apply focus peaking highlighting, of the color for focus peaking highlighting, to selected pixels of a later frame in sequence of frames of video to obtain a second highlighted frame of video; and
present a video including the first highlighted frame of video and the second highlighted frame of video using the display.
18 . The system of claim 10 , wherein the first component image encodes luminance pixel values, the second component image encodes a first chrominance channel of the color image, and the third component image encodes a second chrominance channel of the color image.
19 . A non-transitory computer-readable storage medium storing executable instructions that, when executed by a processor, cause performance of operations, comprising operations to:
access a color image including a first component image, a second component image, and a third component image that each encode a dimension of a color space used to encode the color image;
select pixels of the color image for focus peaking highlighting based on pixel values of the first component image; and
determine a color for focus peaking highlighting based on the second component image and on the third component image.
20 . The non-transitory computer-readable storage medium of claim 19 , wherein determining the color for focus peaking highlighting comprises operations to:
determine a first average for pixel values of the second component image;
determine a second average for pixel values of the third component image;
determine an angle based on the first average and the second average; and
determine the color for focus peaking highlighting based on the angle.