CN109361867B - Filter processing method and mobile terminal - Google Patents

Filter processing method and mobile terminal Download PDF

Info

Publication number
CN109361867B
CN109361867B CN201811408445.8A CN201811408445A CN109361867B CN 109361867 B CN109361867 B CN 109361867B CN 201811408445 A CN201811408445 A CN 201811408445A CN 109361867 B CN109361867 B CN 109361867B
Authority
CN
China
Prior art keywords
target color
channel
offset
mapping table
target
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.)
Active
Application number
CN201811408445.8A
Other languages
Chinese (zh)
Other versions
CN109361867A (en
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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201811408445.8A priority Critical patent/CN109361867B/en
Publication of CN109361867A publication Critical patent/CN109361867A/en
Application granted granted Critical
Publication of CN109361867B publication Critical patent/CN109361867B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/10Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)

Abstract

The invention provides a filter processing method and a mobile terminal, wherein the method comprises the following steps: in the embodiment of the invention, a first input of a user is received; adjusting an offset of a target color channel of a first target image in response to the first input; generating a target color mapping table based on the adjusted offset of the target color channel; performing filter processing on the first target image according to the target color mapping table; wherein the target color channel comprises at least one of a red channel, a green channel, and a blue channel. Different filter treatments can be carried out on the preview picture according to filter adjustment operation, the flexibility of filter treatment is realized, the filter can be directly carried out on a preview interface, and the complexity of user operation is reduced.

Description

