CN107798662B - Image processing method and mobile terminal - Google Patents

Image processing method and mobile terminal Download PDF

Info

Publication number
CN107798662B
CN107798662B CN201710971492.2A CN201710971492A CN107798662B CN 107798662 B CN107798662 B CN 107798662B CN 201710971492 A CN201710971492 A CN 201710971492A CN 107798662 B CN107798662 B CN 107798662B
Authority
CN
China
Prior art keywords
light source
image
layer
processing
original
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
CN201710971492.2A
Other languages
Chinese (zh)
Other versions
CN107798662A (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 CN201710971492.2A priority Critical patent/CN107798662B/en
Publication of CN107798662A publication Critical patent/CN107798662A/en
Application granted granted Critical
Publication of CN107798662B publication Critical patent/CN107798662B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Telephone Function (AREA)
  • Image Processing (AREA)

Abstract

The invention provides an image processing method and a mobile terminal, wherein the method comprises the following steps: detecting a light source area in an original layer; performing fuzzy processing of a preset shape on the light source area to obtain a light source layer; and processing the light source layer and the original layer to obtain an output image. According to the image processing method and the mobile terminal, the light source area in the original image layer is subjected to the fuzzy processing of the preset shape, so that the out-of-focus filter effect can be simulated, and the image processing effect of the mobile terminal is improved.

Description

Image processing method and mobile terminal
Technical Field
The present invention relates to the field of communications technologies, and in particular, to an image processing method and a mobile terminal.
Background
With the development of communication technology, the functions of the mobile terminal are more and more powerful, and the photographing function of the mobile terminal brings convenience to daily life of users. With the development of image acquisition and processing technology, the requirements of users for capturing images are higher.
In order to achieve a better viewing effect, it is necessary to control the light source in the captured picture to display a special shape such as a heart shape, that is, to perform out-of-focus blurring so that the picture takes on the special shape. The blurring of the outside of the focus of the physical lens means that when a shot object point is imaged, an imaging light beam does not converge to a point, but presents a fuzzy circle which is a dispersion circle, so that a shot image shows a blurring effect.
The long-focus shooting device has powerful shooting function and can realize the blurring effect of the physical lens. In order to achieve the out-of-focus blurring effect of the special shape, a user needs to rely on a shooting device with a long focal length, add a self-made filter corresponding to the required special shape, and shoot the blurring effect in cooperation with the long focal length. The focal length of the photographing device of the mobile terminal is short, so that the photographed image cannot show an out-of-focus blurring effect in a special shape, and the image processing effect of the mobile terminal is poor.
Therefore, the existing mobile terminal has the technical problem of poor image processing effect.
Disclosure of Invention
The embodiment of the invention provides an image processing method and a mobile terminal, and aims to solve the technical problem that the image processing effect of the conventional mobile terminal is poor.
In order to solve the technical problem, the invention is realized as follows: an image processing method comprising: detecting a light source area in an original image layer, performing fuzzy processing of a preset shape on the light source area to obtain a light source image layer, and performing fuzzy processing on the original image layer and the light source image layer to obtain an output image.
In a first aspect, an embodiment of the present invention provides an image processing method, including:
detecting a light source area in an original layer;
performing fuzzy processing of a preset shape on the light source area to obtain a light source layer;
and processing the original image layer and the light source image layer to obtain an output image.
In a second aspect, an embodiment of the present invention further provides a mobile terminal, including:
the light source area detection module is used for detecting a light source area in an original image layer;
the first fuzzy processing module is used for carrying out fuzzy processing on the light source area in a preset shape to obtain a light source layer;
and the output image acquisition module is used for processing the original image layer and the light source image layer to obtain an output image.
In a third aspect, an embodiment of the present invention further provides a mobile terminal, including a processor, a memory, and a computer program stored on the memory and operable on the processor, where the computer program, when executed by the processor, implements the steps of the image processing method.
In a fourth aspect, 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 being executed by a processor, the computer program implements the steps of the image processing method.
According to the embodiment of the invention, the light source area in the original image layer is subjected to the fuzzy processing of the preset shape, so that the out-of-focus filter effect can be simulated, and the image processing effect of the mobile terminal is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive exercise.
FIG. 1 is a flow chart of an image processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of an image processing method according to another embodiment of the present invention;
fig. 3 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention;
fig. 5 is a second schematic structural diagram of a mobile terminal according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a mobile terminal according to another embodiment 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.
Referring to fig. 1, fig. 1 is a flowchart of an image processing method according to an embodiment of the present invention, as shown in fig. 1, including the following steps:
step 101, detecting a light source area in an original layer.
After the mobile terminal acquires an input image, processing an original image layer in the input image. And detecting a light source area in the original layer to detect a high-brightness light source in the original layer. The pixel points with the brightness values larger than the preset threshold value in the original image layer can be extracted according to the brightness value of each pixel point in the original image layer, and the light source area of the original image layer is obtained. The input image may include a plurality of light sources, the mobile terminal may further generate a layer including all light source regions, and all light source regions included in the layer may be directly processed.
And 102, performing fuzzy processing of a preset shape on the light source area to obtain a light source layer.
And obtaining a light source layer in the original layer according to the steps, and performing fuzzy processing of a preset shape on the detected light source layer to obtain the light source layer so that a light source area in the light source layer presents the preset shape.
In an embodiment, the blurring processing of the preset shape may be performed on the light source region, and the light source region may be subjected to gaussian kernel transformation of the preset shape, so as to realize that the light source region takes the preset shape.
The gaussian kernel transform is to change the shape of a blur by changing the gaussian kernel of the blur processing in the gaussian blur. Gaussian Blur (also called Gaussian smoothing) is a processing effect widely used in Image processing programs such as Adobe Photoshop, cross-platform Image processing Program (GNU Image processing Program, GIMP for short) and paint. The principle of Gaussian blur is that the color values of pixels are adjusted according to a Gaussian curve, images are selectively blurred, the color values of the pixels around a certain point can be counted according to the Gaussian curve, the color value of the curve is obtained by adopting a mathematical weighted average calculation method, and finally the outline of an image main body can be left.
There are many gaussian kernels, which may be a circular gaussian kernel, a square gaussian kernel, or a diamond gaussian kernel. When the mobile terminal selects the Gaussian kernel, the matched Gaussian kernel is selected according to the fuzzy shape which the user wants to highlight the light source to present. In an embodiment, the step of performing a fuzzy processing on the light source layer with a preset shape to obtain the light source layer may include:
and selecting a Gaussian kernel array matched with the preset shape, and performing convolution processing on the light source layer by using the Gaussian kernel array to obtain the light source layer with the preset shape.
And determining a preset shape which the user wants to present by the high-brightness light source, and searching the Gaussian kernel array matched with the preset shape from the corresponding relation between the prestored shape and the Gaussian kernel array. The Gaussian kernel array can comprise display sites and blank sites, the weight of the blank sites is zero, the weight of the display sites is a non-zero value, pixel points corresponding to the blank sites do not need to be displayed, and the pixel points corresponding to the display sites need to be displayed. The data weights of the display sites may all be the same so that the pixels in the display area exhibit the same display effect.
On the basis of the above embodiment, considering that the light source usually presents a gradual change effect from the center to the edge, the blurring effect of the light source can also be optimized by changing the data weight of the gaussian array. The data weight of the center position of the Gaussian kernel array can be controlled to be larger, and the data weight from the center to the edge is controlled to be smaller, so that the maximum fuzzy degree of the center position of the light source can be realized, and the fuzzy degree from the center to the edge is gradually reduced, so that the fuzzy effect of the light source is more vivid, and the better display effect is achieved. For example, if the predetermined shape is a heart shape, the matching gaussian kernel array may be set as:
Figure BDA0001437623940000041
other schemes that can control the blur shape by changing the gaussian kernel of the gaussian blur can be applied to the present embodiment, and are not limited herein.
And 103, processing the original image layer and the light source image layer to obtain an output image.
And detecting a light source area of an original layer according to the steps, carrying out fuzzy processing on a preset shape to obtain a light source layer, and then processing the original layer and the light source layer to obtain an output image. The processing procedure may be to superimpose the original layer and the light source layer to obtain an output image.
On the basis of the above embodiment, in order to enable an image of a light source region in a light source layer to be displayed preferentially to a light source image originally included in the original layer and reduce an influence of overlapping display of the light source image in the original layer and an image of the light source region after blurring processing in the light source layer on a display effect of an output image, the light source layer may be overlaid on the original layer, so that a display priority of the light source image of a preset shape after blurring processing in the light source layer is higher than that of the light source image of a corresponding position in the original layer, and a user can clearly view the light source image of the preset shape after blurring processing. In other embodiments, in order to further optimize the display effect, the light source image in the original layer may be processed, so as to weaken the display effect of the light source image in the original layer or control the light source image in the original layer not to be displayed, thereby achieving the highlight display effect of the light source image in the preset shape after the blur processing in the light source layer. Other schemes capable of optimizing the display effect of the output image are applicable to the embodiment, and are not limited herein.
In the embodiment of the present invention, the mobile terminal may include any mobile terminal with a camera, for example: a Mobile phone, a Tablet Personal Computer (Tablet Personal Computer), a Laptop Computer (Laptop Computer), a Personal Digital Assistant (PDA), a Mobile Internet Device (MID), a Wearable Device (Wearable Device), or the like.
In the image processing method provided by the embodiment of the present invention, the light source area in the original layer is detected, and the light source image is subjected to the fuzzy processing of the preset shape, so as to obtain the light source layer. And processing the light source layer and the original layer to obtain an output image. The mobile terminal detects the light source area in the original image layer and carries out fuzzy processing of the preset shape, so that the out-of-focus blurred picture with the special shape can be obtained, and the image processing effect of the mobile terminal is improved.
Referring to fig. 2, fig. 2 is a flowchart of an image processing method according to another embodiment of the present invention. The image processing method provided by the embodiment of the invention is different from the image processing method provided by the embodiment of the invention in that: and adding the operation of blurring the background image in the original image layer. As shown in fig. 2, the method comprises the following steps:
step 201, detecting a light source area in an original layer.
After the mobile terminal acquires an input image, a light source area in an original layer of the input image is detected, and a high-brightness light source in the original layer is detected. For a specific implementation process of detecting the light source region in the original layer, reference may be made to the above embodiments, which are not described again.
Step 202, performing fuzzy processing of a preset shape on the light source area to obtain a light source layer.
And detecting the light source area in the original layer according to the steps, and performing fuzzy processing of a preset shape on the detected light source area to obtain a light source layer so that the light source image in the light source layer presents the light source image of the preset shape. The process of performing the blurring process on the light source region with the preset shape may refer to the above embodiments, and is not described in detail.
And step 203, identifying a main body image and a background image of the original image layer.
The original layer may include a main image and a background image, the main image may be a portion of the original layer that needs to be highlighted, the background image may be a portion of the original layer that does not need to be highlighted, and the light source images in the original layer are also mostly concentrated in the background area of the original layer. In the image processing process, the light source image in the original layer is blurred, and in order to match the blurring effect of the processed output image, it is preferable to perform blurring on the background image of the original layer while keeping the main image in the original layer clearly displayed.
And identifying the main body image and the background image in the original image layer in a depth extraction mode. Image depth, which refers to the number of bits used to store each pixel in an image, can be used to measure the color resolution of the image. The depth extraction method is used for identifying the main image and the background image of the original image layer and can be divided into single shot depth extraction and double shot depth extraction. And the single shot depth extraction refers to inputting attribute parameters of a main object through machine training and segmenting a main image and a background image of the original image layer. And the double-shot depth extraction refers to extracting a main image and a background image in an original image layer according to the parallax of the same image shot by the double cameras. Other ways of identifying the main image and the background image in the original image layer are applicable to this embodiment, and are not limited.
And 204, carrying out fuzzy processing on the background image to obtain a fuzzy layer comprising the main body image and the background image after the fuzzy processing.
And after identifying the main image and the background image in the original image layer according to the steps, carrying out fuzzy processing on the background image to obtain a fuzzy image layer comprising the main image and the background image after the fuzzy processing. In an embodiment, a blurring mode such as circular filtering or gaussian blurring may be used to perform blurring processing on the background image in the original image layer. Circular filtering blur refers to convolving a circular frame blur with an image to generate a more accurate out-of-focus imaging effect. Other ways of blurring the background image of the original image layer are applicable to this embodiment, and are not limited.
In this embodiment, the sequence of the steps of detecting the light source region and performing the blurring process, and the step of obtaining the blurred layer by performing the original layer processing may be changed without limitation.
And 205, overlapping the light source layer and the fuzzy layer to obtain an output image.
And after the fuzzy light source layer with the preset shape and the fuzzy layer comprising the clear main body image and the fuzzy background image are obtained according to the steps, superposing the light source layer and the fuzzy layer to obtain an output image. Therefore, the main image of the output image is clearly displayed, the background image is displayed in a fuzzy mode, and the light source has a fuzzy effect in a preset shape, so that the display effect of the output image is better.
On the basis of the above embodiment, considering that the main image of the original layer may also have a light source image, if the light source region in the entire original layer is subjected to the blurring processing of the preset shape, the definition of the main image of the original layer is maintained, and only the background image of the original layer is subjected to the blurring processing, so that the clearly displayed main image appears as the blurred light source image, and the definition of the main image of the output image is affected. Therefore, when the light source region detection of the original layer is performed, only the light source region in the background image in the original layer may be detected and blurred, and the light source region in the main body image in the original layer may not be blurred in a preset shape, so as to maintain the sharpness of the main body image.
According to the image processing method provided by the embodiment of the invention, the mobile terminal performs fuzzy processing of the preset shape on the light source area in the original layer, and matches the background image after the fuzzy processing, so that the out-of-focus virtual image with the special shape can be obtained, and the image processing effect of the mobile terminal is improved. For a specific implementation process of the image processing method provided in the embodiment of the present invention, reference may be made to the specific implementation process of the image processing method provided in the above embodiment, and details are not repeated here.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention, and as shown in fig. 3, the mobile terminal 300 includes: the image processing device comprises a light source region detection module 301, a first blurring processing module 302 and an output image acquisition module 303, wherein the light source region detection module 301 is connected with the first blurring processing module 302, and the first blurring processing module 302 is connected with the output image acquisition module 303.
The light source area detection module 301 is configured to detect a light source area in an original layer;
the first fuzzy processing module 302 is configured to perform fuzzy processing of a preset shape on the light source region to obtain a light source layer;
the output image obtaining module 303 is configured to process the original image layer and the light source image layer to obtain an output image.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention. On the basis of the above embodiment, as shown in fig. 4, the mobile terminal 300 may further include:
an identifying module 304, configured to identify a main body image and a background image of the original image layer;
a second blurring module 305, configured to perform blurring processing on the background image to obtain a blurring layer including the main image and the background image after the blurring processing;
the output image acquisition module 303 is configured to:
and superposing the light source layer and the fuzzy layer to obtain an output image.
On the basis of the above embodiment, the light source region detection module 301 may be configured to:
and screening the light source image in the background image in the original image layer.
On the basis of the above embodiment, the output image acquiring module 303 may be configured to:
and covering the light source layer on the original layer to obtain an output image.
Referring to fig. 5, fig. 5 is a second schematic structural diagram of a mobile terminal according to an embodiment of the present invention. On the basis of the foregoing embodiment, as shown in fig. 5, the first blur processing module 302 may include:
an array selection submodule 3021, configured to select the gaussian kernel array with the preset shape matching;
and the convolution processing submodule 3022 is configured to perform convolution processing on the light source region by using the gaussian kernel array, so as to obtain the light source layer with the preset shape.
The mobile terminal 300 can implement each process implemented by the mobile terminal in the method embodiments of fig. 1 and fig. 2, and is not described herein again to avoid repetition.
According to the mobile terminal provided by the embodiment of the invention, the light source area in the original layer is detected, and the light source area is subjected to fuzzy processing in a preset shape, so that the light source layer is obtained. And identifying a main image and a background image of the original image layer, and performing fuzzy processing on the background image to obtain a clear main image and a fuzzy image layer after the fuzzy processing. And processing the light source layer and the fuzzy layer to obtain an output image. The mobile terminal performs fuzzy processing of a preset shape on a light source area in an original layer, and matches a background image after the fuzzy processing, so that an out-of-focus virtual picture with a special shape can be obtained, and the image processing effect of the mobile terminal is improved. For a specific implementation process of the mobile terminal provided in the embodiment of the present invention, reference may be made to the specific implementation process of the image processing method provided in the above embodiment, and details are not repeated here.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a mobile terminal according to another embodiment of the present invention. As shown in fig. 6, to implement a mobile terminal according to various embodiments of the present invention, the mobile terminal 600 includes, but is not limited to: a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609, a processor 610, and a power supply 611. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 6 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.
The processor 610 is configured to detect a light source area in an original layer;
performing fuzzy processing of a preset shape on the light source area to obtain a light source layer;
and processing the light source layer and the original layer to obtain an output image.
Optionally, the processor 610 is further configured to: identifying a main body image and a background image of the original image layer;
blurring the background image to obtain a blurred image layer comprising the main body image and the blurred background image;
and superposing the light source layer and the fuzzy layer to obtain an output image.
Optionally, the processor 610 is further configured to: and detecting a light source area in the background image in the original image layer.
Optionally, the processor 610 is further configured to: and covering the light source layer on the original layer to obtain an output image.
Optionally, the processor 610 is further configured to: selecting a Gaussian kernel array matched with the preset shape;
and performing convolution processing on the light source area by using the Gaussian kernel array to obtain the light source layer with the preset shape.
The mobile terminal 600 can implement each process implemented by the mobile terminal in the foregoing embodiments, and details are not repeated here to avoid repetition.
In the mobile terminal according to the embodiment of the present invention, the mobile terminal 300 according to the embodiment of the present invention performs a fuzzy processing of a preset shape on a light source region by detecting the light source region in an original layer, so as to obtain a light source layer. And identifying a main image and a background image of the original image layer, and performing fuzzy processing on the background image to obtain a clear main image and a fuzzy image layer after the fuzzy processing. And superposing the light source layer and the fuzzy layer to obtain an output image. The mobile terminal performs fuzzy processing of a preset shape on a light source area in an original layer, and matches a background image after the fuzzy processing, so that an out-of-focus virtual picture with a special shape can be obtained, and the image processing effect of the mobile terminal is improved. For a specific implementation process of the mobile terminal provided in the embodiment of the present invention, reference may be made to the specific implementation process of the image processing method provided in the above embodiment, and details are not repeated here.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 601 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 610; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 601 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. Further, the radio frequency unit 601 may 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 602, such as helping the user send and receive e-mails, browse webpages, access streaming media, and the like.
The audio output unit 603 may convert audio data received by the radio frequency unit 601 or the network module 602 or stored in the memory 609 into an audio signal and output as sound. Also, the audio output unit 603 may also provide audio output related to a specific function performed by the mobile terminal 600 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 603 includes a speaker, a buzzer, a receiver, and the like.
The input unit 604 is used to receive audio or video signals. The input Unit 604 may include a Graphics Processing Unit (GPU) 6041 and a microphone 6042, and the Graphics processor 6041 processes image data of a still picture or video obtained by an image capturing apparatus (such as a camera) in a video capture mode or an image capture mode. The processed image frames may be displayed on the display unit 606. The image frames processed by the graphic processor 6041 may be stored in the memory 609 (or other storage medium) or transmitted via the radio frequency unit 601 or the network module 602. The microphone 6042 can receive sound, and can process such sound 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 601 in case of the phone call mode.
The mobile terminal 600 also includes at least one sensor 605, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 6061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 6061 and/or the backlight when the mobile terminal 600 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 605 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 606 is used to display information input by the user or information provided to the user. The Display unit 606 may include a Display panel 6061, and the Display panel 6061 may be configured by a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 607 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 607 includes a touch panel 6071 and other input devices 6072. Touch panel 6071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 6071 using a finger, stylus, or any suitable object or accessory). The touch panel 6071 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 610, receives a command from the processor 610, and executes the command. In addition, the touch panel 6071 can be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The user input unit 607 may include other input devices 6072 in addition to the touch panel 6071. Specifically, the other input devices 6072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a track ball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 6071 can be overlaid on the display panel 6061, and when the touch panel 6071 detects a touch operation on or near the touch panel 6071, the touch operation is transmitted to the processor 610 to determine the type of the touch event, and then the processor 610 provides a corresponding visual output on the display panel 6061 according to the type of the touch event. Although the touch panel 6071 and the display panel 6061 are shown in fig. 6 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 6071 and the display panel 6061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 608 is an interface through which an external device is connected to the mobile terminal 600. 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 608 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 600 or may be used to transmit data between the mobile terminal 600 and external devices.
The memory 609 may be used to store software programs as well as various data. The memory 609 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 609 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 610 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 609 and calling data stored in the memory 609, thereby integrally monitoring the mobile terminal. Processor 610 may include one or more processing units; preferably, the processor 610 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 610.
The mobile terminal 600 may further include a power supply 611 (e.g., a battery) for supplying power to the various components, and preferably, the power supply 611 is logically connected to the processor 610 via a power management system, so that functions of managing charging, discharging, and power consumption are performed via the power management system.
In addition, the mobile terminal 600 includes some functional modules that are not shown, and are not described in detail herein.
Preferably, an embodiment of the present invention further provides a mobile terminal, which includes a processor 610, a memory 609, and a computer program stored in the memory 609 and capable of running on the processor 610, where the computer program is executed by the processor 610 to implement each process of the above-mentioned image 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 embodiment of the image processing method, 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 (8)

