CN114333001A - Image processing method, intelligent terminal and storage medium - Google Patents

Image processing method, intelligent terminal and storage medium Download PDF

Info

Publication number
CN114333001A
CN114333001A CN202111608757.5A CN202111608757A CN114333001A CN 114333001 A CN114333001 A CN 114333001A CN 202111608757 A CN202111608757 A CN 202111608757A CN 114333001 A CN114333001 A CN 114333001A
Authority
CN
China
Prior art keywords
portrait
image
area
preset
image processing
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.)
Pending
Application number
CN202111608757.5A
Other languages
Chinese (zh)
Inventor
赵玮
周凡贻
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Transsion Holdings Co Ltd
Original Assignee
Shenzhen Transsion Holdings Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Transsion Holdings Co Ltd filed Critical Shenzhen Transsion Holdings Co Ltd
Priority to CN202111608757.5A priority Critical patent/CN114333001A/en
Publication of CN114333001A publication Critical patent/CN114333001A/en
Pending legal-status Critical Current

Links

Images

Abstract

The application provides an image processing method, image processing equipment and a storage medium, wherein the image processing method is applied to an intelligent terminal and comprises the following steps: s10: acquiring attribute information of an image; s20: and matching the attribute information with a preset library to obtain image processing parameters, and processing the target portrait area in the image by adopting the image processing parameters. According to the method and the device, the portrait processing is carried out by acquiring the attribute information of the image and matching the attribute information with the preset library to obtain the image processing parameters, and the portrait processing can be carried out based on the attribute of the image, so that the portrait processing effect can be improved.

Description

