CN108090866B - Method, system and equipment for converting photo into artistic photo - Google Patents
Method, system and equipment for converting photo into artistic photo Download PDFInfo
- Publication number
- CN108090866B CN108090866B CN201711329897.2A CN201711329897A CN108090866B CN 108090866 B CN108090866 B CN 108090866B CN 201711329897 A CN201711329897 A CN 201711329897A CN 108090866 B CN108090866 B CN 108090866B
- Authority
- CN
- China
- Prior art keywords
- photo
- parameters
- artistic
- beautifying
- person
- Prior art date
- Legal status (The legal status 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 status listed.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 27
- 238000013507 mapping Methods 0.000 claims abstract description 34
- 230000006870 function Effects 0.000 claims abstract description 22
- 230000000694 effects Effects 0.000 claims description 16
- 230000003796 beauty Effects 0.000 claims description 15
- 230000002087 whitening effect Effects 0.000 claims description 12
- 238000000605 extraction Methods 0.000 claims description 8
- 208000002874 Acne Vulgaris Diseases 0.000 claims description 6
- 206010000496 acne Diseases 0.000 claims description 6
- 238000005516 engineering process Methods 0.000 claims description 6
- 230000001815 facial effect Effects 0.000 claims description 6
- 238000004364 calculation method Methods 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 9
- 238000003860 storage Methods 0.000 description 5
- 238000012545 processing Methods 0.000 description 4
- 230000014509 gene expression Effects 0.000 description 3
- 238000007726 management method Methods 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000013527 convolutional neural network Methods 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 238000012216 screening Methods 0.000 description 2
- 241000894007 species Species 0.000 description 2
- 244000025254 Cannabis sativa Species 0.000 description 1
- 241000699670 Mus sp. Species 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000010422 painting Methods 0.000 description 1
- 238000010248 power generation Methods 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/04—Context-preserving transformations, e.g. by using an importance map
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/60—Editing figures and text; Combining figures or text
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/40—Image enhancement or restoration using histogram techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/77—Retouching; Inpainting; Scratch removal
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30196—Human being; Person
- G06T2207/30201—Face
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Processing Or Creating Images (AREA)
- Studio Devices (AREA)
Abstract
The invention provides a method, a system and equipment for converting photos into artistic photos, wherein the method comprises the following steps: acquiring a shot photo and photo parameter information, wherein the photo parameter information comprises photo shooting time and a geographical position; identifying characters and scenes in the picture to generate a theme description language of the character scene; beautifying the figures in the photo by using the beautifying function mapping relation table to obtain a beautified photo; matching the poetry associated with the theme description language in a poetry database according to the theme description language, and converting the poetry into an artistic photo with preset fonts and a beautified photo in the same table frame. The method can automatically beautify and convert the photo into the artistic photo, does not need to find a photographer for taking a picture, does not need to beautify and repair by a specially-assigned person in the later period, thereby automatically generating the artistic photo meeting the requirements of users.
Description
Technical Field
The invention relates to the technical field of image processing, in particular to a method, a system and equipment for converting a photo into an artistic photo.
Background
Through manipulations such as angles, light rays, expressions, clothes, makeup, backgrounds and the like, the connotation and the characteristics of people can be fully expressed, the defects are covered, and a certain beautifying effect is achieved. Photographs taken in this form are called artistic photographs.
However, the conventional art photo generation needs a special photographer/cameraman to shoot a person, which often requires a high cost for a user, and the generated photo is only in a common photo form and needs to be created manually, so that the user requirements cannot be met from the cost, the expression form and the production flow, and a conversion method and a system capable of automatically converting the photo to generate the art photo are urgently needed.
Disclosure of Invention
In view of the above-mentioned shortcomings of the prior art, it is an object of the present invention to provide a method, system and device for converting photos into artistic photos based on photos, which can solve the problem of automatically converting ordinary photos into artistic photos in the prior art.
To achieve the above and other related objects, in a first aspect of the present application, the present invention provides a method for converting a photo into an artistic photo, applied to an electronic device, comprising:
acquiring a shot photo and photo parameter information, wherein the photo parameter information comprises photo shooting time and a geographical position;
identifying the characters and the scenery in the photo to generate a theme description language of the character scene;
beautifying the figures in the photo by using the beautifying function mapping relation table to obtain a beautified photo;
matching poems associated with the theme description language in a poetry database according to the theme description language, and converting the poems into artistic photos with preset fonts and beautified photos in the same table frame.
In certain embodiments of the first aspect, the step of identifying the person and the scene within the photograph to generate a subject descriptor of the person scene comprises:
extracting the figure information in the photo, calculating the area of the figure in the photo and calculating the area of the scenery according to the figure information;
and identifying the gender of the person according to the facial features of the person information, identifying scene features in the image by adopting an image identification technology, and generating a subject description language of the current person scene according to the person, the scene features, the time for taking the picture and the geographic position.
In some embodiments of the first aspect, the step of extracting the personal information in the photo, calculating the region of the person in the photo according to the personal information, and calculating the region of the scene includes:
extracting HOG (histogram of gradient direction) features of the persons in the photo according to a preset positive sample library and a preset negative sample library;
and calculating the region where the character is located according to the HOG characteristics of the character in the preview image, and calculating the region where the background is located according to the region where the character is located.
In some embodiments of the first aspect, the beautifying the person in the photo by using the beauty function mapping relation table to obtain an beautified photo includes:
optimizing the photo by using a beauty function mapping relation table, wherein the mapping relation table comprises a mapping relation between a preset parameter type and a beauty effect parameter; the beautifying effect parameters comprise face thinning parameters, eye size adjusting parameters, skin grinding and acne removing parameters, skin whitening parameters, tooth whitening parameters and blush parameters;
and automatically adjusting the type of the preset parameters according to the current scene characteristics, and optimizing the photo in a beauty function mapping relation table according to the type of the preset parameters to obtain the optimized photo.
In a second aspect of the present application, there is provided a system for converting a photo into an artistic photo for use in an electronic device, the system comprising:
the acquisition module is used for acquiring the shot picture and the picture parameter information, wherein the picture parameter information comprises the picture shooting time and the geographical position;
the recognition module is used for recognizing the characters and the scenery in the photo and generating a theme description language of the character scene;
the beautifying module is used for beautifying the people in the photo by utilizing the beautifying function mapping relation table to obtain a beautified photo;
and the artistic photo generation module is used for matching poems related to the theme description language in a poetry database according to the theme description language, and converting the poems into artistic photos with preset fonts and beautified photos in the same table frame.
In certain embodiments of the second aspect, the identification module comprises:
the extraction and calculation unit is used for extracting the figure information in the photo, calculating the region of the figure in the photo according to the figure information and calculating the region of the scenery;
and the subject descriptor generating unit is used for identifying the gender of the person according to the facial features of the person information, identifying scene features in the image by adopting an image identification technology, and generating the subject descriptor of the current person scene according to the person, the scene features, the time for taking the picture and the geographic position.
In certain embodiments of the second aspect, the extraction computation unit comprises:
the extraction subunit is used for extracting the HOG characteristics of the gradient direction histogram of the person in the photo according to a preset positive sample library and a preset negative sample library;
and the calculating subunit is used for calculating the region where the character is located according to the HOG characteristics of the character in the preview image, and calculating the region where the background is located according to the region where the character is located.
In certain embodiments of the second aspect, the beautification module comprises:
the first beautifying unit is used for optimizing the photo by utilizing a beautifying function mapping relation table, and the mapping relation table comprises a mapping relation between preset parameter types and beautifying effect parameters; the beautifying effect parameters comprise face thinning parameters, eye size adjusting parameters, skin grinding and acne removing parameters, skin whitening parameters, tooth whitening parameters and blush parameters;
and the second beautifying unit is used for automatically adjusting the size of the preset parameter type according to the current scene characteristics, and optimizing the photo in the beauty function mapping relation table according to the preset parameter type to obtain the optimized photo.
In a third aspect of the present application, there is provided an electronic device comprising:
one or more processors;
a memory; and
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors to execute the instructions, the execution of the instructions by the one or more processors causing the electronic device to perform the method for converting photos to artistic photos as described above.
As mentioned above, the method, the system and the equipment for converting the photos into the artistic photos have the following advantages:
the method can automatically beautify and convert the photo into the artistic photo without specially finding a photographer for taking a photo and without repairing PS (personal service) and the like by a specially-assigned person in the later period, so that the artistic photo meeting the requirements of a user is automatically generated.
Drawings
FIG. 1 is a flow chart of a method for converting a photo into an artistic photo according to the present invention;
FIG. 2 is a flowchart illustrating a step S2 of a method for converting a photo into an artistic photo according to the present invention;
FIG. 3 is a flowchart illustrating a step S3 of a method for converting a photo into an artistic photo according to the present invention;
FIG. 4 is a block diagram of a system for converting photos into art photos according to the present invention;
FIG. 5 is a block diagram showing the structure of a recognition module in a system for converting photos into artistic photos according to the present invention;
FIG. 6 is a block diagram of a system for converting a photo into an artistic photo according to the present invention;
FIG. 7 is a block diagram of an electronic device for converting photos into art photos according to the present invention;
FIG. 8 is a first effect diagram of a method for converting a photo into an artistic photo according to the present invention;
fig. 9 shows a second effect of the method for converting a photo into an artistic photo according to the present invention.
Detailed Description
The following description of the embodiments of the present application is provided for illustrative purposes, and other advantages and capabilities of the present application will become apparent to those skilled in the art from the present disclosure.
In the following description, reference is made to the accompanying drawings that describe several embodiments of the application. The following detailed description is not to be taken in a limiting sense, and the scope of embodiments of the present application is defined only by the claims of the issued patent. Spatially relative terms, such as "upper," "lower," "left," "right," "lower," "below," "lower," "above," "upper," and the like, may be used herein to facilitate describing one element or feature's relationship to another element or feature as illustrated in the figures.
Although the terms first, second, etc. may be used herein to describe various elements in some instances, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, the first preset threshold may be referred to as a second preset threshold, and similarly, the second preset threshold may be referred to as a first preset threshold, without departing from the scope of the various described embodiments. The first preset threshold and the preset threshold are both described as one threshold, but they are not the same preset threshold unless the context clearly indicates otherwise. Similar situations also include a first volume and a second volume.
Furthermore, as used herein, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context indicates otherwise, it should be further understood that the terms "comprises" and "comprising" indicate the presence of the stated features, steps, operations, elements, components, items, species, and/or groups, but do not preclude the presence, or addition of one or more other features, steps, operations, elements, components, items, species, and/or groups. A; b; c; a and B; a and C; b and C; A. b and C "are only exceptions to this definition should be done when combinations of elements, functions, steps or operations are inherently mutually exclusive in some manner.
The present application provides a screen rotation control system, method and apparatus, which is suitable for use in an electronic device, such as but not limited to a notebook computer, a tablet computer, a mobile phone, a smart phone, a media player, a Personal Digital Assistant (PDA), a navigator, a smart tv, a smart watch, a digital camera, and so on, and a combination of two or more thereof. It should be understood that the electronic device described in the embodiments of the present application is only one example of an application, and that components of the device may have more or fewer components than shown, or a different configuration of components. The various components of the depicted figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits. In the specific embodiment of the present application, the electronic device will be described as a smart phone.
The electronic device includes memory, a memory controller, one or more processing units (CPUs), a peripheral interface, RF circuitry, audio circuitry, speakers, a microphone, an input/output (I/O) subsystem, a touch screen, other output or control devices, and an external port. These components communicate over one or more communication buses or signal lines. The electronic device also includes a power system for powering the various components. The power system may include a power management system, one or more power sources (e.g., battery, Alternating Current (AC)), a charging system, power failure detection circuitry, a power converter or inverter, a power status indicator (e.g., Light Emitting Diode (LED)), and any other components associated with power generation, management, and distribution in a portable device.
The electronic device supports various applications, such as one or more of: a mapping application, a rendering application, a word processing application, a website creation application, a disc editing application, a spreadsheet application, a gaming application, a telephone application, a video conferencing application, an email application, an instant messaging application, a fitness support application, a photo management application, a digital camera application, a digital video camera application, a web browsing application, a digital music player application, and/or a digital video player application.
Referring to fig. 1, a flowchart of a method for converting a photo into an artistic photo according to the present invention is applied to an electronic device, and includes:
step S1, acquiring the shot picture and the picture parameter information, wherein the picture parameter information comprises the picture shooting time and the geographic position;
specifically, the photo may be a photo taken by a mobile phone, a photo taken by a digital camera, or a photo taken by another intelligent terminal, the taking time is accurate to a certain minute at a certain day in a certain month in a certain year, so that a time reference is conveniently provided for accurate generation of a subsequent theme description language, and the geographic location is also accurate to a certain minimum place, such as a specific location of a certain street, e.g., a certain park, a certain tourist site, a certain building, etc., so that a theme reference is conveniently provided for the theme description language.
Step S2, recognizing the character and the scenery in the photo, and generating a theme description language of the character scene;
step S3, beautify the people in the photo by using the beauty function mapping relation table to obtain the beautified photo;
step S4, matching poems associated with the theme description language in a poetry database according to the theme description language, and converting the poems into artistic photos with preset fonts and beautified photos in the same form frame.
Specifically, the theme description language can be themes such as single or multiple person garden tour, appreciation and the like, and corresponding scenery features can be extracted according to scenery in the photo. The poetry database stores poetry of Tang Dynasty, Song Dynasty, Yuanqu and poetry (namely, various artistic words), and also comprises poetry independently created by some users; wherein, according to the theme of poetry, for example: name of word plate, name of poem, theme of original song, etc.; matching the theme description language with the themes of various artistic words, screening the artistic words according with the current theme, and matching the scene characteristics described in each artistic word with the scene characteristics in the photo if a plurality of artistic words are matched at the same time. Selecting the best matching artistic word with more matched scenery features, converting the artistic word into a preset font, and concentrating the artistic word and the beautified photo into an artistic photo in the same table frame, as shown in figure 8 or figure 9, the artistic photo can be mounted in a painting and calligraphy mode, the artistic expression mode of the artistic photo is improved, and the artistic photo is convenient to watch.
For example: if the scene features in the photo contain characters, extracting character features OCR to recognize the scene feature characters, and matching the position information of the photo can further determine the theme of the photo, so that poetry artistic words with irrelevant matching degree are prevented from appearing.
In the embodiment, the artistic photo is formed by automatically beautifying the photo, generating the theme description language according with the content of the photo according to the characters, the scenery and the photo meeting information in the photo, matching the theme description language with various artistic words and screening the optimal artistic words and the beautified photo, so that the artistic scope of the artistic photo is improved, manual participation in photo beautification is not needed, the generation and manufacturing process of the artistic photo is changed, and the requirements of various users are met.
Referring to fig. 2, a flowchart of step S2 of the method for converting a photo into an artistic photo according to the present invention includes:
step S201, extracting the figure information in the photo, calculating the area of the figure in the photo and calculating the area of the scenery according to the figure information;
specifically, extracting HOG features of a gradient direction histogram of people in the photo according to a preset positive sample library and a preset negative sample library;
and calculating the region where the character is located according to the HOG characteristics of the character in the preview image, and calculating the region where the background is located according to the region where the character is located.
In the embodiment, the area where the scenery is located can be extracted, the scenery including scenery features such as flowers, grass and trees in the scenery can be identified, and the scenery features are used as auxiliary features to be matched in the artistic words, so that the photo can be matched with the optimal artistic words.
Step S202, identifying the gender of the person according to the facial features of the person information, identifying scene features in the image by adopting an image identification technology, and generating a subject descriptor of the current person scene according to the person, the scene features, the time for taking the picture and the geographic position.
Specifically, through a preset prior model in a deep convolutional neural network, judging the gender classification of a face image to be recognized, and obtaining a gender judgment result, wherein the face image to be recognized comprises a hair area;
if the probability value of the gender judgment result is greater than a preset probability value, determining the gender judged by the gender judgment result as the gender of the person depicted by the face image to be recognized;
and if the probability value of the gender discrimination result is smaller than the preset probability value, identifying the gender of the figure depicted by the face image to be identified through cosine similarity comparison between the features of the face image to be identified and the features of the face image sample, wherein the face image sample is an image sample of the whole face.
In the embodiment, under the complex imaging condition, the deep convolutional neural network is combined with the feature comparison of the image, the auxiliary recognition can be performed by using the depth texture, the edge and the color feature of the face, and the accuracy of the gender recognition is increased. After the sex of the character is obtained, when the artistic words are matched conveniently, the related poems can be matched more accurately.
Referring to fig. 3, a flowchart of step S3 of the method for converting a photo into an artistic photo according to the present invention includes:
s301, optimizing the photo by using a beauty function mapping relation table, wherein the mapping relation table comprises a mapping relation between preset parameter types and beauty effect parameters; the beautifying effect parameters comprise face thinning parameters, eye size adjusting parameters, skin grinding and acne removing parameters, skin whitening parameters, tooth whitening parameters and blush parameters;
and S302, automatically adjusting the size of the preset parameter type according to the current scene characteristics, and optimizing the photo in a beauty function mapping relation table according to the preset parameter type to obtain the optimized photo.
In the embodiment, preset parameters are adjusted according to the brightness and contrast of the scene features in the photo and the resolution of the photo, so that the people in the photo are adjusted and converted into corresponding beautifying effects, and the photo is more in line with the requirements of artistic photo compared with the original photo.
Referring to fig. 4, a block diagram of a system for converting a photo into an artistic photo according to the present invention is applied to an electronic device, and the system includes:
the acquisition module 1 is used for acquiring the shot photos and the photo parameter information, wherein the photo parameter information comprises photo shooting time and geographic position;
the recognition module 2 is used for recognizing the characters and the scenery in the photos and generating a theme description language of the character scenes;
the beautifying module 3 is used for beautifying the people in the photo by using the beautifying function mapping relation table to obtain a beautified photo;
and the artistic photo generation module 4 is used for matching poems related to the theme description language in a poetry database according to the theme description language, and converting the poems into artistic photos with preset fonts and beautified photos in the same form frame.
Referring to fig. 5, a structural block diagram of an identification module in a system for converting a photo into an artistic photo according to the present invention is shown, where the identification module includes:
the extraction and calculation unit 21 is used for extracting the person information in the photo, calculating the region of the person in the photo according to the person information and calculating the region of the scenery;
the extraction calculating unit 21 specifically includes:
an extracting subunit 211, configured to extract, according to a preset positive sample library and a preset negative sample library, a histogram of gradient directions HOG feature of a person in the photograph;
and the computing subunit 212 is configured to compute an area where a character is located according to the HOG features of the character in the preview image, and compute an area where a background is located according to the area where the character is located.
And the subject descriptor generating unit 22 is configured to identify the gender of the person according to the facial features of the person information, identify scene features in the image by using an image identification technology, and generate a subject descriptor of the current person scene according to the person, the scene features, the time for taking the photo, and the geographic location.
Referring to fig. 6, a block diagram of an beautification module in a system based on photo conversion to artistic photo according to the present invention is shown, where the beautification module includes:
a first beautifying unit 31, configured to optimize the photo by using a beautifying function mapping relation table, where the mapping relation table includes a mapping relation between preset parameter types and beautifying effect parameters; the beautifying effect parameters comprise face thinning parameters, eye size adjusting parameters, skin grinding and acne removing parameters, skin whitening parameters, tooth whitening parameters and blush parameters;
and the second beautifying unit 32 is configured to automatically adjust the size of the preset parameter type according to the current scene characteristic, and optimize the photo in the beauty function mapping relation table according to the preset parameter type to obtain an optimized photo.
Referring to fig. 7, a block diagram of an electronic device 5 for converting a photo into an artistic photo according to the present invention includes:
one or more processors 51;
a memory 52; and
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors to execute the instructions, the execution of the instructions by the one or more processors causing the electronic device to perform the method for converting photos to artistic photos as described above.
In some embodiments, the processor 51 is also operatively coupled to I/O ports that enable the electronic device 20 to interact with various other electronic devices, and to input structures that enable a user to interact with the electronic device 20. Thus, the input structures may include buttons, keyboards, mice, touch pads, and the like. In addition, the electronic display may include a touch component that facilitates user input by detecting the occurrence and/or location of an object touching its screen (e.g., a surface of the electronic display).
The processor 51 is operatively coupled to a memory 52 and/or a non-volatile storage device. More specifically, the processor may execute instructions stored in the memory and/or the non-volatile storage device to perform operations in the computing device, such as generating image data and/or transmitting image data to an electronic display. As such, the processor may include one or more general purpose microprocessors, one or more application specific processors (ASICs), one or more field programmable logic arrays (FPGAs), or any combination thereof.
The memory 52 may comprise high-speed random access memory, and may also comprise non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. In certain embodiments, the memory may also include memory that is remote from the one or more processors, such as network-attached memory accessed via RF circuitry or external ports and a communication network (not shown), which may be the internet, one or more intranets, Local Area Networks (LANs), wide area networks (WLANs), Storage Area Networks (SANs), etc., or a suitable combination thereof. The memory controller may control access to the memory by other components of the device, such as the CPU and peripheral interfaces.
In conclusion, the method can automatically beautify and convert the photo into the artistic photo without specially finding a photographer for taking a photo and without repairing PS (personal service) and the like by later-stage specially-assigned persons, so that the artistic photo meeting the requirements of users is automatically generated. Therefore, the invention effectively overcomes various defects in the prior art and has high industrial utilization value.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.
Claims (7)
1. A method for converting photos into artistic photos, which is applied in electronic equipment, is characterized by comprising the following steps:
acquiring a shot photo and photo parameter information, wherein the photo parameter information comprises photo shooting time and a geographical position;
identifying the characters and the scenery in the photo to generate a theme description language of the character scene; extracting the figure information in the photo, calculating the area of the figure in the photo and calculating the area of the scenery according to the figure information; identifying the gender of the person according to the facial features of the person information, identifying scene features in the image by adopting an image identification technology, and generating a theme description language of the current person scene according to the person, the scene features, the time for taking the picture and the geographic position;
beautifying the figures in the photo by using the beautifying function mapping relation table to obtain a beautified photo;
matching poems associated with the theme description language in a poetry database according to the theme description language, and converting the poems into artistic photos with preset fonts and beautified photos in the same table frame.
2. The method of claim 1, wherein the steps of extracting the person information in the photo, calculating the region of the person in the photo according to the person information, and calculating the region of the scene comprise:
extracting HOG (histogram of gradient direction) features of the persons in the photo according to a preset positive sample library and a preset negative sample library;
and calculating the region where the character is located according to the HOG characteristics of the character in the preview image, and calculating the region where the background is located according to the region where the character is located.
3. The method of claim 1, wherein the step of beautifying the person in the photo by using the beauty function mapping relation table to obtain a beautified photo comprises:
optimizing the photo by using a beauty function mapping relation table, wherein the mapping relation table comprises a mapping relation between a preset parameter type and a beauty effect parameter; the beautifying effect parameters comprise face thinning parameters, eye size adjusting parameters, skin grinding and acne removing parameters, skin whitening parameters, tooth whitening parameters and blush parameters;
and automatically adjusting the type of the preset parameters according to the current scene characteristics, and optimizing the photo in a beauty function mapping relation table according to the type of the preset parameters to obtain the optimized photo.
4. A system for converting photos into artistic photos for use in an electronic device, the system comprising:
the acquisition module is used for acquiring the shot picture and the picture parameter information, wherein the picture parameter information comprises the picture shooting time and the geographical position;
the recognition module is used for recognizing the characters and the scenery in the photo and generating a theme description language of the character scene; wherein the identification module comprises:
the extraction and calculation unit is used for extracting the figure information in the photo, calculating the region of the figure in the photo according to the figure information and calculating the region of the scenery;
the subject descriptor generating unit is used for identifying the gender of the person according to the facial features of the person information, identifying scene features in the image by adopting an image identification technology, and generating the subject descriptor of the current person scene according to the person, the scene features, the time for taking the picture and the geographic position;
the beautifying module is used for beautifying the people in the photo by utilizing the beautifying function mapping relation table to obtain a beautified photo;
and the artistic photo generation module is used for matching poems related to the theme description language in a poetry database according to the theme description language, and converting the poems into artistic photos with preset fonts and beautified photos in the same table frame.
5. The system of claim 4, wherein the extraction computation unit comprises:
the extraction subunit is used for extracting the HOG characteristics of the gradient direction histogram of the person in the photo according to a preset positive sample library and a preset negative sample library;
and the calculating subunit is used for calculating the region where the character is located according to the HOG characteristics of the character in the preview image, and calculating the region where the background is located according to the region where the character is located.
6. The system of claim 4, wherein the beautification module comprises:
the first beautifying unit is used for optimizing the photo by utilizing a beautifying function mapping relation table, and the mapping relation table comprises a mapping relation between preset parameter types and beautifying effect parameters; the beautifying effect parameters comprise face thinning parameters, eye size adjusting parameters, skin grinding and acne removing parameters, skin whitening parameters, tooth whitening parameters and blush parameters;
and the second beautifying unit is used for automatically adjusting the size of the preset parameter type according to the current scene characteristics, and optimizing the photo in the beauty function mapping relation table according to the preset parameter type to obtain the optimized photo.
7. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a memory; and
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors to execute instructions that cause the electronic device to perform the method of converting photo-based into artistic photo of any of claims 1-3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711329897.2A CN108090866B (en) | 2017-12-13 | 2017-12-13 | Method, system and equipment for converting photo into artistic photo |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711329897.2A CN108090866B (en) | 2017-12-13 | 2017-12-13 | Method, system and equipment for converting photo into artistic photo |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108090866A CN108090866A (en) | 2018-05-29 |
CN108090866B true CN108090866B (en) | 2021-08-10 |
Family
ID=62175632
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711329897.2A Expired - Fee Related CN108090866B (en) | 2017-12-13 | 2017-12-13 | Method, system and equipment for converting photo into artistic photo |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108090866B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111405180A (en) * | 2020-03-18 | 2020-07-10 | 惠州Tcl移动通信有限公司 | Photographing method, photographing device, storage medium and mobile terminal |
Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101753941A (en) * | 2008-12-19 | 2010-06-23 | 康佳集团股份有限公司 | Method for realizing markup information in imaging device and imaging device |
CN102202173A (en) * | 2010-03-23 | 2011-09-28 | 三星电子(中国)研发中心 | Photo automatically naming method and device thereof |
CN102662961A (en) * | 2012-03-08 | 2012-09-12 | 北京百舜华年文化传播有限公司 | Method, apparatus and terminal unit for matching semantics with image |
CN103152521A (en) * | 2013-01-30 | 2013-06-12 | 广东欧珀移动通信有限公司 | Effect of depth of field achieving method for mobile terminal and mobile terminal |
CN104159032A (en) * | 2014-08-20 | 2014-11-19 | 广东欧珀移动通信有限公司 | Method and device of adjusting facial beautification effect in camera photographing in real time |
CN104801494A (en) * | 2015-04-20 | 2015-07-29 | 张星家 | Intelligent sorting device and method applied to expressage |
CN104965921A (en) * | 2015-07-10 | 2015-10-07 | 陈包容 | Information matching method |
CN105404845A (en) * | 2014-09-15 | 2016-03-16 | 腾讯科技(深圳)有限公司 | Picture processing method and apparatus |
CN105512328A (en) * | 2015-12-23 | 2016-04-20 | 北京奇虎科技有限公司 | Method, system and device for realizing uploading of album photos |
CN105574912A (en) * | 2015-12-15 | 2016-05-11 | 南京偶酷软件有限公司 | Method for converting natural languages into animation continuity data |
CN105787111A (en) * | 2016-03-24 | 2016-07-20 | 李秋燕 | Private map making method based on user interest |
CN106610969A (en) * | 2015-10-21 | 2017-05-03 | 上海文广互动电视有限公司 | Multimodal information-based video content auditing system and method |
CN106815309A (en) * | 2016-12-20 | 2017-06-09 | 北京奇虎科技有限公司 | A kind of image method for pushing, device and mobile terminal |
CN107398906A (en) * | 2017-07-28 | 2017-11-28 | 安徽爱依特科技有限公司 | Autonomous hair circle of friends method based on robot |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9319640B2 (en) * | 2009-12-29 | 2016-04-19 | Kodak Alaris Inc. | Camera and display system interactivity |
-
2017
- 2017-12-13 CN CN201711329897.2A patent/CN108090866B/en not_active Expired - Fee Related
Patent Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101753941A (en) * | 2008-12-19 | 2010-06-23 | 康佳集团股份有限公司 | Method for realizing markup information in imaging device and imaging device |
CN102202173A (en) * | 2010-03-23 | 2011-09-28 | 三星电子(中国)研发中心 | Photo automatically naming method and device thereof |
CN102662961A (en) * | 2012-03-08 | 2012-09-12 | 北京百舜华年文化传播有限公司 | Method, apparatus and terminal unit for matching semantics with image |
CN103152521A (en) * | 2013-01-30 | 2013-06-12 | 广东欧珀移动通信有限公司 | Effect of depth of field achieving method for mobile terminal and mobile terminal |
CN104159032A (en) * | 2014-08-20 | 2014-11-19 | 广东欧珀移动通信有限公司 | Method and device of adjusting facial beautification effect in camera photographing in real time |
CN105404845A (en) * | 2014-09-15 | 2016-03-16 | 腾讯科技(深圳)有限公司 | Picture processing method and apparatus |
CN104801494A (en) * | 2015-04-20 | 2015-07-29 | 张星家 | Intelligent sorting device and method applied to expressage |
CN104965921A (en) * | 2015-07-10 | 2015-10-07 | 陈包容 | Information matching method |
CN106610969A (en) * | 2015-10-21 | 2017-05-03 | 上海文广互动电视有限公司 | Multimodal information-based video content auditing system and method |
CN105574912A (en) * | 2015-12-15 | 2016-05-11 | 南京偶酷软件有限公司 | Method for converting natural languages into animation continuity data |
CN105512328A (en) * | 2015-12-23 | 2016-04-20 | 北京奇虎科技有限公司 | Method, system and device for realizing uploading of album photos |
CN105787111A (en) * | 2016-03-24 | 2016-07-20 | 李秋燕 | Private map making method based on user interest |
CN106815309A (en) * | 2016-12-20 | 2017-06-09 | 北京奇虎科技有限公司 | A kind of image method for pushing, device and mobile terminal |
CN107398906A (en) * | 2017-07-28 | 2017-11-28 | 安徽爱依特科技有限公司 | Autonomous hair circle of friends method based on robot |
Also Published As
Publication number | Publication date |
---|---|
CN108090866A (en) | 2018-05-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106446873B (en) | Face detection method and device | |
US9727775B2 (en) | Method and system of curved object recognition using image matching for image processing | |
Varish et al. | Image retrieval scheme using quantized bins of color image components and adaptive tetrolet transform | |
TWI443588B (en) | Image recognition algorithm, method of identifying a target image using same, and method of selecting data for transmission to a portable electronic device | |
CN109189879B (en) | Electronic book display method and device | |
US9224036B2 (en) | Generating static scenes | |
CN108898082B (en) | Picture processing method, picture processing device and terminal equipment | |
US9619732B2 (en) | Generating compositions | |
WO2021164550A1 (en) | Image classification method and apparatus | |
WO2021104097A1 (en) | Meme generation method and apparatus, and terminal device | |
CN106815803B (en) | Picture processing method and device | |
US9141191B2 (en) | Capturing photos without a camera | |
CN104866308A (en) | Scenario image generation method and apparatus | |
CN112163428A (en) | Semantic tag acquisition method and device, node equipment and storage medium | |
WO2017107855A1 (en) | Picture searching method and device | |
WO2022152116A1 (en) | Image processing method and apparatus, device, storage medium, and computer program product | |
CN108021905A (en) | image processing method, device, terminal device and storage medium | |
CN113906413A (en) | Contextual media filter search | |
WO2022193911A1 (en) | Instruction information acquisition method and apparatus, readable storage medium, and electronic device | |
CN108090866B (en) | Method, system and equipment for converting photo into artistic photo | |
CN113642359B (en) | Face image generation method and device, electronic equipment and storage medium | |
Mukherjee et al. | Energy efficient face recognition in mobile-fog environment | |
CN114140427B (en) | Object detection method and device | |
US8994834B2 (en) | Capturing photos | |
CN113032560B (en) | Sentence classification model training method, sentence processing method and equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20210810 Termination date: 20211213 |
|
CF01 | Termination of patent right due to non-payment of annual fee |