1. An image processing method applied to a mobile terminal is characterized by comprising the following steps:
detecting a light source area in an original layer;
performing fuzzy processing of a preset shape on the light source area to obtain a light source layer;
processing the original image layer and the light source image layer to obtain an output image;
before the step of processing the original image layer and the light source image layer to obtain an output image, the method further includes:
identifying a main body image and a background image of the original image layer;
blurring the background image to obtain a blurred image layer comprising the main body image and the blurred background image;
the step of processing the original image layer and the light source image layer to obtain an output image includes:
superposing the light source layer and the fuzzy layer to obtain an output image;
the step of performing fuzzy processing of a preset shape on the light source area to obtain a light source layer comprises:
selecting a Gaussian kernel array matched with the preset shape;
performing convolution processing on the light source area by using the Gaussian kernel array to obtain a light source layer with the preset shape;
the Gaussian kernel array comprises display sites and blank sites, the weight of the blank sites is zero, the weight of the display sites is a non-zero value, the data weight of the center position of the display sites of the Gaussian kernel array is large, and the data weight from the center to the edge is small.
2. The method according to claim 1, wherein the step of detecting the light source area in the original layer comprises:
and detecting a light source area in the background image in the original image layer.
3. The method according to claim 1, wherein the step of processing the original image layer and the light source image layer to obtain an output image further comprises:
and covering the light source layer on the original layer to obtain an output image.
4. A mobile terminal, comprising:
the light source area detection module is used for detecting a light source area in an original image layer;
the first fuzzy processing module is used for carrying out fuzzy processing on the light source area in a preset shape to obtain a light source layer;
the output image acquisition module is used for processing the original image layer and the light source image layer to obtain an output image;
the identification module is used for identifying the main body image and the background image of the original image layer;
the second fuzzy processing module is used for carrying out fuzzy processing on the background image to obtain a fuzzy layer comprising the main body image and the background image after the fuzzy processing;
the output image acquisition module is configured to:
superposing the light source layer and the fuzzy layer to obtain an output image;
the first blurring processing module includes:
the array selection submodule is used for selecting the Gaussian kernel array matched with the preset shape;
the convolution processing submodule is used for performing convolution processing on the light source area by using the Gaussian kernel array to obtain a light source layer with the preset shape;
the Gaussian kernel array comprises display sites and blank sites, the weight of the blank sites is zero, the weight of the display sites is a non-zero value, the data weight of the center position of the display sites of the Gaussian kernel array is large, and the data weight from the center to the edge is small.
5. The mobile terminal of claim 4, wherein the light source region detection module is configured to:
and detecting a light source area in the background image in the original image layer.
6. The mobile terminal of claim 4, wherein the output image acquisition module is configured to:
and covering the light source layer on the original layer to obtain an output image.
7. A mobile terminal, characterized in that it comprises a processor, a memory and a computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, implements the steps of the image processing method according to any one of claims 1 to 3.
8. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program, when being executed by a processor, carries out the steps of the image processing method according to any one of claims 1 to 3.
CN201710971492.2A 2017-10-18 2017-10-18 Image processing method and mobile terminal Active CN107798662B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710971492.2A CN107798662B (en) 2017-10-18 2017-10-18 Image processing method and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710971492.2A CN107798662B (en) 2017-10-18 2017-10-18 Image processing method and mobile terminal

Publications (2)

Publication Number Publication Date
CN107798662A CN107798662A (en) 2018-03-13
CN107798662B true CN107798662B (en) 2020-04-07

Family

ID=61533294

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710971492.2A Active CN107798662B (en) 2017-10-18 2017-10-18 Image processing method and mobile terminal

Country Status (1)

Country Link
CN (1) CN107798662B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108284925A (en) * 2018-01-09 2018-07-17 燕山大学 The recognition detection method of waterline
CN110298813A (en) * 2019-06-28 2019-10-01 北京金山安全软件有限公司 Method and device for processing picture and electronic equipment
CN117693767A (en) * 2022-06-20 2024-03-12 北京小米移动软件有限公司 Image processing method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104318542A (en) * 2014-11-20 2015-01-28 上海华力创通半导体有限公司 Image enhancement processing algorithm
CN105045476A (en) * 2015-06-12 2015-11-11 广东小天才科技有限公司 Method and device for acquiring spotlight graph
CN105976332A (en) * 2016-05-03 2016-09-28 北京大学深圳研究生院 Image de-blurring method based on bright stripe information in image
CN106056661A (en) * 2016-05-31 2016-10-26 钱进 Direct3D 11-based 3D graphics rendering engine
CN106204513A (en) * 2016-08-15 2016-12-07 厦门美图之家科技有限公司 The methods, devices and systems of image procossing
CN106327458A (en) * 2016-08-31 2017-01-11 上海交通大学 Method for layered rendering based on image
CN106504220A (en) * 2016-08-19 2017-03-15 华为机器有限公司 A kind of image processing method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104574452B (en) * 2013-10-10 2020-07-28 腾讯科技(深圳)有限公司 Method and device for generating window background
CN105719327B (en) * 2016-02-29 2018-09-07 北京中邮云天科技有限公司 A kind of artistic style image processing method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104318542A (en) * 2014-11-20 2015-01-28 上海华力创通半导体有限公司 Image enhancement processing algorithm
CN105045476A (en) * 2015-06-12 2015-11-11 广东小天才科技有限公司 Method and device for acquiring spotlight graph
CN105976332A (en) * 2016-05-03 2016-09-28 北京大学深圳研究生院 Image de-blurring method based on bright stripe information in image
CN106056661A (en) * 2016-05-31 2016-10-26 钱进 Direct3D 11-based 3D graphics rendering engine
CN106204513A (en) * 2016-08-15 2016-12-07 厦门美图之家科技有限公司 The methods, devices and systems of image procossing
CN106504220A (en) * 2016-08-19 2017-03-15 华为机器有限公司 A kind of image processing method and device
CN106327458A (en) * 2016-08-31 2017-01-11 上海交通大学 Method for layered rendering based on image

