# US 2017/0294000 A1 · Sky editing based on image composition

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2017/0294000 A1
- Document ID: US20170294000A1
- Status: Published application
- Kind: A1
- Application number: 15/094,799
- Filed: 2016-04-08
- Published: 2017-10-12
- Earliest claimed: 2016-04-08
- Assignees: Adobe Systems Incorporated
- Applicants: Adobe Systems Incorporated
- Inventors: Xiaohui Shen; Yi-Hsuan Tsai; Kalyan K. Sunkavalli; Zhe Lin
- Web page: https://patentgrep.com/patent/US20170294000A1

## CPC

- G06T 5/77: Retouching; Inpainting; Scratch removal
- G06F 3/0482: Interaction with lists of selectable items, e.g. menus
- G06F 3/04845: for image manipulation, e.g. dragging, rotation, expansion or change of colour
- G06F 16/5838: {using colour}
- G06T 7/90: Determination of colour characteristics
- G06T 11/10: Texturing; Colouring; Generation of textures or colours (retouching, inpainting or scratch removal G06T5/77)
- G06T 2207/20084: Artificial neural networks [ANN]
- G06T 2207/20221: Image fusion; Image merging
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Embodiments of the present disclosure relate to a sky editing system and related processes for sky editing. The sky editing system includes a composition detector to determine the composition of a target image. A sky search engine in the sky editing system is configured to find a reference image with similar composition with the target image. Subsequently, a sky editor replaces content of the sky in the target image with content of the sky in the reference image. As such, the sky editing system transforms the target image into a new image with a preferred sky background.

## Claims

### Claim 1

A computer-implemented method for editing images, comprising:
generating, based on a neural network, a first feature vector of a target image to represent a first image layout of the target image, and a second feature vector of a reference image to represent a second image layout of the reference image;
computing a distance between the first feature vector of the target image and the second feature vector of the reference image;
determining the reference image sharing a similar image layout with the target image based on the distance being below a distance threshold; and
producing a new image by replacing content of a first sky in the target image with content of a second sky in the reference image.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
computing respective histograms of scene parsing labels of a plurality of cells of a spatial grid on a training image; and
generating a label based on the respective histograms to represent an image layout of the training image.

### Claim 3 (depends on 2)

The method of claim 2, further comprising:
delimiting the plurality of cells of the spatial grid with same size; and
scene parsing the training image with a scene classification model.

### Claim 4 (depends on 2)

The method of claim 2, further comprising:
clustering the training image into a group of training images based on the label; and
training a neural network with the group of training images.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
identifying one or more candidate images sharing the similar image layout with the target image;
determining a completeness ratio of a maximum rectangular sky region in a sky mask of a first candidate image of the one or more candidate images over the sky mask; and
removing the first candidate image from the one or more candidate images when the completeness ratio is less than a completeness ratio threshold.

### Claim 6 (depends on 5)

The method of claim 5, further comprising:
determining a first aspect ratio between a width and a height of a first sky mask of the target image;
determining a second aspect ratio between a width and a height of a second sky mask for a second candidate image of the one or more candidate images; and
removing the second candidate image from the one or more candidate images when the second aspect ratio differs from the first aspect ratio more than an aspect ratio difference threshold.

### Claim 7 (depends on 5)

The method of claim 5, further comprising:
determining a first resolution of a first sky mask of the target image;
determining a second resolution of a second sky mask for a third candidate image of the one or more candidate images; and
removing the third candidate image from the one or more candidate images when the second resolution differs from the first resolution more than a resolution difference threshold.

### Claim 8 (depends on 1)

The method of claim 1, further comprising:
adjusting a luminance of a non-sky part of the new image based on a color distance between the first sky in the target image and the second sky in the reference image; or
adjusting the luminance of the non-sky part of the new image based on a mean of luminance on a non-sky part of the reference image.

### Claim 9 (depends on 1)

The method of claim 1, further comprising:
adjusting a first color temperature of a non-sky part of the new image based on a second color temperature of a non-sky part of the reference image; or
adjusting a first saturation of the non-sky part of the new image based on a second saturation of the non-sky part of the reference image.

### Claim 10 (depends on 1)

The method of claim 1, further comprising:
adjusting a non-sky part of the new image based on lighting reflections from the second sky in the reference image onto a non-sky part of the reference image; or
adjusting the non-sky part of the new image based on a direction of sunlight in the reference image.

### Claim 11 (depends on 1)

The method of claim 1, further comprising:
applying semantic segmentation on a non-sky part of the new image and a non-sky part of the reference image; and
adjusting a portion of the non-sky part of the new image based on a semantically corresponding portion of the non-sky part of the reference image.

