CN108038834B - Method, terminal and computer readable storage medium for reducing noise - Google Patents

Method, terminal and computer readable storage medium for reducing noise Download PDF

Info

Publication number
CN108038834B
CN108038834B CN201711464562.1A CN201711464562A CN108038834B CN 108038834 B CN108038834 B CN 108038834B CN 201711464562 A CN201711464562 A CN 201711464562A CN 108038834 B CN108038834 B CN 108038834B
Authority
CN
China
Prior art keywords
pixel point
image
determining
variance factor
filtering algorithm
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
CN201711464562.1A
Other languages
Chinese (zh)
Other versions
CN108038834A (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.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201711464562.1A priority Critical patent/CN108038834B/en
Publication of CN108038834A publication Critical patent/CN108038834A/en
Application granted granted Critical
Publication of CN108038834B publication Critical patent/CN108038834B/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • G06T2207/20028Bilateral filtering

Landscapes

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

Abstract

The embodiment of the invention discloses a method for reducing noise, which applies a terminal and comprises the following steps: the method comprises the steps of obtaining an image collected by a camera of a terminal, determining position information of each pixel point of the image after increasing brightness values of a preset area including four top angles in the image, determining position weight of each pixel point according to the position information of each pixel point, adjusting variance factors in a bilateral filtering algorithm corresponding to each pixel point according to the position weight of each pixel point to obtain adjusted variance factors of each pixel point, and performing noise reduction processing on each pixel point according to the adjusted variance factors and the bilateral filtering algorithm of each pixel point to obtain noise-reduced pixel values of each pixel point of the image. The embodiment of the invention also discloses a terminal and a computer readable storage medium. The technical problem that the existing noise reduction method has poor noise reduction effect on the brightened image is solved, and the visual effect of the image is improved.

Description

Method, terminal and computer readable storage medium for reducing noise
Technical Field
The present invention relates to a technique for reducing noise of an image, and more particularly, to a method, a terminal, and a computer-readable storage medium for reducing noise.
Background
At present, the camera in the terminal is lower at the luminance value of four angles that gathers the image because the influence of light leads to the image because the influence of light, influences the visual effect of image, in order to avoid this phenomenon, can adjust the luminance value of four angles in the image, for example, the luminance value of four angles of increase image for the luminance value of four angles of image obtains promoting, thereby improves the visual effect of image.
However, after the brightness values of the four corners of the image are increased, the digital gains of the four corners of the image are increased, so that the noise of the four corners of the image is increased, and the conventional method for reducing the noise of the image adopts a bilateral filtering algorithm to reduce the noise of the image, but the method cannot reduce the noise caused by brightening the four corners; therefore, for the brightened image, the noise reduction effect of the existing noise reduction method is poor, and the visual effect of the image is influenced.
Disclosure of Invention
In view of the above, the main objective of the present invention is to provide a method, a terminal and a computer-readable storage medium for reducing noise, which are used to solve the technical problem that the existing noise reduction method has a poor noise reduction effect on a brightened image, and improve the visual effect of the image.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a method for reducing noise, where the method is applied to a terminal, and includes: acquiring an image acquired by a camera of the terminal; determining position information of each pixel point of the image after determining that the brightness value of a preset area comprising four vertex angles in the image is increased; determining the position weight of each pixel point according to the position information of each pixel point; adjusting the variance factor in the bilateral filtering algorithm corresponding to each pixel point according to the position weight of each pixel point to obtain the adjusted variance factor of each pixel point; and respectively carrying out noise reduction processing on each pixel point according to the adjusted variance factor of each pixel point and the bilateral filtering algorithm to obtain a noise-reduced pixel value of each pixel point of the image.
Optionally, the determining the position weight of each pixel point according to the position information of each pixel point includes: determining the distance between each pixel point and the central point of the image according to the position information of each pixel point; and determining the position weight of each pixel point according to the distance between each pixel point and the central point of the image.
Optionally, the variance factor in the bilateral filtering algorithm includes: a variance factor of a spatial domain of the image and a variance factor of a neighborhood of the image.
Optionally, the adjusting, according to the position weight of each pixel point, a variance factor in a bilateral filtering algorithm corresponding to each pixel point to obtain an adjusted variance factor of each pixel point includes: determining the product of the position weight of each pixel point and the variance factor of the space domain of the image in the bilateral filtering algorithm corresponding to each pixel point as the variance factor of the space domain of the image adjusted by each pixel point; and determining the product of the position weight of each pixel point and the variance factor of the neighborhood of the image in the bilateral filtering algorithm corresponding to each pixel point as the variance factor of the neighborhood of the image after the adjustment of each pixel point.
In a second aspect, an embodiment of the present invention provides a terminal, where the terminal includes a processor, a memory, and a communication bus; the communication bus is used for realizing connection communication between the processor and the memory; the processor is configured to execute a noise reduction program stored in the memory to implement the steps of:
acquiring an image acquired by a camera of the terminal; determining position information of each pixel point of the image after determining that the brightness value of a preset area comprising four vertex angles in the image is increased; determining the position weight of each pixel point according to the position information of each pixel point; adjusting the variance factor in the bilateral filtering algorithm corresponding to each pixel point according to the position weight of each pixel point to obtain the adjusted variance factor of each pixel point; and respectively carrying out noise reduction processing on each pixel point according to the adjusted variance factor of each pixel point and the bilateral filtering algorithm to obtain a noise-reduced pixel value of each pixel point of the image.
Optionally, in the determining the position weight of each pixel point according to the position information of each pixel point, the processor is further configured to execute the noise reduction program to implement the following steps:
determining the distance between each pixel point and the central point of the image according to the position information of each pixel point; and determining the position weight of each pixel point according to the distance between each pixel point and the central point of the image.
Optionally, the variance factor in the bilateral filtering algorithm includes: a variance factor of a spatial domain of the image and a variance factor of a neighborhood of the image.
Optionally, in the adjusting the variance factor in the bilateral filtering algorithm corresponding to each pixel point according to the position weight of each pixel point to obtain the adjusted variance factor of each pixel point, the processor is further configured to execute the program for reducing noise, so as to implement the following steps:
determining the product of the position weight of each pixel point and the variance factor of the space domain of the image in the bilateral filtering algorithm corresponding to each pixel point as the variance factor of the space domain of the image adjusted by each pixel point; and determining the product of the position weight of each pixel point and the variance factor of the neighborhood of the image in the bilateral filtering algorithm corresponding to each pixel point as the variance factor of the neighborhood of the image after the adjustment of each pixel point.
In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, where a program for reducing noise is stored, and when the program for reducing noise is executed by a processor, the program for reducing noise implements the steps of the method for reducing noise as described in one or more of the above embodiments.
The method, the terminal and the computer readable storage medium for reducing noise provided by the embodiments of the present invention first obtain an image collected by a camera of the terminal, determine to increase a brightness value of a preset region including four vertex angles in the image, and then increase noise of the preset region including four vertex angles in the image, in order to further reduce noise of the preset region including four vertex angles in the image, first determine position information of each pixel point in the image, and then determine a position weight of each pixel point according to the position information of each pixel point, so that different positions have different position weights, and then adjust a variance factor in a bilateral filtering algorithm corresponding to each pixel point according to the position weight of each pixel point, to obtain an adjusted variance factor of each pixel point, so that different positions have variance factors of different bilateral filtering algorithms, finally, according to the variance factor and the bilateral filtering algorithm after the adjustment of each pixel point, noise reduction processing is respectively carried out on each pixel point to obtain a noise-reduced pixel value of each pixel point of the image, and therefore when the position weight of a preset region including four vertex angles in the image is large, the variance factor of the bilateral filtering algorithm corresponding to the preset region including four vertex angles in the image is large, and compared with other positions of the image, the noise reduction degree of the noise in the preset region including four vertex angles in the image is also large; that is to say, in the embodiment of the present invention, different position weights are determined for pixel points at different positions, so that the position weight of the preset region including the four vertex angles in the image is larger, and thus, the variance factor in the bilateral filtering algorithm corresponding to the preset region including the four vertex angles in the image is larger, and finally, the noise reduction degree of the preset region including the four vertex angles in the image is larger than that of other positions, thereby eliminating the technical problem that the existing noise reduction method has a poor noise reduction effect on the brightened image, improving the noise reduction effect of the brightened image, and further improving the visual effect of the image.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention;
fig. 2 is a diagram of a communication network system architecture according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a method for reducing noise according to a first embodiment of the present invention;
fig. 4 is a schematic structural diagram of a terminal according to a second embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer-readable storage medium according to a third embodiment of the present invention.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
The terminal may be implemented in various forms. For example, the terminal described in the present invention may include mobile terminals such as a mobile phone, a tablet computer, a notebook computer, a palm top computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and fixed terminals such as a Digital TV, a desktop computer, and the like.
The following description will be given by way of example of a mobile terminal, and it will be understood by those skilled in the art that the construction according to the embodiment of the present invention can be applied to a fixed type terminal, in addition to elements particularly used for mobile purposes.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present invention, the mobile terminal 100 may include: a Radio Frequency (RF) unit 101, a Wireless Fidelity (WiFi) module 102, an audio output unit 103, an a/V (audio/video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 1 is not intended to be limiting of mobile terminals, which may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, receive downlink information of a base station and then process the downlink information to the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access 2000(CDMA2000, Code Division Multiple Access 2000), wideband Code Division Multiple Access (WCDMA, wideband Code Division Multiple Access), Time Division Synchronous Code Division Multiple Access (TD-SCDMA, Time Division-Synchronous Code Division Multiple Access), frequency Division duplex Long Term Evolution (FDD-LTE, frequency Division duplex Long Term Evolution (TDD-Long Term Evolution), and Time Division duplex Long Term Evolution (TDD-Long Term Evolution).
WiFi belongs to short-distance wireless transmission technology, and the mobile terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 102, and provides wireless broadband internet access for the user. Although fig. 1 shows the WiFi module 102, it is understood that it does not belong to the essential constitution of the mobile terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive audio or video signals. The a/V input Unit 104 may include a Graphics Processor (GPU) 1041 and a microphone 1042, the Graphics processor 1041 Processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 may receive sounds (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, or the like, and may be capable of processing such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or a backlight when the mobile terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 1071 (e.g., an operation performed by the user on or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory), and drive a corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. 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 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, and are not limited to these specific examples.
Further, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although the touch panel 1071 and the display panel 1061 are shown in fig. 1 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 108 serves as an interface through which at least one external device is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and external devices.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a 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 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, 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 110.
The mobile terminal 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described in detail herein.
In order to facilitate understanding of the embodiments of the present invention, a communication network system on which the mobile terminal of the present invention is based is described below.
Referring to fig. 2, fig. 2 is an architecture diagram of a communication Network system according to an embodiment of the present invention, where the communication Network system is an LTE system of a universal mobile telecommunications technology, and the LTE system includes User Equipment (UE) 201, Evolved UMTS Terrestrial radio access Network (E-UTRAN) 202, Evolved Packet Core Network (EPC) 203, and IP service 204 of an operator, which are in communication connection in sequence.
Specifically, the UE201 may be the terminal 100 described above, and is not described herein again.
The E-UTRAN202 includes eNodeB2021 and other eNodeBs 2022, among others. Among them, the eNodeB2021 may be connected with other eNodeB2022 through backhaul (e.g., X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide the UE201 access to the EPC 203.
The EPC203 may include a Mobility Management Entity (MME) 2031, a Home Subscriber Server (HSS) 2032, other MMEs 2033, a Serving Gateway (SGW) 2034, a packet data network gateway (PGW, PDN gateway) 2035, and a Policy and Charging Rules Function (PCRF) 2036, and the like. The MME2031 is a control node that handles signaling between the UE201 and the EPC203, and provides bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location registers (not shown) and holds some user specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034, PGW2035 may provide IP address assignment for UE201 and other functions, and PCRF2036 is a policy and charging control policy decision point for traffic data flow and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown in the figure).
The IP services 204 may include the internet, intranets, IP Multimedia Subsystem (IMS), other IP services, and the like.
Although the LTE system is described as an example, it should be understood by those skilled in the art that the present invention is not limited to the LTE system, but may also be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems.
Based on the above mobile terminal hardware structure and communication network system, the present invention provides various embodiments of the method.
Example one
Based on the foregoing embodiments, embodiments of the present invention provide a method for reducing noise, where the method may be applied to a terminal, and functions implemented by the method may be implemented by a processor in the terminal calling a program code, where of course, the program code may be stored in a computer storage medium, and thus, the terminal at least includes the processor and the storage medium.
Fig. 3 is a schematic flow chart of a method for reducing noise according to a first embodiment of the present invention, and referring to fig. 3, the method for reducing noise may include:
s301: acquiring an image acquired by a camera of a terminal;
at present, when a user sends a photographing instruction or a camera shooting instruction to a terminal, the terminal collects an image first after receiving the photographing instruction or the camera shooting instruction, and in the process of collecting the image, because a focus of the image is generally located in a middle area of the image, brightness values of preset areas of four vertex angles of the image are low, and the brightness values of the preset areas of the four vertex angles of the image need to be increased.
S302: determining position information of each pixel point of the image after determining that the brightness value of a preset area comprising four vertex angles in the image is increased;
in order to achieve the purpose of increasing the brightness values of the preset regions at the four corners of the image, when the camera of the terminal is acquiring the image, the terminal increases the brightness values of the preset regions at the four corners of the image.
The preset region including the four vertex angles in the image can be a sector area within a preset radius by taking each vertex angle as a circle center; or, the center of the image is taken as a center of a circle, a half of the length of the image is taken as a radius to draw a circle, and a region formed by a boundary line between a straight line forming four corners of the image and the circle is a preset region including the four corners in the image, where embodiments of the present invention are not particularly limited.
After the preset regions including the four top angles in the image are increased, the digital gain of the preset regions including the four top angles in the image can be increased, so that the noise of the preset regions including the four top angles in the image is increased, then, the noise reduction is performed on each pixel point of the image by adopting the existing method, the noise reduction is performed on the middle region of the image and the preset regions including the four top angles in the image, and then, under the condition that the noise of each pixel point of the image is different, the noise reduction effect of the existing noise reduction method on the image is poor.
In order to improve the noise reduction effect of an image, position information of each pixel point of the image can be determined firstly, wherein the position information can be a horizontal coordinate and a vertical coordinate under a preset rectangular coordinate system, and can also be a distance and an angle relative to a preset origin under a polar coordinate system; here, the embodiments of the present invention are not particularly limited.
S303: determining the position weight of each pixel point according to the position information of each pixel point;
after the position information of the image is determined in S302, the position weight of each pixel point is determined according to the position information of each pixel point, that is, different position weights are determined for pixel points at different positions, wherein the determination of the position weight of each pixel point can be implemented in the following manner:
in an alternative embodiment, the distance between each pixel point and the center point of the image may be calculated, and then the position weight corresponding to each pixel point is determined according to the distance between each pixel point and the center point of the image, where the position weights are preset and correspond to the distances one by one, and the larger the distance is, the larger the position weight is.
In another optional embodiment, each preset numerical value of the image may be obtained first, then, the distance between each pixel point and the central point of the image is calculated, the absolute value of the difference between each preset numerical value and each pixel point is calculated, the preset numerical value corresponding to the two values with the smallest absolute value is selected from the preset numerical values, and finally, the position weight of each pixel point is determined according to the preset formula according to the distance between each pixel point and the central point of the image and the selected preset numerical value.
S304: adjusting a variance factor in a bilateral filtering algorithm corresponding to each pixel point according to the position weight of each pixel point to obtain an adjusted variance factor of each pixel point;
in S303, after the position weight of each pixel point is determined, the pixel points at different positions have different position weights; then, in S304, the variance factor in the bilateral filtering algorithm corresponding to each pixel point is adjusted according to the position weight of each pixel point, that is, for pixel points at different positions, the adjustment values of the variance factor in the bilateral filtering algorithm corresponding to the pixel point are different, so that the adjusted variance factors of the pixel point obtained by the pixel points at different positions are different; that is to say, different position weights are set for the pixel points at different positions, so that noise reduction processing with different strengths can be performed on the pixel points at different positions.
The variance factor in the bilateral filtering algorithm may include: a variance factor of a spatial domain of the image and a variance factor of a neighborhood of the image; here, the embodiments of the present invention are not particularly limited.
The bilateral filtering algorithm is an algorithm for performing noise reduction processing on an image through a bilateral filter, and the greater the variance factor in the bilateral filtering algorithm is, the greater the noise reduction processing strength of the bilateral filter on the image is.
S305: and respectively carrying out noise reduction processing on each pixel point according to the adjusted variance factor and the bilateral filtering algorithm of each pixel point to obtain the noise-reduced pixel value of each pixel point of the image.
In S304, after the variance factor adjusted for each pixel point is obtained, since different variance factors determine the noise reduction degree for the image, increasing the variance factor can improve the noise reduction degree for the image, and decreasing the variance factor can weaken the noise reduction degree for the image.
Then, in order to improve the noise reduction degree of the preset region including the four vertex angles in the image, the variance factor of each pixel point in the preset region including the four vertex angles in the image can be increased, so that the noise reduction degree of each pixel point in the preset region including the four vertex angles of the image is increased, the noise introduced to each pixel point in the preset region including the four vertex angles of the image is eliminated, and the pixel value of each pixel point of the image after noise reduction is obtained through a bilateral filtering algorithm.
The method for reducing noise provided by the embodiment of the invention comprises the steps of firstly, acquiring an image acquired by a camera of a terminal, determining that the brightness value of a preset region comprising four top angles in the image is increased, then increasing the noise of the preset region comprising four top angles in the image, in order to further reduce the noise of the preset region comprising four top angles in the image, firstly determining the position information of each pixel point of the image, then determining the position weight of each pixel point according to the position information of each pixel point, thus different positions have different position weights, then adjusting the variance factor in a bilateral filtering algorithm corresponding to each pixel point according to the position weight of each pixel point to obtain the adjusted variance factor of each pixel point, enabling different positions to have variance factors of different bilateral filtering algorithms, and finally, according to the adjusted variance factor and the bilateral filtering algorithm of each pixel point, performing noise reduction processing on each pixel point respectively to obtain a noise-reduced pixel value of each pixel point of the image, wherein when the position weight of a preset region including four vertex angles in the image is large, the variance factor of a bilateral filtering algorithm corresponding to the preset region including the four vertex angles in the image is large, so that compared with other positions of the image, the noise reduction degree of the noise in the preset region including the four vertex angles in the image is also large; that is to say, in the embodiment of the present invention, different position weights are determined for pixel points at different positions, so that the position weight of the preset region including the four vertex angles in the image is larger, and thus, the variance factor in the bilateral filtering algorithm corresponding to the preset region including the four vertex angles in the image is larger, and finally, the noise reduction degree of the preset region including the four vertex angles in the image is larger than that of other positions, thereby eliminating the technical problem that the existing noise reduction method has a poor noise reduction effect on the brightened image, improving the noise reduction effect of the brightened image, and further improving the visual effect of the image.
Example two
Based on the foregoing method embodiment, the present embodiment provides a terminal, fig. 4 is a schematic structural diagram of a terminal in a second embodiment of the present invention, and referring to fig. 4, the terminal includes a processor 71, a memory 72, and a communication bus 73; the communication bus 73 is used for realizing connection communication between the processor 71 and the memory 72; the processor 71 is configured to execute the noise reduction program stored in the memory 72 to implement the following steps:
the method comprises the steps of obtaining an image collected by a camera of a terminal, determining position information of each pixel point of the image after increasing brightness values of a preset area including four top angles in the image, determining position weight of each pixel point according to the position information of each pixel point, adjusting variance factors in a bilateral filtering algorithm corresponding to each pixel point according to the position weight of each pixel point to obtain adjusted variance factors of each pixel point, and performing noise reduction processing on each pixel point according to the adjusted variance factors and the bilateral filtering algorithm of each pixel point to obtain noise-reduced pixel values of each pixel point of the image.
In an alternative embodiment, in determining the position weight of each pixel point according to the position information of each pixel point, the processor 71 is further configured to execute the noise reduction program to implement the following steps:
determining the distance between each pixel point and the central point of the image according to the position information of each pixel point; and determining the position weight of each pixel point according to the distance between each pixel point and the central point of the image.
In an alternative embodiment, the variance factor in the bilateral filtering algorithm includes: a variance factor of a spatial domain of the image and a variance factor of a neighborhood of the image.
In an alternative embodiment, in adjusting the variance factor in the bilateral filtering algorithm corresponding to each pixel point according to the position weight of each pixel point to obtain the adjusted variance factor of each pixel point, the processor 71 is further configured to execute the noise reduction program to implement the following steps:
determining the product of the position weight of each pixel point and the variance factor of the space domain of the image in the bilateral filtering algorithm corresponding to each pixel point as the variance factor of the space domain of the image after the adjustment of each pixel point; and determining the product of the position weight of each pixel point and the variance factor of the neighborhood of the image in the bilateral filtering algorithm corresponding to each pixel point as the variance factor of the neighborhood of the image after the adjustment of each pixel point.
EXAMPLE III
Based on the foregoing method embodiments, this embodiment provides a computer-readable storage medium, fig. 5 is a schematic structural diagram of a computer-readable storage medium in a third embodiment of the present invention, as shown in fig. 5, the computer-readable storage medium 800 stores a noise reduction program, and when the noise reduction program is executed by a processor, the steps of the noise reduction method described in one or more embodiments above are implemented.
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.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
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 (5)

1. A method for reducing noise, the method being applied to a terminal, the method comprising:
acquiring an image acquired by a camera of the terminal;
determining position information of each pixel point of the image after determining that the brightness value of a preset area comprising four vertex angles in the image is increased; wherein the preset regions of the four apex angles include: a region which is formed by the boundary lines of the straight lines forming the four vertex angles of the image and the circle, and draws the circle by taking the center of the image as the center of the circle and taking the half of the length of the image as the radius;
determining the position weight of each pixel point according to the position information of each pixel point; determining the position weight of each pixel point according to the position information of each pixel point specifically comprises: determining the distance between each pixel point and the central point of the image according to the position information of each pixel point; determining the position weight of each pixel point according to the distance between each pixel point and the central point of the image; wherein the distance is positively correlated with the location weight;
adjusting the variance factor in the bilateral filtering algorithm corresponding to each pixel point according to the position weight of each pixel point to obtain the adjusted variance factor of each pixel point;
and respectively carrying out noise reduction processing on each pixel point according to the adjusted variance factor of each pixel point and the bilateral filtering algorithm to obtain a noise-reduced pixel value of each pixel point of the image.
2. The method of claim 1, wherein the variance factor in the bilateral filtering algorithm comprises:
a variance factor of a spatial domain of the image and a variance factor of a neighborhood of the image.
3. The method according to claim 2, wherein the adjusting the variance factor in the bilateral filtering algorithm corresponding to each pixel point according to the position weight of each pixel point to obtain the adjusted variance factor of each pixel point comprises:
determining the product of the position weight of each pixel point and the variance factor of the space domain of the image in the bilateral filtering algorithm corresponding to each pixel point as the variance factor of the space domain of the image adjusted by each pixel point;
and determining the product of the position weight of each pixel point and the variance factor of the neighborhood of the image in the bilateral filtering algorithm corresponding to each pixel point as the variance factor of the neighborhood of the image after the adjustment of each pixel point.
4. A terminal, characterized in that the terminal comprises a processor, a memory and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute a noise reduction program stored in the memory to implement the steps of:
acquiring an image acquired by a camera of the terminal;
determining position information of each pixel point of the image after determining that the brightness value of a preset area comprising four vertex angles in the image is increased; wherein the preset regions of the four apex angles include: a region which is formed by the boundary lines of the straight lines forming the four vertex angles of the image and the circle, and draws the circle by taking the center of the image as the center of the circle and taking the half of the length of the image as the radius;
determining the position weight of each pixel point according to the position information of each pixel point; determining the position weight of each pixel point according to the position information of each pixel point specifically comprises: determining the distance between each pixel point and the central point of the image according to the position information of each pixel point; determining the position weight of each pixel point according to the distance between each pixel point and the central point of the image; wherein the distance is positively correlated with the location weight;
adjusting the variance factor in the bilateral filtering algorithm corresponding to each pixel point according to the position weight of each pixel point to obtain the adjusted variance factor of each pixel point;
and respectively carrying out noise reduction processing on each pixel point according to the adjusted variance factor of each pixel point and the bilateral filtering algorithm to obtain a noise-reduced pixel value of each pixel point of the image.
5. A computer-readable storage medium, characterized in that the computer-readable medium stores a program for reducing noise, which when executed by a processor implements the steps of the method for reducing noise according to any one of claims 1 to 3.
CN201711464562.1A 2017-12-28 2017-12-28 Method, terminal and computer readable storage medium for reducing noise Active CN108038834B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711464562.1A CN108038834B (en) 2017-12-28 2017-12-28 Method, terminal and computer readable storage medium for reducing noise

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711464562.1A CN108038834B (en) 2017-12-28 2017-12-28 Method, terminal and computer readable storage medium for reducing noise

Publications (2)

Publication Number Publication Date
CN108038834A CN108038834A (en) 2018-05-15
CN108038834B true CN108038834B (en) 2020-06-26

Family

ID=62097821

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711464562.1A Active CN108038834B (en) 2017-12-28 2017-12-28 Method, terminal and computer readable storage medium for reducing noise

Country Status (1)

Country Link
CN (1) CN108038834B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111131716B (en) * 2019-12-31 2021-06-15 联想(北京)有限公司 Image processing method and electronic device
CN113469889B (en) * 2020-03-30 2023-08-25 杭州海康威视数字技术股份有限公司 Image noise reduction method and device
CN111583145B (en) * 2020-04-30 2023-11-28 深圳市商汤智能传感科技有限公司 Image noise reduction method and device, electronic equipment and storage medium
CN112508823B (en) * 2021-02-02 2021-09-07 数坤(北京)网络科技股份有限公司 Image denoising method and device and computer readable storage medium
CN115713471B (en) * 2022-11-23 2023-08-29 珠海视熙科技有限公司 Image noise reduction method and device, storage medium and computer equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101950418A (en) * 2010-08-26 2011-01-19 北京中创信测科技股份有限公司 Image quality evaluation method and device
CN102855613A (en) * 2011-07-01 2013-01-02 株式会社东芝 Image processing device and image processing method
DE102013219156A1 (en) * 2013-09-24 2015-03-26 Siemens Aktiengesellschaft Tomosynthetic method for generating a 3D X-ray image and diagnostic device operating with this method
CN105243641A (en) * 2015-08-18 2016-01-13 西安电子科技大学 Low illumination image enhancement method based on dual-tree complex wavelet transform
CN106875347A (en) * 2016-12-30 2017-06-20 努比亚技术有限公司 A kind of picture processing device and method
CN107222686A (en) * 2017-06-30 2017-09-29 维沃移动通信有限公司 A kind for the treatment of method and apparatus of view data

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101950418A (en) * 2010-08-26 2011-01-19 北京中创信测科技股份有限公司 Image quality evaluation method and device
CN102855613A (en) * 2011-07-01 2013-01-02 株式会社东芝 Image processing device and image processing method
DE102013219156A1 (en) * 2013-09-24 2015-03-26 Siemens Aktiengesellschaft Tomosynthetic method for generating a 3D X-ray image and diagnostic device operating with this method
CN105243641A (en) * 2015-08-18 2016-01-13 西安电子科技大学 Low illumination image enhancement method based on dual-tree complex wavelet transform
CN106875347A (en) * 2016-12-30 2017-06-20 努比亚技术有限公司 A kind of picture processing device and method
CN107222686A (en) * 2017-06-30 2017-09-29 维沃移动通信有限公司 A kind for the treatment of method and apparatus of view data

Also Published As

Publication number Publication date
CN108038834A (en) 2018-05-15

Similar Documents

Publication Publication Date Title
CN108038834B (en) Method, terminal and computer readable storage medium for reducing noise
CN108566479B (en) Screen state control method, mobile terminal and computer readable storage medium
CN110035176B (en) Brightness adjusting method of mobile terminal, mobile terminal and storage medium
CN107295270B (en) Image brightness value determination method and device, terminal and computer-readable storage medium
CN109005574B (en) Cell selection method, mobile terminal and computer readable storage medium
CN108198150B (en) Method for eliminating image dead pixel, terminal and storage medium
CN107423238B (en) Screen projection connection method and device and computer readable storage medium
CN109710159B (en) Flexible screen response method and device and computer readable storage medium
CN112822538A (en) Screen projection display method, screen projection device, terminal and storage medium
CN109816619B (en) Image fusion method, device, terminal and computer readable storage medium
CN112689323A (en) Specific absorption rate control method, terminal and computer readable storage medium
CN108334266B (en) Control method of flexible terminal, flexible terminal and computer readable storage medium
CN109683778B (en) Flexible screen control method and device and computer readable storage medium
CN109491577B (en) Holding interaction method and device and computer readable storage medium
CN110069122B (en) Screen control method, terminal and computer readable storage medium
CN112437472B (en) Network switching method, equipment and computer readable storage medium
CN112423102A (en) Small window screen projection control method and device and computer readable storage medium
CN111970738A (en) Network switching control method, equipment and computer readable storage medium
CN109561221B (en) Call control method, device and computer readable storage medium
CN109462829B (en) Call transfer method, device and computer readable storage medium
CN111443818A (en) Screen brightness regulation and control method and device and computer readable storage medium
CN108196924B (en) Brightness adjusting method, terminal and computer readable storage medium
CN108183833B (en) Response processing method and device and computer readable storage medium
CN107743204B (en) Exposure processing method, terminal, and computer-readable storage medium
CN107770373B (en) Screen saturation adjusting method and corresponding 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