Also Published As

Publication number Publication date
CN107798662A (en) 2018-03-13

Similar Documents

Publication Publication Date Title
CN108513070B (en) Image processing method, mobile terminal and computer readable storage medium
CN108491775B (en) Image correction method and mobile terminal
CN109688322B (en) Method and device for generating high dynamic range image and mobile terminal
CN108495029B (en) Photographing method and mobile terminal
CN108989672B (en) Shooting method and mobile terminal
CN108989678B (en) Image processing method and mobile terminal
CN108038825B (en) Image processing method and mobile terminal
CN110365907B (en) Photographing method and device and electronic equipment
CN107730460B (en) Image processing method and mobile terminal
CN111405199B (en) Image shooting method and electronic equipment
CN107566749B (en) Shooting method and mobile terminal
CN110213485B (en) Image processing method and terminal
CN107749046B (en) Image processing method and mobile terminal
CN109819166B (en) Image processing method and electronic equipment
CN111031234B (en) Image processing method and electronic equipment
CN108174110B (en) Photographing method and flexible screen terminal
CN109005355B (en) Shooting method and mobile terminal
CN109246351B (en) Composition method and terminal equipment
CN107798662B (en) Image processing method and mobile terminal
CN111145087A (en) Image processing method and electronic equipment
CN111182211B (en) Shooting method, image processing method and electronic equipment
CN110636225B (en) Photographing method and electronic equipment
CN109639981B (en) Image shooting method and mobile terminal
CN109104573B (en) Method for determining focusing point and terminal equipment
CN109462727B (en) Filter adjusting method and mobile terminal

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