### Claim 12

A non-transitory computer storage medium comprising computer-useable instructions that, when used by one or more computing devices, cause the one or more computing devices to perform operations comprising:
training a neural network with a plurality of clusters of training images, the plurality of clusters formed based on a plurality of image labels for representing image composition of respective training images;
generating, based on the trained neural network, a feature vector of a target image to represent image composition of the target image;
identifying a reference image sharing similar image composition with the target image based on a comparison between the feature vector of the target image and a feature vector of the reference image; and
producing a new image by replacing content of a first sky in the target image with content of a second sky in the reference image.

### Claim 13 (depends on 12)

The non-transitory computer storage medium of claim 12, wherein the operations further comprising:
delimiting a training image into a spatial grid;
generating scene parsing labels for respective cells in the spatial grid via a scene classification model;
computing histograms of respective scene parsing labels for the respective cells; and
producing a label based on the respective histograms to represent image composition of the training image.

### Claim 14 (depends on 13)

The non-transitory computer storage medium of claim 13, wherein the operations further comprising:
clustering the training image into a group of training images based on the label; and
training the neural network with the group of training images.

### Claim 15 (depends on 1)

The non-transitory computer storage medium of claim 1, wherein the operations further comprising:
adjusting a luminance of a non-sky part of the new image based on a color distance between the first sky in the target image and the second sky in the reference image;
adjusting the luminance of the non-sky part of the new image based on a mean of luminance on a non-sky part of the reference image;
adjusting a first color temperature of the non-sky part of the new image based on a second color temperature of the non-sky part of the reference image; or
adjusting a first saturation of the non-sky part of the target image based on a second saturation of the non-sky part of the reference image.

### Claim 16

A system for editing images, comprising:
a processor;
a composition detector, operatively coupled to the processor, to determine a feature vector of a target image to represent image composition of the target image;
a sky search engine, operatively coupled to the composition detector, to search one or more reference images sharing a similar image composition with the target image from a plurality of images based on the feature vector; and
a sky editor, operatively coupled to the sky search engine, to replace content of a first sky in the target image with content of a second sky in a reference image from the one or more reference images.

### Claim 17 (depends on 16)

The system of claim 16, wherein the composition detector is further to compute respective histograms of scene parsing labels of a plurality of cells in a spatial grid of a training image, generate a label based on the respective histograms to describe image composition of the training image, cluster the training image into a group of training images based on the label, and enable supervised learning by the composition detector with the group of training images.

### Claim 18 (depends on 16)

The system of claim 16, wherein the sky search engine is further to compute respective distances between the feature vector of the target image and respective feature vectors of a plurality of candidate images, and identify one or more candidate images with a distance of the respective distances being below a predefined distance threshold.

### Claim 19 (depends on 18)

The system of claim 18, wherein the sky search engine is further to determine a completeness ratio of a maximum rectangular sky region of a sky mask of a first candidate image of the one or more candidate images over the sky mask, and remove the first candidate image from the one or more candidate images when the completeness ratio is less than a predefined ratio threshold; determine a first aspect ratio between a width and a height of a first sky mask of the target image, determine a second aspect ratio between a width and a height of a second sky mask for a second candidate image of the one or more candidate images, and remove the second candidate image from the one or more candidate images when the second aspect ratio differs from the first aspect ratio more than a predefined aspect ratio threshold; or determine a first resolution of the first sky mask of the target image, determine a second resolution of the second sky mask for a third candidate image of the one or more candidate images, and remove the third candidate image from the one or more candidate images when the second resolution differs from the first resolution more than a predefined resolution threshold.

### Claim 20 (depends on 16)

The system of claim 16, wherein the sky editor is further to adjust a luminance of a non-sky part of the target image based on a color distance between the first sky in the target image and the second sky in the reference image; adjust the luminance of the non-sky part of the target image based on a mean of luminance of the non-sky part of the reference image; adjust a first color temperature of the non-sky part of the target image based on a second color temperature of the non-sky part of the reference image; adjust a first saturation of the non-sky part of the target image based on a second saturation of the non-sky part of the reference image; adjust the non-sky part of the target image based on lighting reflections from the second sky in the reference image onto the non-sky part of the reference image; adjust the non-sky part of the target image based on a direction of sunlight in the reference image; or apply semantic segmentation on the non-sky part of the target image and the non-sky part of the reference image, and adjust a portion of the non-sky part of the target image based on a semantically corresponding portion of the non-sky part of the reference image.
