Method and apparatus for generating image filter
AssigneeXiaomi Inc.
InventorsBaichao Wang, Zhijun Chen, Wendi Hou
Life of this patent
Estimating the term…
Abstract
The present disclosure discloses a method and an apparatus for generating an image filter. The method includes receiving a first image that is selected with a specific imaging effect desired for the image filter, generating a group of images corresponding to the first image, wherein the group of images comprises at least a second image of a common structure characteristic with the first image and without the specific imaging effect, calculating a mapping relationship for transforming the group of images to the first image and storing the mapping relationship to be used as the image filter to generate the specific imaging effect on other images.
Claims15
A method for generating an image filter, wherein the method is applied in an electronic device, and the method comprises:
- receiving, by the electronic device, a first image that is selected with a specific imaging effect desired for the image filter;
- generating, by the electronic device, a group of images corresponding to the first image, wherein the group of images comprises at least a second image of a common structure characteristic with the first image and the second image does not have the specific imaging effect and is selected from an image library;
- calculating, by the electronic device, a mapping relationship for transforming the group of images to the first image;
- and
- storing, in the electronic device, the mapping relationship to be used as the image filter to generate the specific imaging effect on other images,
- wherein generating, by the electronic device, the group of images corresponding to the first image comprises:
- calculating, by the electronic device, a first feature vector of the first image;
- obtaining, by the electronic device, a second feature vector of each sample image in the image library, the sample images in the image library being images without the specific imaging effect;
- comparing, by the electronic device, the first feature vector with each second feature vector to determine, from the sample images, at least the second image of the common structure characteristic with the first image;
- and
- forming, by the electronic device, the group of images including at least the second image.
An apparatus for generating an image filter, wherein the apparatus is included in an electronic device, and the apparatus comprises:
- a processor;
- and
- a memory for storing instructions executable by the processor;
- wherein the processor is configured to:
- receive a first image that is selected with a specific imaging effect desired for the image filter;
- generate a group of images corresponding to the first image, wherein the group of images comprises at least a second image of a common structure characteristic with the first image and the second image does not have the specific imaging effect and is selected from an image library;
- calculate a mapping relationship for transforming the group of images to the first image;
- and
- store the mapping relationship to be used as the image filter in the memory,
- wherein the processor is further configured to calculate a first feature vector of the first image, obtain a second feature vector of each sample image in the image library, the sample image being an image without the specific imaging effect, compare the first feature vector with each second feature vector to determine, from the sample images, at least the second image of the common structure characteristic with the first image, and form the group of images including at least the second image.
A non-transitory computer-readable storage medium having stored therein instructions that, when executed by a processor of a terminal device, causes the terminal device to perform a method for generating an image filter, the method comprising:
- receiving a first image that is selected with a specific imaging effect desired for the image filter;
- generating a group of images corresponding to the first image, wherein the group of images comprises at least a second image of a common structure characteristic to the first image and the second image does not have the specific imaging effect and is selected from an image library;
- calculating a mapping relationship for transforming the group of images to the first image;
- and
- storing the mapping relationship as the image filter to generate the specific imaging effect on other images,
- wherein generating the group of images corresponding to the first image comprises:
- calculating a first feature vector of the first image;
- obtaining a second feature vector of each sample image in the image library, the sample images in the image library being images without the specific imaging effect;
- comparing the first feature vector with each second feature vector to determine, from the sample images, at least the second image of the common structure characteristic with the first image;
- and
- forming the group of images including at least the second image.
Dependencies are inferred from the claim text.