Image processing method, intelligent terminal and storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to an image processing method, an intelligent terminal, and a storage medium.
Background
In order to beautify a portrait, it is necessary to process an image including the portrait. The processing mode includes processing by using fixed parameters or processing according to processing parameters set by a user.
In the course of conceiving and implementing the present application, the inventors found that at least the following problems existed: when the fixed parameters are processed, the characteristics of different images cannot be matched, and when the parameters are processed manually, the parameters set by a user may be unreasonable, so that the human image processing effect is poor.
The foregoing description is provided for general background information and is not admitted to be prior art.
Disclosure of Invention
In view of the above technical problems, the present application provides an image processing method, an intelligent terminal and a storage medium, which can improve the effect of portrait processing.
In order to solve the above technical problem, the present application provides an image processing method applied to an intelligent terminal, including:
s10: acquiring attribute information of an image, wherein the attribute information comprises environment information corresponding to the image and/or portrait information in the image;
s20: and matching the attribute information with a preset library to obtain image processing parameters, and processing the target portrait area in the image by adopting the image processing parameters.
Optionally, the environment information includes at least one of a light brightness and a light angle,
and/or the portrait information comprises at least one of the following information:
gender of the portrait;
the number of figures;
portrait complexion;
the human body is like a skin.
Optionally, S10 includes:
acquiring first characteristic information of at least one portrait area in the image, wherein the first characteristic information comprises the area and/or the position of the portrait area;
selecting the target portrait area from all the portrait areas according to the first characteristic information of at least one portrait area;
and determining the attribute information corresponding to the target portrait area.
Optionally, S12 includes:
selecting the area of the portrait area larger than or equal to a preset area and/or the position of the portrait area in a preset area as the target portrait area in all the portrait areas, wherein the first characteristic information comprises the area of the portrait area and the position of the portrait area;
the preset area is determined according to the maximum area of the portrait area, and the preset area is a preset central area of the image.
Optionally, S10 includes:
acquiring the color of a pixel point of at least one portrait area in the image;
comparing the pixel point color of at least one portrait area with a preset skin color library to obtain the portrait skin color of at least one portrait area, wherein the portrait information comprises the portrait skin color.
Optionally, S10 includes:
identifying a skin region in the image;
determining skin particle points according to the brightness difference between every two pixel points in the skin area;
and determining the portrait skin of the image according to the interval where the number of the skin particle points is located, wherein the portrait information comprises the portrait skin.
Optionally, S10 includes:
acquiring second characteristic information of at least one portrait area in the image, wherein the second characteristic information comprises portrait area brightness and background area brightness;
and determining the light angle corresponding to at least one portrait area according to the second characteristic information, wherein the environment information comprises the light angle.
Optionally, according to the second feature information, determining the light angle corresponding to at least one of the portrait areas includes:
determining the face part brightness of at least one portrait area according to the portrait area brightness of the portrait area;
determining a brightness value difference between every two face parts according to the face part brightness of at least one portrait region;
and determining the light angle according to the brightness of the portrait area of at least one portrait area, the brightness value difference between every two facial parts and the brightness of the background area, wherein the light angle is a forward light, a backward light or a side light.
Optionally, S20 includes:
determining the attribute information corresponding to at least one target portrait region in the image;
respectively matching at least one attribute information with the preset library to obtain at least one image processing parameter corresponding to the target portrait area;
and processing at least one target portrait area by adopting the image processing parameters corresponding to at least one target portrait area.
Optionally, S20 includes:
forming an interval group according to the interval where at least one attribute value in the attribute information is located;
inquiring the image processing parameters corresponding to the interval groups in the preset library;
and processing the target portrait area in the image by adopting the image processing parameters.
The application also provides an image processing method applied to the intelligent terminal, and the method comprises the following steps:
step S30: displaying description information of at least one candidate library, wherein the candidate library comprises a corresponding relation between preset attribute information and preset image processing parameters, and the preset attribute information comprises preset environment information and/or preset portrait information;
step S40: and if a determination instruction for the description information is received, setting a preset library according to the library to be selected corresponding to the determination instruction so as to process a pre-target image.
Optionally, in the embodiment of the present invention, description information of at least two different candidate libraries is displayed as an example.
Optionally, after S30, the method further comprises:
if a preview instruction for the description information is received, processing the target image according to the attribute information of the candidate library and the target image corresponding to the preview instruction to obtain a preview image;
and displaying the preview image.
Optionally, before S30, the method further includes:
acquiring a preset image and a preset identifier corresponding to each library to be selected;
generating the description information corresponding to each candidate bank according to the preset image and the preset identification corresponding to each candidate bank;
and each preset image is obtained by processing the initial image based on the corresponding preset image parameter.
Optionally, after S40, the method further includes:
acquiring attribute information of an image to be processed;
matching the preset library with the attribute information of the image to be processed to obtain target image processing parameters;
and processing the target portrait area in the image to be processed by adopting the target image processing parameters.
Optionally, the method further comprises:
acquiring historical setting information aiming at the preset library;
predicting the preset library preferred by the user as a target library according to the historical setting information;
and displaying the recommendation information of the target library.
The application also provides an intelligent terminal, including: the image processing system comprises a memory and a processor, wherein the memory stores an image processing program, and the image processing program realizes the steps of the method when being executed by the processor.
The present application also provides a computer storage medium having a computer program stored thereon, which, when being executed by a processor, carries out the steps of the method as described above.
As described above, the image processing method of the present application, applied to an intelligent terminal, includes the steps of: s10: acquiring attribute information of an image, wherein the attribute information comprises environment information corresponding to the image and/or portrait information in the image; s20: and matching the attribute information with a preset library to obtain image processing parameters, and processing the target portrait area in the image by adopting the image processing parameters. Through the technical scheme, the effect of improving portrait processing can be realized, and further the user experience is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic diagram of a hardware structure of an intelligent terminal implementing various embodiments of the present application;
fig. 2 is a communication network system architecture diagram according to an embodiment of the present application;
fig. 3 is a flowchart illustrating an image processing method according to the first embodiment;
fig. 4 is a flowchart illustrating an image processing method according to a second embodiment;
fig. 5 is a flowchart illustrating a method for selecting a target portrait area according to a second embodiment;
fig. 6 is a flowchart illustrating an image processing method according to a third embodiment;
fig. 7 is a flowchart illustrating an image processing method according to a fourth embodiment;
fig. 8 is a flowchart illustrating an image processing method according to a fifth embodiment;
FIG. 9 is a flowchart illustrating a method of determining ray angles according to a fifth embodiment;
fig. 10 is a flowchart illustrating an image processing method according to a sixth embodiment;
fig. 11 is a flowchart illustrating an image processing method according to a seventh embodiment;
fig. 12 is a flowchart illustrating an image processing method according to an eighth embodiment;
fig. 13 is a flowchart illustrating an image processing method according to a ninth embodiment;
fig. 14 is a flowchart illustrating an image processing method according to the tenth embodiment.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings. With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. These drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the inventive concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, the recitation of an element by the phrase "comprising an … …" does not exclude the presence of additional like elements in the process, method, article, or apparatus that comprises the element, and further, where similarly-named elements, features, or elements in different embodiments of the disclosure may have the same meaning, or may have different meanings, that particular meaning should be determined by their interpretation in the embodiment or further by context with the embodiment.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope herein. Depending on the context, the word "if" as used herein may be interpreted as "at … …" or "at … …" or "in response to a determination". Also, 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 will be further understood that the terms "comprises," "comprising," "includes" and/or "including," when used in this specification, specify the presence of 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, species, and/or groups thereof. The terms "or," "and/or," "including at least one of the following," and the like, as used herein, are to be construed as inclusive or mean any one or any combination. For example, "includes at least one of: A. b, C "means" any of the following: a; b; c; a and B; a and C; b and C; a and B and C ", again for example," A, B or C "or" A, B and/or C "means" any of the following: a; b; c; a and B; a and C; b and C; a and B and C'. An exception to this definition will occur only when a combination of elements, functions, steps or operations are inherently mutually exclusive in some way.
It should be understood that, although the steps in the flowcharts in the embodiments of the present application are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least some of the steps in the figures may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, in different orders, and may be performed alternately or at least partially with respect to other steps or sub-steps of other steps.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
It should be noted that step numbers such as S10 and S20 are used herein for the purpose of more clearly and briefly describing the corresponding content, and do not constitute a substantial limitation on the sequence, and those skilled in the art may perform S20 first and then S10 in specific implementation, which should be within the scope of the present application.
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for the convenience of description of the present application, and have no specific meaning in themselves. Thus, "module", "component" or "unit" may be used mixedly.
The smart terminal may be implemented in various forms. For example, the smart terminal described in the present application may include smart terminals such as a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and the like, and fixed terminals such as a Digital TV, a desktop computer, and the like.
The following description will be given taking a mobile terminal as an example, and it will be understood by those skilled in the art that the configuration according to the embodiment of the present application can be applied to a fixed type terminal in addition to elements particularly used for mobile purposes.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present application, the mobile terminal 100 may include: RF (Radio Frequency) unit 101, WiFi module 102, audio output unit 103, a/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 1 is not intended to be limiting of mobile terminals, which may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, receive downlink information of a base station and then process the downlink information to the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA2000(Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division duplex-Long Term Evolution), TDD-LTE (Time Division duplex-Long Term Evolution, Time Division Long Term Evolution), 5G, and so on.
WiFi belongs to short-distance wireless transmission technology, and the mobile terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 102, and provides wireless broadband internet access for the user. Although fig. 1 shows the WiFi module 102, it is understood that it does not belong to the essential constitution of the mobile terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive audio or video signals. The a/V input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, the Graphics processor 1041 Processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 may receive sounds (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, or the like, and may be capable of processing such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Optionally, the light sensor includes an ambient light sensor that may adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that may turn off the display panel 1061 and/or the backlight when the mobile terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Alternatively, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 1071 (e.g., an operation performed by the user on or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory), and drive a corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. Optionally, the touch detection device detects a touch orientation of a user, detects a signal caused by a touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. Optionally, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, and are not limited thereto.
Alternatively, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although the touch panel 1071 and the display panel 1061 are shown in fig. 1 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 108 serves as an interface through which at least one external device is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and external devices.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a program storage area and a data storage area, and optionally, the program storage area may store an operating system, an application program (such as a sound playing function, an image playing function, and the like) required by at least one function, and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor and a modem processor, optionally, the application processor mainly handles operating systems, user interfaces, application programs, etc., and the modem processor mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described in detail herein.
In order to facilitate understanding of the embodiments of the present application, a communication network system on which the mobile terminal of the present application is based is described below.
Referring to fig. 2, fig. 2 is an architecture diagram of a communication Network system according to an embodiment of the present disclosure, where the communication Network system is an LTE system of a universal mobile telecommunications technology, and the LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and an IP service 204 of an operator, which are in communication connection in sequence.
Optionally, the UE201 may be the terminal 100 described above, and is not described herein again.
The E-UTRAN 202 includes eNodeB2021 and other eNodeBs 2022, among others. Alternatively, the eNodeB2021 may be connected with other enodebs 2022 through a backhaul (e.g., X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide the UE201 access to the EPC 203.
The EPC203 may include an MME (Mobility Management Entity) 2031, an HSS (Home Subscriber Server) 2032, other MMEs 2033, an SGW (Serving gateway) 2034, a PGW (PDN gateway) 2035, and a PCRF (Policy and Charging Rules Function) 2036, and the like. Optionally, the MME2031 is a control node that handles signaling between the UE201 and the EPC203, providing bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location register (not shown) and holds subscriber specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034, PGW2035 may provide IP address assignment for UE201 and other functions, and PCRF2036 is a policy and charging control policy decision point for traffic data flow and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
The IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem), or other IP services, among others.
Although the LTE system is described as an example, it should be understood by those skilled in the art that the present application is not limited to the LTE system, but may also be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems (e.g. 5G), and the like.
Based on the above mobile terminal hardware structure and communication network system, various embodiments of the present application are provided.
First embodiment
Referring to fig. 3, a first embodiment of the present application provides an image processing method including the steps of:
s10: acquiring attribute information of an image, wherein the attribute information comprises environment information corresponding to the image and/or portrait information in the image;
in an exemplary technique, when portrait processing is performed, the portrait is processed using fixed processing parameters. When processing is performed using fixed processing parameters, the processing effect is different depending on the attribute information of the image. For a fixed processing parameter, the processing effect is better when processing the image under the bright light environment, but when processing the image under the dark light environment, because the skin particles of the portrait in the image are reduced, when processing by using the fixed parameter, the buffing is too heavy, the smearing sense is strong, the skin is too smooth, the detail characteristics are lacked, and the portrait processing effect is reduced. If the backlight portrait area and the light receiving portrait area exist in the image, the skin states of the light receiving surface and the backlight surface are different, the skin texture of the light receiving surface is more, the detail particles are more visible, and the detail of the skin texture of the backlight surface is less than that of the light receiving surface. When image processing is performed using fixed parameters, it may not be possible to simultaneously process the skin on both the light-receiving surface and the backlight surface to a good state, and the processing effect is poor. In another exemplary technique, the intelligent terminal directly processes according to the processing parameters set by the user, and the human image processing effect is often poor due to the uneven image processing capabilities of different users.
In order to solve the above problem, in this embodiment, attribute information of an image is obtained, the attribute information is matched with a preset library to obtain an image processing parameter, and the image processing parameter is used to process a target portrait area in the image, so that the image processing parameter is obtained after the preset library is matched according to environment information corresponding to the image and/or portrait information in the image, and the portrait processing effect is improved.
Optionally, the environment information includes at least one of a light brightness and a light angle, and/or the portrait information includes at least one of the following information: gender of the portrait; the number of figures; portrait complexion; the human body is like a skin.
The light brightness is the brightness of the image. The light angle is the angle at which the light illuminates the portrait area. The portrait gender is the gender identified for the portrait in the image. The number of faces is the number of identified face regions in the image. The portrait skin color is the skin color of the portrait area in the image. The portrait skin is the skin of the portrait area in the image.
Alternatively, the luminance of light is obtained according to the ISO sensitivity of the image.
Optionally, the light brightness is determined according to the section of the image where ISO is located. Illustratively, when the ISO is in the first interval, the light brightness is a first brightness; when the ISO is in a second interval, the light brightness is a second brightness.
Optionally, the light angles include forward light, backward light, and side light. The direct light means that light rays are irradiated from the front side of the portrait. The backlight value light is irradiated from the back of the portrait. The side light means a side surface on which light is irradiated to the portrait, and in the case of the side light, the portrait area includes a light receiving area and a backlight area.
Optionally, the portrait information is obtained by identifying the image by adopting a portrait identification algorithm based on a neural network.
S20: and matching the attribute information with a preset library to obtain image processing parameters, and processing the target portrait area in the image by adopting the image processing parameters.
The preset library is a database including preset attribute information and preset image processing parameters. The preset library also comprises a corresponding relation between preset attribute information and preset image processing parameters. The target portrait area is a portrait area to be processed in the image. The image processing parameters are parameters for processing the human image.
Optionally, the image processing parameters include a peeling parameter, a luminance parameter, a chrominance parameter, or other parameters.
Optionally, the preset library includes preset image processing parameters corresponding to each preset attribute information.
Optionally, the preset attribute information in the preset library corresponds to the preset image processing parameters one to one. Or, the plurality of preset attribute information correspond to a preset image processing parameter.
Optionally, the attribute information is matched with preset attribute information in a preset library to obtain corresponding preset attribute information, a corresponding preset image processing parameter is determined according to the corresponding preset attribute information, and the corresponding preset image processing parameter is used as an image processing parameter for processing the target portrait area.
In a scene, the attribute information of an image includes environment information and portrait information, the environment information includes light brightness and light angle, wherein the light brightness of the image is marked as highlight brightness, and the light angle is a direct light. The image includes two portrait areas therein, and the image also has the following attribute information: the portrait skin of one portrait area is yellow skin, the gender of the portrait corresponding to the portrait area is female, and the portrait skin corresponding to the portrait area is smooth skin with few grain points; the portrait skin of the other portrait area is black skin, the gender of the portrait corresponding to the portrait area is male, and the portrait skin corresponding to the portrait area is rough skin with more grain points. And matching the attribute information with a preset library to obtain a group of image processing parameters corresponding to the attribute information, and processing two portrait areas in the image by adopting the group of image processing parameters to obtain a processed image. In the processing process, the attribute information is matched with the preset library, and the portrait is processed based on the image processing parameters obtained by matching, so that the portrait of the processed image has relatively real texture information, the portrait beautifying effect is achieved, and the portrait processing effect is improved.
In this embodiment, by acquiring attribute information of an image, the attribute information includes environment information corresponding to the image and/or portrait information in the image; and matching the attribute information with a preset library to obtain image processing parameters, and processing the target portrait area in the image by adopting the image processing parameters. Therefore, image processing parameters are obtained after the preset library is matched according to the environment information corresponding to the image and/or the portrait information in the image flexibly, and the portrait processing effect is improved.
Second embodiment
Referring to fig. 4, a second embodiment of the present application provides an image processing method, based on the first embodiment, S10 includes:
s11: acquiring first characteristic information of at least one portrait area in the image, wherein the first characteristic information comprises the area and/or the position of the portrait area;
optionally, the image includes a plurality of portrait areas, and when performing portrait processing, a target portrait area is selected from all the portrait areas, image processing information is determined based on attribute information of the target portrait area, and the image is processed. To perform image processing on a targeted basis.
Optionally, the area of the portrait area is represented by a ratio of pixels in the portrait coverage area to all pixels in the image, or by a size of the portrait area, or by other means.
Optionally, the position of the portrait area is represented by a position of a center point of the portrait area, or by a position of a feature point of the portrait area, or by a position of an edge point of the portrait area, or in other manners. Optionally, the feature point locations include a nose location, an eye location, a mouth location, and the like.
S12: selecting the target portrait area from all the portrait areas according to the first characteristic information of at least one portrait area;
optionally, the portrait area with the area within the preset area interval is used as the target portrait area.
In one scene, the image comprises four portraits, wherein two portraits are shooting main bodies, the other two portraits are passerby, first proportion information of the area of the portrait regions corresponding to the two shooting main bodies in the image area is calculated respectively, second proportion information of the area of the portrait regions corresponding to the other two passerby in the image area is calculated respectively, and third proportion information of the area of the portrait regions in the preset area interval is obtained. Then, after comparison is performed according to the first ratio information, the second ratio information, and the third ratio information, two subjects are detected, and the two subjects are taken as the target portrait area. The proportion of the image area occupied by the shooting main body is large, and the proportion of the image area occupied by passers-by is small. By obtaining image processing information based on the attribute information of the target portrait area, interference of a non-shooting subject is avoided, and the effect of portrait processing is reduced.
Optionally, a target distance between the position of the portrait area and the edge of the image is determined, and a target portrait area is selected according to a comparison result between the target distance and a preset distance, wherein when the target distance is greater than or equal to the preset distance, the corresponding portrait area is used as the target portrait area.
Optionally, two portrait areas are included in the image. And respectively calculating the actual distance between the two portrait areas and the edge of the image, and acquiring the preset distance, so that the two portrait areas can be detected according to the fact that the actual distance is greater than the preset distance.
Optionally, when the target distance is smaller than the preset distance, whether the area of the portrait area is larger than the preset area is judged, when the area of the portrait area is larger than or equal to the preset area, the corresponding portrait area is used as the target portrait area, and when the area of the portrait area is smaller than the preset area, the portrait area is not selected as the target portrait area.
Optionally, the image includes two portrait areas, and the two portrait areas are both adjacent to the edge of the image, at this time, the area of the portrait area is compared with a preset area, it is calculated that only one portrait area is larger than the preset area, and the portrait area larger than the preset area is taken as the target portrait area. Under the condition that the target portrait area is selected together by combining the area of the portrait area and the position of the portrait area, the accuracy of selecting the shooting subject is higher. The method can more accurately avoid the interference of the attribute information of the non-shooting main body on the portrait processing, and further improve the portrait processing effect.
Alternatively, referring to fig. 5, fig. 5 is a flowchart illustrating a method for selecting a target portrait area, where step S12 includes:
s121: selecting the area of the portrait area to be larger than or equal to a preset area in all the portrait areas, and/or selecting the portrait area position in the portrait area in the preset area as the target portrait area, wherein the first characteristic information comprises the area of the portrait area and the position of the portrait area;
the preset area is determined according to the maximum area of the portrait area, and the preset area is a preset central area of the image.
Optionally, N times the maximum area portrait area is used as the preset area, where N is a positive number less than 1.
Optionally, after subtracting the preset area value from the maximum area of the portrait area, a difference value is obtained as the preset area.
Alternatively, the preset central region is a square region extending from the central position of the image to the boundary of the image, or a circular region, or a region of another shape.
Optionally, the image includes four portrait areas, namely two shooting subjects and two passers-by, where the shooting subject occupies a larger screen area and the passers-by occupies a smaller screen area. The area of the two shooting subjects is larger than the preset area, and the portrait area of the shooting subject can be selected as the target portrait area.
Optionally, the image includes four portrait areas, two shooting subjects and two passers-by, the shooting subjects occupy the center of the picture, and the passers-by occupy the edges. The preset central area is a quadrilateral area obtained by extending the image center outwards. And detecting that the two shooting subjects are positioned in the quadrilateral area through calculation, so that the portrait areas where the two shooting subjects are positioned are used as target portrait areas.
S13: and determining the attribute information corresponding to the target portrait area.
Optionally, in the process of determining the attribute information, only the attribute information of the selected target portrait area is determined, and portrait areas other than the target portrait area in the image are ignored, so that the attribute information of non-target portrait areas is prevented from causing interference on image processing parameters.
Optionally, the image includes a plurality of portrait areas, and a plurality of portrait areas including a plurality of skin colors and a plurality of skin types, however, only one subject is photographed. At the moment, the shooting subject is calculated and selected as the target portrait area by adopting the mode, so that the attribute information of the portrait areas of other skin colors and other skin types is avoided, the selection of image processing parameters is interfered, the portrait processing can be accurately carried out aiming at the attribute information of the shooting subject, and the image processing effect is good.
In this embodiment, first feature information of at least one portrait area in an image is acquired, where the first feature information includes a portrait area and/or a portrait area position; selecting a target portrait area from all portrait areas according to the first characteristic information of at least one portrait area; and determining attribute information corresponding to the target portrait area. By selecting the target portrait area in the image and determining the attribute information of the target portrait area, the attribute information can be determined in a targeted manner, and then the image processing parameters are determined in a targeted manner, so that the image processing parameters are matched with the target portrait area, the interference of the attributes of the non-target portrait area on image processing is avoided, and the portrait processing effect is improved.
Third embodiment
Referring to fig. 6, a third embodiment of the present application provides an image processing method, based on the first embodiment, S10 includes:
s14: acquiring the color of a pixel point of at least one portrait area in the image;
in the present embodiment, the attribute information includes portrait skin color.
Optionally, each portrait area in the image is identified through a portrait identification algorithm, the pixel point color of at least one portrait area is respectively extracted, and the skin color corresponding to the portrait area is identified based on the pixel point color.
S15: comparing the pixel point color of at least one portrait area with a preset skin color library to obtain the portrait skin color of at least one portrait area, wherein the attribute information comprises the portrait skin color.
Optionally, the preset skin color library includes a corresponding relationship between a preset skin color and a preset pixel point color. The method comprises the steps of obtaining the color of a preset pixel point corresponding to at least one portrait area by matching the color of the pixel point of at least one portrait area with the color of the preset pixel point, and determining the portrait skin color of at least one portrait area according to the color of the preset pixel point corresponding to at least one portrait area and the corresponding relation.
Optionally, the portrait area is a target portrait area, and the method further includes:
determining at least one target portrait area in the image, obtaining pixel point colors of the target portrait area, and comparing the pixel point colors of the target portrait area with a preset skin color library to obtain the portrait skin color of the target portrait area.
Optionally, the preset skin color is divided into multiple types, including dark skin color, light skin color and neutral skin color; alternatively, including brown skin, black skin, and white skin; or divided into other types, the embodiment does not make a unique limitation on the preset skin color.
In the embodiment, the color of the pixel point of at least one portrait area in the image is obtained; and comparing the pixel point color of the at least one portrait area with a preset skin color library to obtain the portrait skin color of the at least one portrait area. Therefore, the portrait skin color of the portrait area is obtained, and the image processing parameters are determined based on the portrait skin color so as to improve the portrait processing effect.
Fourth embodiment
Referring to fig. 7, a fourth embodiment of the present application provides an image processing method, based on the first embodiment, S10 includes:
s16: identifying a skin region in the image;
the skin area is the area of the human image where the skin site is located.
Optionally, the skin region includes a forehead skin region, a nose skin region, a chin skin region, a cheek skin region, or other skin regions.
S17: determining skin particle points according to the brightness difference between every two pixel points in the skin area;
skin particle spots are fine particle spots present on the skin.
Optionally, the skin particle point is a pixel point region having a preset brightness characteristic in the image.
Optionally, the preset luminance characteristic includes any one of: firstly, the difference value of the brightness values between two adjacent pixel points or between more than two adjacent pixel points is smaller than a first preset brightness threshold value, and the difference value of the brightness values between the pixel points and the adjacent pixel points is larger than a second preset brightness threshold value; secondly, the difference value of the brightness values of the single pixel point and the adjacent pixel point is larger than a third preset brightness threshold value.
Optionally, a brightness difference between every two adjacent pixel points is calculated, and the skin particle point is determined according to the brightness difference between every two adjacent pixel points.
Optionally, the manner of determining the skin particle point according to the brightness difference between every two pixel points in the skin region is as follows:
determining a first brightness difference value between every two pixel points in a skin area, forming a pixel point group by every two pixel points of which the first brightness difference value is smaller than a first preset brightness threshold value, determining a second brightness difference value between at least one pixel point and a target adjacent pixel point for at least one pixel point in at least one pixel point group, determining the corresponding pixel point group as the target pixel point group when the second brightness difference value is larger than a second preset brightness threshold value, and forming skin particle points according to the adjacent target pixel point group. And the target adjacent pixel points are adjacent pixel points which are not in the same pixel point group.
Optionally, the manner of determining the skin particle point according to the brightness difference between every two pixel points in the skin region is as follows:
and calculating a third brightness difference value between at least one pixel point and an adjacent pixel point, selecting a target pixel point with the third brightness difference value larger than a third preset brightness threshold value, and obtaining skin particle points according to the target pixel point.
Alternatively, the skin particle point may be determined in other ways, which are not limited herein.
S18: and determining the portrait skin of the image according to the interval where the number of the skin particle points is located, wherein the attribute information comprises the portrait skin.
Alternatively, the greater the number of skin particle spots, the rougher the skin; the fewer the number of skin particle spots, the smoother the skin.
Optionally, the portrait skin is determined according to a preset mapping relationship between the interval where the number of the skin particle points is located and the portrait skin, and the preset mapping relationship is a relationship between the portrait skin corresponding to the interval where the number of the skin particle points is located.
Optionally, the human skin includes smooth skin and rough skin; or, the plurality of human figure skin types are divided according to the smoothness degree.
Optionally, the human skin is determined as follows:
and determining the human skin type of the image according to the interval where the number of the skin particle points is located and the area of the skin particle points.
Alternatively, the roughness or smoothness of the skin can be determined according to the interval in which the number is located, and the size of the skin particle point can be determined according to the area of the skin particle point. The portrait skin includes the smoothness of the portrait skin and/or the size of the grain points of the portrait skin.
In the present embodiment, by identifying skin regions in an image; determining skin particle points according to the brightness difference between every two pixel points in the skin area; and determining the human figure skin type of the image according to the interval where the number of the skin particle points is located. Therefore, the portrait skin can be determined, the image processing information is further determined by combining the portrait skin, the portrait is processed by adopting the image processing parameters in a self-adaptive manner according to different portrait skins, and the portrait processing effect is improved.
Fifth embodiment
Referring to fig. 8, a fifth embodiment of the present application provides an image processing method, based on the first embodiment, S10 includes:
s19: acquiring second characteristic information of at least one portrait area in the image, wherein the second characteristic information comprises portrait area brightness and background area brightness;
the portrait has different characteristics under different light angles, skin texture is rich in the forward light, skin texture is less in the backward light, and the light receiving surface texture is more than the backlight surface texture in the side light, so that different image processing parameters are required to be adopted for processing, and the portrait processing effect is improved.
The brightness of the portrait area is the brightness of the portrait area; the brightness of the background area is the brightness of the non-portrait area.
Optionally, the portrait area luminance includes luminance of a plurality of sub-areas in the portrait area.
S110: and determining the light angle corresponding to at least one portrait area according to the second characteristic information, wherein the attribute information comprises the light angle.
Optionally, the ray angle is determined as follows:
and when the brightness of the portrait area is higher than that of the background area, determining that the light angle is forward light, and when the brightness of the portrait area is lower than that of the background area, determining that the light angle is backward light.
Optionally, in order to determine the light ray angle more accurately, referring to fig. 9, fig. 9 is a flowchart illustrating a method for determining the light ray angle, and S110 includes:
s1101: determining the face part brightness of at least one portrait area according to the portrait area brightness of the portrait area;
s1102: determining a brightness value difference between every two face parts according to the face part brightness of at least one portrait area;
s1103: determining the light angle according to the brightness of the portrait area, the brightness value difference between every two facial parts and the brightness of the background area of at least one portrait area, wherein the light angle is a forward light, a backward light or a side light, and the attribute information comprises the light angle.
Optionally, the facial region includes the forehead, chin, cheeks, nose, etc.
Optionally, the human image region brightness comprises brightness of at least one facial part.
Optionally, a difference value of the brightness values between the facial parts included in the at least one portrait area is determined according to the brightness of the facial parts of the at least one portrait area.
Optionally, when the brightness difference between every two facial parts is smaller than a preset brightness difference, the brightness of the portrait area is greater than the brightness of the background area, and the brightness of at least one portrait area is greater than the preset brightness of the portrait area, determining that the light angle is a direct light;
optionally, when the brightness difference between every two facial parts is smaller than a preset brightness difference, the brightness of the portrait area is smaller than the brightness of the background area, and the brightness of at least one portrait area is larger than the brightness of the preset portrait area, determining the light angle as backlight;
optionally, when the luminance value difference between the two sides of the cheek is greater than the preset cheek luminance difference, the light ray angle is determined to be the side light.
In this embodiment, second characteristic information of at least one portrait area in an image is obtained, where the second characteristic information includes a brightness of the portrait area and a brightness of a background area; and determining the light angle corresponding to at least one portrait area according to the second characteristic information. Therefore, image processing parameters are obtained according to the light angles, portrait processing is carried out, and the portrait processing effect is good for images with different light angles.
Sixth embodiment
Referring to fig. 10, a sixth embodiment of the present application provides an image processing method, based on the first embodiment, S20 includes:
s21: determining the attribute information corresponding to at least one target portrait region in the image;
optionally, the target portrait area is first identified in the image, and in a case where a plurality of target portrait areas exist, the attribute information corresponding to at least one target portrait area in the image is determined.
S22: respectively matching at least one attribute information with the preset library to obtain at least one image processing parameter corresponding to the target portrait area;
optionally, the preset library includes a corresponding relationship between preset attribute information and preset image processing parameters. And respectively determining preset image processing parameters corresponding to at least one attribute information, and determining image processing parameters corresponding to at least one target portrait area according to the preset image processing parameters corresponding to at least one attribute information.
S23: and processing at least one target portrait area by adopting the image processing parameters corresponding to at least one target portrait area.
And when at least one target portrait area is processed, processing by adopting the image processing parameters corresponding to the target portrait area.
In a scene, two figures are included in an image. The method comprises the steps of determining light brightness corresponding to an image, and respectively determining portrait gender, light angle, portrait skin color and portrait skin quality of at least one portrait, so as to obtain corresponding skin-polishing parameters according to attribute information of the at least one portrait and the light brightness of the image, and respectively performing skin beautifying processing by adopting the skin-polishing parameters corresponding to at least one portrait area, so that portrait processing effects are respectively suitable for the at least one portrait, not only are the environmental effects and the portrait characteristics considered, but also personalized processing is performed on the at least one portrait, and further the portrait processing effect is improved.
In the embodiment, the attribute information corresponding to at least one target portrait area in the image is determined; respectively matching at least one attribute information with a preset library to obtain an image processing parameter corresponding to at least one target portrait area; and processing the at least one target portrait area by adopting the image processing parameters corresponding to the at least one target portrait area. And the personalized processing is respectively carried out on at least one portrait area, so that the portrait processing effect is further improved.
Seventh embodiment
Referring to fig. 11, a seventh embodiment of the present application provides an image processing method, based on the first embodiment, S20 includes:
s24: forming an interval group according to the interval where at least one attribute value in the attribute information is located;
the interval group is a combination of intervals in which at least one attribute value exists.
S25: inquiring the image processing parameters corresponding to the interval groups in the preset library;
optionally, the preset library includes a corresponding relationship between a preset interval group and a preset image processing parameter. And inquiring to obtain the image processing parameters corresponding to the interval groups by determining the preset interval groups matched with the interval groups and according to the preset image processing parameters corresponding to the matched preset interval groups.
S26: and processing the target portrait area in the image by adopting the image processing parameters.
In a scene, the attribute information of the image comprises light brightness, light angle, portrait gender, portrait skin color, portrait skin quality and portrait quantity. Obtaining the light brightness A by obtaining ISO, obtaining the number of the portrait as B, the gender of the portrait as C, the light angle as D, the skin colors of the portrait as E1 and E2, and the skin types of the portrait as F1 and F2 by image recognition, and obtaining the interval group G1 and the interval group G2. The section group G1 includes { a, B, C, D, E1, F1}, and the section group G2 includes { a, B, C, D, E2, F2 }. The image processing parameters corresponding to G1 and the image processing parameters corresponding to G2 are respectively searched in a preset library, the image processing parameters corresponding to G1 are respectively adopted to process the target portrait area corresponding to G1, and the image processing parameters corresponding to G2 are adopted to process the target portrait area corresponding to G2.
In this embodiment, a section group is formed by a section in which at least one attribute value is located according to the attribute information; inquiring image processing parameters corresponding to the interval groups in a preset library; and processing the target portrait area in the image by adopting the image processing parameters. Therefore, the image processing parameters can be determined according to the attribute values, and the image processing parameters are determined by combining the attribute information of the image, so that the problem of poor portrait processing effect when preset fixed parameters are adopted or manually adjusted by a user is solved. The effect of portrait processing can be improved.
Eighth embodiment
Referring to fig. 12, an eighth embodiment of the present application provides an image processing method including the steps of:
step S30: displaying description information of at least two different libraries to be selected, wherein each library to be selected comprises a corresponding relation between preset attribute information and preset image processing parameters, and the preset attribute information comprises preset environment information and/or preset portrait information;
the candidate database is a pre-configured optional database and comprises a corresponding relation between preset attribute information and preset image processing parameters.
Optionally, the preset environment information includes at least one of a light brightness and a light angle, and/or the preset portrait information includes at least one of the following information: gender of the portrait; the number of figures; portrait complexion; the human body is like a skin.
Because the image processing requirements of users may be different, when a set of fixed preset libraries are used to process images, the user requirements may not be completely matched. For example, for an image, by extracting attribute information such as light brightness, portrait skin color, portrait skin quality and the like of the image, matching the attribute information with a preset library, obtaining corresponding image processing parameters and processing the image, rich skin details are reserved while the portrait in the obtained image is beautified, and a better image processing effect is achieved. However, some users may prefer an image processing effect with a deeper degree of dermabrasion and smoother skin, while another portion of users prefer an image processing effect with a shallower degree of dermabrasion and closer to the real effect. In order to meet the image processing requirements of different users, the present embodiment further displays description information of at least two candidate libraries, so that the users can select the required candidate libraries based on the description information, and set a preset library based on the candidate libraries required by the users.
Optionally, the degree of buffing of each candidate library is different.
Optionally, the filter effect of each candidate bank is different.
Optionally, the description information includes image information, text information, or sound information. The description information is used for describing the candidate libraries so that the user can know the basic information of each candidate library.
Alternatively, the steps S30 and S40 may be performed if an instruction to set a preset library is received after determining an image required to be processed in each process of processing an image. And after the preset library is set, image processing is carried out according to the set preset library. Therefore, when processing images every time, the user can set a preset library required by the user for image processing, and the setting flexibility is strong.
Alternatively, the preset library may be set before the image processing is performed, so that it is not necessary to set the preset library again later. Among them, an instruction to set a preset library may be detected at the setting interface, and steps S30 and S40 may be performed according to the instruction to set the preset library, so that the preset library may be set in advance. Thereafter, image processing may be performed based on a preset library set in advance. The operation is convenient and fast, and a preset library is not required to be repeatedly set.
Optionally, after S30, the method further comprises:
if a preview instruction for the description information is received, processing the target image according to the attribute information of the candidate library and the target image corresponding to the preview instruction to obtain a preview image;
and displaying the preview image.
In order to facilitate the user to select the required libraries to be selected and set the preset libraries, the preview image corresponding to each library to be selected can be generated and displayed according to the preview instruction of the user, so that the user can conveniently check the processing effect of the libraries to be selected so as to set the required preset libraries.
Optionally, the preview instruction includes a touch instruction, a voice instruction, or a key instruction to the smart terminal, and may also be another computer instruction for obtaining a preview image.
Optionally, the target image is an image selected by the user, or the target image is a preset default image.
Optionally, before S30, the method further includes:
acquiring a preset image and a preset identifier corresponding to each library to be selected;
generating the description information corresponding to each candidate bank according to the preset image and the preset identification corresponding to each candidate bank;
and each preset image is obtained by processing the initial image based on the corresponding preset image parameter.
The preset image is a pre-stored image. The preset identification is preset information for identifying the library to be selected.
Optionally, the description information includes a preset image and a preset identifier.
Alternatively, the preset identifier may be composed of a character string, or may be composed of other data.
Optionally, after the initial image is processed by each candidate library, a preset image corresponding to each candidate library is obtained and stored.
Optionally, the description information of each candidate library may be displayed in a grid form, a list form or other display forms, so as to be conveniently viewed by the user.
Step S40: and if a determination instruction for the description information is received, setting a preset library according to the library to be selected corresponding to the determination instruction.
The determining instruction is an instruction for determining the selected candidate bank.
Alternatively, the determination instruction may be a touch instruction, a voice instruction, a key instruction, or the like.
Optionally, the candidate library corresponding to the determination instruction is set as a preset library.
In a scene, a user needs to process a portrait image that the user takes. After detecting that an image processing interface is entered, the intelligent terminal displays thumbnails and names of a plurality of libraries to be processed in a grid mode, acquires an image to be processed selected by a user after detecting that the user selects a library to be processed with a style type of light buffing style for previewing, processes the image to be processed based on the library to be selected by the user and attribute information of the image to be processed, obtains a preview image, and displays the preview image. After the preview image is displayed, the user may be unsatisfied, the selected library with the 'moderate buffing style' is reselected for previewing, the intelligent terminal regenerates a preview picture according to the selected library reselected by the user and displays the preview picture, and after a confirmation instruction triggered by the user and confirming image processing according to the selected library at the last time is detected, the selected library with the 'moderate buffing style' selected at the last time is set as a preset library and is stored after the image to be processed is processed based on the preset library. Therefore, the user can set the preset library according to the requirement of the user, differential image processing can be carried out on the image based on the attribute information of the image, the requirement of the user can be matched, and the image processing effect can be effectively improved.
In this embodiment, by displaying description information of at least two different libraries to be selected, each library to be selected includes a corresponding relationship between preset attribute information and a preset image processing parameter, where the preset attribute information includes preset environment information and/or preset portrait information; and if a determination instruction for the description information is received, setting a preset library according to the library to be selected corresponding to the determination instruction. Therefore, the preset library can be set according to the user preference, the preset library can be matched with the setting requirements of the user when used for image processing, and the attribute information of the image can also be matched, so that the image processing effect is improved.
Ninth embodiment
Referring to fig. 13, a ninth embodiment is proposed based on the eighth embodiment, and after S40, the method further includes:
step S50, acquiring attribute information of the image to be processed;
the image to be processed is an image that needs to be processed.
Optionally, the attribute information includes environmental information and/or portrait information.
Optionally, the environment information includes at least one of a light brightness and a light angle, and/or the portrait information includes at least one of the following information: gender of the portrait; the number of figures; portrait complexion; the human body is like a skin.
The light brightness is the brightness of the image. The light angle is the angle at which the light illuminates the portrait area. The portrait gender is the gender identified for the portrait in the image. The number of faces is the number of identified face regions in the image. The portrait skin color is the skin color of the portrait area in the image. The portrait skin is the skin of the portrait area in the image.
Alternatively, the luminance of light is obtained according to the ISO sensitivity of the image.
Optionally, the light brightness is determined according to the section of the image where ISO is located. Illustratively, when the ISO is in the first interval, the light brightness is a first brightness; when the ISO is in a second interval, the light brightness is a second brightness.
Optionally, the light angles include forward light, backward light, and side light. The direct light means that light rays are irradiated from the front side of the portrait. The backlight value light is irradiated from the back of the portrait. The side light means a side surface on which light is irradiated to the portrait, and in the case of the side light, the portrait area includes a light receiving area and a backlight area.
Optionally, the portrait information is obtained by identifying the image by adopting a portrait identification algorithm based on a neural network.
Step S60, matching the preset library with the attribute information of the image to be processed to obtain target image processing parameters;
optionally, the target image processing parameters include a peeling parameter, a luminance parameter, a chrominance parameter, or other parameters.
Optionally, the preset library includes preset image processing parameters corresponding to each preset attribute information.
Optionally, the preset attribute information in the preset library corresponds to the preset image processing parameters one to one. Or, the plurality of preset attribute information correspond to a preset image processing parameter.
Optionally, the attribute information is matched with preset attribute information in a preset library to obtain corresponding preset attribute information, a corresponding preset image processing parameter is determined according to the corresponding preset attribute information, and the corresponding preset image processing parameter is used as a target image processing parameter for processing the target portrait area.
And step S70, processing the target portrait area in the image to be processed by adopting the target image processing parameters.
In the embodiment, attribute information of an image to be processed is acquired; matching the set preset library with attribute information of an image to be processed to obtain target image processing parameters; and processing the target portrait area in the image to be processed by adopting the target image processing parameters. Therefore, the image processing can be carried out by combining the required preset library set by the user, the image processing of differentiation can be carried out on the image based on the attribute information of the image, the requirements of the user can be matched, and the image processing effect can be effectively improved.
Tenth embodiment
Referring to fig. 14, a tenth embodiment of the present application provides an image processing method, based on the eighth embodiment, the method further includes:
step S80: acquiring historical setting information aiming at the preset library;
the history setting information is information of a history setting preset library.
In a case where there are many candidate libraries and a user is used to switch setting of the preset library between different candidate libraries every time image processing is performed, the user may need to frequently query and set the preset library among a large number of candidate libraries, which is cumbersome to operate. In order to solve the problem, the embodiment further obtains history setting information for the preset library, predicts the preset library preferred by the user as the target library according to the history setting information, and displays recommendation information of the target library, so that the user can conveniently determine the target library preferred by the history and set the preset library, and frequent inquiry among a large number of libraries to be selected one by one is avoided.
Alternatively, when it is detected that the set number is greater than the preset number threshold according to the history setting information, step S90 is performed, thereby avoiding the problem of inaccurate recommendation caused by too small amount of data.
Step S90: predicting the preset library preferred by the user as a target library according to the historical setting information;
optionally, according to the history setting information, a preset library with a preset number of highest setting frequency is determined as the target library.
Optionally, a preset library for predicting user preferences is used as the target library according to the historical setting information and the preset neural network prediction model.
Step S100: and displaying the recommendation information of the target library.
The recommendation information is information of a target library that recommends user preferences.
Alternatively, step S80 in the present embodiment may be executed after step S40, or may be executed periodically, or may be executed before step S30. Fig. 14 shows only a schematic diagram performed after step S40, but is not limited thereto.
Optionally, when an instruction for setting a preset library is received, acquiring history setting information for the preset library, predicting the preset library preferred by the user as a target library according to the history setting information, displaying recommendation information of the target library, and generating description information of a candidate library according to the recommendation information of the target library, where the target library may be used as the candidate library, and performing step S30.
Optionally, while step S30 is being performed, recommendation information of the target library is also displayed, which facilitates the user to select the target library to set the preset library.
In the embodiment, historical setting information for the preset library is acquired; predicting the preset library preferred by the user as a target library according to the historical setting information; and displaying the recommendation information of the target library. Therefore, the target library preferred by the user can be recommended to the user, and the preset library preferred by the user can be conveniently set.
The application also provides an intelligent terminal, which comprises a memory and a processor, wherein the memory is stored with an image processing program, and the image processing program is executed by the processor to realize the steps of the image processing method in any embodiment.
The present application further provides a computer-readable storage medium, on which an image processing program is stored, and the image processing program, when executed by a processor, implements the steps of the image processing method in any of the above embodiments.
In the embodiments of the intelligent terminal and the computer-readable storage medium provided in the present application, all technical features of any one of the embodiments of the image processing method may be included, and the expanding and explaining contents of the specification are basically the same as those of the embodiments of the method, and are not described herein again.
Embodiments of the present application also provide a computer program product, which includes computer program code, when the computer program code runs on a computer, the computer is caused to execute the method in the above various possible embodiments.
Embodiments of the present application further provide a chip, which includes a memory and a processor, where the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that a device in which the chip is installed executes the method in the above various possible embodiments.
It is to be understood that the foregoing scenarios are only examples, and do not constitute a limitation on application scenarios of the technical solutions provided in the embodiments of the present application, and the technical solutions of the present application may also be applied to other scenarios. For example, as can be known by those skilled in the art, with the evolution of system architecture and the emergence of new service scenarios, the technical solution provided in the embodiments of the present application is also applicable to similar technical problems.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
The steps in the method of the embodiment of the application can be sequentially adjusted, combined and deleted according to actual needs.
The units in the device in the embodiment of the application can be merged, divided and deleted according to actual needs.
In the present application, the same or similar term concepts, technical solutions and/or application scenario descriptions will be generally described only in detail at the first occurrence, and when the description is repeated later, the detailed description will not be repeated in general for brevity, and when understanding the technical solutions and the like of the present application, reference may be made to the related detailed description before the description for the same or similar term concepts, technical solutions and/or application scenario descriptions and the like which are not described in detail later.
In the present application, each embodiment is described with emphasis, and reference may be made to the description of other embodiments for parts that are not described or illustrated in any embodiment.
The technical features of the technical solution of the present application may be arbitrarily combined, and for brevity of description, all possible combinations of the technical features in the embodiments are not described, however, as long as there is no contradiction between the combinations of the technical features, the scope of the present application should be considered as being described in the present application.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, a controlled terminal, or a network device) to execute the method of at least one embodiment of the present application.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions according to the embodiments of the present application are all or partially generated when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, memory Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.