Filter processing method and mobile terminal
Technical Field
The invention relates to the technical field of mobile terminals, in particular to a filter processing method and a mobile terminal.
Background
The quality of the photos can be effectively improved by carrying out image processing on the photos, and the requirements of users are met. The filter is used for most common image processing, and various special effects can be realized.
In the prior art, the filter processing of the picture by the user can be performed in two ways. In the first scheme, based on a filter algorithm provided by the mobile terminal, a user can select a desired filter algorithm to perform filter processing on a shot picture. In the second scheme, the user can perform filter processing on the photos through professional image processing software.
It can be seen that, for the first scheme, since the filter algorithm provided by the mobile terminal is fixed, the user cannot adjust the filter algorithm, and cannot realize flexible filter processing; with the second scheme, the photograph is copied to the image processing software, resulting in complicated user operations.
Disclosure of Invention
The embodiment of the invention provides a filter processing method and a mobile terminal, and aims to solve the problems that the existing filter processing effect is fixed and the operation is complicated.
On one hand, the embodiment of the invention discloses a filter processing method, which is applied to a mobile terminal and comprises the following steps:
receiving a first input of a user;
adjusting an offset of a target color channel of a first target image in response to the first input;
generating a target color mapping table based on the adjusted offset of the target color channel;
performing filter processing on the first target image according to the target color mapping table;
wherein the target color channel comprises at least one of a red channel, a green channel, and a blue channel.
On the other hand, the embodiment of the invention also discloses a mobile terminal, which comprises:
the first input receiving module is used for receiving a first input of a user;
an offset adjustment module to adjust an offset of a target color channel of a first target image in response to the first input;
the color mapping table generating module is used for generating a target color mapping table based on the adjusted offset of the target color channel;
the first filter processing module is used for carrying out filter processing on the first target image according to the target color mapping table;
wherein the target color channel comprises at least one of a red channel, a green channel, and a blue channel.
In still another aspect, an embodiment of the present invention further discloses a mobile terminal, which includes a processor, a memory, and a computer program stored on the memory and capable of running on the processor, where the computer program, when executed by the processor, implements the steps of the filter processing method according to any one of the above.
In a final aspect, an embodiment of the present invention further discloses a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the filter processing method according to any one of the above.
In the embodiment of the invention, a first input of a user is received; adjusting an offset of a target color channel of a first target image in response to the first input; generating a target color mapping table based on the adjusted offset of the target color channel; performing filter processing on the first target image according to the target color mapping table; wherein the target color channel comprises at least one of a red channel, a green channel, and a blue channel. Different filter treatments can be carried out on the preview picture according to filter adjustment operation, the flexibility of filter treatment is realized, the filter can be directly carried out on a preview interface, and the complexity of user operation is reduced.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
FIG. 1 is a flow chart illustrating steps of a filter processing method according to a first embodiment of the present invention;
FIG. 2 shows a schematic diagram of the filter adjustment operation in an embodiment of the invention;
FIG. 3 shows another schematic diagram of the filter adjustment operation in an embodiment of the invention;
fig. 4 is a block diagram illustrating a mobile terminal according to a second embodiment of the present invention;
fig. 5 is a diagram illustrating a hardware structure of a mobile terminal implementing various embodiments of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The following describes a filter processing method and a mobile terminal according to the present invention in detail by taking several specific embodiments.
Referring to fig. 1, a flowchart illustrating steps of a filter processing method according to a first embodiment of the present invention is shown, which may specifically include the following steps:
step 101, receiving a first input of a user.
Wherein the first input is used to adjust the offset employed for each color channel when the filter is adjusted.
In practical applications, the first input may be performed on the interface of the mobile terminal, or may be performed through a physical key, for example, adjusting a position of a slider on a slider, so as to adjust the offset within a certain range; or when the mobile terminal is at the designated interface, the mobile terminal is switched to the larger physical key and the smaller physical key. Since the color channels range from 0 to 255, the offset also ranges from 0 to 255.
Specifically, the user may operate the adjustment buttons corresponding to the red channel, the green channel, and the blue channel, respectively. For example, as shown in fig. 2, R corresponds to a red channel, G corresponds to a green channel, and B corresponds to a third blue channel, and the user may slide up and down in the region above R to adjust the offset of the red channel, may also slide up and down in the region above G to adjust the offset of the green channel, and may also slide up and down in the region above B to adjust the offset of the green channel.
In addition, the user can simultaneously adjust the offset of the red channel, the green channel and the blue channel through one adjusting button. As shown in fig. 3, the user may slide up or down on the screen, and when sliding up, the red, green, and blue channels simultaneously increase by the same value, and when sliding down, the red, green, and blue channels simultaneously decrease by the same value.
The typical interface of the embodiment of the invention is a picture preview interface, and the obtained preview picture is displayed in the picture preview interface without a filter or after the filter is filtered according to the default parameters. At this time, if the user is not satisfied with the current preview photo, the user may perform an adjustment operation on the screen of the mobile terminal.
Step 102, in response to the first input, adjusting an offset of a target color channel of the first target image.
In practical applications, the total offset amount generally needs to be multiplied by the offset amount corresponding to each step according to the number of steps of adjustment. For example, the user moves the slider by 3 steps, each step corresponding to an offset of 2, and the total offset is 2 × 3 — 6.
And 103, generating a target color mapping table based on the adjusted offset of the target color channel.
Wherein the target color mapping table represents the mapped composite colors after at least one color channel in the composite colors has been adjusted by the offset. The target color mapping table can be understood as a function for the composite color, the input is each color component in the composite color of the pixel point, and the output is the adjusted composite color.
In the embodiment of the present invention, the range of each color value in the RGB (Red Green Blue ) mode is 0 to 255, so that the target color mapping table needs to map each value of each color, that is: and (i, j, k) is mapped into (i + i1, j + j1, k + k1), wherein i, j, k, i + i1, j + j1 and k + k1 all take values from 0 to 255, i1, j1 and k1 all take values from-255 to 255, and i1, j1 and k1 take values which can be the same or different.
For example, for a composite color (50, 123, 142), where 50 is the red channel, 123 is the green channel, and 142 is the blue channel, if the adjustment amount for the red channel is 10, the adjustment amount for the green is 15, and the adjustment amount for the blue is-10, then the target color mapping table maps the composite color (50, 123, 142) to the composite color (60, 138, 132).
It can be understood that, during mapping, the values of the target color channels after adjustment should be greater than or equal to 0 and less than or equal to 255. If the adjustment is larger than 255, 255 is taken, and if the adjustment is smaller than 0, 0 is taken.
Optionally, in another embodiment of the present invention, the step 103 includes a sub-step 1031:
and a sub-step 1031, generating a target color mapping table based on the adjusted offset of the at least one target color channel.
In the embodiment of the invention, the red channel, the green channel and the blue channel can be respectively adjusted, and the adjustment amplitude of each color channel can be different. Specifically, when only one color channel is adjusted, only one offset exists for the color channel, so as to generate a target color mapping table for the color channel according to the offset; when two or three color channels are adjusted, two or three offsets exist at this time, and each offset corresponds to one color channel, so that the target color mapping table for different color channels is generated according to the two or three offsets.
The embodiment of the invention can respectively adjust different color channels and realize flexible filter processing.
Optionally, in another embodiment of the present invention, the step 103 includes sub-steps 1032 to 1034:
sub-step 1032 obtains an offset of the adjusted at least one target color channel.
The embodiment of the invention can adjust for one target color channel, also can adjust for two or three target color channels, and can correspond to the same or different offsets.
And a substep 1033 of generating an offset combination for each target color channel based on said adjusted offset of at least one target color channel.
Specifically, for each color channel, the offset combination may be generated according to different values of the offset. For example, for the red channel, the larger value, the middle value and the smaller value in the red channel offset adjustment process are taken as the offset combination of the red channel. Thereby obtaining offset combinations for the red, green, and blue channels, respectively.
It will be appreciated that in practical applications, when the offsets of the three color channels are the same, the offset combinations may be the same.
Substep 1034, generating at least two target color mapping tables based on the offset combinations of all target color channels; wherein each offset combination comprises at least two offset values.
Specifically, for the offset combination of each target color channel, a target color mapping table for the target color channel is generated according to each offset value. For example, for the red channel, 3 target color maps are generated with larger, medium, and smaller offset values, respectively; for the green channel, 3 target color mapping tables are generated through larger, moderate and smaller offset values respectively; for the blue channel, 3 target color maps are generated with larger, medium, and smaller offset values, respectively. Resulting in 9 target color mapping tables.
In addition, the offsets of the different color channels may be combined. For example, a target color mapping table is generated for a larger offset for the red channel and a smaller offset for the green channel; or, a target color mapping table is generated for small offsets for the red channel, moderate offsets for the green channel, and large offsets for the blue channel.
In the embodiment of the invention, the selection of various filter effects can be provided for a user, so that the filter is more flexible.
Optionally, in another embodiment of the present invention, after the step 103, steps a1 to A3 are further included:
step a1, when receiving a storage request for the target color mapping table, storing the target color mapping table corresponding to the filter process.
In the embodiment of the present invention, when the target color mapping table is only one, the preview picture after the filter is one, so that the storage operation may be a shooting operation for the preview picture; when the number of the color mapping tables is more than two, the number of the preview pictures after the filter is more than two, so that the storage operation can be a saving operation for each preview picture or a selection operation of a user for one of the preview pictures, and at this time, the target color mapping table adopted when the picture is filtered is stored.
Step A2, receiving a second input from the user to the target color mapping table.
The second input may be a selection operation of the target color mapping table.
Step a3, in response to the second input, performing filter processing on a second target image using the target color mapping table.
In the embodiment of the invention, the user can directly perform filter processing on the preview picture by adopting the previously stored target color mapping table without performing filter adjustment operation, and the color mapping table is generated according to the filter adjustment operation again.
Specifically, first, a camera is started to obtain a preview picture, and a target color mapping table stored in step a1 is obtained; then, the user can select one of the target color mapping tables, so that the mobile terminal performs filter processing on the preview picture according to the target color mapping table.
The embodiment of the invention can adopt the generated target color mapping table to directly carry out filter processing, thereby being beneficial to saving the filter processing time.
And 104, performing filter processing on the first target image according to the target color mapping table, wherein the target color channel comprises at least one of a red channel, a green channel and a blue channel.
Wherein the filter transforms the color of the picture, and the filter adjustment operation can be used to adjust the degree of color transformation. For example, for an RGB (Red Green Blue) mode, the filter adjustment operation may adjust three color values of Red, Green, and Blue.
It will be appreciated that the filter adjustment operation is a sliding operation on the screen, specifying one of the directions to increase the color value and the other direction to decrease the color value. In addition, the filter adjustment operation can also be realized through a physical key, and the specific implementation mode of the filter adjustment operation is not limited in the embodiment of the invention.
Specifically, firstly, determining a color mapping table according to an adjustment amount corresponding to a filter adjustment operation, wherein the color mapping table is used for representing a color value corresponding to each color after the adjustment of the adjustment amount; then, finding a corresponding color value after adjustment for each pixel point in the preview picture according to the original color; and finally, replacing the primary synthesized color with the adjusted color value to obtain a preview picture after the filter.
In an application scene of filtering the preview picture, the preview picture processed by the filter can be displayed on a picture preview interface of the mobile terminal.
And the photo preview interface displays the real-time preview photo. Specifically, when the user pauses for a certain time during the filter adjustment operation, the preview picture is subjected to filter processing and displayed in step 104.
The embodiment of the invention can filter the picture when previewing, so that the previewed picture after filtering is directly taken as the shot picture when a user clicks to shoot, and the picture does not need to be filtered after clicking to shoot, thereby effectively reducing the shooting processing time while filtering.
Optionally, in another embodiment of the present invention, the step 104 includes sub-steps 1041 to 1042:
in sub-step 1041, for each pixel point in the first target image, a mapping value corresponding to the target color channel is searched from the target color mapping table.
Specifically, the red channel, the green channel, and the blue channel of the pixel point are compared with each color channel of each composite color in the color mapping table. If the red channel, the green channel and the blue channel all have the same value, the mapping composite color of the composite color in the target color mapping table is the mapping composite color corresponding to the pixel point; and if at least one of the mapping colors is different, the mapping composite color of the composite color in the target color mapping table is not the mapping composite color corresponding to the pixel point.
And a substep 1042 of, for each pixel point in the first target image, replacing the original value of the target color channel of each pixel point with a corresponding mapping value.
It can be understood that each pixel point in the preview picture is searched for the mapping composite color according to the substep 1041, and the original composite color is replaced, and the obtained picture is the preview picture after the filter.
According to the embodiment of the invention, each pixel point in the picture can be mapped correspondingly according to the target mapping table, so that the uniformity of the filter effect is ensured.
In an embodiment of the invention, the preview picture after the filter can be displayed to the user and provide a selection operation. Specifically, when the preview picture after the filter only comprises one picture, the preview picture is directly displayed on a picture preview interface; when the preview photos after the filter comprise more than two photos, the two photos are displayed on an intermediate display interface, and after the user selects one of the two photos, the preview photo selected by the user is displayed on a photo preview interface.
In the embodiment of the invention, a first input of a user is received; adjusting an offset of a target color channel of a first target image in response to the first input; generating a target color mapping table based on the adjusted offset of the target color channel; performing filter processing on the first target image according to the target color mapping table; wherein the target color channel comprises at least one of a red channel, a green channel, and a blue channel. Different filter treatments can be carried out on the preview picture according to filter adjustment operation, the flexibility of filter treatment is realized, the filter can be directly carried out on a preview interface, and the complexity of user operation is reduced.
Referring to fig. 4, a block diagram of a mobile terminal according to a third embodiment of the present invention is shown.
The mobile terminal 200 includes: the device comprises a first input receiving module 201, an offset adjusting module 202, a color mapping table generating module 203 and a first filter processing module 204.
The functions of the modules and the interaction relationship between the modules are described in detail below.
The first input receiving module 201 is configured to receive a first input of a user.
An offset adjustment module 202, configured to adjust an offset of a target color channel of the first target image in response to the first input.
And a color mapping table generating module 203, configured to generate a target color mapping table based on the adjusted offset of the target color channel.
A first filter processing module 204, configured to perform filter processing on the first target image according to the target color mapping table; wherein the target color channel comprises at least one of a red channel, a green channel, and a blue channel.
Optionally, in another embodiment of the present invention, the color mapping table generating module 203 includes:
and the first color mapping table generating submodule is used for generating a target color mapping table based on the adjusted offset of at least one target color channel.
Optionally, in another embodiment of the present invention, the color mapping table generating module 203 includes:
and the offset acquisition submodule is used for acquiring the offset of the adjusted at least one target color channel.
And the offset combination generation submodule is used for generating an offset combination of each target color channel according to the adjusted offset of at least one target color channel.
A second color mapping table generation submodule for generating at least two target color mapping tables based on the offset combinations of all the target color channels; wherein each offset combination comprises at least two offset values.
Optionally, in another embodiment of the present invention, the first filter processing module 204 includes:
and the mapping value searching submodule is used for searching a mapping value corresponding to the target color channel from the target color mapping table for each pixel point in the first target image.
And the mapping value replacing submodule is used for replacing the original value of the target color channel of each pixel point with the corresponding mapping value for each pixel point in the first target image.
Optionally, in another embodiment of the present invention, the mobile terminal further includes:
and the color mapping table storage module is used for storing the target color mapping table corresponding to the filter processing under the condition of receiving a storage request of the target color mapping table.
And the second input receiving module is used for receiving second input of the target color mapping table from a user.
And the second filter processing module is used for responding to the second input and performing filter processing on a second target image by adopting the target color mapping table.
In the embodiment of the invention, a first input of a user is received; adjusting an offset of a target color channel of a first target image in response to the first input; generating a target color mapping table based on the adjusted offset of the target color channel; performing filter processing on the first target image according to the target color mapping table; wherein the target color channel comprises at least one of a red channel, a green channel, and a blue channel. Different filter treatments can be carried out on the preview picture according to filter adjustment operation, the flexibility of filter treatment is realized, the filter can be directly carried out on a preview interface, and the complexity of user operation is reduced.
The second embodiment is a corresponding device embodiment to the first embodiment, and the detailed description may refer to the first embodiment, which is not repeated herein.
Fig. 5 is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present invention, where the mobile terminal 300 includes but is not limited to: radio frequency unit 301, network module 302, audio output unit 303, input unit 304, sensor 305, display unit 306, user input unit 307, interface unit 308, memory 309, processor 310, and power supply 311. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 5 is not intended to be limiting of mobile terminals, and that a mobile terminal may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the mobile terminal includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
A processor 310 for receiving a first input of a user; adjusting an offset of a target color channel of a first target image in response to the first input; generating a target color mapping table based on the adjusted offset of the target color channel; performing filter processing on the first target image according to the target color mapping table; wherein the target color channel comprises at least one of a red channel, a green channel, and a blue channel.
In the embodiment of the invention, a first input of a user is received; adjusting an offset of a target color channel of a first target image in response to the first input; generating a target color mapping table based on the adjusted offset of the target color channel; performing filter processing on the first target image according to the target color mapping table; wherein the target color channel comprises at least one of a red channel, a green channel, and a blue channel. Different filter treatments can be carried out on the preview picture according to filter adjustment operation, the flexibility of filter treatment is realized, the filter can be directly carried out on a preview interface, and the complexity of user operation is reduced.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 301 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 310; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 301 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 301 can also communicate with a network and other devices through a wireless communication system.
The mobile terminal provides the user with wireless broadband internet access through the network module 302, such as helping the user send and receive e-mails, browse webpages, access streaming media, and the like.
The audio output unit 303 may convert audio data received by the radio frequency unit 301 or the network module 302 or stored in the memory 309 into an audio signal and output as sound. Also, the audio output unit 303 may also provide audio output related to a specific function performed by the mobile terminal 300 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 303 includes a speaker, a buzzer, a receiver, and the like.
The input unit 304 is used to receive audio or video signals. The input Unit 304 may include a Graphics Processing Unit (GPU) 3041 and a microphone 3042, and the Graphics processor 3041 processes image data of a still picture or video obtained by an image capturing apparatus (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 306. The image frames processed by the graphic processor 3041 may be stored in the memory 309 (or other storage medium) or transmitted via the radio frequency unit 301 or the network module 302. The microphone 3042 may receive sounds and may be capable of processing such sounds into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 301 in case of the phone call mode.
The mobile terminal 300 also includes at least one sensor 305, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that adjusts the brightness of the display panel 3061 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 3061 and/or a backlight when the mobile terminal 300 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), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 305 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 306 is used to display information input by the user or information provided to the user. The Display unit 306 may include a Display panel 3061, and the Display panel 3061 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 307 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. Specifically, the user input unit 307 includes a touch panel 3071 and other input devices 3072. The touch panel 3071, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 3071 (e.g., operations by a user on or near the touch panel 3071 using a finger, a stylus, or any suitable object or attachment). The touch panel 3071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by 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 310, and receives and executes commands sent by the processor 310. In addition, the touch panel 3071 may be implemented using various types, such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 307 may include other input devices 3072 in addition to the touch panel 3071. Specifically, the other input devices 3072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described herein.
Further, the touch panel 3071 may be overlaid on the display panel 3061, and when the touch panel 3071 detects a touch operation on or near the touch panel, the touch operation is transmitted to the processor 310 to determine the type of the touch event, and then the processor 310 provides a corresponding visual output on the display panel 3061 according to the type of the touch event. Although the touch panel 3071 and the display panel 3061 are shown as two separate components in fig. 5 to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 3071 and the display panel 3061 may be integrated to implement the input and output functions of the mobile terminal, which is not limited herein.
The interface unit 308 is an interface through which an external device is connected to the mobile terminal 300. 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 308 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 300 or may be used to transmit data between the mobile terminal 300 and external devices.
The memory 309 may be used to store software programs as well as various data. The memory 309 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), 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 309 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 310 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 309 and calling data stored in the memory 309, thereby performing overall monitoring of the mobile terminal. Processor 310 may include one or more processing units; preferably, the processor 310 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 310.
The mobile terminal 300 may further include a power supply 311 (such as a battery) for supplying power to various components, and preferably, the power supply 311 may be logically connected to the processor 310 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, the mobile terminal 300 includes some functional modules that are not shown, and thus, the detailed description thereof is omitted.
Preferably, an embodiment of the present invention further provides a mobile terminal, which includes a processor 310, a memory 309, and a computer program stored in the memory 309 and capable of running on the processor 310, where the computer program is executed by the processor 310 to implement each process of the filter processing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the filter processing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
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, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
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 solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (6)

