CN108280816B - Gaussian filtering method and mobile terminal - Google Patents

Gaussian filtering method and mobile terminal Download PDF

Info

Publication number
CN108280816B
CN108280816B CN201711375981.8A CN201711375981A CN108280816B CN 108280816 B CN108280816 B CN 108280816B CN 201711375981 A CN201711375981 A CN 201711375981A CN 108280816 B CN108280816 B CN 108280816B
Authority
CN
China
Prior art keywords
pixel
pixel point
average value
target
point
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
CN201711375981.8A
Other languages
Chinese (zh)
Other versions
CN108280816A (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 CN201711375981.8A priority Critical patent/CN108280816B/en
Publication of CN108280816A publication Critical patent/CN108280816A/en
Application granted granted Critical
Publication of CN108280816B publication Critical patent/CN108280816B/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/10Image enhancement or restoration by non-spatial domain filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
    • H04M1/72439User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for image or video messaging

Abstract

The invention provides a Gaussian filtering method and a mobile terminal, wherein the method comprises the following steps: acquiring a plurality of pixel average values corresponding to the target pixel points; and acquiring a Gaussian result corresponding to the target pixel point according to the average value of the plurality of pixels. Obtaining a plurality of pixel average values corresponding to a target pixel point directly; and obtaining a Gaussian result corresponding to the target pixel point according to the average value of the plurality of pixels. According to the method, the Gaussian result is obtained according to the average value of the plurality of pixels corresponding to the target pixel point, the calculated amount of Gaussian filtering is reduced, the processing time of the Gaussian filtering is shortened, and the system performance is improved.

Description

Gaussian filtering method and mobile terminal
Technical Field
The present invention relates to the field of mobile terminal technologies, and in particular, to a gaussian filtering method and a mobile terminal.
Background
With the development of mobile terminals, people increasingly use mobile terminals to take pictures, and use the currently popular technologies of beautifying the face and skin, blurring the pictures and the like after taking pictures to beautify the pictures.
In the prior art, technologies such as beautifying and skin care, dual-shooting blurring and the like all involve Gaussian filtering, the implementation process of the Gaussian filtering is simple, but the calculation amount is large, the processing time is long, and further the system performance is influenced.
Disclosure of Invention
The embodiment of the invention provides a Gaussian filtering method and a mobile terminal, and aims to solve the problem that in the prior art, the system performance is affected due to the fact that the calculated amount of Gaussian filtering is large.
In order to solve the technical problem, the invention is realized as follows: a method of gaussian filtering, comprising: acquiring a plurality of pixel average values corresponding to the target pixel points; and acquiring a Gaussian result corresponding to the target pixel point according to the average value of the plurality of pixels.
In a first aspect, an embodiment of the present invention further provides a mobile terminal, where the mobile terminal includes: the first acquisition module is used for acquiring a plurality of pixel average values corresponding to the target pixel points; and the second acquisition module is used for acquiring the Gaussian result corresponding to the target pixel point according to the average value of the plurality of pixels.
In a second aspect, an embodiment of the present invention provides a mobile terminal, including a processor, a memory, and a computer program stored in the memory and executable on the processor, where the computer program, when executed by the processor, implements the steps of the gaussian filtering method.
In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the gaussian filtering method.
According to the embodiment of the invention, the Gaussian result is obtained according to the average value of a plurality of pixels corresponding to the target pixel point, the calculation amount of Gaussian filtering is reduced, the processing time of the Gaussian filtering is shortened, and the system performance is further improved.
Drawings
FIG. 1 is a flow chart of the steps of a Gaussian filtering method according to a first embodiment of the present invention;
FIG. 2 is a flow chart of the steps of a Gaussian filtering method according to a second embodiment of the present invention;
FIG. 3 is a pixel representation of an embodiment of the present invention;
fig. 4 is a block diagram of a mobile terminal according to a third embodiment of the present invention;
fig. 5 is a block diagram of a mobile terminal according to a fourth embodiment of the present invention;
fig. 6 is a block diagram of a mobile terminal according to a fifth 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.
Example one
Referring to fig. 1, a flowchart illustrating steps of a gaussian filtering method according to a first embodiment of the present invention is shown.
The Gaussian filtering method provided by the embodiment of the invention comprises the following steps:
step 101: a plurality of pixel average values corresponding to the target pixel point are obtained.
Each target pixel corresponds to four pixel average values, and since the GPU can read a point of a non-integer pixel block, each pixel average value corresponding to the target pixel point is read by the GPU (Graphics Processing Unit).
In the embodiment of the invention, the target pixel point A in the table 1 is calculatedx,yThe Gaussian results of (A) are described as examples.
Table 1:
Figure BDA0001514556770000021
Figure BDA0001514556770000031
in Table 1, target Pixel Ax,yCorresponding pixel average values are respectively Ax-0.5,y-0.5、Ax+0.5,y-0.5、Ax-0.5,y+0.5And Ax+0.5,y+0.5And (4) reading the pixel values corresponding to the four points respectively through the GPU.
Step 102: and obtaining a Gaussian result corresponding to the target pixel point according to the average value of the plurality of pixels.
And obtaining a Gaussian result corresponding to the target pixel point by calculating by obtaining the average value of each pixel corresponding to the target pixel point and the weight value corresponding to the target pixel point.
By adjusting the pixel value of the target pixel point to be the Gaussian result, the processing of blurring the image or peeling can be finished.
In the embodiment of the invention, the Gaussian result is obtained according to the average value of a plurality of pixels corresponding to the target pixel point, the calculation amount of Gaussian filtering is reduced, the processing time of the Gaussian filtering is shortened, and the system performance is further improved.
Example two
Referring to fig. 2, a flowchart illustrating steps of a gaussian filtering method according to a second embodiment of the present invention is shown.
The Gaussian filtering method provided by the embodiment of the invention comprises the following steps:
step 201: and reading the first pixel average value, the second pixel average value, the third pixel average value and the fourth pixel average value corresponding to the target pixel point.
As shown in fig. 3, for the pixel representation intention of the embodiment, the first pixel average value is a pixel average value of the first pixel point, the second pixel point, the third pixel point and the target pixel point adjacent to the target pixel point; and reading pixel values of pixel points positioned at the center positions of the first pixel point, the second pixel point, the third pixel point and the target pixel point, and taking the pixel values as a first pixel average value.
The second pixel average value is the pixel average value of a second pixel point, a fourth pixel point, a fifth pixel point and a target pixel point which are adjacent to the target pixel point; and reading pixel values of pixel points positioned at the center positions of the second pixel point, the fourth pixel point, the fifth pixel point and the target pixel point, and taking the pixel values as a second pixel average value.
The third pixel average value is the pixel average value of the target pixel point, the adjacent third pixel point, the sixth pixel point, the seventh pixel point and the target pixel point; and reading pixel values of pixel points positioned at the center positions of the third pixel point, the sixth pixel point, the seventh pixel point and the target pixel point, and taking the pixel values as an average value of the third pixel.
The fourth pixel average value is the pixel average value of the target pixel point, the fifth pixel point, the seventh pixel point, the eighth pixel point and the target pixel point. And reading pixel values of pixel points positioned at the center positions of the fifth pixel point, the seventh pixel point, the eighth pixel point and the target pixel point, and taking the pixel values as a fourth pixel average value.
In the embodiment of the invention, the target pixel point A in the table 1 is calculatedx,yThe Gaussian results of (A) are described as examples. Note that the pixel region shown in table 1 is only a part of the image, and the target pixel a is referred to for calculation of the gaussian result of each pixel in the imagex,yThe calculation method of the gaussian result of (2) may be calculated.
Step 202: the sum of the first pixel average value, the second pixel average value, the third pixel average value and the fourth pixel average value is calculated.
Step 203: and taking the product of the weighted value corresponding to the target pixel point and the sum of the average value of each pixel as the Gaussian result corresponding to the target pixel point.
Normal distribution is an advisable weight distribution mode. On the graph of normal distribution, normal distribution is a bell-shaped curve, and the closer to the center, the larger the value is, and the farther away from the center, the smaller the value is. Because the image is two-dimensional, the weight value of each pixel point can be calculated.
When calculating the gaussian results of the target pixel points of table 1:
specifically, calculate Ax-0.5,y-0.5+Ax+0.5,y-0.5+Ax-0.5,y+0.5+Ax+0.5,y+0.5Of pixel values of (a), whereinx-0.5,y-0.5、Ax+0.5,y-0.5、Ax-0.5,y+0.5And Ax+0.5,y+0.5Is a target pixel point Ax,yThe corresponding first pixel average value, the second pixel average value, the third pixel average value and the fourth pixel average value.
When the target pixel point Ax,yWhen the weight value of (2) is 0.25:
the gaussian result corresponding to the target pixel point is:
0.25*(Ax-0.5,y-0.5+Ax+0.5,y-0.5+Ax-0.5,y+0.5+Ax+0.5,y+0.5)。
compared with the prior art, the calculation process of the Gaussian result of the target pixel point in the table 1 is as follows:
Gx,y=0.25*Ax,y+0.0625*Ax-1,y-1+0.125*Ax,y-1+0.0625*Ax+1,y-1+0.125*Ax-1,y+0.125*Ax+1,y+0.0625*Ax-1,y+1+0.125*Ax,y+1+0.0625*Ax+1,y+1
the calculated amount is simplified into 3 times of addition operation and 1 time of multiplication operation from 9 times of multiplication operation and 8 times of addition operation per pixel, the read amount is also greatly reduced, the whole calculated amount is reduced by more than 75%, the data read amount is reduced by more than 55%, and the time consumption of the whole algorithm is changed to about 35% of the original time consumption, so that the speed of picture processing is improved, and the use experience of a user is improved.
In the embodiment of the invention, the average value of a plurality of pixels corresponding to the target pixel point is directly obtained; according to the average value of the multiple pixels, the Gaussian result corresponding to the target pixel point is obtained, the Gaussian result corresponding to the pixel point can be obtained only by executing simple calculation, and complex calculation is not required, so that the calculation amount can be reduced, the image beautifying efficiency is improved, the use experience of a user is enhanced, and in addition, the power consumption of the mobile terminal can be reduced due to the reduction of the calculation amount.
EXAMPLE III
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 provided by the embodiment of the invention comprises:
a first obtaining module 301, configured to obtain a plurality of pixel average values corresponding to target pixel points;
a second obtaining module 302, configured to obtain a gaussian result corresponding to the target pixel point according to the average value of the multiple pixels.
In the embodiment of the invention, the Gaussian result is obtained according to the average value of a plurality of pixels corresponding to the target pixel point, the calculation amount of Gaussian filtering is reduced, the processing time of the Gaussian filtering is shortened, and the system performance is further improved.
Example four
Referring to fig. 5, a block diagram of a mobile terminal according to a fourth embodiment of the present invention is shown.
The mobile terminal provided by the embodiment of the invention comprises:
a first obtaining module 401, configured to obtain a plurality of pixel average values corresponding to target pixel points;
a second obtaining module 402, configured to obtain a gaussian result corresponding to the target pixel point according to the average value of the multiple pixels.
Preferably, the first obtaining module 401 is specifically configured to: and reading a first pixel average value, a second pixel average value, a third pixel average value and a fourth pixel average value corresponding to the target pixel point.
Preferably, the first pixel average value is a first pixel point, a second pixel point, a third pixel point and a pixel average value of the target pixel point which are adjacent to the target pixel point;
the first obtaining module 401 includes:
a first reading submodule 4011, configured to read pixel values of pixel points located at center positions of the first pixel point, the second pixel point, the third pixel point, and the target pixel point, and use the pixel values as the first pixel average value; the second pixel average value is the pixel average value of a second pixel point, a fourth pixel point, a fifth pixel point and the target pixel point which are adjacent to the target pixel point;
the first obtaining module 401 includes:
a second reading submodule 4012, configured to read pixel values of pixel points located at center positions of the second pixel point, the fourth pixel point, the fifth pixel point, and the target pixel point, and use the pixel values as the second pixel average value; the third pixel average value is the pixel average value of the target pixel point, the adjacent third pixel point, the adjacent sixth pixel point, the adjacent seventh pixel point and the target pixel point;
the first obtaining module 401 includes:
a third reading submodule 4013, configured to read pixel values of pixel points located at center positions of the third pixel point, the sixth pixel point, the seventh pixel point, and the target pixel point, and use the pixel values as the third pixel average value; the fourth pixel average value is the pixel average value of the target pixel point, the adjacent fifth pixel point, the adjacent seventh pixel point, the adjacent eighth pixel point and the target pixel point.
The first obtaining module 401 includes:
the fourth reading submodule 4014 is configured to read pixel values of the pixels located at the center positions of the fifth pixel point, the seventh pixel point, the eighth pixel point, and the target pixel point, and use the pixel values as the fourth pixel average value.
Preferably, the second obtaining module 402 includes:
a first calculating submodule 4021, configured to calculate a sum of the first pixel average value, the second pixel average value, the third pixel average value, and the fourth pixel average value;
the second calculating submodule 4022 is configured to use a product of a weight value corresponding to the target pixel point and a sum of the average values of the pixels as a gaussian result corresponding to the target pixel point.
The mobile terminal provided in the embodiment of the present invention can implement each process implemented by the mobile terminal in the method embodiments of fig. 1 to fig. 2, and is not described herein again to avoid repetition.
In the embodiment of the invention, the average value of a plurality of pixels corresponding to the target pixel point is directly obtained; according to the average value of the multiple pixels, the Gaussian result corresponding to the target pixel point is obtained, the Gaussian result corresponding to the pixel point can be obtained only by executing simple calculation, and complex calculation is not required, so that the calculation amount can be reduced, the image beautifying efficiency is improved, and the use experience of a user is enhanced.
EXAMPLE five
Fig. 6 is a schematic hardware structure diagram of a mobile terminal implementing fifth embodiment of the present invention,
the mobile terminal 500 includes, but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, a processor 510, and a power supply 511. 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.
A processor 510, configured to obtain a plurality of pixel average values corresponding to target pixel points; and acquiring a Gaussian result corresponding to the target pixel point according to the average value of the plurality of pixels.
In the embodiment of the invention, the average value of a plurality of pixels corresponding to the target pixel point is directly obtained; and obtaining a Gaussian result corresponding to the target pixel point according to the average value of the plurality of pixels, obtaining the target pixel value corresponding to the pixel block only by performing simple calculation, and not performing complex calculation, so that the calculation amount can be reduced, the image beautifying efficiency is improved, and the use experience of a user is enhanced.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 501 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 510; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 501 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 501 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 502, such as helping the user send and receive e-mails, browse webpages, access streaming media, and the like.
The audio output unit 503 may convert audio data received by the radio frequency unit 501 or the network module 502 or stored in the memory 509 into an audio signal and output as sound. Also, the audio output unit 503 may also provide audio output related to a specific function performed by the mobile terminal 500 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 503 includes a speaker, a buzzer, a receiver, and the like.
The input unit 504 is used to receive an audio or video signal. The input Unit 504 may include a Graphics Processing Unit (GPU) 5041 and a microphone 5042, and the Graphics processor 5041 processes image data of a still picture or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 506. The image frames processed by the graphic processor 5041 may be stored in the memory 509 (or other storage medium) or transmitted via the radio frequency unit 501 or the network module 502. The microphone 5042 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 501 in case of the phone call mode.
The mobile terminal 500 also includes at least one sensor 505, 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 5061 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 5061 and/or a backlight when the mobile terminal 500 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 505 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 506 is used to display information input by the user or information provided to the user. The Display unit 506 may include a Display panel 5061, and the Display panel 5061 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 507 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 507 includes a touch panel 5071 and other input devices 5072. Touch panel 5071, 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 5071 using a finger, stylus, or any suitable object or attachment). The touch panel 5071 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 510, and receives and executes commands sent by the processor 510. In addition, the touch panel 5071 may be implemented in various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 5071, the user input unit 507 may include other input devices 5072. In particular, other input devices 5072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
Further, the touch panel 5071 may be overlaid on the display panel 5061, and when the touch panel 5071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 510 to determine the type of the touch event, and then the processor 510 provides a corresponding visual output on the display panel 5061 according to the type of the touch event. Although in fig. 6, the touch panel 5071 and the display panel 5061 are two independent components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 5071 and the display panel 5061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 508 is an interface through which an external device is connected to the mobile terminal 500. 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 508 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 500 or may be used to transmit data between the mobile terminal 500 and external devices.
The memory 509 may be used to store software programs as well as various data. The memory 509 may mainly include a storage program area and a storage data area, wherein the storage program 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 509 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 510 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 509 and calling data stored in the memory 509, thereby performing overall monitoring of the mobile terminal. Processor 510 may include one or more processing units; preferably, the processor 510 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 processor 510.
The mobile terminal 500 may further include a power supply 511 (e.g., a battery) for supplying power to various components, and preferably, the power supply 511 may be logically connected to the processor 510 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 500 includes some functional modules that are not shown, and thus, are not described in detail herein.
Preferably, an embodiment of the present invention further provides a mobile terminal, which includes a processor 510, a memory 509, and a computer program that is stored in the memory 509 and can be run on the processor 510, and when the computer program is executed by the processor 510, the processes of the foregoing gaussian filtering method embodiment are implemented, and the same technical effect can be achieved, 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 foregoing gaussian filtering 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 method of gaussian filtering, the method comprising:
acquiring a plurality of pixel average values corresponding to the target pixel points;
obtaining a Gaussian result corresponding to the target pixel point according to the average value of the plurality of pixels;
wherein the step of obtaining a plurality of pixel average values corresponding to the target pixel point includes:
reading a first pixel average value, a second pixel average value, a third pixel average value and a fourth pixel average value corresponding to the target pixel point;
the step of obtaining the gaussian result corresponding to the target pixel point according to the average value of the plurality of pixels includes:
calculating the sum of the first pixel average value, the second pixel average value, the third pixel average value and the fourth pixel average value, wherein the first pixel average value is the pixel average value of the first pixel point, the second pixel point, the third pixel point and the target pixel point adjacent to the target pixel point, the second pixel average value is the pixel average value of the second pixel point, the fourth pixel point, the fifth pixel point and the target pixel point adjacent to the target pixel point, the third pixel average value is the pixel average value of the target pixel point, the third pixel point, the sixth pixel point, the seventh pixel point and the target pixel point adjacent to the target pixel point, and the fourth pixel average value is the pixel average value of the target pixel point, the fifth pixel point, the seventh pixel point, the eighth pixel point and the target pixel point adjacent to the target pixel point, the position of the target pixel point is Ax,yThe position of the first pixel point is Ax-1,y-1The position of the second pixel point is Ax,y-1And the position of the third pixel point is Ax-1,yThe position of the fourth pixel point is Ax+1,y-1The position of the fifth pixel point is Ax+1,yAnd the position of the sixth pixel point is Ax-1,y+1The position of the seventh pixel point is Ax,y+1The position of the eighth pixel point is Ax+1,y+1The method comprises the following steps that x is the abscissa of a target pixel point in a target coordinate system, y is the ordinate of the target pixel point in the target coordinate system, the target coordinate system is a coordinate system which is established by taking the upper left vertex of an image where the target pixel point is located as the origin, taking the pixel row extending direction of the image as the positive direction of a horizontal axis and taking the pixel column extending direction of the image as the positive direction of a longitudinal axis;
and taking the product of the weight value corresponding to the target pixel point and the sum of the average value of each pixel as the Gaussian result corresponding to the target pixel point.
2. The method of claim 1,
reading the first pixel average, comprising:
reading pixel values of pixel points located at the center positions of the first pixel point, the second pixel point, the third pixel point and the target pixel point, and taking the pixel values as the average value of the first pixel;
reading the second pixel average, comprising:
reading pixel values of pixel points located at the center positions of the second pixel point, the fourth pixel point, the fifth pixel point and the target pixel point, and taking the pixel values as the average value of the second pixel;
reading the third pixel average, comprising:
reading pixel values of pixel points located at the center positions of the third pixel point, the sixth pixel point, the seventh pixel point and the target pixel point, and taking the pixel values as the average value of the third pixel;
reading the fourth pixel average, comprising:
and reading pixel values of pixel points positioned at the center positions of the fifth pixel point, the seventh pixel point, the eighth pixel point and the target pixel point, and taking the pixel values as the average value of the fourth pixel.
3. A mobile terminal, characterized in that the mobile terminal comprises:
the first acquisition module is used for acquiring a plurality of pixel average values corresponding to the target pixel points;
the second acquisition module is used for acquiring a Gaussian result corresponding to the target pixel point according to the average value of the plurality of pixels;
the first obtaining module is specifically configured to: the pixel reading module is used for reading a first pixel average value, a second pixel average value, a third pixel average value and a fourth pixel average value corresponding to the target pixel point;
the second acquisition module includes:
a first calculating submodule, configured to calculate a sum of the first pixel average value, the second pixel average value, the third pixel average value, and a fourth pixel average value, where the first pixel average value is a pixel average value of a first pixel point, a second pixel point, a third pixel point, and the target pixel point adjacent to the target pixel point, the second pixel average value is a pixel average value of a second pixel point, a fourth pixel point, a fifth pixel point, and the target pixel point adjacent to the target pixel point, the third pixel average value is a pixel average value of the target pixel point, an adjacent third pixel point, a sixth pixel point, a seventh pixel point, and the target pixel point, and the fourth pixel average value is a pixel average value of the target pixel point, an adjacent fifth pixel point, a seventh pixel point, an eighth pixel point, and the target pixel point, the position of the target pixel point is Ax,yThe position of the first pixel point is Ax-1,y-1The position of the second pixel point is Ax,y-1And the position of the third pixel point is Ax-1,yThe position of the fourth pixel point is Ax+1,y-1Position of the fifth pixel pointIs Ax+1,yAnd the position of the sixth pixel point is Ax-1,y+1The position of the seventh pixel point is Ax,y+1The position of the eighth pixel point is Ax+1,y+1The method comprises the following steps that x is the abscissa of a target pixel point in a target coordinate system, y is the ordinate of the target pixel point in the target coordinate system, the target coordinate system is a coordinate system which is established by taking the upper left vertex of an image where the target pixel point is located as the origin, taking the pixel row extending direction of the image as the positive direction of a horizontal axis and taking the pixel column extending direction of the image as the positive direction of a longitudinal axis;
and the second calculation submodule is used for taking the product of the weighted value corresponding to the target pixel point and the sum of the average value of each pixel as the Gaussian result corresponding to the target pixel point.
4. The mobile terminal of claim 3,
the first obtaining module comprises:
the first reading submodule is used for reading pixel values of pixel points positioned at the center positions of the first pixel point, the second pixel point, the third pixel point and the target pixel point, and taking the pixel values as the average value of the first pixel;
the first obtaining module comprises: the second reading submodule is used for reading pixel values of pixel points positioned at the center positions of the second pixel point, the fourth pixel point, the fifth pixel point and the target pixel point, and taking the pixel values as the average value of the second pixel;
the first obtaining module comprises:
a third reading submodule, configured to read pixel values of pixels located at center positions of the third pixel point, the sixth pixel point, the seventh pixel point, and the target pixel point, and use the pixel values as an average value of the third pixel;
the first obtaining module comprises:
and the fourth reading submodule reads pixel values of pixel points positioned at the center positions of the fifth pixel point, the seventh pixel point, the eighth pixel point and the target pixel point, and takes the pixel values as the fourth pixel average value.
5. A mobile terminal comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the gaussian filtering method according to any one of claims 1 to 2.
6. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the gaussian filtering method as defined in any one of claims 1 to 2.
CN201711375981.8A 2017-12-19 2017-12-19 Gaussian filtering method and mobile terminal Active CN108280816B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711375981.8A CN108280816B (en) 2017-12-19 2017-12-19 Gaussian filtering method and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711375981.8A CN108280816B (en) 2017-12-19 2017-12-19 Gaussian filtering method and mobile terminal

Publications (2)

Publication Number Publication Date
CN108280816A CN108280816A (en) 2018-07-13
CN108280816B true CN108280816B (en) 2020-09-18

Family

ID=62801843

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711375981.8A Active CN108280816B (en) 2017-12-19 2017-12-19 Gaussian filtering method and mobile terminal

Country Status (1)

Country Link
CN (1) CN108280816B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101464998A (en) * 2009-01-15 2009-06-24 浙江大学 Non-gauss veins noise smooth filtering method for textile industry
CN104103041A (en) * 2013-12-24 2014-10-15 北京华科创智健康科技股份有限公司 Ultrasonic image mixed noise self-adaptive suppression method
CN104166991A (en) * 2014-07-28 2014-11-26 西安电子科技大学 Level set image segmentation method based on self-adaptive parameter
CN104992419A (en) * 2015-07-08 2015-10-21 北京大学深圳研究生院 Super pixel Gaussian filtering pre-processing method based on JND factor
CN107146231A (en) * 2017-05-04 2017-09-08 季鑫 Retinal image bleeding area segmentation method and device and computing equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9842573B2 (en) * 2014-11-24 2017-12-12 Electronics And Telecommunications Research Institute Apparatus and method for gaussian filtering

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101464998A (en) * 2009-01-15 2009-06-24 浙江大学 Non-gauss veins noise smooth filtering method for textile industry
CN104103041A (en) * 2013-12-24 2014-10-15 北京华科创智健康科技股份有限公司 Ultrasonic image mixed noise self-adaptive suppression method
CN104166991A (en) * 2014-07-28 2014-11-26 西安电子科技大学 Level set image segmentation method based on self-adaptive parameter
CN104992419A (en) * 2015-07-08 2015-10-21 北京大学深圳研究生院 Super pixel Gaussian filtering pre-processing method based on JND factor
CN107146231A (en) * 2017-05-04 2017-09-08 季鑫 Retinal image bleeding area segmentation method and device and computing equipment

Also Published As

Publication number Publication date
CN108280816A (en) 2018-07-13

Similar Documents

Publication Publication Date Title
CN108459797B (en) Control method of folding screen and mobile terminal
CN108073343B (en) display interface adjusting method and mobile terminal
CN107817939B (en) Image processing method and mobile terminal
CN107977652B (en) Method for extracting screen display content and mobile terminal
CN110174993B (en) Display control method, terminal equipment and computer readable storage medium
CN108846663B (en) Two-dimensional code adjusting method and device and mobile terminal
CN108038825B (en) Image processing method and mobile terminal
CN111031234B (en) Image processing method and electronic equipment
CN107153500B (en) Method and equipment for realizing image display
CN109727212B (en) Image processing method and mobile terminal
US20230014409A1 (en) Detection result output method, electronic device and medium
CN108174110B (en) Photographing method and flexible screen terminal
CN111031178A (en) Video stream clipping method and electronic equipment
CN109343811B (en) Display adjustment method and terminal equipment
CN109639981B (en) Image shooting method and mobile terminal
CN108536513B (en) Picture display direction adjusting method and mobile terminal
CN107977947B (en) Image processing method and mobile terminal
CN107729100B (en) Interface display control method and mobile terminal
CN110740265B (en) Image processing method and terminal equipment
CN109286414B (en) Antenna determination method and terminal
CN109189517B (en) Display switching method and mobile terminal
CN111328132A (en) Method for adjusting transmitting power and electronic equipment
CN108259808B (en) Video frame compression method and mobile terminal
CN108234745B (en) Signal receiving method, mobile terminal and computer readable storage medium
CN110489037B (en) Screen capturing 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