Claims (15)

1. An image processing method, characterized by comprising the steps of:
s10: acquiring attribute information of an image;
s20: and matching the attribute information with a preset library to obtain image processing parameters, and processing the target portrait area in the image by adopting the image processing parameters.
2. The method of claim 1, wherein the step of S10 includes:
acquiring first characteristic information of at least one portrait area in the image, wherein the first characteristic information comprises the area and/or the position of the portrait area;
selecting the target portrait area from all the portrait areas according to the first characteristic information of at least one portrait area;
and determining the attribute information corresponding to the target portrait area.
3. The method of claim 2, wherein the step of S12 includes:
selecting the area of the portrait area larger than or equal to a preset area and/or the position of the portrait area in a preset area as the target portrait area in all the portrait areas, wherein the first characteristic information comprises the area of the portrait area and the position of the portrait area;
the preset area is determined according to the maximum area of the portrait area, and the preset area is a preset central area of the image.
4. The method of claim 1, wherein the step of S10 includes:
acquiring the color of a pixel point of at least one portrait area in the image;
comparing the pixel point color of at least one portrait area with a preset skin color library to obtain the portrait skin color of at least one portrait area, wherein the portrait information comprises the portrait skin color.
5. The method of claim 1, wherein the step of S10 includes:
identifying a skin region in the image;
determining skin particle points according to the brightness difference between every two pixel points in the skin area;
and determining the portrait skin of the image according to the interval where the number of the skin particle points is located, wherein the portrait information comprises the portrait skin.
6. The method of claim 1, wherein the step of S10 includes:
acquiring second characteristic information of at least one portrait area in the image, wherein the second characteristic information comprises portrait area brightness and background area brightness;
and determining a light angle corresponding to at least one portrait area according to the second characteristic information, wherein the environment information comprises the light angle.
7. The method of claim 6, wherein determining the ray angle corresponding to at least one of the portrait areas according to the second feature information comprises:
determining the face part brightness of at least one portrait area according to the portrait area brightness of the portrait area;
determining a brightness value difference between every two face parts according to the face part brightness of at least one portrait region;
and determining the light angle according to the brightness of the portrait area of at least one portrait area, the brightness value difference between every two facial parts and the brightness of the background area, wherein the light angle is a forward light, a backward light or a side light.
8. The method of claim 1, wherein the step of S20 includes:
determining the attribute information corresponding to at least one target portrait region in the image;
respectively matching at least one attribute information with the preset library to obtain at least one image processing parameter corresponding to the target portrait area;
processing at least one target portrait area by adopting the image processing parameters corresponding to the target portrait area;
and/or forming an interval group according to the interval where at least one attribute value in the attribute information is located;
inquiring the image processing parameters corresponding to the interval groups in the preset library;
and processing the target portrait area in the image by adopting the image processing parameters.
9. An image processing method, characterized by comprising the steps of:
s30: displaying the description information of at least one candidate library;
s40: and if a determination instruction for the description information is received, processing a pre-target image according to the library to be selected corresponding to the determination instruction.
10. The method of claim 9, wherein after the step of S30, the method further comprises:
if a preview instruction for the description information is received, processing the target image according to the attribute information of the candidate library and the target image corresponding to the preview instruction to obtain a preview image; and displaying the preview image.
11. The method of claim 9, wherein prior to the step of S30, the method further comprises:
acquiring a preset image and a preset identifier corresponding to each library to be selected;
and generating the description information corresponding to each candidate bank according to the preset image corresponding to each candidate bank and the preset identification.
12. The method of claim 9, wherein after the step of S40, further comprising:
acquiring attribute information of an image to be processed;
matching the preset library with the attribute information of the image to be processed to obtain target image processing parameters;
and processing the target portrait area in the image to be processed by adopting the target image processing parameters.
13. The method of claim 9, wherein the method further comprises:
acquiring historical setting information aiming at the preset library;
predicting the preset library preferred by the user as a target library according to the historical setting information;
and displaying the recommendation information of the target library.
14. An intelligent terminal, characterized in that, intelligent terminal includes: memory, a processor, wherein the memory has stored thereon an image processing program which, when executed by the processor, implements the steps of the image processing method of any of claims 1 to 13.
15. A readable storage medium, characterized in that the readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the image processing method according to any one of claims 1 to 13.
CN202111608757.5A 2021-12-24 2021-12-24 Image processing method, intelligent terminal and storage medium Pending CN114333001A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111608757.5A CN114333001A (en) 2021-12-24 2021-12-24 Image processing method, intelligent terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111608757.5A CN114333001A (en) 2021-12-24 2021-12-24 Image processing method, intelligent terminal and storage medium