1. A filter processing method is applied to a mobile terminal, and is characterized by comprising the following steps:
receiving a first input of a user;
adjusting an offset of a target color channel of a first target image in response to the first input;
generating a target color mapping table based on the adjusted offset of the target color channel;
performing filter processing on the first target image according to the target color mapping table;
wherein the target color channel comprises at least one of a red channel, a green channel, and a blue channel;
generating a target color mapping table based on the adjusted offset of the target color channel, including:
obtaining the offset of at least one adjusted target color channel;
generating an offset combination of each target color channel according to the adjusted offset of at least one target color channel;
generating at least two target color mapping tables based on the offset combinations of all the target color channels;
wherein each offset combination comprises at least two offset values.
2. The method of claim 1, wherein said filtering said first target image according to said target color map comprises:
for each pixel point in the first target image, searching a mapping value corresponding to the target color channel from the target color mapping table;
and replacing the original value of the target color channel of each pixel point with a corresponding mapping value for each pixel point in the first target image.
3. The method of claim 1, wherein after generating a target color mapping table based on the adjusted offset of the target color channel, further comprising:
under the condition that a storage request for the target color mapping table is received, storing the target color mapping table corresponding to the filter processing;
receiving a second input of the target color mapping table from the user;
and responding to the second input, and performing filter processing on a second target image by adopting the target color mapping table.
4. A mobile terminal, comprising:
the first input receiving module is used for receiving a first input of a user;
an offset adjustment module to adjust an offset of a target color channel of a first target image in response to the first input;
the color mapping table generating module is used for generating a target color mapping table based on the adjusted offset of the target color channel;
the first filter processing module is used for carrying out filter processing on the first target image according to the target color mapping table;
wherein the target color channel comprises at least one of a red channel, a green channel, and a blue channel;
the color mapping table generating module comprises:
the offset obtaining submodule is used for obtaining the offset of the adjusted at least one target color channel;
an offset combination generation submodule, configured to generate an offset combination of each target color channel according to the adjusted offset of the at least one target color channel;
a second color mapping table generation submodule for generating at least two target color mapping tables based on the offset combinations of all the target color channels;
wherein each offset combination comprises at least two offset values.
5. The mobile terminal of claim 4, wherein the first filter processing module comprises:
a mapping value searching submodule, configured to search, for each pixel point in the first target image, a mapping value corresponding to the target color channel from the target color mapping table;
and the mapping value replacing submodule is used for replacing the original value of the target color channel of each pixel point with the corresponding mapping value for each pixel point in the first target image.
6. The mobile terminal of claim 4, wherein the mobile terminal further comprises:
the color mapping table storage module is used for storing a target color mapping table corresponding to the filter processing under the condition of receiving a storage request of the target color mapping table;
the second input receiving module is used for receiving second input of the target color mapping table from a user;
and the second filter processing module is used for responding to the second input and performing filter processing on a second target image by adopting the target color mapping table.
CN201811408445.8A 2018-11-23 2018-11-23 Filter processing method and mobile terminal Active CN109361867B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811408445.8A CN109361867B (en) 2018-11-23 2018-11-23 Filter processing method and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811408445.8A CN109361867B (en) 2018-11-23 2018-11-23 Filter processing method and mobile terminal

