WO2020097836A1 - Image processing method and apparatus, and computer device and storage medium - Google Patents

Image processing method and apparatus, and computer device and storage medium Download PDF

Info

Publication number
WO2020097836A1
WO2020097836A1 PCT/CN2018/115523 CN2018115523W WO2020097836A1 WO 2020097836 A1 WO2020097836 A1 WO 2020097836A1 CN 2018115523 W CN2018115523 W CN 2018115523W WO 2020097836 A1 WO2020097836 A1 WO 2020097836A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
filtered
target
original
filtered image
Prior art date
Application number
PCT/CN2018/115523
Other languages
French (fr)
Chinese (zh)
Inventor
陈岩
Original Assignee
深圳市欢太科技有限公司
Oppo广东移动通信有限公司
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 深圳市欢太科技有限公司, Oppo广东移动通信有限公司 filed Critical 深圳市欢太科技有限公司
Priority to CN201880097722.XA priority Critical patent/CN112703530B/en
Priority to PCT/CN2018/115523 priority patent/WO2020097836A1/en
Publication of WO2020097836A1 publication Critical patent/WO2020097836A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction

Definitions

  • the present application relates to the field of computer technology, and in particular, to an image processing method, device, computer equipment, and storage medium.
  • An image processing method includes:
  • An image processing device including:
  • Acquisition module for acquiring original images
  • a filtering processing module configured to perform a first filtering process on the original image to obtain a first filtered image, and perform a second filtering process on the original image to obtain a second filtered image, wherein the clarity of the first filtered image Higher than the sharpness of the second filtered image;
  • a weakening processing module configured to weaken the first filtered image according to the second filtered image to obtain an intermediate image
  • the superimposition processing module is configured to superimpose the first filtered image and the intermediate image to obtain a target image.
  • a computer device includes a memory and a processor.
  • the memory stores a computer program.
  • the processor is caused to perform the following steps:
  • the above image processing method, device, computer equipment and storage medium after acquiring the original image, subject the original image to the first filtering process and the second filtering process to obtain the first filtered image and the second filtered image, respectively; A filtered image is weakened to obtain an intermediate image; finally, the intermediate image is superimposed on the first filtered image to obtain the target image.
  • Performing the first filtering process and the second filtering process on the original image can remove the noise, and then superimpose the intermediate image on the first filtered image, which can enhance the details in the image and improve the accuracy of image processing.
  • FIG. 1 is a schematic diagram of the internal structure of an electronic device in an embodiment
  • FIG. 3 is a flowchart of a method for freezing a frozen application program in an embodiment
  • FIG. 4 is a flowchart of a filter processing method in an embodiment
  • FIG. 5 is a flowchart of a weakening processing method in an embodiment
  • FIG. 6 is a flowchart of a noise recognition method in an embodiment
  • FIG. 7 is a structural block diagram of an application program device according to an embodiment
  • FIG. 8 is a structural block diagram of an application program device according to an embodiment
  • FIG. 9 is a block diagram of a partial structure of a mobile phone related to an electronic device provided by an embodiment of the present application.
  • first”, “second”, etc. used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from another element.
  • the first filtered image may be referred to as the second filtered image, and similarly, the second filtered image may be referred to as the first filtered image.
  • Both the first filtered image and the second filtered image are filtered images, but they are not the same filtered image.
  • the electronic device includes a processor, memory, and display screen connected by a system bus.
  • the processor is used to provide computing and control capabilities to support the operation of the entire electronic device.
  • the memory is used to store data, programs, and / or instruction codes, etc. At least one computer program is stored on the memory, and the computer program can be executed by the processor to implement the image processing method for electronic devices provided in the embodiments of the present application.
  • the memory may include a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a random-access memory (Random-Access-Memory, RAM).
  • the memory includes a non-volatile storage medium and internal memory.
  • the non-volatile storage medium stores an operating system and computer programs.
  • the computer program can be executed by the processor to implement an image processing method provided by various embodiments of the present application.
  • the internal memory provides a cached operating environment for the operating system and computer programs in the non-volatile storage medium.
  • the display screen can be a touch screen, such as a capacitive screen or an electronic screen, used to display the interface information of the foreground application program, and can also be used to detect a touch operation acting on the display screen and generate corresponding instructions, such as the application of the front and background applications Switching instructions, etc.
  • the structure shown in FIG. 1 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied.
  • the specific electronic device may It includes more or fewer components than shown in the figure, or some components are combined, or have a different component arrangement.
  • the electronic device further includes a network interface connected through a system bus.
  • the network interface may be an Ethernet card or a wireless network card, etc., and is used to communicate with external electronic devices, for example, it may be used to communicate with a server.
  • the image processing method includes steps 202 to 208. among them:
  • Step 202 Obtain the original image.
  • the image refers to a picture with visual effects.
  • image noise refers to unnecessary or redundant interference information present in the image.
  • the presence of image noise seriously affects the quality of the image, so the image needs to be processed to remove image noise and improve the image quality.
  • Images can be files in multiple formats, such as JPEG (Joint Photographic Experts GROUP), GIF (Graphics Interchange Format), PNG (Portable Network Graphics) and other formats .
  • Step 204 Perform a first filtering process on the original image to obtain a first filtered image, and perform a second filtering process on the original image to obtain a second filtered image, where the clarity of the first filtered image is higher than that of the second filtered image .
  • filtering refers to the operation of filtering out the frequency of a specific band in the signal.
  • Filtering can be divided into high-pass filtering, low-pass filtering, Gaussian filtering, joint bilateral filtering, etc., which is not limited here.
  • the first filtering process may be a joint bilateral filtering process, that is, a process performed according to a joint bilateral filter.
  • the first filtered image may be an image obtained by joint bilateral filtering processing on the original image.
  • the process of joint bilateral filtering on the original image is as follows: the distance and color of each pixel in the original image are weighted and smoothed, and the original image is averagely blurred to remove noise in the original image. And retain the high-frequency part of the original image, which is the detail part of the image.
  • the second filtering process may be a Gaussian filtering process, that is, a process performed according to a Gaussian filter.
  • the second filtered image may be an image obtained by performing Gaussian filtering on the original image.
  • the process of performing Gaussian filtering on the original image is as follows: obtaining the original pixel value of each pixel in the original image and obtaining the neighborhood of the pixel; according to the original pixel value of each pixel in the original image, The second pixel value of each pixel is calculated in the neighborhood of, and a second filtered image is generated according to the second pixel value of each pixel.
  • each small square is a pixel.
  • the pixel value refers to the average brightness information of each small square in the image.
  • the neighborhood refers to adjacent areas.
  • the neighborhood of a pixel refers to an adjacent area centered on the pixel.
  • the average pixel value of each pixel is calculated, that is, the second pixel value, and each The average pixel value is used as the pixel value of each original pixel to form a second filtered image.
  • the average pixel value of each pixel in the entire original image is blurred, thereby removing noise in the original image.
  • the first filtered image obtained after the first filtering process retains the high-frequency part of the original image, so the details of the details in the first filtered image are relatively clear, and removed according to the second filtered image obtained after the second filtering process
  • the noise in the original image is reduced, and the high-frequency part is weakened accordingly. Therefore, the first filtered image obtained finally retains more detailed information than the second filtered image, that is, the sharpness of the first filtered image is higher than that of the second filtered image.
  • Step 206 Perform a weakening process on the first filtered image according to the second filtered image to obtain an intermediate image.
  • the weakening process refers to the process of weakening the information in the image.
  • the second filtered image can be subtracted from the first filtered image, then the information in the first filtered image is weakened. It is also possible to multiply the second filtered image by a certain ratio and then subtract the second filtered image after multiplying by a certain ratio based on the first filtered image, which is not limited to this.
  • the first filtered image may be an image obtained by joint bilateral filtering processing
  • the second filtered image may be an image obtained by Gaussian filtering processing.
  • the clarity of the first filtered image is higher than the clarity of the second filtered image.
  • the low-frequency portion of the first filtered image is similar to the low-frequency portion of the second filtered image, while the first filtered image retains the high-frequency portion of the original image, and the pixel values of the high-frequency portion of the second filtered image are The pixel values of the low frequency part are averaged. Therefore, the first filtered image is subtracted from the second filtered image to obtain an intermediate image, that is, the high-frequency part of the first filtered image.
  • Step 208 Superimpose the first filtered image and the intermediate image to obtain the target image.
  • the superimposition process refers to the process of fusing multiple images. For example, after adding image A and image B, the average value is obtained to obtain the superimposed image. It is also possible to fuse image A and image B according to different weights to obtain a superimposed image, which is not limited to this.
  • the intermediate image that is, the high-frequency part of the first filtered image is superimposed on the first filtered image to obtain the target image.
  • the low-frequency part of the target image retains the low-frequency part of the first filtered image, while the high-frequency part of the target image has a higher definition than the first filtered image.
  • the original image after acquiring the original image, the original image is subjected to first filtering processing and second filtering processing to obtain a first filtered image and a second filtered image respectively; the first filtered image is weakened according to the second filtered image, The intermediate image is obtained; finally, the intermediate image is superimposed on the first filtered image to obtain the target image.
  • the original image is subjected to the first filtering process and the second filtering process to remove noise, and then the intermediate image is superimposed on the first filtered image, which can enhance the details in the image and improve the accuracy of image processing Sex.
  • the step of acquiring the original image includes:
  • step 302 when an image acquisition instruction is detected, the resource occupancy rate of the electronic device is acquired.
  • resources refer to the software or hardware resources that the electronic device must use when processing application events, such as the electronic device CPU (Central Processing Unit, central processing unit), memory (Memory), hardware, network resources, IO (Input -Output, input and output), etc.
  • Resource occupancy rate refers to the proportion of resources occupied by electronic devices, generally refers to the ratio of occupied resources to all resources, which can be expressed as a percentage. For example, the total memory of the device is 128GB, and the already occupied memory is 56GB, then the resource occupancy rate of the device can be expressed as the memory occupancy rate, and the obtained memory occupancy rate is 43.75%.
  • the image acquisition instruction may include information such as the size of the image, the address of the image, the resolution of the image, and the sharpness of the image.
  • the electronic device processes the image, it needs to occupy part of the software or hardware resources. Therefore, when the image acquisition instruction is detected, the resource occupancy rate of the electronic device is acquired.
  • Step 304 When the resource occupancy rate of the electronic device is greater than the occupancy rate threshold, acquire the target priority corresponding to the target application program that initiated the image acquisition instruction.
  • the priority refers to the priority level, that is, the degree of importance.
  • the priority of the application is higher, it means that the importance of the application is more important.
  • an application when an application sends an image to an electronic device, it will initiate an image acquisition instruction.
  • the priority corresponding to each application program can be set in advance. After the electronic device detects the image acquisition instruction, when the resource occupancy rate of the electronic device is greater than the occupancy threshold, the target application program that initiated the image acquisition instruction is acquired, and the target priority of the target application program is further acquired.
  • the step of acquiring the original image is performed to process the original image.
  • Step 306 Obtain the frozen application from the applications running in the electronic device according to the target priority, and freeze the frozen application.
  • the running application can be frozen.
  • the application program in the frozen state does not occupy processor resources to run, but still consumes resources such as memory and hardware of the electronic device.
  • the application in the frozen state has not been closed, but it is not running temporarily.
  • the application running in the electronic device is acquired according to the target priority, and then the frozen application is obtained from the running application, and the frozen application is frozen.
  • Step 308 Acquire the original image according to the image acquisition instruction.
  • the image acquisition instruction may include the address of the image and the like. Acquire the address of the image according to the image acquisition instruction, so as to acquire the original image in the storage space corresponding to the address of the image.
  • the original image can also be acquired in real time, and can also be acquired in other ways, not limited to this. For example, an image acquisition instruction is detected, and the camera is turned on to obtain the original image according to the image acquisition instruction.
  • the resource occupancy rate of the electronic device when an image acquisition instruction is detected, that is, before image processing, the resource occupancy rate of the electronic device is acquired, and when the resource occupancy rate is greater than the occupancy rate threshold, the electronic is acquired according to the target priority of the target application Freeze the application in the device and freeze the frozen application before acquiring the original image. After the application is frozen, more resources can be released to process the image by the electronic device, which can reduce the resource consumption of the electronic device.
  • obtaining the frozen application from the application running in the electronic device according to the target priority includes: obtaining the priority threshold according to the resource occupancy rate and the target priority; obtaining from the application running in the electronic device Applications with a priority lower than the priority threshold are considered frozen applications.
  • the occupancy threshold may include a first occupancy threshold and a second occupancy threshold, and the first occupancy threshold is less than the second occupancy threshold.
  • the target priority is used as the priority threshold, and from the applications running in the electronic device, the application whose priority is lower than the priority threshold is obtained As a frozen application.
  • the priority threshold is obtained according to the resource occupancy rate and the target priority.
  • the first occupancy threshold is 80%
  • the second occupancy threshold is 90%
  • the resource occupancy of the electronic device is 90%
  • the target priority of the target application is 3, and the preset proportional coefficient k is 2.
  • the resource occupancy rate of the electronic device is equal to the second occupancy threshold 90%
  • the priority threshold is obtained through the resource occupancy rate of the electronic device and the target priority of the target application, and from the applications running in the electronic device, the application with a priority lower than the priority threshold is obtained as a freeze
  • the application program freezes the frozen application program and combines the resource occupancy rate of the electronic device and the target priority of the target application program to freeze the frozen application program, which can more accurately reduce the resource consumption of the electronic device.
  • performing a first filtering process on the original image to obtain a first filtered image, and performing a second filtering process on the original image to obtain a second filtered image includes:
  • Step 402 Obtain the brightness of the original image.
  • the brightness of the original image refers to the brightness of the original image, which can usually be measured from a percentage of 0% (black) to 100% (white). The higher the percentage, the higher the brightness of the original image.
  • the brightness of the original image may be calculated according to the pixel value of the pixel, or may be calculated according to other methods, which is not limited herein.
  • R represents the average value of the red channel pixel values of all pixels in the original image
  • G represents the average value of the green channel pixel values of all pixels in the original image
  • B represents the average of the blue channel pixel values of all pixels in the original image .
  • the brightness of the original image may be changed according to the change in the degree of exposure when taking a picture, or may be changed according to the change in the color depth of the image, which is not limited thereto.
  • Step 404 When the brightness of the original image is within the preset brightness range, acquire the first filtering parameter and the second filtering parameter.
  • the first filtering parameter refers to the filtering parameter of the first filtering process.
  • the second filter parameter refers to the filter parameter of the second filter process.
  • the first filter parameter of the first filter process and the second filter parameter of the second filter process are acquired.
  • the first filter parameter and the second filter parameter may be set in advance, or may be adjusted according to the brightness of the original image or other factors, which is not limited herein.
  • the prompt information may be output through the electronic device.
  • the first brightness threshold is greater than the second brightness threshold.
  • the output of the prompt information through the electronic device may be the output of the brightness value of the original image and the output of the prompt message, such as "the image is too bright, and processing is not recommended.”
  • Step 406 Perform a first filtering process on the original image according to the first filtering parameter to obtain a first filtered image, and perform a second filtering process on the original image according to the second filtering parameter to obtain a second filtered image.
  • the electronic device after acquiring the first filtering parameter and the second filtering parameter, performs first filtering processing and second filtering processing on the original image to obtain the first filtered image and the second filtered image, respectively.
  • the first filtering process may be a joint bilateral filtering process; the second filtering process may be a Gaussian filtering process.
  • the first filtering parameter may be a joint bilateral filtering parameter; the second filtering parameter may be a Gaussian filtering parameter.
  • the first filtering parameter and the second filtering parameter are acquired, and the original image is processed according to the first filtering parameter and the second filtering parameter, thereby avoiding Processing the original image that does not meet the preset brightness range saves the resources of the electronic device.
  • the first filtered image is weakened according to the second filtered image to obtain an intermediate image, including:
  • step 502 the first filtered image is subtracted from the second filtered image to obtain a difference image.
  • the flat portion in the first filtered image is similar to the flat portion in the second filtered image.
  • the first filtered image retains the high-frequency part of the image, that is, the detail part of the image; the high-frequency part of the second filtered image is averaged by the low-frequency part in the neighborhood.
  • the first filtered image is subtracted from the second filtered image to obtain a difference image, that is, a high-frequency part of the first filtered image, that is, a detail part in the first filtered image.
  • Step 504 Obtain the weighting factor of the difference image.
  • the weighting factor refers to a factor used to indicate the importance of the difference image in the target image.
  • the weighting factor of the difference image when the weighting factor of the difference image is larger, it indicates that the difference image is more important in the target image, that is, the detail part in the target image is clearer.
  • the sharpness of the difference image is obtained; the weighting factor of the difference image is obtained according to the sharpness of the difference image.
  • Step 506 Obtain an intermediate image according to the difference image and the weighting factor of the difference image.
  • the difference image may be multiplied by the weighting factor of the difference image to obtain an intermediate image, or the intermediate image may be obtained by other methods according to the weighting factor of the difference image and the difference image, which is not limited herein.
  • the first filtered image is subtracted from the second filtered image to obtain a difference image, and then the weighting factor of the difference image is obtained, and the intermediate image can be obtained by the weighting factor of the difference image and the difference image, which can be more accurate To get the detail of the target image.
  • obtaining the weighting factor of the difference image includes: obtaining the sharpness of the difference image; and obtaining the weighting factor of the difference image according to the sharpness of the difference image.
  • the clarity of the image refers to the clarity of the image.
  • the sharpness of the difference image when the sharpness of the difference image is sufficiently high, the sharpness of the intermediate image obtained by increasing the weighting factor is not much different from the sharpness of the difference image, but consumes a lot of resources of the electronic device. Therefore, when the sharpness of the difference image is higher, it means that the high-frequency part of the difference image, that is, the higher the pixel value of the detail part, can reduce the weighting factor of the difference image. When the sharpness of the difference image is lower, it means that the high-frequency part of the difference image, that is, the lower the pixel value of the detail part, can increase the weighting factor of the difference image.
  • the weighting factor of the difference image is obtained through the sharpness of the difference image.
  • the weighting factor can be reduced, so that the weight can be adjusted according to the sharpness of the difference image Factor to improve the accuracy of image processing.
  • the method further includes:
  • Step 602 Identify the noise of the target image.
  • the noise of the image refers to unnecessary or unnecessary interference information existing in the image.
  • the noise of the image will affect the accuracy of the image.
  • the noise of the target image can be identified by the Filter-Based Approach Using Arithmetic Algorithm; the noise of the target image can also be identified by the Filter-Based Approach Using Statistics Averaging algorithm, or by identifying the noise in the target image, etc. Limited to this.
  • the noise of the image is composed of various noises in the image. Pixels divide the image into several small squares, and the small squares that belong to noise are noises.
  • Step 604 Acquire the noise ratio of the noise in the target image.
  • Step 606 when the noise ratio of the target image is greater than the ratio threshold, the target image is used as the original image, and the step of acquiring the original image is performed.
  • the noise ratio of the image when the noise ratio of the image is too large, the sharpness of the image is too low.
  • the noise ratio of the target image is greater than the ratio threshold, the target image is used as the original image, the step of acquiring the original image is performed, and the image processing is performed again to obtain the target image with a lower noise ratio.
  • the ratio threshold may be set by the user in advance, or may be set in other ways, which is not limited herein.
  • the target image when the noise ratio of the target image is greater than the ratio threshold, the target image is used as the original image for image processing, and the target image with better denoising effect can be obtained.
  • steps in the flowcharts of FIGS. 2-6 are displayed in order according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless clearly stated in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least some of the steps in FIGS. 2-6 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. The execution order of is not necessarily sequential, but may be executed in turn or alternately with at least a part of other steps or sub-steps or stages of other steps.
  • the above image processing method may further include the following steps:
  • the first filtered image is subtracted from the second filtered image to obtain a difference image.
  • the target image is used as the original image, the step of acquiring the original image is performed, and the image processing is performed again.
  • an image processing apparatus 700 including: an acquisition module 702, a filter processing module 704, a weakening processing module 706, and an overlay processing module 708, wherein:
  • the obtaining module 702 is used to obtain the original image.
  • the filtering processing module 704 is configured to perform a first filtering process on the original image to obtain a first filtered image, and perform a second filtering process on the original image to obtain a second filtered image, where the clarity of the first filtered image is higher than that of the second filtered The clarity of the image.
  • the weakening processing module 706 is configured to weaken the first filtered image according to the second filtered image to obtain an intermediate image.
  • the superimposition processing module 708 is configured to superimpose the first filtered image and the intermediate image to obtain a target image.
  • the above image processing method, device, computer equipment and storage medium after acquiring the original image, subject the original image to the first filtering process and the second filtering process to obtain the first filtered image and the second filtered image, respectively; A filtered image is weakened to obtain an intermediate image; finally, the intermediate image is superimposed on the first filtered image to obtain the target image.
  • the original image is subjected to the first filtering process and the second filtering process to remove noise, and then the intermediate image is superimposed on the first filtered image to enhance the details in the image.
  • an image processing apparatus 800 including: a freezing module 802, an obtaining module 804, a filtering processing module 806, a weakening processing module 808, an overlay processing module 810, and a noise recognition module 812 ,among them:
  • the freezing module 802 is used to obtain the resource occupancy rate of the electronic device when an image acquisition instruction is detected; when the resource occupancy rate of the electronic device is greater than the occupancy threshold, obtain the target priority corresponding to the target application that initiated the image acquisition instruction ; Obtain the frozen application from the applications running in the electronic device according to the target priority, and freeze the frozen application.
  • Acquiring the original image includes: acquiring the original image according to the image acquisition instruction.
  • the obtaining module 804 is used to obtain the original image.
  • the filtering processing module 806 is configured to perform a first filtering process on the original image to obtain a first filtered image, and perform a second filtering process on the original image to obtain a second filtered image, where the clarity of the first filtered image is higher than that of the second filtered The clarity of the image.
  • the weakening processing module 808 is configured to weaken the first filtered image according to the second filtered image to obtain an intermediate image.
  • the superimposition processing module 810 is configured to superimpose the first filtered image and the intermediate image to obtain a target image.
  • the noise recognition module 812 is used for recognizing the noise of the target image; acquiring the noise ratio of the noise in the target image; when the noise ratio of the target image is greater than the ratio threshold, taking the target image as the original image and performing the step of acquiring the original image.
  • the frozen application is frozen, and then the original image is acquired;
  • the first image filter and the second image filter can be used to remove the noise, and then the intermediate image can be superimposed on the first filtered image to enhance the detail in the image; when the noise ratio of the target image is greater than the ratio threshold, then Taking the target image as the original image and then performing image processing can reduce the power consumption of the electronic device while enhancing the detail of the target image.
  • the above freezing module 802 is further used to obtain a priority threshold according to the resource occupancy rate and the target priority; from applications running in the electronic device, an application with a priority lower than the priority threshold is obtained as a frozen application program.
  • the above filter processing module 806 is further used to obtain the brightness of the original image; when the brightness of the original image is within the preset brightness range, the first filter parameter and the second filter parameter are obtained; according to the first filter parameter pair
  • the original image is subjected to a first filter process to obtain a first filtered image, and the second filter process is performed on the original image according to a second filter parameter to obtain a second filtered image.
  • the aforementioned weakening processing module 808 is further used to subtract the first filtered image from the second filtered image to obtain a difference image; obtain a weighting factor of the difference image; according to the weighting factor of the difference image and the difference image Get the intermediate image.
  • the above-mentioned weakening processing module 808 is further used to obtain the sharpness of the difference image; the weighting factor of the difference image is obtained according to the sharpness of the difference image.
  • each module in the above image processing apparatus is for illustration only. In other embodiments, the image processing apparatus may be divided into different modules as needed to complete all or part of the functions of the above image processing apparatus.
  • Each module in the above image processing device may be implemented in whole or in part by software, hardware, and a combination thereof.
  • the above modules may be embedded in the hardware or independent of the processor in the computer device, or may be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
  • each module in the image processing apparatus provided in the embodiments of the present application may be in the form of a computer program.
  • the computer program can be run on a terminal or a server.
  • the program module composed of the computer program may be stored in the memory of the terminal or the server.
  • An embodiment of the present application also provides an electronic device. As shown in FIG. 9, for ease of description, only parts related to the embodiments of the present application are shown, and specific technical details are not disclosed, please refer to the method part of the embodiments of the present application.
  • the electronic device may be any terminal device including a mobile phone, tablet computer, PDA (Personal Digital Assistant), POS (Point of Sales), in-vehicle computer, wearable device, etc. Taking the electronic device as a mobile phone for example :
  • the mobile phone includes: a radio frequency (Radio Frequency) circuit 910, a memory 920, an input unit 930, a display unit 940, a sensor 950, an audio circuit 960, a wireless fidelity (WiFi) module 970, a processor 980 , And power supply 990 and other components.
  • a radio frequency (Radio Frequency) circuit 910 the mobile phone includes: a radio frequency (Radio Frequency) circuit 910, a memory 920, an input unit 930, a display unit 940, a sensor 950, an audio circuit 960, a wireless fidelity (WiFi) module 970, a processor 980 , And power supply 990 and other components.
  • WiFi wireless fidelity
  • FIG. 9 does not constitute a limitation on the mobile phone, and may include more or less components than those shown in the figure, or a combination of certain components, or a different component arrangement.
  • the RF circuit 910 can be used to receive and send signals during the sending and receiving of information or during a call. It can receive the downlink information of the base station and process it to the processor 980; it can also send the uplink data to the base station.
  • RF circuits include but are not limited to antennas, at least one amplifier, transceiver, coupler, low noise amplifier (Low Noise Amplifier, LNA), duplexer, and so on.
  • the RF circuit 910 can also communicate with other devices through a wireless communication network.
  • the above wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile (GSM), General Packet Radio Service (GPRS), and Code Division Multiple Access (Code Division) Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), e-mail, Short Message Service (SMS), etc.
  • GSM Global System of Mobile
  • GPRS General Packet Radio Service
  • CDMA Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • SMS Short Message Service
  • the memory 920 may be used to store software programs and modules.
  • the processor 980 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 920.
  • the memory 920 may mainly include a program storage area and a data storage area, where the program storage area may store an operating system and at least one function-required application program (such as an application program for a sound playback function, an application program for an image playback function, etc.), etc .;
  • the data storage area can store data (such as audio data, address book, etc.) created according to the use of the mobile phone.
  • the memory 920 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
  • the input unit 930 may be used to receive input numeric or character information, and generate key signal input related to user settings and function control of the mobile phone 900.
  • the input unit 930 may include a touch panel 931 and other input devices 932.
  • the touch panel 931 also known as a touch screen, can collect user's touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc. on or near the touch panel 931 Operation), and drive the corresponding connection device according to the preset program.
  • the touch panel 931 may include a touch detection device and a touch controller.
  • the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into contact coordinates, and then sends It is given to the processor 980 and can receive the command sent by the processor 980 and execute it.
  • the touch panel 931 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 930 may also include other input devices 932.
  • other input devices 932 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), and the like.
  • the display unit 940 may be used to display information input by the user or information provided to the user and various menus of the mobile phone.
  • the display unit 940 may include a display panel 941.
  • the display panel 941 may be configured in the form of a liquid crystal display (Liquid Crystal) (LCD), an organic light-emitting diode (Organic Light-Emitting Diode, OLED), or the like.
  • the touch panel 931 may cover the display panel 941, and when the touch panel 931 detects a touch operation on or near it, it is transmitted to the processor 980 to determine the type of touch event, and then the processor 980 according to The type of touch event provides a corresponding visual output on the display panel 941.
  • the touch panel 931 and the display panel 941 are used as two independent components to realize the input and input functions of the mobile phone, in some embodiments, the touch panel 931 and the display panel 941 may be integrated and Realize the input and output functions of the mobile phone.
  • the mobile phone 900 may further include at least one sensor 950, such as a light sensor, a motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 941 according to the brightness of the ambient light, and the proximity sensor may close the display panel 941 and / or when the mobile phone moves to the ear Or backlight.
  • the motion sensor may include an acceleration sensor.
  • the acceleration sensor can detect the magnitude of acceleration in various directions, and can detect the magnitude and direction of gravity when at rest. It can be used for applications that recognize mobile phone gestures (such as horizontal and vertical screen switching), and vibration recognition related functions (such as Pedometer, percussion), etc.
  • the mobile phone can also be equipped with other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor and so on.
  • the audio circuit 960, the speaker 961, and the microphone 962 may provide an audio interface between the user and the mobile phone.
  • the audio circuit 960 can transmit the converted electrical signal of the received audio data to the speaker 961, which converts the speaker 961 into a sound signal output; on the other hand, the microphone 962 converts the collected sound signal into an electrical signal, which After receiving, it is converted into audio data, and then processed by the audio data output processor 980, and then sent to another mobile phone through the RF circuit 910, or the audio data is output to the memory 920 for subsequent processing.
  • WiFi is a short-range wireless transmission technology.
  • the mobile phone can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 970. It provides users with wireless broadband Internet access.
  • FIG. 9 shows the WiFi module 970, it can be understood that it is not a necessary component of the mobile phone 900, and may be omitted as needed.
  • the processor 980 is the control center of the mobile phone, connects various parts of the entire mobile phone with various interfaces and lines, executes or executes the software programs and / or modules stored in the memory 920, and calls the data stored in the memory 920 to execute Various functions and processing data of the mobile phone, so as to monitor the mobile phone as a whole.
  • the processor 980 may include one or more processing units.
  • the processor 980 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, user interface, application programs, and the like; the modem processor mainly processes wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 980.
  • the mobile phone 900 further includes a power supply 990 (such as a battery) that supplies power to various components.
  • a power supply 990 (such as a battery) that supplies power to various components.
  • the power supply can be logically connected to the processor 980 through a power management system, so as to realize functions such as charging, discharging, and power management through the power management system.
  • the mobile phone 900 may further include a camera, a Bluetooth module, and the like.
  • the processor 980 included in the electronic device implements the steps of the image processing method when executing the computer program stored on the memory.
  • the embodiments of the present application also provide a computer-readable storage medium.
  • One or more non-volatile computer-readable storage media containing computer-executable instructions, which when executed by one or more processors, cause the processors to perform the steps of the image processing method.
  • a computer program product containing instructions that, when run on a computer, causes the computer to perform an image processing method.
  • Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM), which acts as external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR) SDRAM, enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDR double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous Link (Synchlink) DRAM
  • Rambus direct RAM
  • DRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)

Abstract

An image processing method, comprising: acquiring an original image; performing first filtering processing on the original image to obtain a first filtered image, and performing second filtering processing on the original image to obtain a second filtered image, wherein the sharpness of the first filtered image is higher than the sharpness of the second filtered image; performing weaken processing on the first filtered image according to the second filtered image to obtain an intermediate image; and performing superimposition processing on the first filtered image and the intermediate image to obtain a target image.

Description

图像处理方法、装置、计算机设备和存储介质Image processing method, device, computer equipment and storage medium 技术领域Technical field
本申请涉及计算机技术领域,特别是涉及一种图像处理方法、装置、计算机设备和存储介质。The present application relates to the field of computer technology, and in particular, to an image processing method, device, computer equipment, and storage medium.
背景技术Background technique
随着计算机技术的发展,出现了越来越多的图像处理技术。在对图像进行处理的过程中,可以将图像的噪声去掉。然而,在去除图像的噪声同时,图像的细节部分也可以被模糊化。With the development of computer technology, more and more image processing technologies have appeared. In the process of processing the image, the image noise can be removed. However, while removing noise from the image, details of the image can also be blurred.
发明内容Summary of the invention
基于此,有必要针对上述技术问题,提供一种能够提高图像细节部分清晰度的图像处理方法、装置、计算机设备和存储介质。Based on this, it is necessary to provide an image processing method, device, computer equipment, and storage medium that can improve the clarity of image details and parts in view of the above technical problems.
一种图像处理方法,所述方法包括:An image processing method, the method includes:
获取原始图像;Get the original image;
将所述原始图像进行第一滤波处理得到第一滤波图像,并将所述原始图像进行第二滤波处理得到第二滤波图像,其中,所述第一滤波图像的清晰度高于所述第二滤波图像的清晰度;Performing a first filtering process on the original image to obtain a first filtered image, and performing a second filtering process on the original image to obtain a second filtered image, wherein the clarity of the first filtered image is higher than that of the second Filter the clarity of the image;
根据所述第二滤波图像对所述第一滤波图像进行弱化处理,得到中间图像;Weaken the first filtered image according to the second filtered image to obtain an intermediate image;
将所述第一滤波图像与所述中间图像进行叠加处理,得到目标图像。Superimposing the first filtered image and the intermediate image to obtain a target image.
一种图像处理装置,所述装置包括:An image processing device including:
获取模块,用于获取原始图像;Acquisition module for acquiring original images;
滤波处理模块,用于将所述原始图像进行第一滤波处理得到第一滤波图像,并将所述原始图像进行第二滤波处理得到第二滤波图像,其中,所述第一滤波图像的清晰度高于所述第二滤波图像的清晰度;A filtering processing module, configured to perform a first filtering process on the original image to obtain a first filtered image, and perform a second filtering process on the original image to obtain a second filtered image, wherein the clarity of the first filtered image Higher than the sharpness of the second filtered image;
弱化处理模块,用于根据所述第二滤波图像对所述第一滤波图像进行弱化处理,得到中间图像;A weakening processing module, configured to weaken the first filtered image according to the second filtered image to obtain an intermediate image;
叠加处理模块,用于将所述第一滤波图像与所述中间图像进行叠加处理,得到目标图像。The superimposition processing module is configured to superimpose the first filtered image and the intermediate image to obtain a target image.
一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如下步骤:A computer device includes a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor is caused to perform the following steps:
获取原始图像;Get the original image;
将所述原始图像进行第一滤波处理得到第一滤波图像,并将所述原始图像进行第二滤波处理得到第二滤波图像,其中,所述第一滤波图像的清晰度高于所述第二滤波图像的清晰度;Performing a first filtering process on the original image to obtain a first filtered image, and performing a second filtering process on the original image to obtain a second filtered image, wherein the clarity of the first filtered image is higher than that of the second Filter the clarity of the image;
根据所述第二滤波图像对所述第一滤波图像进行弱化处理,得到中间图像;Weaken the first filtered image according to the second filtered image to obtain an intermediate image;
将所述第一滤波图像与所述中间图像进行叠加处理,得到目标图像。Superimposing the first filtered image and the intermediate image to obtain a target image.
一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如下步骤:获取原始图像;A computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the following steps are realized: acquiring an original image;
将所述原始图像进行第一滤波处理得到第一滤波图像,并将所述原始图像进行第二滤波处理得到第二滤波图像,其中,所述第一滤波图像的清晰度高于所述第二滤波图像的清晰度;Performing a first filtering process on the original image to obtain a first filtered image, and performing a second filtering process on the original image to obtain a second filtered image, wherein the clarity of the first filtered image is higher than that of the second Filter the clarity of the image;
根据所述第二滤波图像对所述第一滤波图像进行弱化处理,得到中间图像;Weaken the first filtered image according to the second filtered image to obtain an intermediate image;
将所述第一滤波图像与所述中间图像进行叠加处理,得到目标图像。Superimposing the first filtered image and the intermediate image to obtain a target image.
上述图像处理方法、装置、计算机设备和存储介质,获取原始图像后,将原始图像进行第一滤波处理和第二滤波处理分别得到第一滤波图像和第二滤波图像;根据第二滤波图像对第一滤波图像进行弱化处理,得到中间图像;最后将中间图像叠加到第一滤波图像上,得到目标图像。将原始图像进行第一滤波处理和第二滤波处理,可以去除噪声,再将中间图像对第一滤波图像进行叠加处理,可以增强图像中的细节部分,提高图像处理的准确性。The above image processing method, device, computer equipment and storage medium, after acquiring the original image, subject the original image to the first filtering process and the second filtering process to obtain the first filtered image and the second filtered image, respectively; A filtered image is weakened to obtain an intermediate image; finally, the intermediate image is superimposed on the first filtered image to obtain the target image. Performing the first filtering process and the second filtering process on the original image can remove the noise, and then superimpose the intermediate image on the first filtered image, which can enhance the details in the image and improve the accuracy of image processing.
附图说明BRIEF DESCRIPTION
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly explain the embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings required in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present application. For those of ordinary skill in the art, without paying any creative work, other drawings can be obtained based on these drawings.
图1为一个实施例中电子设备的内部结构示意图;1 is a schematic diagram of the internal structure of an electronic device in an embodiment;
图2为一个实施例中图像处理方法的流程图;2 is a flowchart of an image processing method in an embodiment;
图3为一个实施例中将冻结应用程序进行冻结方法的流程图;3 is a flowchart of a method for freezing a frozen application program in an embodiment;
图4为一个实施例中滤波处理方法的流程图;4 is a flowchart of a filter processing method in an embodiment;
图5为一个实施例中弱化处理方法的流程图;5 is a flowchart of a weakening processing method in an embodiment;
图6为一个实施例中噪声识别方法的流程图;6 is a flowchart of a noise recognition method in an embodiment;
图7为一个实施例的应用程序装置的结构框图;7 is a structural block diagram of an application program device according to an embodiment;
图8为一个实施例的应用程序装置的结构框图;8 is a structural block diagram of an application program device according to an embodiment;
图9为与本申请实施例提供的电子设备相关的手机的部分结构的框图。9 is a block diagram of a partial structure of a mobile phone related to an electronic device provided by an embodiment of the present application.
具体实施方式detailed description
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clear, the present application will be described in further detail in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
可以理解,本申请所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。举例来说,在不脱离本申请的范围的情况下,可以将第一滤波图像称为第二滤波图像,且类似地,可将第二滤波图像称为第一滤波图像。第一滤波图像和第二滤波图像两者都是滤波图像,但其不是同一滤波图像。It can be understood that the terms “first”, “second”, etc. used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from another element. For example, without departing from the scope of the present application, the first filtered image may be referred to as the second filtered image, and similarly, the second filtered image may be referred to as the first filtered image. Both the first filtered image and the second filtered image are filtered images, but they are not the same filtered image.
如图1所示,提供了一种电子设备的内部结构示意图。该电子设备包括通过系统总线连接的处理器、存储器和显示屏。其中,该处理器用于提供计算和控制能力,支撑整个电子设备的运行。存储器用于存储数据、程序、和/或指令代码等,存储器上存储至少一个计算机程序,该计算机程序可被处理器执行,以实现本申请实施例中提供的适用于电子设备的图像处理方法。存储器可包括磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性存储介质,或随机存储记忆体(Random-Access-Memory,RAM)等。例如,在一个实施例中,存储器包括非易失性存储介质及内存储器。非易失性存储介质存储有操作系统和计算机程序。该计算机程序可被处理器所执行,以用于实现本申请各个实施例所提供的一种图像处理方法。内存储器为非易失性存储介质中的操作系统和计算机程序提供高速缓存的运行环境。显示屏可以是触摸屏,比如为电容屏或电子屏,用于显示前台应用程序的界面信息,还可以被用于 检测作用于该显示屏的触摸操作,生成相应的指令,比如进行前后台应用的切换指令等。As shown in FIG. 1, a schematic diagram of an internal structure of an electronic device is provided. The electronic device includes a processor, memory, and display screen connected by a system bus. Among them, the processor is used to provide computing and control capabilities to support the operation of the entire electronic device. The memory is used to store data, programs, and / or instruction codes, etc. At least one computer program is stored on the memory, and the computer program can be executed by the processor to implement the image processing method for electronic devices provided in the embodiments of the present application. The memory may include a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a random-access memory (Random-Access-Memory, RAM). For example, in one embodiment, the memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The computer program can be executed by the processor to implement an image processing method provided by various embodiments of the present application. The internal memory provides a cached operating environment for the operating system and computer programs in the non-volatile storage medium. The display screen can be a touch screen, such as a capacitive screen or an electronic screen, used to display the interface information of the foreground application program, and can also be used to detect a touch operation acting on the display screen and generate corresponding instructions, such as the application of the front and background applications Switching instructions, etc.
本领域技术人员可以理解,图1中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的电子设备的限定,具体的电子设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。如该电子设备还包括通过系统总线连接的网络接口,网络接口可以是以太网卡或无线网卡等,用于与外部的电子设备进行通信,比如可用于同服务器进行通信。Those skilled in the art may understand that the structure shown in FIG. 1 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied. The specific electronic device may It includes more or fewer components than shown in the figure, or some components are combined, or have a different component arrangement. For example, the electronic device further includes a network interface connected through a system bus. The network interface may be an Ethernet card or a wireless network card, etc., and is used to communicate with external electronic devices, for example, it may be used to communicate with a server.
图2为一个实施例中图像处理方法的流程图。如图2所示,该图像处理方法包括步骤202至步骤208。其中:2 is a flowchart of an image processing method in an embodiment. As shown in FIG. 2, the image processing method includes steps 202 to 208. among them:
步骤202,获取原始图像。Step 202: Obtain the original image.
其中,图像指的是具有视觉效果的画面。图像中可能存在图像噪声。图像噪声指的是存在于图像中的不必要的或多余的干扰信息。图像噪声的存在严重影响了图像的质量,因此需要将图像进行处理,去除图像噪声,提高图像的质量。图像可以是多种格式的文件,如图像可以是JPEG(Joint Photographic Experts GROUP,联合图像专家小组)、GIF(Graphics Interchange Format,图像互换格式)、PNG(Portable Network Graphics,便携式网络图形)等格式。Among them, the image refers to a picture with visual effects. There may be image noise in the image. Image noise refers to unnecessary or redundant interference information present in the image. The presence of image noise seriously affects the quality of the image, so the image needs to be processed to remove image noise and improve the image quality. Images can be files in multiple formats, such as JPEG (Joint Photographic Experts GROUP), GIF (Graphics Interchange Format), PNG (Portable Network Graphics) and other formats .
步骤204,将原始图像进行第一滤波处理得到第一滤波图像,并将原始图像进行第二滤波处理得到第二滤波图像,其中,第一滤波图像的清晰度高于第二滤波图像的清晰度。Step 204: Perform a first filtering process on the original image to obtain a first filtered image, and perform a second filtering process on the original image to obtain a second filtered image, where the clarity of the first filtered image is higher than that of the second filtered image .
其中,滤波指的是将信号中特定波段频率进行滤除的操作。滤波可以分为高通滤波、低通滤波、高斯滤波、联合双边滤波等,在此不做限定。Among them, filtering refers to the operation of filtering out the frequency of a specific band in the signal. Filtering can be divided into high-pass filtering, low-pass filtering, Gaussian filtering, joint bilateral filtering, etc., which is not limited here.
在一个实施例中,第一滤波处理可以是联合双边滤波处理,即根据联合双边滤波器进行的处理。相应地,第一滤波图像可以是对原始图像进行联合双边滤波处理得到的图像。In one embodiment, the first filtering process may be a joint bilateral filtering process, that is, a process performed according to a joint bilateral filter. Correspondingly, the first filtered image may be an image obtained by joint bilateral filtering processing on the original image.
具体地,对原始图像进行联合双边滤波处理的过程如下:将原始图像中各个像素点的距离和颜色进行带权平滑处理,并将原始图像进行平均模糊化,从而去除了原始图像中的噪声,并且保留了原始图像中的高频部分,也就是图像中的细节部分。Specifically, the process of joint bilateral filtering on the original image is as follows: the distance and color of each pixel in the original image are weighted and smoothed, and the original image is averagely blurred to remove noise in the original image. And retain the high-frequency part of the original image, which is the detail part of the image.
在一个实施例中,第二滤波处理可以是高斯滤波处理,即根据高斯滤波器进行的处理。相应地,第二滤波图像可以是对原始图像进行高斯滤波处理得到的图像。In one embodiment, the second filtering process may be a Gaussian filtering process, that is, a process performed according to a Gaussian filter. Correspondingly, the second filtered image may be an image obtained by performing Gaussian filtering on the original image.
具体地,对原始图像进行高斯滤波处理的过程如下:获取原始图像中各个像素点的原始像素值,并获取像素点的邻域;根据原始图像中各个像素点的原始像素值,在各个像素点的 邻域中计算得到各个像素点的第二像素值;根据各个像素点的第二像素值生成第二滤波图像。Specifically, the process of performing Gaussian filtering on the original image is as follows: obtaining the original pixel value of each pixel in the original image and obtaining the neighborhood of the pixel; according to the original pixel value of each pixel in the original image, The second pixel value of each pixel is calculated in the neighborhood of, and a second filtered image is generated according to the second pixel value of each pixel.
其中,把图像分割成若干个小方格,每个小方格即为一个像素点。像素值指的是图像中每个小方格的平均亮度信息。邻域指的是相邻的区域。像素点的邻域指的是在以该像素点为中心的相邻的区域。Among them, the image is divided into several small squares, each small square is a pixel. The pixel value refers to the average brightness information of each small square in the image. The neighborhood refers to adjacent areas. The neighborhood of a pixel refers to an adjacent area centered on the pixel.
具体地,获取原始图像中各个像素点的原始像素值并获取像素点的邻域后,在各个像素点的邻域内,计算得到各个像素点的平均像素值,即第二像素值,并将各个平均像素值作为原来各个像素点的像素值,从而组成第二滤波图像。第二滤波图像通过将整张原始图像中各个像素点的像素值进行平均模糊化,从而去除了原始图像中的噪声。Specifically, after obtaining the original pixel value of each pixel in the original image and obtaining the neighborhood of the pixel, within the neighborhood of each pixel, the average pixel value of each pixel is calculated, that is, the second pixel value, and each The average pixel value is used as the pixel value of each original pixel to form a second filtered image. In the second filtered image, the average pixel value of each pixel in the entire original image is blurred, thereby removing noise in the original image.
根据第一滤波处理后得到的第一滤波图像保留了原始图像的高频部分,因此第一滤波图像中的细节部分的信息是比较清晰的,根据第二滤波处理后得到的第二滤波图像去除了原始图像中的噪声,而高频部分也相应地被弱化了。所以,最后得到的第一滤波图像保留的细节信息比第二滤波图像中保留的细节信息更多,即第一滤波图像的清晰度高于第二滤波图像的清晰度。The first filtered image obtained after the first filtering process retains the high-frequency part of the original image, so the details of the details in the first filtered image are relatively clear, and removed according to the second filtered image obtained after the second filtering process The noise in the original image is reduced, and the high-frequency part is weakened accordingly. Therefore, the first filtered image obtained finally retains more detailed information than the second filtered image, that is, the sharpness of the first filtered image is higher than that of the second filtered image.
步骤206,根据第二滤波图像对第一滤波图像进行弱化处理,得到中间图像。Step 206: Perform a weakening process on the first filtered image according to the second filtered image to obtain an intermediate image.
其中,弱化处理指的是将图像中的信息进行减弱的处理。例如,可以在第一滤波图像的基础上减去第二滤波图像,那么第一滤波图像中的信息就被弱化了。还可以将第二滤波图像的乘以一定比例,然后在第一滤波图像的基础上减去乘以一定比例后的第二滤波图像,不限于此。The weakening process refers to the process of weakening the information in the image. For example, the second filtered image can be subtracted from the first filtered image, then the information in the first filtered image is weakened. It is also possible to multiply the second filtered image by a certain ratio and then subtract the second filtered image after multiplying by a certain ratio based on the first filtered image, which is not limited to this.
在本实施例中,第一滤波图像可以是联合双边滤波处理得到的图像,第二滤波图像可以是高斯滤波处理得到的图像。第一滤波图像的清晰度高于第二滤波图像的清晰度。In this embodiment, the first filtered image may be an image obtained by joint bilateral filtering processing, and the second filtered image may be an image obtained by Gaussian filtering processing. The clarity of the first filtered image is higher than the clarity of the second filtered image.
具体地,第一滤波图像的低频部分与第二滤波图像的低频部分类似,而第一滤波图像保留了原始图像中的高频部分,第二滤波图像的高频部分的像素值被邻域内的低频部分的像素值平均化。因此,将第一滤波图像减去第二滤波图像,得到中间图像,即第一滤波图像的高频部分。Specifically, the low-frequency portion of the first filtered image is similar to the low-frequency portion of the second filtered image, while the first filtered image retains the high-frequency portion of the original image, and the pixel values of the high-frequency portion of the second filtered image are The pixel values of the low frequency part are averaged. Therefore, the first filtered image is subtracted from the second filtered image to obtain an intermediate image, that is, the high-frequency part of the first filtered image.
步骤208,将第一滤波图像与中间图像进行叠加处理,得到目标图像。Step 208: Superimpose the first filtered image and the intermediate image to obtain the target image.
其中,叠加处理指的是将多张图像进行融合的处理。例如,将图像A和图像B进行相加后,再取平均值,得到叠加后的图像。也可以按照不同的权重将图像A和图像B进行融合,得到叠加后的图像,不限于此。Among them, the superimposition process refers to the process of fusing multiple images. For example, after adding image A and image B, the average value is obtained to obtain the superimposed image. It is also possible to fuse image A and image B according to different weights to obtain a superimposed image, which is not limited to this.
具体地,将中间图像也就是第一滤波图像的高频部分叠加到第一滤波图像中,得到目标图像。目标图像的低频部分保留第一滤波图像的低频部分,而目标图像的高频部分的清晰度高于第一滤波图像的清晰度。Specifically, the intermediate image, that is, the high-frequency part of the first filtered image is superimposed on the first filtered image to obtain the target image. The low-frequency part of the target image retains the low-frequency part of the first filtered image, while the high-frequency part of the target image has a higher definition than the first filtered image.
上述图像处理方法中,获取原始图像后,将原始图像进行第一滤波处理和第二滤波处理分别得到第一滤波图像和第二滤波图像;根据第二滤波图像对第一滤波图像进行弱化处理,得到中间图像;最后将中间图像叠加到第一滤波图像上,得到目标图像。上述图像处理的方式,将原始图像进行第一滤波处理和第二滤波处理,可以去除噪声,再将中间图像对第一滤波图像进行叠加处理,可以增强图像中的细节部分,提高图像处理的准确性。In the above image processing method, after acquiring the original image, the original image is subjected to first filtering processing and second filtering processing to obtain a first filtered image and a second filtered image respectively; the first filtered image is weakened according to the second filtered image, The intermediate image is obtained; finally, the intermediate image is superimposed on the first filtered image to obtain the target image. In the above image processing method, the original image is subjected to the first filtering process and the second filtering process to remove noise, and then the intermediate image is superimposed on the first filtered image, which can enhance the details in the image and improve the accuracy of image processing Sex.
在一个实施例中,如图3所示,获取原始图像的步骤包括:In one embodiment, as shown in FIG. 3, the step of acquiring the original image includes:
步骤302,当检测到图像获取指令时,获取电子设备的资源占用率。In step 302, when an image acquisition instruction is detected, the resource occupancy rate of the electronic device is acquired.
其中,资源是指电子设备在处理应用事件时所必须用到的软件或硬件资源,比如电子设备的CPU(Central Processing Unit,中央处理器)、内存(Memory)、硬件、网络资源、IO(Input-Output,输入输出)等。资源占用率是指电子设备的资源被占用的比例,一般是指被占用的资源与全部资源的比例,可以通过百分比的形式进行表示。例如,设备的总内存有128GB,已经被占用的内存有56GB,那么该设备的资源占用率就可以表示为内存占用率,得到的内存占用率即为43.75%。Among them, resources refer to the software or hardware resources that the electronic device must use when processing application events, such as the electronic device CPU (Central Processing Unit, central processing unit), memory (Memory), hardware, network resources, IO (Input -Output, input and output), etc. Resource occupancy rate refers to the proportion of resources occupied by electronic devices, generally refers to the ratio of occupied resources to all resources, which can be expressed as a percentage. For example, the total memory of the device is 128GB, and the already occupied memory is 56GB, then the resource occupancy rate of the device can be expressed as the memory occupancy rate, and the obtained memory occupancy rate is 43.75%.
具体地,在图像获取指令中,可以包括如图像的大小、图像的地址、图像的分辨率、图像的清晰度等信息。电子设备对图像进行处理的过程中,需要占用部分的软件或者硬件资源。因此,在检测到图像获取指令时,获取电子设备的资源占用率。Specifically, the image acquisition instruction may include information such as the size of the image, the address of the image, the resolution of the image, and the sharpness of the image. When the electronic device processes the image, it needs to occupy part of the software or hardware resources. Therefore, when the image acquisition instruction is detected, the resource occupancy rate of the electronic device is acquired.
步骤304,当电子设备的资源占用率大于占用率阈值时,获取发起图像获取指令的目标应用程序所对应的目标优先级。Step 304: When the resource occupancy rate of the electronic device is greater than the occupancy rate threshold, acquire the target priority corresponding to the target application program that initiated the image acquisition instruction.
其中,优先级指的是优先的等级,即重要程度。当应用程序的优先级越高时,则表示应用程序的重要程度越重要。Among them, the priority refers to the priority level, that is, the degree of importance. When the priority of the application is higher, it means that the importance of the application is more important.
具体地,当应用程序将图像发送到电子设备时,会发起图像获取指令。在电子设备中的应用程序,可以预先设置各个应用程序对应的优先级。电子设备检测到图像获取指令后,当电子设备的资源占用率大于占用率阈值时,则获取发起图像获取指令的目标应用程序,进一步获取目标应用程序的目标优先级。Specifically, when an application sends an image to an electronic device, it will initiate an image acquisition instruction. For the application programs in the electronic device, the priority corresponding to each application program can be set in advance. After the electronic device detects the image acquisition instruction, when the resource occupancy rate of the electronic device is greater than the occupancy threshold, the target application program that initiated the image acquisition instruction is acquired, and the target priority of the target application program is further acquired.
进一步地,当电子设备的资源占用率小于占用率阈值时,则执行获取原始图像步骤,对 原始图像进行处理。Further, when the resource occupancy rate of the electronic device is less than the occupancy rate threshold, the step of acquiring the original image is performed to process the original image.
步骤306,根据目标优先级从电子设备中运行的应用程序中获取冻结应用程序,并将冻结应用程序冻结。Step 306: Obtain the frozen application from the applications running in the electronic device according to the target priority, and freeze the frozen application.
其中,运行中的应用程序可以被冻结。处于冻结状态的应用程序不占用处理器资源进行运行,但是仍然占用电子设备的内存和硬件等资源。处于冻结状态的应用程序并没有被关闭,只是暂时不运行。Among them, the running application can be frozen. The application program in the frozen state does not occupy processor resources to run, but still consumes resources such as memory and hardware of the electronic device. The application in the frozen state has not been closed, but it is not running temporarily.
具体地,获取目标应用程序的目标优先级后,根据目标优先级获取电子设备中运行的的应用程序,再从运行中的应用程序中获取冻结应用程序,并将冻结应用程序冻结。Specifically, after acquiring the target priority of the target application, the application running in the electronic device is acquired according to the target priority, and then the frozen application is obtained from the running application, and the frozen application is frozen.
步骤308,根据图像获取指令获取原始图像。Step 308: Acquire the original image according to the image acquisition instruction.
具体地,图像获取指令中可以包含图像的地址等。根据图像获取指令获取图像的地址,从而在图像的地址对应的存储空间中获取原始图像。获取原始图像也可以实时获取,还可以是其他方式获取,不限于此。例如,检测到图像获取指令,根据图像获取指令打开摄像头拍摄得到原始图像。Specifically, the image acquisition instruction may include the address of the image and the like. Acquire the address of the image according to the image acquisition instruction, so as to acquire the original image in the storage space corresponding to the address of the image. The original image can also be acquired in real time, and can also be acquired in other ways, not limited to this. For example, an image acquisition instruction is detected, and the camera is turned on to obtain the original image according to the image acquisition instruction.
在本实施例中,当检测到图像获取指令时,也就是在图像处理之前,获取电子设备的资源占用率,当资源占用率大于占用率阈值时,则根据目标应用程序的目标优先级获取电子设备中的冻结应用程序,并将冻结应用程序冻结之后,才进行获取原始图像。冻结应用程序后,可以释放更多的资源,以供电子设备对图像进行处理,可以降低电子设备的资源功耗。In this embodiment, when an image acquisition instruction is detected, that is, before image processing, the resource occupancy rate of the electronic device is acquired, and when the resource occupancy rate is greater than the occupancy rate threshold, the electronic is acquired according to the target priority of the target application Freeze the application in the device and freeze the frozen application before acquiring the original image. After the application is frozen, more resources can be released to process the image by the electronic device, which can reduce the resource consumption of the electronic device.
在一个实施例中,根据目标优先级从电子设备中运行的应用程序中获取冻结应用程序,包括:根据资源占用率和目标优先级获取优先级阈值;从电子设备中运行的应用程序中,获取优先级低于优先级阈值的应用程序作为冻结应用程序。In one embodiment, obtaining the frozen application from the application running in the electronic device according to the target priority includes: obtaining the priority threshold according to the resource occupancy rate and the target priority; obtaining from the application running in the electronic device Applications with a priority lower than the priority threshold are considered frozen applications.
具体地,占用率阈值可以包括第一占用率阈值和第二占用率阈值,第一占用率阈值小于第二占用率阈值。当资源占用率大于第一占用率阈值且小于第二占用率阈值时,将目标优先级作为优先级阈值,并从电子设备中运行的应用程序中,获取优先级低于优先级阈值的应用程序作为冻结应用程序。当资源占用率大于或等于第二占用率阈值时,根据资源占用率和目标优先级获取优先级阈值,优先级阈值可以通过以下计算公式得到:优先级阈值=资源占用率*k+目标优先级。其中,k为预先设置的比例系数。可以理解的是,资源占用率越高,则电子设备中空闲的资源越少,则需要冻结的应用程序越多,也就是说优先级阈值越高。Specifically, the occupancy threshold may include a first occupancy threshold and a second occupancy threshold, and the first occupancy threshold is less than the second occupancy threshold. When the resource occupancy rate is greater than the first occupancy threshold and less than the second occupancy threshold, the target priority is used as the priority threshold, and from the applications running in the electronic device, the application whose priority is lower than the priority threshold is obtained As a frozen application. When the resource occupancy rate is greater than or equal to the second occupancy threshold, the priority threshold is obtained according to the resource occupancy rate and the target priority. The priority threshold can be obtained by the following calculation formula: priority threshold = resource occupancy rate * k + target priority. Among them, k is a preset scale factor. It can be understood that the higher the resource occupancy rate, the fewer idle resources in the electronic device, and the more applications need to be frozen, that is, the higher the priority threshold.
例如,第一占用率阈值为80%,第二占用率阈值为90%,电子设备的资源占用率为90%, 目标应用程序的目标优先级为3,预先设置的比例系数k为2。则电子设备的资源占用率等于第二占用率阈值90%,优先级阈值=资源占用率*k+目标优先级=90%*2+3=4.8。因此,从电子设备中运行的应用程序中,获取优先级低于优先级阈值4.8的应用程序作为冻结应用程序。For example, the first occupancy threshold is 80%, the second occupancy threshold is 90%, the resource occupancy of the electronic device is 90%, the target priority of the target application is 3, and the preset proportional coefficient k is 2. Then, the resource occupancy rate of the electronic device is equal to the second occupancy threshold 90%, and the priority threshold = resource occupancy rate * k + target priority = 90% * 2 + 3 = 4.8. Therefore, from the applications running in the electronic device, an application with a priority lower than the priority threshold of 4.8 is acquired as a frozen application.
在本实施例中,通过电子设备的资源占用率和目标应用程序的目标优先级获取优先级阈值,并从电子设备中运行的应用程序中,获取优先级低于优先级阈值的应用程序作为冻结应用程序,将该冻结应用程序冻结,结合电子设备的资源占用率和目标应用程序的目标优先级对冻结应用程序进行冻结,可以更加准确地降低电子设备的资源功耗。In this embodiment, the priority threshold is obtained through the resource occupancy rate of the electronic device and the target priority of the target application, and from the applications running in the electronic device, the application with a priority lower than the priority threshold is obtained as a freeze The application program freezes the frozen application program and combines the resource occupancy rate of the electronic device and the target priority of the target application program to freeze the frozen application program, which can more accurately reduce the resource consumption of the electronic device.
在一个实施例中,如图4所示,将原始图像进行第一滤波处理得到第一滤波图像,并将原始图像进行第二滤波处理得到第二滤波图像,包括:In one embodiment, as shown in FIG. 4, performing a first filtering process on the original image to obtain a first filtered image, and performing a second filtering process on the original image to obtain a second filtered image includes:
步骤402,获取原始图像的亮度。Step 402: Obtain the brightness of the original image.
其中,原始图像的亮度指的是原始图像的明亮程度,通常可以使用从0%(黑色)至100%(白色)的百分比来度量,百分比越高,表示原始图像的亮度越高。原始图像的亮度可以根据像素点的像素值计算得到,也可以根据其他方式计算得到,在此不做限定。Wherein, the brightness of the original image refers to the brightness of the original image, which can usually be measured from a percentage of 0% (black) to 100% (white). The higher the percentage, the higher the brightness of the original image. The brightness of the original image may be calculated according to the pixel value of the pixel, or may be calculated according to other methods, which is not limited herein.
例如,原始图像为RGB(Red Green Blue,红绿蓝)格式的,则原始图像的亮度Y可以通过以下公式计算得到:Y=0.299*R+0.587*G+0.114*B。其中,R表示原始图像中所有像素点的红色通道像素值的均值,G表示原始图像中所有像素点的绿色通道像素值的均值,B表示原始图像中所有像素点的蓝色通道像素值的均值。原始图像的亮度可以是根据拍照时曝光的程度的变化而变化,也可以是根据图像的颜色深浅变化而变化,不限于此。For example, if the original image is in RGB (Red Green, Blue, Red, Green, Blue) format, the brightness Y of the original image can be calculated by the following formula: Y = 0.299 * R + 0.587 * G + 0.114 * B. Where R represents the average value of the red channel pixel values of all pixels in the original image, G represents the average value of the green channel pixel values of all pixels in the original image, and B represents the average of the blue channel pixel values of all pixels in the original image . The brightness of the original image may be changed according to the change in the degree of exposure when taking a picture, or may be changed according to the change in the color depth of the image, which is not limited thereto.
步骤404,当原始图像的亮度在预设亮度范围内时,获取第一滤波参数和第二滤波参数。Step 404: When the brightness of the original image is within the preset brightness range, acquire the first filtering parameter and the second filtering parameter.
其中,第一滤波参数指的是第一滤波处理的滤波参数。第二滤波参数指的是第二滤波处理的滤波参数。The first filtering parameter refers to the filtering parameter of the first filtering process. The second filter parameter refers to the filter parameter of the second filter process.
具体地,当原始图像的亮度在预设亮度范围内时,获取第一滤波处理的第一滤波参数和第二滤波处理的第二滤波参数。第一滤波参数和第二滤波参数可以预先进行设置,也可以根据原始图像的亮度或者其他因素进行调节,在此不做限定。Specifically, when the brightness of the original image is within the preset brightness range, the first filter parameter of the first filter process and the second filter parameter of the second filter process are acquired. The first filter parameter and the second filter parameter may be set in advance, or may be adjusted according to the brightness of the original image or other factors, which is not limited herein.
进一步地,当原始图像的亮度小于第一亮度阈值时,或者当原始图像的亮度大于第二亮度阈值时,可以通过电子设备输出提示信息。其中,第一亮度阈值大于第二亮度阈值。通过电子设备输出提示信息可以是输出原始图像的亮度值,并输出提示语,如“图像过亮,不建议进行处理”。Further, when the brightness of the original image is less than the first brightness threshold, or when the brightness of the original image is greater than the second brightness threshold, the prompt information may be output through the electronic device. The first brightness threshold is greater than the second brightness threshold. The output of the prompt information through the electronic device may be the output of the brightness value of the original image and the output of the prompt message, such as "the image is too bright, and processing is not recommended."
具体地,当图像过亮或者过暗时,图像中的可用信息较少,从而不对图像进行处理,以避免图像严重失真。Specifically, when the image is too bright or too dark, there is less available information in the image, so the image is not processed to avoid serious distortion of the image.
步骤406,根据第一滤波参数对原始图像进行第一滤波处理,得到第一滤波图像,并根据第二滤波参数对原始图像进行第二滤波处理,得到第二滤波图像。Step 406: Perform a first filtering process on the original image according to the first filtering parameter to obtain a first filtered image, and perform a second filtering process on the original image according to the second filtering parameter to obtain a second filtered image.
具体地,电子设备获取到第一滤波参数和第二滤波参数后,对原始图像进行第一滤波处理和第二滤波处理,分别得到第一滤波图像和第二滤波图像。在本实施例中,第一滤波处理可以是联合双边滤波处理;第二滤波处理可以是高斯滤波处理。相应地,第一滤波参数可以是联合双边滤波参数;第二滤波参数可以是高斯滤波参数。Specifically, after acquiring the first filtering parameter and the second filtering parameter, the electronic device performs first filtering processing and second filtering processing on the original image to obtain the first filtered image and the second filtered image, respectively. In this embodiment, the first filtering process may be a joint bilateral filtering process; the second filtering process may be a Gaussian filtering process. Accordingly, the first filtering parameter may be a joint bilateral filtering parameter; the second filtering parameter may be a Gaussian filtering parameter.
在本实施例中,当获取原始图像的亮度在预设亮度范围内时,获取第一滤波参数和第二滤波参数,根据第一滤波参数和第二滤波参数对原始图像进行处理,避免了将不符合预设亮度范围内的原始图像进行处理,节约了电子设备的资源。In this embodiment, when the brightness of the acquired original image is within the preset brightness range, the first filtering parameter and the second filtering parameter are acquired, and the original image is processed according to the first filtering parameter and the second filtering parameter, thereby avoiding Processing the original image that does not meet the preset brightness range saves the resources of the electronic device.
在一个实施例中,如图5所示,根据第二滤波图像对第一滤波图像进行弱化处理,得到中间图像,包括:In one embodiment, as shown in FIG. 5, the first filtered image is weakened according to the second filtered image to obtain an intermediate image, including:
步骤502,将第一滤波图像减去第二滤波图像,得到差值图像。In step 502, the first filtered image is subtracted from the second filtered image to obtain a difference image.
具体地,第一滤波图像中的平坦部分与第二滤波图像中的平坦部分类似。而第一滤波图像保留了图像中的高频部分,也就是图像中的细节部分;第二滤波图像的高频部分被邻域内的低频部分平均化。将第一滤波图像减去第二滤波图像,得到差值图像,也就是得到第一滤波图像的高频部分,即第一滤波图像中的细节部分。Specifically, the flat portion in the first filtered image is similar to the flat portion in the second filtered image. The first filtered image retains the high-frequency part of the image, that is, the detail part of the image; the high-frequency part of the second filtered image is averaged by the low-frequency part in the neighborhood. The first filtered image is subtracted from the second filtered image to obtain a difference image, that is, a high-frequency part of the first filtered image, that is, a detail part in the first filtered image.
步骤504,获取差值图像的权重因子。Step 504: Obtain the weighting factor of the difference image.
其中,权重因子指的是用于表示差值图像在目标图像中重要程度的因子。The weighting factor refers to a factor used to indicate the importance of the difference image in the target image.
具体地,当差值图像的权重因子越大时,则表示差值图像在目标图像中的重要程度越重要,也就是目标图像中的细节部分越清晰。Specifically, when the weighting factor of the difference image is larger, it indicates that the difference image is more important in the target image, that is, the detail part in the target image is clearer.
进一步地,获取差值图像的清晰度;根据差值图像的清晰度获取差值图像的权重因子。Further, the sharpness of the difference image is obtained; the weighting factor of the difference image is obtained according to the sharpness of the difference image.
步骤506,根据差值图像和差值图像的权重因子得到中间图像。Step 506: Obtain an intermediate image according to the difference image and the weighting factor of the difference image.
在本实施例中,可以将差值图像乘以差值图像的权重因子,得到中间图像,也可以根据差值图像和差值图像的权重因子通过其他方式得到中间图像,在此不做限定。In this embodiment, the difference image may be multiplied by the weighting factor of the difference image to obtain an intermediate image, or the intermediate image may be obtained by other methods according to the weighting factor of the difference image and the difference image, which is not limited herein.
在本实施例中,将第一滤波图像减去第二滤波图像得到差值图像,然后获取差值图像的权重因子,通过差值图像和差值图像的权重因子可以得到中间图像,可以更加准确地得到目 标图像的细节部分。In this embodiment, the first filtered image is subtracted from the second filtered image to obtain a difference image, and then the weighting factor of the difference image is obtained, and the intermediate image can be obtained by the weighting factor of the difference image and the difference image, which can be more accurate To get the detail of the target image.
在一个实施例中,获取差值图像的权重因子,包括:获取差值图像的清晰度;根据差值图像的清晰度获取差值图像的权重因子。In one embodiment, obtaining the weighting factor of the difference image includes: obtaining the sharpness of the difference image; and obtaining the weighting factor of the difference image according to the sharpness of the difference image.
其中,图像的清晰度指的是图像的清晰程度。Among them, the clarity of the image refers to the clarity of the image.
具体地,差值的图像的清晰度足够高时,提高权重因子而得到的中间图像的清晰度与差值图像的清晰度差别不大,但是消耗了电子设备的大量资源。因此,当差值图像的清晰度越高时,则表示差值图像的高频部分,即细节部分的像素值越高,可以降低差值图像的权重因子。当差值图像的清晰度越低时,则表示差值图像的高频部分,即细节部分的像素值越低,可以提高差值图像的权重因子。Specifically, when the sharpness of the difference image is sufficiently high, the sharpness of the intermediate image obtained by increasing the weighting factor is not much different from the sharpness of the difference image, but consumes a lot of resources of the electronic device. Therefore, when the sharpness of the difference image is higher, it means that the high-frequency part of the difference image, that is, the higher the pixel value of the detail part, can reduce the weighting factor of the difference image. When the sharpness of the difference image is lower, it means that the high-frequency part of the difference image, that is, the lower the pixel value of the detail part, can increase the weighting factor of the difference image.
在本实施例中,通过差值图像的清晰度获取差值图像的权重因子,当差值图像的清晰度越高时,则可以降低权重因子,这样可以根据差值图像的清晰度来调节权重因子,提高图像处理的准确性。In this embodiment, the weighting factor of the difference image is obtained through the sharpness of the difference image. When the sharpness of the difference image is higher, the weighting factor can be reduced, so that the weight can be adjusted according to the sharpness of the difference image Factor to improve the accuracy of image processing.
在一个实施例中,如图6所示,将第一滤波图像与中间图像进行叠加处理,得到目标图像之后,还包括:In one embodiment, as shown in FIG. 6, after the first filtered image and the intermediate image are superimposed to obtain the target image, the method further includes:
步骤602,识别目标图像的噪声。Step 602: Identify the noise of the target image.
其中,图像的噪声指的是存在于图像中的不必要的或多余的干扰信息。图像的噪声会影响图像的准确性。Among them, the noise of the image refers to unnecessary or unnecessary interference information existing in the image. The noise of the image will affect the accuracy of the image.
具体地,可以通过Filter-Based Approach Using Arithmetic Averaging算法识别目标图像的噪声;也可以通过Filter-Based Approach Using Statistical Averaging算法识别目标图像的噪声,还可以是通过识别目标图像中的噪点等方式,不限于此。其中,图像的噪声由图像中的各个噪点组成。像素点是把图像分割成若干个小方格,而属于噪声的小方格即为噪点。Specifically, the noise of the target image can be identified by the Filter-Based Approach Using Arithmetic Algorithm; the noise of the target image can also be identified by the Filter-Based Approach Using Statistics Averaging algorithm, or by identifying the noise in the target image, etc. Limited to this. Among them, the noise of the image is composed of various noises in the image. Pixels divide the image into several small squares, and the small squares that belong to noise are noises.
步骤604,获取噪声在目标图像中的噪声比例。Step 604: Acquire the noise ratio of the noise in the target image.
具体地,可以通过目标图像中的噪点在目标图像中的比例,得到噪声比例。如目标图像的分辨率为400*240,也就是将目标图像分割成400*240个像素点,获取的噪点为100个,则目标图像的噪声比例为100/400*240=0.1%。Specifically, the noise ratio can be obtained through the ratio of the noise in the target image in the target image. If the resolution of the target image is 400 * 240, that is, the target image is divided into 400 * 240 pixels and the acquired noise is 100, then the noise ratio of the target image is 100/400 * 240 = 0.1%.
步骤606,当目标图像的噪声比例大于比例阈值时,将目标图像作为原始图像,执行获取原始图像步骤。 Step 606, when the noise ratio of the target image is greater than the ratio threshold, the target image is used as the original image, and the step of acquiring the original image is performed.
具体地,当图像的噪声比例过大时,图像的清晰度过低。当目标图像的噪声比例大于比例阈值时,将目标图像作为原始图像,执行获取原始图像步骤,重新进行图像处理,以获取噪声比例更低的目标图像。其中,比例阈值可以是用户预先设置的,也可以是其他方式设置的,在此不做限定。Specifically, when the noise ratio of the image is too large, the sharpness of the image is too low. When the noise ratio of the target image is greater than the ratio threshold, the target image is used as the original image, the step of acquiring the original image is performed, and the image processing is performed again to obtain the target image with a lower noise ratio. The ratio threshold may be set by the user in advance, or may be set in other ways, which is not limited herein.
在本实施例中,当目标图像的噪声比例大于比例阈值时,则将目标图像作为原始图像进行图像处理,可以获取更好去噪效果的目标图像。In this embodiment, when the noise ratio of the target image is greater than the ratio threshold, the target image is used as the original image for image processing, and the target image with better denoising effect can be obtained.
应该理解的是,虽然图2-6的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2-6中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the flowcharts of FIGS. 2-6 are displayed in order according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless clearly stated in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least some of the steps in FIGS. 2-6 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. The execution order of is not necessarily sequential, but may be executed in turn or alternately with at least a part of other steps or sub-steps or stages of other steps.
在一个实施例中,上述图像处理方法还可以包括以下步骤:In one embodiment, the above image processing method may further include the following steps:
(1)在检测到图像获取指令时,获取电子设备的资源占用率。(1) When the image acquisition instruction is detected, the resource occupancy rate of the electronic device is acquired.
(2)当电子设备的资源占用率大于占用率阈值时,则获取发起图像获取指令的目标应用程序所对应的目标优先级。(2) When the resource occupancy rate of the electronic device is greater than the occupancy rate threshold, the target priority corresponding to the target application program that initiated the image acquisition instruction is acquired.
(3)根据目标优先级和资源占用率获取优先级阈值,从电子设备中运行的应用程序获取冻结应用程序,并冻结该应用程序。(3) Obtain the priority threshold according to the target priority and resource occupancy rate, obtain the frozen application from the application running in the electronic device, and freeze the application.
(4)根据图像获取指令获取原始图像。(4) Acquire the original image according to the image acquisition instruction.
(5)将冻结应用程序冻结,电子设备释放了部分软件或者硬件资源后,获取原始图像的亮度。(5) Freeze the frozen application, and after the electronic device releases some software or hardware resources, obtain the brightness of the original image.
(6)当原始图像的亮度在预设范围内时,获取第一滤波参数和第二滤波参数。(6) When the brightness of the original image is within a preset range, acquire the first filtering parameter and the second filtering parameter.
(7)根据第一滤波参数对原始图像进行第一滤波处理,得到第一滤波图像,并根据第二滤波参数对原始图像进行第二滤波处理,得到第二滤波图像。(7) Perform a first filtering process on the original image according to the first filtering parameter to obtain a first filtered image, and perform a second filtering process on the original image according to the second filtering parameter to obtain a second filtered image.
(8)将第一滤波图像减去第二滤波图像,得到差值图像。(8) The first filtered image is subtracted from the second filtered image to obtain a difference image.
(9)获取差值图像的清晰度。(9) Acquiring the sharpness of the difference image.
(10)根据差值图像的清晰度获取差值图像的权重因子。(10) Obtain the weighting factor of the difference image according to the sharpness of the difference image.
(11)根据权重因子和差值图像得到中间图像。(11) Obtain an intermediate image based on the weighting factor and the difference image.
(12)将第一滤波图像与中间图像进行叠加处理,得到目标图像。(12) Superimpose the first filtered image and the intermediate image to obtain the target image.
(13)识别目标图像的噪声。(13) Identify the noise of the target image.
(14)获取噪声在目标图像中的噪声比例。(14) Acquire the noise ratio of noise in the target image.
(15)当目标图像的噪声比例大于比例阈值时,则将目标图像作为原始图像,执行获取原始图像步骤,再次进行图像处理。(15) When the noise ratio of the target image is greater than the ratio threshold, the target image is used as the original image, the step of acquiring the original image is performed, and the image processing is performed again.
在一个实施例中,如图7所示,提供了一种图像处理装置700,包括:获取模块702、滤波处理模块704、弱化处理模块706和叠加处理模块708,其中:In one embodiment, as shown in FIG. 7, an image processing apparatus 700 is provided, including: an acquisition module 702, a filter processing module 704, a weakening processing module 706, and an overlay processing module 708, wherein:
获取模块702,用于获取原始图像。The obtaining module 702 is used to obtain the original image.
滤波处理模块704,用于将原始图像进行第一滤波处理得到第一滤波图像,并将原始图像进行第二滤波处理得到第二滤波图像,其中,第一滤波图像的清晰度高于第二滤波图像的清晰度。The filtering processing module 704 is configured to perform a first filtering process on the original image to obtain a first filtered image, and perform a second filtering process on the original image to obtain a second filtered image, where the clarity of the first filtered image is higher than that of the second filtered The clarity of the image.
弱化处理模块706,用于根据第二滤波图像对第一滤波图像进行弱化处理,得到中间图像。The weakening processing module 706 is configured to weaken the first filtered image according to the second filtered image to obtain an intermediate image.
叠加处理模块708,用于将第一滤波图像与中间图像进行叠加处理,得到目标图像。The superimposition processing module 708 is configured to superimpose the first filtered image and the intermediate image to obtain a target image.
上述图像处理方法、装置、计算机设备和存储介质,获取原始图像后,将原始图像进行第一滤波处理和第二滤波处理分别得到第一滤波图像和第二滤波图像;根据第二滤波图像对第一滤波图像进行弱化处理,得到中间图像;最后将中间图像叠加到第一滤波图像上,得到目标图像。上述图像处理的方式,将原始图像进行第一滤波处理和第二滤波处理,可以去除噪声,再将中间图像对第一滤波图像进行叠加处理,可以增强图像中的细节部分。The above image processing method, device, computer equipment and storage medium, after acquiring the original image, subject the original image to the first filtering process and the second filtering process to obtain the first filtered image and the second filtered image, respectively; A filtered image is weakened to obtain an intermediate image; finally, the intermediate image is superimposed on the first filtered image to obtain the target image. In the above image processing method, the original image is subjected to the first filtering process and the second filtering process to remove noise, and then the intermediate image is superimposed on the first filtered image to enhance the details in the image.
在一个实施例中,如图8所示,提供了一种图像处理装置800,包括:冻结模块802、获取模块804、滤波处理模块806、弱化处理模块808、叠加处理模块810和噪声识别模块812,其中:In one embodiment, as shown in FIG. 8, an image processing apparatus 800 is provided, including: a freezing module 802, an obtaining module 804, a filtering processing module 806, a weakening processing module 808, an overlay processing module 810, and a noise recognition module 812 ,among them:
冻结模块802,用于当检测到图像获取指令时,获取电子设备的资源占用率;当电子设备的资源占用率大于占用率阈值时,获取发起图像获取指令的目标应用程序所对应的目标优先级;根据目标优先级从电子设备中运行的应用程序中获取冻结应用程序,并将冻结应用程序冻结。获取原始图像,包括:根据图像获取指令获取原始图像。The freezing module 802 is used to obtain the resource occupancy rate of the electronic device when an image acquisition instruction is detected; when the resource occupancy rate of the electronic device is greater than the occupancy threshold, obtain the target priority corresponding to the target application that initiated the image acquisition instruction ; Obtain the frozen application from the applications running in the electronic device according to the target priority, and freeze the frozen application. Acquiring the original image includes: acquiring the original image according to the image acquisition instruction.
获取模块804,用于获取原始图像。The obtaining module 804 is used to obtain the original image.
滤波处理模块806,用于将原始图像进行第一滤波处理得到第一滤波图像,并将原始图像进行第二滤波处理得到第二滤波图像,其中,第一滤波图像的清晰度高于第二滤波图像的清晰度。The filtering processing module 806 is configured to perform a first filtering process on the original image to obtain a first filtered image, and perform a second filtering process on the original image to obtain a second filtered image, where the clarity of the first filtered image is higher than that of the second filtered The clarity of the image.
弱化处理模块808,用于根据第二滤波图像对第一滤波图像进行弱化处理,得到中间图像。The weakening processing module 808 is configured to weaken the first filtered image according to the second filtered image to obtain an intermediate image.
叠加处理模块810,用于将第一滤波图像与中间图像进行叠加处理,得到目标图像。The superimposition processing module 810 is configured to superimpose the first filtered image and the intermediate image to obtain a target image.
噪声识别模块812,用于识别目标图像的噪声;获取噪声在目标图像中的噪声比例;当目标图像的噪声比例大于比例阈值时,将目标图像作为原始图像,执行获取原始图像步骤。The noise recognition module 812 is used for recognizing the noise of the target image; acquiring the noise ratio of the noise in the target image; when the noise ratio of the target image is greater than the ratio threshold, taking the target image as the original image and performing the step of acquiring the original image.
上述图像处理方法、装置、计算机设备和存储介质,在获取原始图像之前,当电子设备的资源占用率大于占用率阈值时,则将冻结应用程序冻结,再进行获取原始图像;获取原始图像后,将原始图像进行第一滤波处理和第二滤波处理,可以去除噪声,再将中间图像对第一滤波图像进行叠加处理,可以增强图像中的细节部分;当目标图像的噪声比例大于比例阈值,则将目标图像作为原始图像再进行图像处理,在增强目标图像的细节部分的同时可以降低电子设备功耗。For the above image processing method, device, computer equipment and storage medium, before acquiring the original image, when the resource occupancy rate of the electronic device is greater than the occupancy threshold, the frozen application is frozen, and then the original image is acquired; The first image filter and the second image filter can be used to remove the noise, and then the intermediate image can be superimposed on the first filtered image to enhance the detail in the image; when the noise ratio of the target image is greater than the ratio threshold, then Taking the target image as the original image and then performing image processing can reduce the power consumption of the electronic device while enhancing the detail of the target image.
在一个实施例中,上述冻结模块802还用于根据资源占用率和目标优先级获取优先级阈值;从电子设备中运行的应用程序中,获取优先级低于优先级阈值的应用程序作为冻结应用程序。In one embodiment, the above freezing module 802 is further used to obtain a priority threshold according to the resource occupancy rate and the target priority; from applications running in the electronic device, an application with a priority lower than the priority threshold is obtained as a frozen application program.
在一个实施例中,上述滤波处理模块806还用于获取原始图像的亮度;当原始图像的亮度在预设亮度范围内时,获取第一滤波参数和第二滤波参数;根据第一滤波参数对原始图像进行第一滤波处理,得到第一滤波图像,并根据第二滤波参数对原始图像进行第二滤波处理,得到第二滤波图像。In one embodiment, the above filter processing module 806 is further used to obtain the brightness of the original image; when the brightness of the original image is within the preset brightness range, the first filter parameter and the second filter parameter are obtained; according to the first filter parameter pair The original image is subjected to a first filter process to obtain a first filtered image, and the second filter process is performed on the original image according to a second filter parameter to obtain a second filtered image.
在一个实施例中,上述弱化处理模块808还用于将第一滤波图像减去第二滤波图像,得到差值图像;获取差值图像的权重因子;根据差值图像和差值图像的权重因子得到中间图像。In one embodiment, the aforementioned weakening processing module 808 is further used to subtract the first filtered image from the second filtered image to obtain a difference image; obtain a weighting factor of the difference image; according to the weighting factor of the difference image and the difference image Get the intermediate image.
在一个实施例中,上述弱化处理模块808还用于获取差值图像的清晰度;根据差值图像的清晰度获取差值图像的权重因子。In one embodiment, the above-mentioned weakening processing module 808 is further used to obtain the sharpness of the difference image; the weighting factor of the difference image is obtained according to the sharpness of the difference image.
上述图像处理装置中各个模块的划分仅用于举例说明,在其他实施例中,可将图像处理装置按照需要划分为不同的模块,以完成上述图像处理装置的全部或部分功能。The division of each module in the above image processing apparatus is for illustration only. In other embodiments, the image processing apparatus may be divided into different modules as needed to complete all or part of the functions of the above image processing apparatus.
关于图像处理装置的具体限定可以参见上文中对于图像处理方法的限定,在此不再赘述。 上述图像处理装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For specific definitions of the image processing apparatus, reference may be made to the definition of the image processing method above, and details are not described herein again. Each module in the above image processing device may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in the hardware or independent of the processor in the computer device, or may be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
本申请实施例中提供的图像处理装置中的各个模块的实现可为计算机程序的形式。该计算机程序可在终端或服务器上运行。该计算机程序构成的程序模块可存储在终端或服务器的存储器上。该计算机程序被处理器执行时,实现本申请实施例中所描述方法的步骤。The implementation of each module in the image processing apparatus provided in the embodiments of the present application may be in the form of a computer program. The computer program can be run on a terminal or a server. The program module composed of the computer program may be stored in the memory of the terminal or the server. When the computer program is executed by the processor, the steps of the method described in the embodiments of the present application are implemented.
本申请实施例还提供了一种电子设备。如图9所示,为了便于说明,仅示出了与本申请实施例相关的部分,具体技术细节未揭示的,请参照本申请实施例方法部分。该电子设备可以为包括手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑、穿戴式设备等任意终端设备,以电子设备为手机为例:An embodiment of the present application also provides an electronic device. As shown in FIG. 9, for ease of description, only parts related to the embodiments of the present application are shown, and specific technical details are not disclosed, please refer to the method part of the embodiments of the present application. The electronic device may be any terminal device including a mobile phone, tablet computer, PDA (Personal Digital Assistant), POS (Point of Sales), in-vehicle computer, wearable device, etc. Taking the electronic device as a mobile phone for example :
图9为与本申请实施例提供的电子设备相关的手机的部分结构的框图。参考图9,手机包括:射频(Radio Frequency,RF)电路910、存储器920、输入单元930、显示单元940、传感器950、音频电路960、无线保真(wireless fidelity,WiFi)模块970、处理器980、以及电源990等部件。本领域技术人员可以理解,图9所示的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。9 is a block diagram of a partial structure of a mobile phone related to an electronic device provided by an embodiment of the present application. 9, the mobile phone includes: a radio frequency (Radio Frequency) circuit 910, a memory 920, an input unit 930, a display unit 940, a sensor 950, an audio circuit 960, a wireless fidelity (WiFi) module 970, a processor 980 , And power supply 990 and other components. Those skilled in the art may understand that the structure of the mobile phone shown in FIG. 9 does not constitute a limitation on the mobile phone, and may include more or less components than those shown in the figure, or a combination of certain components, or a different component arrangement.
其中,RF电路910可用于收发信息或通话过程中,信号的接收和发送,可将基站的下行信息接收后,给处理器980处理;也可以将上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路910还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System of Mobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE))、电子邮件、短消息服务(Short Messaging Service,SMS)等。Among them, the RF circuit 910 can be used to receive and send signals during the sending and receiving of information or during a call. It can receive the downlink information of the base station and process it to the processor 980; it can also send the uplink data to the base station. Generally, RF circuits include but are not limited to antennas, at least one amplifier, transceiver, coupler, low noise amplifier (Low Noise Amplifier, LNA), duplexer, and so on. In addition, the RF circuit 910 can also communicate with other devices through a wireless communication network. The above wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile (GSM), General Packet Radio Service (GPRS), and Code Division Multiple Access (Code Division) Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), e-mail, Short Message Service (SMS), etc.
存储器920可用于存储软件程序以及模块,处理器980通过运行存储在存储器920的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器920可主要包括程序存储区和数据存储区,其中,程序存储区可存储操作系统、至少一个功能所需的应用程序(比 如声音播放功能的应用程序、图像播放功能的应用程序等)等;数据存储区可存储根据手机的使用所创建的数据(比如音频数据、通讯录等)等。此外,存储器920可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 920 may be used to store software programs and modules. The processor 980 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 920. The memory 920 may mainly include a program storage area and a data storage area, where the program storage area may store an operating system and at least one function-required application program (such as an application program for a sound playback function, an application program for an image playback function, etc.), etc .; The data storage area can store data (such as audio data, address book, etc.) created according to the use of the mobile phone. In addition, the memory 920 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
输入单元930可用于接收输入的数字或字符信息,以及产生与手机900的用户设置以及功能控制有关的键信号输入。具体地,输入单元930可包括触控面板931以及其他输入设备932。触控面板931,也可称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板931上或在触控面板931附近的操作),并根据预先设定的程式驱动相应的连接装置。在一个实施例中,触控面板931可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器980,并能接收处理器980发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板931。除了触控面板931,输入单元930还可以包括其他输入设备932。具体地,其他输入设备932可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)等中的一种或多种。The input unit 930 may be used to receive input numeric or character information, and generate key signal input related to user settings and function control of the mobile phone 900. Specifically, the input unit 930 may include a touch panel 931 and other input devices 932. The touch panel 931, also known as a touch screen, can collect user's touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc. on or near the touch panel 931 Operation), and drive the corresponding connection device according to the preset program. In one embodiment, the touch panel 931 may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into contact coordinates, and then sends It is given to the processor 980 and can receive the command sent by the processor 980 and execute it. In addition, the touch panel 931 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 931, the input unit 930 may also include other input devices 932. Specifically, other input devices 932 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), and the like.
显示单元940可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元940可包括显示面板941。在一个实施例中,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板941。在一个实施例中,触控面板931可覆盖显示面板941,当触控面板931检测到在其上或附近的触摸操作后,传送给处理器980以确定触摸事件的类型,随后处理器980根据触摸事件的类型在显示面板941上提供相应的视觉输出。虽然在图9中,触控面板931与显示面板941是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板931与显示面板941集成而实现手机的输入和输出功能。The display unit 940 may be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 940 may include a display panel 941. In one embodiment, the display panel 941 may be configured in the form of a liquid crystal display (Liquid Crystal) (LCD), an organic light-emitting diode (Organic Light-Emitting Diode, OLED), or the like. In one embodiment, the touch panel 931 may cover the display panel 941, and when the touch panel 931 detects a touch operation on or near it, it is transmitted to the processor 980 to determine the type of touch event, and then the processor 980 according to The type of touch event provides a corresponding visual output on the display panel 941. Although in FIG. 9, the touch panel 931 and the display panel 941 are used as two independent components to realize the input and input functions of the mobile phone, in some embodiments, the touch panel 931 and the display panel 941 may be integrated and Realize the input and output functions of the mobile phone.
手机900还可包括至少一种传感器950,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板941的亮度,接近传感器可在手机移动到耳边时,关闭显示面板941和/或背光。运动传感器可包括加速度传感器,通过加速度传感器可检测各个方向上加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换)、 振动识别相关功能(比如计步器、敲击)等;此外,手机还可配置陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器等。The mobile phone 900 may further include at least one sensor 950, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 941 according to the brightness of the ambient light, and the proximity sensor may close the display panel 941 and / or when the mobile phone moves to the ear Or backlight. The motion sensor may include an acceleration sensor. The acceleration sensor can detect the magnitude of acceleration in various directions, and can detect the magnitude and direction of gravity when at rest. It can be used for applications that recognize mobile phone gestures (such as horizontal and vertical screen switching), and vibration recognition related functions (such as Pedometer, percussion), etc. In addition, the mobile phone can also be equipped with other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor and so on.
音频电路960、扬声器961和传声器962可提供用户与手机之间的音频接口。音频电路960可将接收到的音频数据转换后的电信号,传输到扬声器961,由扬声器961转换为声音信号输出;另一方面,传声器962将收集的声音信号转换为电信号,由音频电路960接收后转换为音频数据,再将音频数据输出处理器980处理后,经RF电路910可以发送给另一手机,或者将音频数据输出至存储器920以便后续处理。The audio circuit 960, the speaker 961, and the microphone 962 may provide an audio interface between the user and the mobile phone. The audio circuit 960 can transmit the converted electrical signal of the received audio data to the speaker 961, which converts the speaker 961 into a sound signal output; on the other hand, the microphone 962 converts the collected sound signal into an electrical signal, which After receiving, it is converted into audio data, and then processed by the audio data output processor 980, and then sent to another mobile phone through the RF circuit 910, or the audio data is output to the memory 920 for subsequent processing.
WiFi属于短距离无线传输技术,手机通过WiFi模块970可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图9示出了WiFi模块970,但是可以理解的是,其并不属于手机900的必须构成,可以根据需要而省略。WiFi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 970. It provides users with wireless broadband Internet access. Although FIG. 9 shows the WiFi module 970, it can be understood that it is not a necessary component of the mobile phone 900, and may be omitted as needed.
处理器980是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器920内的软件程序和/或模块,以及调用存储在存储器920内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。在一个实施例中,处理器980可包括一个或多个处理单元。在一个实施例中,处理器980可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等;调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器980中。The processor 980 is the control center of the mobile phone, connects various parts of the entire mobile phone with various interfaces and lines, executes or executes the software programs and / or modules stored in the memory 920, and calls the data stored in the memory 920 to execute Various functions and processing data of the mobile phone, so as to monitor the mobile phone as a whole. In one embodiment, the processor 980 may include one or more processing units. In one embodiment, the processor 980 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, user interface, application programs, and the like; the modem processor mainly processes wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 980.
手机900还包括给各个部件供电的电源990(比如电池),优选的,电源可以通过电源管理系统与处理器980逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The mobile phone 900 further includes a power supply 990 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically connected to the processor 980 through a power management system, so as to realize functions such as charging, discharging, and power management through the power management system.
在一个实施例中,手机900还可以包括摄像头、蓝牙模块等。In one embodiment, the mobile phone 900 may further include a camera, a Bluetooth module, and the like.
在本申请实施例中,该电子设备所包括的处理器980执行存储在存储器上的计算机程序时实现图像处理方法的步骤。In the embodiment of the present application, the processor 980 included in the electronic device implements the steps of the image processing method when executing the computer program stored on the memory.
本申请实施例还提供了一种计算机可读存储介质。一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,当所述计算机可执行指令被一个或多个处理器执行时,使得所述处理器执行图像处理方法的步骤。The embodiments of the present application also provide a computer-readable storage medium. One or more non-volatile computer-readable storage media containing computer-executable instructions, which when executed by one or more processors, cause the processors to perform the steps of the image processing method.
一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行图像处理方法。A computer program product containing instructions that, when run on a computer, causes the computer to perform an image processing method.
本申请所使用的对存储器、存储、数据库或其它介质的任何引用可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM),它用作外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDR SDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)。Any references to memory, storage, databases, or other media used in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR) SDRAM, enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation manners of the present application, and their descriptions are more specific and detailed, but they should not be construed as limiting the patent scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which all fall within the protection scope of the present application. Therefore, the protection scope of the patent of this application shall be subject to the appended claims.

Claims (10)

  1. 一种图像处理方法,所述方法包括:An image processing method, the method includes:
    获取原始图像;Get the original image;
    将所述原始图像进行第一滤波处理得到第一滤波图像,并将所述原始图像进行第二滤波处理得到第二滤波图像,其中,所述第一滤波图像的清晰度高于所述第二滤波图像的清晰度;Performing a first filtering process on the original image to obtain a first filtered image, and performing a second filtering process on the original image to obtain a second filtered image, wherein the clarity of the first filtered image is higher than that of the second Filter the clarity of the image;
    根据所述第二滤波图像对所述第一滤波图像进行弱化处理,得到中间图像;Weaken the first filtered image according to the second filtered image to obtain an intermediate image;
    将所述第一滤波图像与所述中间图像进行叠加处理,得到目标图像。Superimposing the first filtered image and the intermediate image to obtain a target image.
  2. 根据权利要求1所述的方法,其特征在于,所述获取原始图像之前,还包括:The method according to claim 1, wherein before acquiring the original image, the method further comprises:
    当检测到图像获取指令时,获取电子设备的资源占用率;When the image acquisition instruction is detected, the resource occupancy rate of the electronic device is acquired;
    当所述电子设备的资源占用率大于占用率阈值时,获取发起所述图像获取指令的目标应用程序所对应的目标优先级;When the resource occupancy rate of the electronic device is greater than the occupancy rate threshold, acquire the target priority corresponding to the target application program that initiated the image acquisition instruction;
    根据所述目标优先级从所述电子设备中运行的应用程序中获取冻结应用程序,并将所述冻结应用程序冻结;Obtaining a frozen application from the applications running in the electronic device according to the target priority, and freezing the frozen application;
    所述获取原始图像,包括:The acquiring the original image includes:
    根据所述图像获取指令获取所述原始图像。Acquire the original image according to the image acquisition instruction.
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述目标优先级从所述电子设备中运行的应用程序中获取冻结应用程序,包括:The method according to claim 2, wherein the obtaining the frozen application from the applications running in the electronic device according to the target priority includes:
    根据所述资源占用率和所述目标优先级获取优先级阈值;Obtaining a priority threshold according to the resource occupancy rate and the target priority;
    从所述电子设备中运行的应用程序中,获取优先级低于所述优先级阈值的应用程序作为冻结应用程序。From the applications running in the electronic device, an application with a priority lower than the priority threshold is obtained as a frozen application.
  4. 根据权利要求1所述的方法,其特征在于,所述将所述原始图像进行第一滤波处理得到第一滤波图像,并将所述原始图像进行第二滤波处理得到第二滤波图像,包括:The method according to claim 1, wherein the first filtering process is performed on the original image to obtain a first filtered image, and the second filtering process is performed on the original image to obtain a second filtered image, including:
    获取所述原始图像的亮度;Obtain the brightness of the original image;
    当所述原始图像的亮度在预设亮度范围内时,获取第一滤波参数和第二滤波参数;When the brightness of the original image is within a preset brightness range, acquire the first filtering parameter and the second filtering parameter;
    根据第一滤波参数对所述原始图像进行第一滤波处理,得到第一滤波图像,并根据第二滤波参数对所述原始图像进行第二滤波处理,得到第二滤波图像。Perform a first filtering process on the original image according to a first filtering parameter to obtain a first filtered image, and perform a second filtering process on the original image according to a second filtering parameter to obtain a second filtered image.
  5. 根据权利要求1所述的方法,其特征在于,所述根据所述第二滤波图像对所述第一滤波图像进行弱化处理,得到中间图像,包括:The method according to claim 1, wherein said weakening the first filtered image according to the second filtered image to obtain an intermediate image includes:
    将所述第一滤波图像减去所述第二滤波图像,得到差值图像;Subtracting the second filtered image from the first filtered image to obtain a difference image;
    获取所述差值图像的权重因子;Obtaining the weighting factor of the difference image;
    根据所述差值图像和所述差值图像的权重因子得到中间图像。The intermediate image is obtained according to the difference image and the weighting factor of the difference image.
  6. 根据权利要求5所述的方法,其特征在于,所述获取所述差值图像的权重因子,包括:The method according to claim 5, wherein the weighting factor for acquiring the difference image includes:
    获取所述差值图像的清晰度;Obtaining the sharpness of the difference image;
    根据所述差值图像的清晰度获取所述差值图像的权重因子。The weighting factor of the difference image is obtained according to the sharpness of the difference image.
  7. 根据权利要求1至6中任一项所述的方法,其特征在于,所述将所述第一滤波图像与所述中间图像进行叠加处理,得到目标图像之后,还包括:The method according to any one of claims 1 to 6, wherein the superimposing the first filtered image and the intermediate image to obtain a target image further comprises:
    识别所述目标图像的噪声;Identify the noise of the target image;
    获取所述噪声在所述目标图像中的噪声比例;Acquiring the noise ratio of the noise in the target image;
    当所述目标图像的噪声比例大于比例阈值时,将所述目标图像作为原始图像,执行所述获取原始图像步骤。When the noise ratio of the target image is greater than the ratio threshold, the target image is used as the original image, and the step of acquiring the original image is performed.
  8. 一种图像处理装置,其特征在于,所述装置包括:An image processing device, characterized in that the device includes:
    获取模块,用于获取原始图像;Acquisition module for acquiring original images;
    滤波处理模块,用于将所述原始图像进行第一滤波处理得到第一滤波图像,并将所述原始图像进行第二滤波处理得到第二滤波图像,其中,所述第一滤波图像的清晰度高于所述第二滤波图像的清晰度;A filtering processing module, configured to perform a first filtering process on the original image to obtain a first filtered image, and perform a second filtering process on the original image to obtain a second filtered image, wherein the clarity of the first filtered image Higher than the sharpness of the second filtered image;
    弱化处理模块,用于根据所述第二滤波图像对所述第一滤波图像进行弱化处理,得到中间图像;A weakening processing module, configured to weaken the first filtered image according to the second filtered image to obtain an intermediate image;
    叠加处理模块,用于将所述第一滤波图像与所述中间图像进行叠加处理,得到目标图像。The superimposition processing module is configured to superimpose the first filtered image and the intermediate image to obtain a target image.
  9. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至7中任一项所述方法的步骤。A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, when the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
  10. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至7中任一项所述的方法的步骤。A computer-readable storage medium on which a computer program is stored, characterized in that when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are realized.
PCT/CN2018/115523 2018-11-15 2018-11-15 Image processing method and apparatus, and computer device and storage medium WO2020097836A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201880097722.XA CN112703530B (en) 2018-11-15 2018-11-15 Image processing method, device, computer equipment and storage medium
PCT/CN2018/115523 WO2020097836A1 (en) 2018-11-15 2018-11-15 Image processing method and apparatus, and computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/115523 WO2020097836A1 (en) 2018-11-15 2018-11-15 Image processing method and apparatus, and computer device and storage medium

Publications (1)

Publication Number Publication Date
WO2020097836A1 true WO2020097836A1 (en) 2020-05-22

Family

ID=70730243

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/115523 WO2020097836A1 (en) 2018-11-15 2018-11-15 Image processing method and apparatus, and computer device and storage medium

Country Status (2)

Country Link
CN (1) CN112703530B (en)
WO (1) WO2020097836A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112150353A (en) * 2020-09-30 2020-12-29 广州虎牙科技有限公司 Image processing method and device, electronic equipment and readable storage medium
CN112950520A (en) * 2021-04-27 2021-06-11 上海海栎创科技股份有限公司 Multi-frame image fusion method and device for removing motion smear
CN113542739A (en) * 2021-07-15 2021-10-22 Oppo广东移动通信有限公司 Image encoding method and apparatus, image decoding method and apparatus, medium, and device
CN114429493A (en) * 2022-01-26 2022-05-03 数坤(北京)网络科技股份有限公司 Image sequence processing method and device, electronic equipment and storage medium
CN117575950A (en) * 2023-11-22 2024-02-20 魅杰光电科技(上海)有限公司 Image preprocessing method, device, equipment and storage medium thereof

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118279128A (en) * 2022-12-28 2024-07-02 华为技术有限公司 Image processing method and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5038388A (en) * 1989-05-15 1991-08-06 Polaroid Corporation Method for adaptively sharpening electronic images
CN101276464A (en) * 2007-03-26 2008-10-01 株式会社东芝 Picture processing apparatus and method
CN103514583A (en) * 2012-06-30 2014-01-15 华为技术有限公司 Image sharpening method and device
CN104103040A (en) * 2013-04-10 2014-10-15 上海联影医疗科技有限公司 Image enhancement method
CN105654448A (en) * 2016-03-29 2016-06-08 微梦创科网络科技(中国)有限公司 Image fusion method and system based on bilateral filter and weight reconstruction
CN105913408A (en) * 2016-04-12 2016-08-31 湘潭大学 Multi-focusing-image fusion method based on bilateral filter
CN108710539A (en) * 2018-05-18 2018-10-26 珠海格力电器股份有限公司 Information processing method, terminal and readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5038388A (en) * 1989-05-15 1991-08-06 Polaroid Corporation Method for adaptively sharpening electronic images
CN101276464A (en) * 2007-03-26 2008-10-01 株式会社东芝 Picture processing apparatus and method
CN103514583A (en) * 2012-06-30 2014-01-15 华为技术有限公司 Image sharpening method and device
CN104103040A (en) * 2013-04-10 2014-10-15 上海联影医疗科技有限公司 Image enhancement method
CN105654448A (en) * 2016-03-29 2016-06-08 微梦创科网络科技(中国)有限公司 Image fusion method and system based on bilateral filter and weight reconstruction
CN105913408A (en) * 2016-04-12 2016-08-31 湘潭大学 Multi-focusing-image fusion method based on bilateral filter
CN108710539A (en) * 2018-05-18 2018-10-26 珠海格力电器股份有限公司 Information processing method, terminal and readable storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112150353A (en) * 2020-09-30 2020-12-29 广州虎牙科技有限公司 Image processing method and device, electronic equipment and readable storage medium
CN112950520A (en) * 2021-04-27 2021-06-11 上海海栎创科技股份有限公司 Multi-frame image fusion method and device for removing motion smear
CN113542739A (en) * 2021-07-15 2021-10-22 Oppo广东移动通信有限公司 Image encoding method and apparatus, image decoding method and apparatus, medium, and device
CN113542739B (en) * 2021-07-15 2023-10-20 Oppo广东移动通信有限公司 Image encoding method and device, image decoding method and device, medium and equipment
CN114429493A (en) * 2022-01-26 2022-05-03 数坤(北京)网络科技股份有限公司 Image sequence processing method and device, electronic equipment and storage medium
CN114429493B (en) * 2022-01-26 2023-05-09 数坤(北京)网络科技股份有限公司 Image sequence processing method and device, electronic equipment and storage medium
CN117575950A (en) * 2023-11-22 2024-02-20 魅杰光电科技(上海)有限公司 Image preprocessing method, device, equipment and storage medium thereof

Also Published As

Publication number Publication date
CN112703530B (en) 2024-05-28
CN112703530A (en) 2021-04-23

Similar Documents

Publication Publication Date Title
WO2020097836A1 (en) Image processing method and apparatus, and computer device and storage medium
EP3410390B1 (en) Image processing method and device, computer readable storage medium and electronic device
JP6967160B2 (en) Image processing methods and related devices
CN107172364B (en) Image exposure compensation method and device and computer readable storage medium
CN107038681B (en) Image blurring method and device, computer readable storage medium and computer device
CN112308806B (en) Image processing method, device, electronic equipment and readable storage medium
CN107451979B (en) Image processing method, device and storage medium
WO2020199878A1 (en) Display brightness adjusting method and related product
EP3454255A1 (en) Facial recognition method and related product
WO2019011206A1 (en) Living body detection method and related product
US11050942B2 (en) Screen fill light photographing method for mobile terminal, system and mobile terminal
CN108198150B (en) Method for eliminating image dead pixel, terminal and storage medium
CN107230065B (en) Two-dimensional code display method and device and computer readable storage medium
CN112532958B (en) Image processing method, device, electronic equipment and readable storage medium
EP3416130B1 (en) Method, device and nonvolatile computer-readable medium for image composition
CN109462732B (en) Image processing method, device and computer readable storage medium
CN110706158B (en) Image processing method, image processing device and terminal equipment
US20240233083A1 (en) Image fusion method and apparatus, storage medium and mobile terminal
CN108154534B (en) Picture definition calibration method, terminal and computer readable storage medium
CN107194363B (en) Image saturation processing method and device, storage medium and computer equipment
CN109782947B (en) Flexible screen display control method and device and computer readable storage medium
WO2023108443A1 (en) Image processing method, smart terminal and storage medium
CN117392035A (en) Image processing method, device, electronic equipment and computer readable storage medium
CN117971148A (en) Processing method, intelligent terminal and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18940379

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 15.09.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18940379

Country of ref document: EP

Kind code of ref document: A1