Publications (1)

Publication Number Publication Date
CN114333001A true CN114333001A (en) 2022-04-12

Family

ID=81013757

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111608757.5A Pending CN114333001A (en) 2021-12-24 2021-12-24 Image processing method, intelligent terminal and storage medium

Country Status (1)

Country Link
CN (1) CN114333001A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024055333A1 (en) * 2022-09-16 2024-03-21 深圳传音控股股份有限公司 Image processing method, smart device, and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024055333A1 (en) * 2022-09-16 2024-03-21 深圳传音控股股份有限公司 Image processing method, smart device, and storage medium

Similar Documents

Publication Publication Date Title
CN107959795B (en) Information acquisition method, information acquisition equipment and computer readable storage medium
CN111935402B (en) Picture shooting method, terminal device and computer readable storage medium
CN107885448B (en) Control method for application touch operation, mobile terminal and readable storage medium
CN107644396B (en) Lip color adjusting method and device
CN111885307A (en) Depth-of-field shooting method and device and computer readable storage medium
CN112463275A (en) Data processing method, terminal and storage medium
CN114037692A (en) Image processing method, mobile terminal and storage medium
CN109639981B (en) Image shooting method and mobile terminal
CN113126844A (en) Display method, terminal and storage medium
CN114333001A (en) Image processing method, intelligent terminal and storage medium
CN112598678A (en) Image processing method, terminal and computer readable storage medium
CN108388389B (en) Interactive interface control method, mobile terminal and computer storage medium
CN115665551A (en) Processing method, intelligent terminal and storage medium
CN115617297A (en) Processing method, intelligent terminal and storage medium
CN114549544A (en) Image processing method, intelligent terminal and storage medium
CN112532838B (en) Image processing method, mobile terminal and computer storage medium
CN114845044A (en) Image processing method, intelligent terminal and storage medium
CN114092366A (en) Image processing method, mobile terminal and storage medium
CN114900613A (en) Control method, intelligent terminal and storage medium
CN114723645A (en) Image processing method, intelligent terminal and storage medium
CN113867586A (en) Icon display method, intelligent terminal and storage medium
CN112990020A (en) AR effect processing method, mobile terminal and readable storage medium
CN113590069A (en) Switching method, mobile terminal and storage medium
CN113676658A (en) Photographing method, mobile terminal and readable storage medium
CN113194227A (en) Processing method, mobile terminal and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication