Image processing method, intelligent terminal and storage medium
By displaying the color blocks of the target area of the image on the smart terminal and allowing users to edit, the color recommendation is solved based on color information and object attributes, and the accuracy and convenience in image color adjustment are achieved, and efficient image color editing is achieved.
Patent Information
- Application Number
- CN202411071607.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-12-13
AI Technical Summary
Existing smart terminals are difficult to achieve precision and easy operation when adjusting image color, resulting in problems such as color offset and cumbersome operation.
By displaying the color blocks of the target area of the image, users are allowed to edit the pixel units mapped by the color block, recommend the initial recommended color based on the color information and object attributes of the target area, and adjust the color through the color editing control to achieve accurate editing of the image color .
It improves the accuracy and operational convenience of image color editing, improves the user experience, and meets users' needs for refinement of image color.
Smart Images

Figure CN119131185A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to an image processing method, an intelligent terminal and a storage medium. Background Art
[0002] Most smart terminals (such as mobile phones, etc.) are equipped with photo album and camera functions for users to browse images and take new images.
[0003] In the process of conceiving and implementing the present application, the inventors discovered that there are at least the following problems: in some implementations, users can adjust the color temperature, hue and saturation of the images in the album, but the aforementioned adjustments are all overall adjustments to the image, which can easily cause color casts in the details of the image, making it difficult to meet users' demands for increasingly fine and precise colors in the image, or the operation is cumbersome and inconvenient. Therefore, how to achieve precise editing of image colors and / or how to conveniently edit image colors are technical problems that technical personnel in this field urgently need to solve.
[0004] The preceding description is intended to provide general background information and does not necessarily constitute prior art. Summary of the invention
[0005] In response to the above technical problems, the present application provides an image processing method, an intelligent terminal and a storage medium, which enable users to edit the image color accurately, and / or the operation is simple, intuitive and convenient, which can enhance the user experience.
[0006] The present application provides an image processing method, which can be applied to a smart terminal, comprising the steps of:
[0007] S1: In response to an editing operation on the current image, display a color block corresponding to a target area of the current image;
[0008] S2: In response to the editing operation on the color block, color editing is performed on the pixel units mapped by the color block to adjust the color of the current image.
[0009] Optionally, in response to the editing operation on the current image, at least one of the following is included:
[0010] In response to an edit operation on the current image in the album;
[0011] Responding to an editing operation on the current image in the camera preview interface.
[0012] Optionally, step S1 includes: based on the color information of the target area, displaying at least one target color by using a preset number of color blocks.
[0013] Optionally, the method further includes: in response to the switching operation, changing the target color displayed by part or all of the color blocks based on the color information of the target area.
[0014] Optionally, the method further includes: identifying attributes of an object in the target area based on the target color of the color block, and recommending an edited color based on the object attributes.
[0015] Optionally, recommending and editing colors based on object attributes includes: obtaining an initial recommended color based on the object attributes, and preferentially displaying the initial recommended color and / or approximate recommended colors with a color scale close to the initial recommended color through a color editing control.
[0016] Optionally, the method further comprises: in response to selection of a recommended color, replacing the color of the pixel unit mapped by the color block with the selected recommended color.
[0017] Optionally, the method further comprises: in response to the selection of the recommended color temperature, performing white balance adjustment or color tone adjustment on the pixel unit mapped by the color block.
[0018] Optionally, the method further comprises: in response to the color editing record, performing corresponding color editing on the album image or the camera preview image that matches the image attribute corresponding to the current image.
[0019] Optionally, the method for acquiring the target area includes at least one of the following:
[0020] Use edge recognition algorithm to perform recognition operation on the current image to obtain the target area;
[0021] In response to the selection operation, a target area is acquired.
[0022] The present application also provides an image processing method, including the steps of: S21: in response to an editing operation on a current image in an album, pixelating a target area of the current image to obtain a pixel unit array that presents colors; S22: determining a preset number of target colors based on the distribution ratio of pixel units of all colors in the pixel unit array, and displaying them through a preset number of color blocks; S23: in response to a selection operation of a target color block, identifying object properties in a target area based on the target color of the target color block, and obtaining an initial recommended color based on the object properties to preferentially display the initial recommended color through a color editing control; S24: in response to a color selection of the color editing control, color editing the pixel unit mapped by the target color block to adjust the color of the current image.
[0023] The present application also provides an intelligent terminal, including: a memory and a processor, wherein an image processing program is stored in the memory, and when the image processing program is executed by the processor, the steps of any of the above image processing methods are implemented.
[0024] The present application also provides a storage medium storing a computer program, which implements the steps of any of the above image processing methods when executed by a processor.
[0025] The present application provides an image processing method, a smart terminal and a storage medium. The image processing method can be applied to a smart terminal, and includes the following steps: S1: in response to an editing operation on a current image, display a color block corresponding to a target area of the current image; S2: in response to an editing operation on a color block, perform color editing on a pixel unit mapped by the color block to adjust the color of the current image. Through the technical solution of the present application, when an editing demand is triggered on an image, a color editing color block of the entire area or a local area of the image can be displayed, so that the user can conveniently and intuitively edit the color of the entire area or a local area of the image by controlling the displayed color editing color block. Through the technical solution of the present application, the user can perform precise and detailed image color editing on the image, and / or the operation is simple, intuitive and convenient, which can enhance the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application. In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor.
[0027] Figure 1 A schematic diagram of the hardware structure of a mobile terminal for implementing various embodiments of the present application;
[0028] Figure 2 A communication network system architecture diagram provided for an embodiment of the present application;
[0029] Figure 3 is a flowchart of an image processing method according to a first embodiment;
[0030] Figure 4 is a flowchart of an image processing method according to a second embodiment;
[0031] Figure 5 It is a schematic diagram of an operating interface of an image processing method according to an example of the present application.
[0032] The realization of the purpose, functional features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. The above-mentioned drawings have shown clear embodiments of this application, which will be described in more detail later. These drawings and textual descriptions are not intended to limit the scope of the concept of this application in any way, but to illustrate the concept of this application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0033] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0034] It should be noted that, in this article, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element. In addition, components, features, and elements with the same name in different embodiments of the present application may have the same meaning or different meanings, and their specific meanings need to be determined by their explanation in the specific embodiment or further combined with the context of the specific embodiment.
[0035] It should be understood that, although the terms first, second, third, etc. may be used to describe various information in this article, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this article, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination". Furthermore, as used in this article, the singular forms "one", "one" and "the" are intended to also include plural forms, unless there is an opposite indication in the context. It should be further understood that the terms "comprising" and "including" indicate that there are the described features, steps, operations, elements, components, projects, kinds, and / or groups, but do not exclude the existence, occurrence or addition of one or more other features, steps, operations, elements, components, projects, kinds, and / or groups. The terms "or", "and / or", "including at least one of the following" etc. used in this application can be interpreted as inclusive, or mean any one or any combination. For example, “comprising at least one of the following: 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”, and for another 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 only occur when a combination of elements, functions, steps or operations are inherently mutually exclusive in some manner.
[0036] It should be understood that, although the various steps in the flowchart in the embodiment of the present application are displayed in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and it can be performed in other orders. Moreover, at least a portion of the steps in the figure may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and their execution order is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0037] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0038] It should be noted that in this article, step codes such as S1 and S2 are used for the purpose of expressing the corresponding content more clearly and concisely, and do not constitute a substantial limitation on the order. When implementing the step, those skilled in the art may execute S2 first and then S1, etc., but these should all be within the scope of protection of this application.
[0039] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0040] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present application and have no specific meaning. Therefore, "module", "component" or "unit" can be used in a mixed manner.
[0041] The intelligent terminal may be implemented in various forms. For example, the intelligent terminal described in the present application may include intelligent terminals such as mobile phones, tablet computers, laptop computers, PDAs, portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, etc., as well as fixed terminals such as digital TVs and desktop computers.
[0042] The following description will be made by taking a mobile terminal as an example, and those skilled in the art will understand that, in addition to components specifically used for mobile purposes, the construction according to the embodiments of the present application can also be applied to fixed-type terminals.
[0043] See also Figure 1 , which is a schematic diagram of the 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 and other components. Those skilled in the art can understand that Figure 1 The structure of the mobile terminal shown in the figure does not constitute a limitation on the mobile terminal. The mobile terminal may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0044] Combine the following Figure 1 The following is a detailed introduction to the various components of the mobile terminal:
[0045] The radio frequency unit 101 can be used for receiving and sending signals during information transmission or communication. Specifically, after receiving the downlink information of the base station, it is sent to the processor 110 for processing; in addition, the uplink data is sent to the base station. Generally, the 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, etc. In addition, the radio frequency unit 101 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile Communications), GPRS (Generic 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), and the like. ion, time-division duplex long-term evolution), 5G and 6G, etc.
[0046] WiFi is a short-range wireless transmission technology. The mobile terminal can help users send and receive emails, browse web pages and access streaming media through the WiFi module 102. It provides users with wireless broadband Internet access. Figure 1 The WiFi module 102 is shown, but it is understandable that it is not an essential component of the mobile terminal and can be omitted as needed without changing the essence of the invention.
[0047] The audio output unit 103 can convert the audio data received by the RF unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output it as sound when the mobile terminal 100 is in a call signal reception mode, a talk mode, a recording mode, a voice recognition mode, a broadcast reception mode, etc. Moreover, the audio output unit 103 can also provide audio output related to a specific function performed by the mobile terminal 100 (for example, a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, etc.
[0048] The A / V input unit 104 is used to receive audio or video signals. The A / V input unit 104 may include a graphics processor (GPU) 1041 and a microphone 1042, and the graphics processor 1041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The processed image frame can be displayed on the display unit 106. The image frame processed by the graphics processor 1041 can be stored in the memory 109 (or other storage medium) or sent via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) via the microphone 1042 in a telephone call mode, a recording mode, a voice recognition mode, and other operating modes, and can process such sound into audio data. The processed audio (voice) data can be converted into a format output that can be sent to a mobile communication base station via the radio frequency unit 101 in the case of a telephone 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 process of receiving and transmitting audio signals.
[0049] 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 and a proximity sensor. Optionally, the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 1061 and / or the backlight when the mobile terminal 100 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured on the mobile phone, such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.
[0050] The display unit 106 is used to display information input by the user or information provided to the user. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0051] The user input unit 107 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile terminal. Optionally, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 1071 or near the touch panel 1071 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. The touch panel 1071 may include two parts: a touch detection device and a touch controller. Optionally, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 110, and can receive and execute the command sent by the processor 110. In addition, the touch panel 1071 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may further include other input devices 1072. Optionally, the other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, a function key (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, etc., which are not specifically limited here.
[0052] Optionally, the touch panel 1071 may cover the display panel 1061. When the touch panel 1071 detects a touch operation on or near it, it transmits the information to the processor 110 to determine the type of touch event. Then, the processor 110 provides corresponding visual output on the display panel 1061 according to the type of touch event. Figure 1 In the figure, the touch panel 1071 and the display panel 1061 are used as two independent components to implement the input and output functions of the mobile terminal. However, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to implement the input and output functions of the mobile terminal, which is not limited here.
[0053] The interface unit 108 serves as an interface through which at least one external device can be 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 with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device 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 an external device.
[0054] The memory 109 can be used to store software programs and various data. The memory 109 can mainly include a program storage area and a data storage area. Optionally, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 109 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0055] The processor 110 is the control center of the mobile terminal. It uses various interfaces and lines to connect various parts of the entire mobile terminal. It executes various functions of the mobile terminal and processes data by running or executing software programs and / or modules stored in the memory 109, and calling data stored in the memory 109, so as to monitor the mobile terminal as a whole. The 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 processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 110.
[0056] The mobile terminal 100 may also include a power supply 111 (such as a battery) for supplying power to various components. Preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system.
[0057] although Figure 1 Not shown, the mobile terminal 100 may further include a Bluetooth module, etc., which will not be described in detail here.
[0058] In order to facilitate understanding of the embodiments of the present application, the communication network system on which the mobile terminal of the present application is based is described below.
[0059] See also Figure 2 , Figure 2 A communication network system architecture diagram is provided for an embodiment of the present application, wherein the communication network system is an LTE system of universal mobile communication technology, and the LTE system includes a UE (User Equ i pment) 201, an E-UTRAN (Evolved UMTS Terrestrial Rad i oAccess Network) 202, an EPC (Evolved Packet Core) 203 and an operator's IP service 204, which are connected in sequence for communication.
[0060] Optionally, UE201 may be the above-mentioned terminal 100, which will not be described in detail here.
[0061] E-UTRAN 202 includes eNodeB 2021 and other eNodeBs 2022, etc. Optionally, eNodeB 2021 may be connected to other eNodeBs 2022 via a backhaul (eg, an X2 interface), and eNodeB 2021 is connected to EPC 203, and eNodeB 2021 may provide UE 201 with access to EPC 203.
[0062] EPC203 may include MME (Mobility Management Entity) 2031, HSS (Home Subscriber Server) 2032, other MME 2033, SGW (Serving Gateway) 2034, PGW (PDN Gate Way) 2035 and PCRF (Policy and Rate Function) 2036. Optionally, MME 2031 is a control node for processing signaling between UE 201 and EPC 203, providing bearer and connection management. HSS 2032 is used to provide some registers to manage functions such as home location register (not shown), and save some user-specific information such as service features and data rates. All user data can be sent through SGW2034, PGW2035 can provide IP address allocation and other functions for UE 201, PCRF2036 is the policy and charging control policy decision point for service data flow and IP bearer resources, which selects and provides available policy and charging control decisions for the policy and charging execution function unit (not shown in the figure).
[0063] The IP service 204 may include the Internet, an intranet, an IMS (IP Multimedia Subsystem, IP Multimedia Subsystem) or other IP services.
[0064] Although the above introduction takes the LTE system as an example, those skilled in the art should know that the present application is not only applicable to the LTE system, but also to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, 5G and future new network systems (such as 6G), etc., without limitation here.
[0065] Based on the above-mentioned mobile terminal hardware structure and communication network system, various embodiments of the present application are proposed.
[0066] First embodiment
[0067] Reference Figure 3 , Figure 3 is a flowchart of an image processing method according to the first embodiment. The image processing method of the embodiment of the present application can be applied to a smart terminal (such as a mobile phone), including the following steps S1 and S2:
[0068] Step S1: In response to an editing operation on a current image, a color block corresponding to a target area of the current image is displayed.
[0069] Optionally, the editing operation on the current image may represent various operations that trigger the display of the color block, including but not limited to at least one of a click operation of a control, a gesture, a sliding track, pressing of a physical key, a voice command, etc.
[0070] Optionally, the target area of the current image may represent the entire area or a partial area of the current image. Optionally, the partial area may be a display area of one or more object elements (or image content) contained in the current image.
[0071] Optionally, a color block may represent one or more colors.
[0072] Optionally, the color represented by the color block may be the same as, similar to, or completely different from the original color displayed by a certain pixel unit in the target area.
[0073] Optionally, in response to the editing operation on the current image, at least one of the following is included but is not limited to:
[0074] In response to an edit operation on the current image in the album;
[0075] Responding to an editing operation on the current image in the camera preview interface.
[0076] Optionally, displaying the color block of the target area corresponding to the current image includes: displaying at least one target color through a preset number of color blocks based on the color information of the target area. In this way, the present embodiment can map and display one or more target colors in the target area through one or more color blocks, so as to facilitate the subsequent convenient and intuitive editing of the color of the target area based on the one or more color blocks to meet user needs.
[0077] Optionally, the color information of the target area may represent information related to the color presented in the target area. Optionally, the color information of the target area includes at least one of the distribution ratio of some or all colors in the target area, a set of iconic colors corresponding to an image attribute corresponding to the current image, and the like.
[0078] Optionally, based on the color information of the target area, the step of displaying at least one target color through a preset number of color blocks includes: obtaining a color sorting result based on the distribution ratio of all colors in the target area and a preset sorting rule; obtaining a preset number of target colors from the color sorting result, and displaying them through a preset number of color blocks. Through the technical solution of this embodiment, one or more color blocks with representative colors can be displayed from large to small according to the color ratio for subsequent editing; or based on the color sorting result, the color corresponding to the middle ratio is determined, and according to the color corresponding to the middle ratio, a preset number of target colors whose color ratio is greater than and / or equal to the middle ratio is determined to be displayed through a preset number of color blocks, or according to the color corresponding to the middle ratio, a preset number of target colors whose color ratio is less than and / or equal to the middle ratio is determined to be displayed through a preset number of color blocks. In this way, the technical solution of this embodiment can make the colors displayed by the preset number of color blocks closer to the required colors that the user wants to edit based on the color sorting result, so that the user can complete the color editing of the current image more quickly.
[0079] Optionally, based on the color information of the target area, the step of displaying at least one target color through a preset number of color blocks includes: obtaining the image attributes of the current image, or obtaining the image attributes of the target area of the current image; determining at least one iconic color corresponding to the image attributes from the target area to obtain an iconic color set; obtaining a color sorting result based on the distribution ratio of all colors in the iconic color set and a preset sorting rule; obtaining a preset number of target colors from the color sorting result, and displaying them through a preset number of color blocks. In this way, the technical solution of this embodiment can identify the image attributes based on the current image, predict the required color that the user wants to edit based on the image attributes, and display it through a preset number of color blocks, so that the user can complete the color editing of the current image more quickly and conveniently.
[0080] Optionally, the image attributes of the target area of the current image include, but are not limited to, object attributes of object elements in the target area.
[0081] Optionally, the preset number of color blocks may be determined based on factors affecting the display quantity.
[0082] Optionally, factors affecting the display quantity include but are not limited to at least one of the screen size of the smart terminal, the display interface size of the current image, the number of target areas, the number of object elements in the target area, the number of colors in the target area that exceed a preset proportion, etc.
[0083] Optionally, the image attribute of the current image is obtained, or the image attribute of the target area of the current image is obtained, and at least one iconic color corresponding to the image attribute is determined from the target area to obtain the iconic color set. For ease of understanding, some examples are provided below for illustration:
[0084] (1) when the image attribute of the current image is identified as a seaside image by image recognition technology, at least one blue, at least one white, and at least one yellow in the current image are used as iconic colors to obtain an iconic color set;
[0085] (2) when the image attribute of the target area of the current image is identified as a beach image by the image recognition technology, at least one white color and at least one yellow color in the current image are used as the iconic colors to obtain the iconic color set;
[0086] (3) when the image attribute of the current image is identified as a sunset image by image recognition technology, at least one red, at least one yellow, and at least one blue in the current image are used as iconic colors to obtain an iconic color set;
[0087] (4) When the image attribute of the target area of the current image is identified as a snow mountain image through image recognition technology, at least one gray, at least one white, and at least one blue in the current image are used as representative colors to obtain a set of iconic colors.
[0088] Optionally, the method further includes: acquiring a target area of the current image.
[0089] Optionally, the method for acquiring the target area includes at least one of the following:
[0090] Use edge recognition algorithm to perform recognition operation on the current image to obtain the target area;
[0091] In response to the selection operation, a target area is acquired.
[0092] Optionally, an edge recognition algorithm is used to perform a recognition operation on the current image to obtain a target area, including: identifying at least one object element in the current image through an image recognition algorithm; and using an edge recognition algorithm to identify edges of the object element to obtain the target area.
[0093] Optionally, the area inside the edge of the object element is the target area. For example, if a flower image is identified from the current image by an image recognition algorithm, the edge of the flower image is identified by an edge recognition algorithm to obtain the target area, so that the flower image in the current image can be finely edited by color blocks; or for example, if a face image is identified from the current image by an image recognition algorithm, the edge of the face image is identified by an edge recognition algorithm to obtain the target area, so that the face image in the current image can be finely edited by color blocks.
[0094] Optionally, the technical solution of this embodiment can quickly determine one or more target areas through an edge recognition algorithm, so that the user can edit the color of a target area by displaying a preset number of color blocks, or the user can edit the color of multiple target areas by displaying a preset number of color blocks. In this way, the technical solution of this embodiment can improve the user's color editing efficiency for the current image.
[0095] Optionally, in the case where color editing is performed on multiple target areas by displaying a preset number of color blocks, each target area may correspond to at least one color block.
[0096] Optionally, all color blocks corresponding to different target areas may be different.
[0097] Optionally, all color blocks corresponding to a target area may include color blocks shared with other target areas.
[0098] Optionally, in response to the selection operation, to obtain the target area, for example, the user can perform a frame selection operation on the current image to obtain the target area; or, for example, in response to the selection operation, to determine the selected area, and use an edge recognition algorithm to perform a recognition operation on the selected area to determine the object elements in the selected area, thereby obtaining the target area. In this way, the technical solution of this embodiment can accurately identify the target area that the user needs to edit through the selection operation, so that the user can perform refined color editing on the current image.
[0099] Optionally, the method further includes (such as after step S1): in response to the switching operation, based on the color information of the target area, changing the target color displayed by some or all color blocks. Therefore, the technical solution of this embodiment can, in response to the switching operation, switch all or part of the colors represented by all the currently displayed color blocks to other colors for the user to select and edit when the color represented by the currently displayed color block does not meet the user's needs.
[0100] Optionally, the method further includes (such as after step S1): based on the target color of the color block, identifying the attributes of an object in the target area, and recommending an edited color based on the object attributes.
[0101] Optionally, the target color may represent the color currently represented by the color block.
[0102] Optionally, the object attributes correspond to features of object elements in the current image.
[0103] Optionally, the object attribute includes but is not limited to at least one of an object category, an object name, a feature description tag of the object, and the like.
[0104] Optionally, the edited color may represent other colors for the color block to switch the currently represented color.
[0105] Optionally, the editing color is recommended based on the object attributes, including but not limited to at least one of the following:
[0106] Collect and analyze big data based on object attributes to obtain the editing color corresponding to the object attributes;
[0107] Based on the object attributes and the pre-trained color matching model, the editing color corresponding to the object attributes is obtained;
[0108] Based on the object attribute and preset object-color recommendation relationship information, an edit color corresponding to the object attribute is obtained. Optionally, the preset object-color recommendation relationship information includes a correspondence between the object attribute and at least one color.
[0109] The technical solution of this embodiment can identify the object attributes corresponding to the object elements in the current image, and thus recommend preferred editing colors or those that are closer to the actual color or color temperature of the object elements based on the object attributes for user selection, thereby facilitating users to quickly perform intuitive and convenient refined color editing of the current image.
[0110] Optionally, recommending and editing colors based on object attributes includes: obtaining an initial recommended color based on the object attributes, and preferentially displaying the initial recommended color and / or approximate recommended colors with a color scale close to the initial recommended color through a color editing control.
[0111] Optionally, the initially recommended color may be one or more colors among all edit colors recommended based on the object attributes.
[0112] Optionally, the initially recommended color may be an optimal edited color recommended based on the object attributes or a color closest to the real color or color temperature of the object element.
[0113] Optionally, the initial recommended color may be one or more colors close to the color scale of the color currently represented by a color block, which may be represented as a recommended color temperature, and may subsequently be used to adjust the overall or partial white balance or hue of the current image.
[0114] Optionally, the user can trigger an editing operation on the color block through the color editing control to switch the edited color one level at a time or across multiple levels based on the initial recommended color, thereby facilitating the user to intuitively determine the target color that needs to be adjusted for the pixel unit mapped by the color block.
[0115] Optionally, the color editing control may also preferentially display approximate recommended colors that are close to the color scale of the target color, which may be characterized as the color editing control displaying the recommended color temperature.
[0116] Optionally, the color editing control includes but is not limited to a color palette, a color wheel, a scrolling hue ring, etc.
[0117] Step S2: In response to the editing operation on the color block, color editing is performed on the pixel units mapped by the color block to adjust the color of the current image.
[0118] Optionally, the editing operation on the color block may be a switching operation on the color currently represented by the color block. Optionally, the editing operation on the color block may be a selection operation on the recommended color displayed by the color editing control.
[0119] Optionally, the pixel units mapped by the color block are color-edited to adjust the color of the current image. When the color of the color block is switched, the pixel units mapped by the color block in the target area are color-switched accordingly. Thus, the color or color temperature of the target area is adjusted by switching the color of at least part of the pixel units in the target area, thereby achieving fine-grained adjustment of the overall or local color or color temperature of the current image.
[0120] Optionally, the aforementioned color temperature adjustment is a case of color regulation.
[0121] Optionally, the aforementioned color temperature adjustment may be to adjust the target color currently represented by the color block to other colors with a color scale similar to the target color, such as fine-tuning the target color currently represented by the color block, which is manifested as white balance adjustment or hue adjustment.
[0122] Optionally, the method further includes: in response to the selection of the recommended color, replacing the color of the pixel unit mapped by the color block with the selected recommended color. In this way, the present embodiment can intuitively adjust the color of the pixel unit to any color through the color block, which can meet the user's demand for true color restoration or the demand for personalized secondary creation of the current image (for example, adjusting the initial color of the pixel unit to other colors with greater contrast).
[0123] Optionally, the method further includes: in response to the selection of the recommended color temperature, adjusting the white balance or the color tone of the pixel unit mapped by the color block. In this way, the present embodiment can intuitively fine-tune the color of the pixel unit through the color block to achieve white balance adjustment or color tone adjustment, which can meet the user's demand for true color restoration or the demand for colors close to the user's favorites (for example, adjusting the initial color of the pixel unit to other colors with greater contrast).
[0124] Optionally, the method further comprises: in response to the color editing record, performing corresponding color editing on the album image or the camera preview image that matches the image attribute corresponding to the current image.
[0125] Optionally, the method further includes (such as after step S2): obtaining a color editing record of the current image; and in response to the color editing record, performing corresponding color editing on the album image or camera preview image that matches the image attribute corresponding to the current image. In this way, the technical solution of this embodiment can realize convenient color editing of other images in the album or camera preview images, improve the color editing efficiency of other images, and further improve the user experience.
[0126] Optionally, the method further includes (such as after step S2): obtaining a color editing record of the current image; adding the color editing record to a learning database to update the learning database; performing data analysis and deep learning based on the learning database to obtain color editing preference information corresponding to image attributes (such as the aforementioned object-color recommendation relationship information); performing color editing on some or all images in the album or performing color editing or color editing recommendations on camera preview images according to the color editing preference information. In this way, the technical solution of this embodiment can perform deep learning based on the color editing record to identify user preferences or camera defects, so that the color of the album or camera can be corrected to match the user's personalized needs and improve the user experience.
[0127] Optionally, the image processing method provided in this embodiment can also be applied to skin color editing and background color editing scenarios of target objects.
[0128] Through the technical solution of this embodiment, users can edit the color of images accurately and meticulously, and / or the operation is simple, intuitive and convenient, which can improve the user experience.
[0129] Second embodiment
[0130] Reference Figure 4 , Figure 4 : is a flow chart of an image processing method according to the second embodiment. The image processing method of the embodiment of the present application can be applied to a smart terminal (such as a mobile phone), and includes the following steps:
[0131] S21: In response to an editing operation on a current image in the album, pixelate a target area of the current image to obtain a pixel unit array presenting color.
[0132] S22: Determine a preset number of target colors based on the distribution ratio of pixel units of all colors in the pixel unit array, and display them through a preset number of color blocks.
[0133] S23: In response to the selection operation of the target color block, based on the target color of the target color block, identifying the object attributes in the target area, and obtaining an initial recommended color based on the object attributes to preferentially display the initial recommended color through the color editing control.
[0134] S24: In response to the color selection of the color editing control, color editing is performed on the pixel units mapped by the target color block to adjust the color of the current image.
[0135] Figure 5 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110 The recommended colors in 10 are shown (recommended color 040, recommended color 041, recommended color 042, recommended color 043, recommended color 044, recommended color 045, recommended color 046, recommended color 047, recommended color 048, recommended color 049). Optionally, the recommended color 041 at the top is the initial recommended color. In response to the color selection of the scrolling hue ring, the pixel unit mapped by the fourth color block 04 is edited to the recommended color 041 to adjust the color of the current image. After adjusting to a satisfactory color, the color editing is completed and the edited image is saved.
[0136] Optionally, the method also includes (such as after step S24): obtaining a color editing record of the current image; in response to the color editing record, performing corresponding color editing or recommending editing colors on an album image or a camera preview image that matches image attributes corresponding to the current image.
[0137] Optionally, the specific implementation of the image processing method provided in this embodiment can be arbitrarily combined without conflicting with the image processing method of the first embodiment, and will not be described in detail here.
[0138] The image processing method provided in this embodiment can, when triggering the editing demand for an image, make the colors displayed by the preset number of color blocks closer to the required colors that the user wants to edit based on the distribution ratio of the pixel units of all colors in the pixel unit array, so that the user can complete the color editing of the current image more quickly. And / or, through the technical solution of this embodiment, the color editing control can give priority to displaying recommended colors, which can facilitate users to intuitively select editing colors and improve editing efficiency.
[0139] An embodiment of the present application further provides an intelligent terminal, including a memory and a processor. An image processing program is stored in the memory. When the image processing program is executed by the processor, the steps of the image processing method in any of the above embodiments are implemented.
[0140] An embodiment of the present application further provides a storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the image processing method in any of the above embodiments are implemented.
[0141] In the embodiments of the smart terminal and storage medium provided in the present application, all technical features of any of the above-mentioned image processing method embodiments may be included, and the expanded and explained contents of the specification are basically the same as those of the embodiments of the above-mentioned methods, and will not be repeated here.
[0142] An embodiment of the present application further provides a computer program product, which includes a computer program code. When the computer program code runs on a computer, the computer executes the methods in the above various possible implementation modes.
[0143] An embodiment of the present application also provides a chip, including a memory and a processor, wherein 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 equipped with the chip executes the methods in various possible implementation modes as described above.
[0144] It is understood that the above scenarios are only examples and do not constitute a limitation on the application scenarios of the technical solutions provided in the embodiments of the present application. The technical solutions of the present application can also be applied to other scenarios. For example, it is known to those skilled in the art that with the evolution of the system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0145] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0146] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs.
[0147] The units in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.
[0148] In the present application, the same or similar terminology concepts, technical solutions and / or application scenario descriptions are generally described in detail only the first time they appear. When they appear again later, they are generally not repeated for the sake of brevity. When understanding the technical solutions and other contents of the present application, for the same or similar terminology concepts, technical solutions and / or application scenario descriptions that are not described in detail later, reference can be made to the previous related detailed descriptions.
[0149] In the present application, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0150] The various technical features of the technical solution of the present application can be arbitrarily combined. In order to make the description concise, not all possible combinations of the various technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of the present application.
[0151] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, a controlled terminal, or a network device, etc.) to execute the method of each embodiment of the present application.
[0152] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can 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. When loading and executing computer program instructions on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. Computer instructions can be stored in a storage medium, or transmitted from one storage medium to another storage medium. For example, computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that contains one or more available media integrated. Available media can be magnetic media, (e.g., floppy disk, storage disk, tape), optical media (e.g., DVD), or semiconductor media (e.g., solid-state storage disk So lid State Dis sk (SSD)), etc.
[0153] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. An image processing method, characterized in that: Includes steps: S1: In response to an editing operation on a current image, displaying a color block corresponding to a target area of the current image; S2: In response to the editing operation on the color block, color editing is performed on the pixel units mapped by the color block to adjust the color of the current image.
2. The image processing method according to claim 1, characterized in that: In response to the editing operation on the current image, at least one of the following is included: In response to an edit operation on the current image in the album; Responding to an editing operation on the current image in the camera preview interface.
3. The image processing method according to claim 1, characterized in that: Step S1 includes: Based on the color information of the target area, at least one target color is displayed through a preset number of color blocks.
4. The image processing method according to claim 2, characterized in that: Also includes at least one of the following: In response to the switching operation, based on the color information of the target area, the target color displayed by part or all of the color blocks is changed; Based on the target color of the color block, the object attributes in the target area are identified, and the edited color is recommended based on the object attributes.
5. The image processing method according to claim 4, characterized in that: Also includes at least one of the following: Recommending and editing colors based on object attributes includes: obtaining an initial recommended color based on the object attributes, and preferentially displaying the initial recommended color and / or an approximate recommended color with a color scale close to the initial recommended color through a color editing control; In response to the selection of the recommended color, the color of the pixel unit mapped by the color block is replaced with the selected recommended color; In response to the selection of the recommended color temperature, white balance adjustment or color tone adjustment is performed on the pixel units mapped by the color blocks.
6. The image processing method according to any one of claims 1 to 5, characterized in that: Also includes: In response to the color editing record, the album image or the camera preview image that matches the image attribute corresponding to the current image is color edited accordingly.
7. The image processing method according to any one of claims 1 to 5, characterized in that: The method for acquiring the target area includes at least one of the following: Using an edge recognition algorithm to perform a recognition operation on the current image to obtain the target area; In response to the selection operation, the target area is acquired.
8. An image processing method, characterized in that: Includes steps: S21: in response to an editing operation on a current image in the album, pixelating a target area of the current image to obtain a pixel unit array presenting color; S22: determining a preset number of target colors based on the distribution ratio of pixel units of all colors in the pixel unit array, and displaying them through a preset number of color blocks; S23: in response to the selection operation of the target color block, identifying the object attributes in the target area based on the target color of the target color block, and obtaining an initial recommended color based on the object attributes to preferentially display the initial recommended color through the color editing control; S24: In response to the color selection of the color editing control, color editing is performed on the pixel units mapped by the target color block to adjust the color of the current image.
9. An intelligent terminal, characterized in that: include: A memory and a processor, wherein an image processing program is stored in the memory, and when the image processing program is executed by the processor, the steps of the image processing method according to any one of claims 1 to 8 are implemented.
10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the image processing method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Catalytic dehydrohalogenation process
EP0002021A1