Publications (2)

Publication Number Publication Date
CN109361867A CN109361867A (en) 2019-02-19
CN109361867B true CN109361867B (en) 2021-06-22

Family

ID=65338464

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811408445.8A Active CN109361867B (en) 2018-11-23 2018-11-23 Filter processing method and mobile terminal

Country Status (1)

Country Link
CN (1) CN109361867B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110598027B (en) * 2019-09-10 2022-09-02 Oppo广东移动通信有限公司 Image processing effect display method and device, electronic equipment and storage medium
CN111050050A (en) * 2019-12-30 2020-04-21 维沃移动通信有限公司 Filter adjusting method and electronic equipment
CN112598758A (en) * 2020-10-22 2021-04-02 努比亚技术有限公司 Image processing method, mobile terminal and computer storage medium
CN113014803A (en) * 2021-02-04 2021-06-22 维沃移动通信有限公司 Filter adding method and device and electronic equipment
CN113570581A (en) * 2021-07-30 2021-10-29 北京市商汤科技开发有限公司 Image processing method and device, electronic equipment and storage medium
CN115631250B (en) * 2021-08-10 2024-03-29 荣耀终端有限公司 Image processing method and electronic equipment
CN113784165B (en) * 2021-09-17 2023-05-05 北京快来文化传播集团有限公司 Short video filter superposition method, system, electronic equipment and readable storage medium
CN114630045A (en) * 2022-02-11 2022-06-14 珠海格力电器股份有限公司 Photographing method and device, readable storage medium and electronic equipment

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2487241A (en) * 2011-01-17 2012-07-18 Sony Corp Feature Aligned Interpolation Using Colour Components
CN103777852B (en) * 2012-10-18 2018-10-02 腾讯科技(深圳)有限公司 A kind of method, apparatus obtaining image
US9154709B2 (en) * 2012-12-21 2015-10-06 Google Inc. Recommending transformations for photography
CN103794194B (en) * 2014-01-24 2015-12-02 厦门美图之家科技有限公司 A kind of method of automatic adjustment mobile terminal screen color
CN104282002B (en) * 2014-09-22 2018-01-30 厦门美图网科技有限公司 A kind of quick beauty method of digital picture
CN104657946B (en) * 2015-02-03 2018-03-30 厦门美图网科技有限公司 A kind of quick image filters treating method and apparatus for realizing multiple effect
CN106814959A (en) * 2015-11-30 2017-06-09 东莞酷派软件技术有限公司 A kind of U.S. face photographic method, device and terminal
CN105607817A (en) * 2015-12-17 2016-05-25 小米科技有限责任公司 Parameter adjustment method and apparatus
CN107948733B (en) * 2017-12-04 2020-07-10 腾讯科技(深圳)有限公司 Video image processing method and device and electronic equipment
CN108156435B (en) * 2017-12-25 2020-03-13 Oppo广东移动通信有限公司 Image processing method and device, computer readable storage medium and computer device

Also Published As

Publication number Publication date
CN109361867A (en) 2019-02-19

Similar Documents

Publication Publication Date Title
CN109361867B (en) Filter processing method and mobile terminal
CN107995429B (en) Shooting method and mobile terminal
US11451706B2 (en) Photographing method and mobile terminal
CN110460907B (en) Video playing control method and terminal
CN107817939B (en) Image processing method and mobile terminal
CN109040643B (en) Mobile terminal and remote group photo method and device
CN110365907B (en) Photographing method and device and electronic equipment
CN109461117B (en) Image processing method and mobile terminal
CN108111754B (en) Method for determining image acquisition mode and mobile terminal
CN109102555B (en) Image editing method and terminal
CN107846583B (en) Image shadow compensation method and mobile terminal
CN109788204A (en) Shoot processing method and terminal device
CN107644396B (en) Lip color adjusting method and device
CN108513067B (en) Shooting control method and mobile terminal
CN108174109B (en) Photographing method and mobile terminal
CN111147752B (en) Zoom factor adjusting method, electronic device, and medium
CN109656636B (en) Application starting method and device
CN107153500B (en) Method and equipment for realizing image display
WO2020011080A1 (en) Display control method and terminal device
CN108174110B (en) Photographing method and flexible screen terminal
CN111045769B (en) Background picture switching method and electronic equipment
CN110086998B (en) Shooting method and terminal
CN109462727B (en) Filter adjusting method and mobile terminal
CN109542307B (en) Image processing method, device and computer readable storage medium
CN110865752A (en) Photo viewing method and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant