CN110516680B - Image processing method and device - Google Patents

Image processing method and device Download PDF

Info

Publication number
CN110516680B
CN110516680B CN201910718432.9A CN201910718432A CN110516680B CN 110516680 B CN110516680 B CN 110516680B CN 201910718432 A CN201910718432 A CN 201910718432A CN 110516680 B CN110516680 B CN 110516680B
Authority
CN
China
Prior art keywords
image
pixel
processing
value
interference
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910718432.9A
Other languages
Chinese (zh)
Other versions
CN110516680A (en
Inventor
陈思昱
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Moruan Communication Technology Co Ltd
Original Assignee
Shanghai Moruan Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Moruan Communication Technology Co Ltd filed Critical Shanghai Moruan Communication Technology Co Ltd
Priority to CN201910718432.9A priority Critical patent/CN110516680B/en
Publication of CN110516680A publication Critical patent/CN110516680A/en
Application granted granted Critical
Publication of CN110516680B publication Critical patent/CN110516680B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/30Noise filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence

Landscapes

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

Abstract

The embodiment of the invention relates to the field of image processing, and discloses an image processing method and device. In the invention, an initial image and pixel values of all pixel points of the initial image are obtained; calculating the pixel value variable quantity of each pixel point relative to the adjacent pixel points; the adjacent pixel points are specifically adjacent pixel points in the preset direction; taking a region formed by pixel points with the pixel value variation larger than a preset threshold value as an interference region; denoising the interference region to remove the interference signal in the interference region; and taking the image subjected to denoising processing on the interference region as a final image. Interference signals in the images are filtered in a software algorithm calculation mode, so that the image content of the final shot images is clearer, and the recognition rate of the images after filtering processing is improved. On the other hand, the interference fringes in the image are removed in a software mode, so that the method is low in cost and easy to implement.

Description

Image processing method and device
Technical Field
The present invention relates to the field of image processing, and in particular, to an image processing method and apparatus.
Background
At present, with the wide application of the analysis of video images and the identification of video contents, the streak noise existing in video images is gradually the focus of attention. The stripe noise in the video image may limit the intelligent monitoring of image recognition and the like, and limit the further analysis of the information in the image, so the stripe noise in the image needs to be removed before the video image is recognized or analyzed to ensure the reliability of the recognition or analysis result.
The inventors found that at least the following problems exist in the related art: at present, for stripe noise in an image, the existence of the stripe noise in the shot image is avoided generally by improving a hardware circuit of an image pickup device, and thus the interference of the noise cannot be removed when the stripe noise is generated. In addition, the cost of the hardware circuit modification is high.
Disclosure of Invention
The embodiment of the invention aims to provide an image processing method and device, which can filter interference signals in a software mode, so that the acquired image content is clearer, the effect of filtering the interference signals is better, and the cost is lower.
To solve the above technical problem, an embodiment of the present invention provides an image processing method, including: acquiring an initial image and pixel values of all pixel points of the initial image; calculating the pixel value variable quantity of each pixel point relative to the adjacent pixel points; the adjacent pixel points are specifically adjacent pixel points in the preset direction; taking a region formed by pixel points with the pixel value variation larger than a preset threshold value as an interference region; denoising the interference region to remove the interference signal in the interference region; and taking the image subjected to denoising processing on the interference region as a final image.
An embodiment of the present invention also provides an image processing apparatus including: the device comprises an acquisition module, a calculation module and a denoising processing module; the acquisition module is used for acquiring an initial image; the calculation module is used for calculating the pixel value variation of each pixel point relative to the adjacent pixel points; the adjacent pixel points are specifically adjacent pixel points in the preset direction; taking a region formed by pixel points with the pixel value variation larger than a preset threshold value as an interference region; the denoising processing module is used for denoising the interference region and taking the image obtained after denoising processing is performed on the interference region as a final image.
Compared with the prior art, the method and the device have the advantages that the interference fringes (horizontal fringes or vertical fringes) in the image have larger pixel value difference with the surrounding image, so that the original image content can be interfered, in order to remove the interference fringes in the image, the pixel values of all pixel points in the image can be analyzed, the pixel points with larger pixel value difference with the surrounding pixel points are found out, the area formed by all the found pixel points with larger pixel value difference with the surrounding pixel points is used as an interference area, the interference area of the image is subjected to denoising treatment, the interference fringes in the interference area are removed, and the final image with the interference fringes removed is obtained. Therefore, interference signals in the images are filtered in a software algorithm calculation mode, the image content of the final shot images is clearer, and the recognition rate of the images after filtering processing is improved. On the other hand, the interference fringes in the image are removed in a software mode, so that the method is low in cost and easy to implement.
In addition, calculate the pixel value variation of each pixel for adjacent pixel, specifically include: solving a first derivative of the pixel value of each pixel point based on the position coordinate to obtain an image after primary processing; the method for processing the interference area includes the following steps that an area formed by pixel points with pixel value variation larger than a preset threshold value is used as the interference area, and the method specifically includes the following steps: selecting all pixel points with pixel values larger than a preset threshold value from the image after primary processing; and taking the area formed by all the pixel points as an interference area. The change rate of each pixel point in the preset direction is obtained through calculation of the first-order derivative of each pixel point, the change rate of each pixel point of the initial image is represented by the pixel value of each pixel point of the image after primary processing, and the image after primary processing can be visually and conveniently obtained to an interference area, so that denoising processing can be conveniently carried out on the interference area.
In addition, after obtaining the once processed image, the method further includes: judging whether the pixel value of each pixel point of the image after the primary processing is larger than a preset upper limit value or not; adjusting the pixel value of the pixel point with the pixel value smaller than the preset upper limit value to be 0; keeping the pixel value of the pixel point with the pixel value larger than or equal to the preset upper limit value unchanged; taking the image with the adjusted pixel value as an image after secondary processing; filtering the image after the secondary processing to obtain an image after the tertiary processing; in the image after the primary processing, selecting all pixel points of which the pixel values are greater than a preset threshold value, specifically: and selecting all pixel points with pixel values larger than a preset threshold value from the image after the third processing. Performing threshold calculation on the image subjected to primary processing, and setting all pixel points smaller than a preset upper limit value to be black, so that the difference between pixel values of an interference area and a background image is increased; and then, filtering the image subjected to secondary processing to make the difference between the black area and the white area more obvious.
In addition, the filtering processing is performed on the image after the secondary processing to obtain an image after the tertiary processing, and the method specifically includes: calculating the average value of the data of the preset filtering area corresponding to each pixel point of the image after the secondary processing; the data of the preset filtering area are specifically pixel values of all pixels of a rectangular area with the pixels as the centers; and taking the calculated average value as the pixel value of each pixel point of the image after the three times of processing. And calculating the average value of the pixel values of each pixel point of the image after the secondary processing and the pixel points around the pixel point, and taking the calculated average value as the pixel value of each point of the image after the tertiary processing, so that the interface between the interference area and the background area is more obvious, and the judgment of the interference area is more facilitated.
In addition, after obtaining the image after the three times of processing, the method further includes: solving intersection of each pixel point of the image after the third processing and each pixel point of the initial image to obtain an image after the fourth processing; in the image after the third processing, selecting all pixel points of which the pixel values are greater than a preset threshold value, specifically: and selecting all pixel points with pixel values larger than a preset threshold value from the image after the four times of processing. In this way, the finally obtained interference region is closer to the region where the interference signal of the initial image is located, and the final denoising processing accuracy is higher.
In addition, denoising processing is performed on the interference region, specifically: acquiring a previous frame image of the initial image in advance as a comparison image; acquiring contrast pixel points in the contrast image; the contrast pixel points correspond to all pixel points in an interference area of the initial image one by one; and replacing the pixel value of each pixel point of the interference area with the pixel value of the comparison pixel point. The pixel values of the pixel points in the interference area of the initial image are replaced by the pixel values of the pixel points of the previous frame of image of the initial image, the operation is simple and easy to realize, the finally obtained denoised image is clearer and more complete in content, and the effect of filtering interference signals is better.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
Fig. 1 is a flowchart of an image processing method according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram of an initial image in accordance with a first embodiment of the present invention;
FIG. 3 is a schematic illustration of an image after one pass processing according to a first embodiment of the present invention;
FIG. 4 is a flow chart of an image processing method according to a second embodiment of the present invention;
FIG. 5 is a schematic illustration of an image after secondary processing according to a second embodiment of the invention;
FIG. 6 is a schematic illustration of an image after three times of processing according to a second embodiment of the present invention;
FIG. 7 is a flowchart of an image processing method according to a third embodiment of the present invention;
FIG. 8 is a schematic illustration of an image after four passes in accordance with a third embodiment of the present invention;
FIG. 9 is a schematic illustration of a final image in accordance with a third embodiment of the invention;
fig. 10 is a schematic configuration diagram of an image processing apparatus according to a fourth embodiment of the present invention;
fig. 11 is a schematic configuration diagram of an image processing apparatus according to a fifth embodiment of the present invention;
fig. 12 is a schematic structural diagram of an electronic device in a sixth embodiment according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments.
The following embodiments are divided for convenience of description, and should not constitute any limitation to the specific implementation manner of the present invention, and the embodiments may be mutually incorporated and referred to without contradiction.
The first embodiment of the present invention relates to an image processing method, which acquires an initial image and pixel values of pixels of the initial image; calculating the pixel value variable quantity of each pixel point relative to the adjacent pixel points; the adjacent pixel points are specifically adjacent pixel points in the preset direction; taking a region formed by pixel points with the pixel value variation larger than a preset threshold value as an interference region; denoising the interference region to remove the interference signal in the interference region; and taking the image subjected to denoising processing on the interference region as a final image. The following describes implementation details of the image processing method of the present embodiment in detail, and the following description is provided only for facilitating understanding of the implementation details, and is not necessary to implement the present embodiment, and a specific flow is shown in fig. 1.
Step 101, obtaining an initial image and pixel values of each pixel point of the initial image. Specifically, when an image is captured by an image capturing apparatus such as a camera, if an interference signal is present in the captured image, for example, a horizontal stripe or a vertical stripe is present in the image, the image processing is performed on the image in which the interference signal is present. The electronic equipment acquires an image with an interference signal as an initial image to be processed, and reads pixel values of all pixel points of the initial image. The acquired image may be a color image or a grayscale image. In practical applications, in order to obtain a better effect of removing the interference signal, when the acquired initial image is a color image, the initial image may be converted into a grayscale image.
Step 102, calculating the pixel value variation of each pixel point relative to the adjacent pixel points. Specifically, the adjacent pixel of each pixel is specifically an adjacent pixel in the preset direction. For example, when the vertical stripes are filtered, the adjacent pixel point of each pixel point can be the pixel point adjacent to the pixel point in the left-right direction; when the horizontal stripes are filtered, the adjacent pixel points of all the pixel points can be the pixel points adjacent to the pixel points in the vertical direction. In summary, in the pixels adjacent to each other in the preset direction, the preset direction is an arbitrary direction different from the direction of the interference fringes, and in practical application, the preset direction is usually the left-right direction (horizontal direction) or the up-down direction (vertical direction).
When the pixel value variation of each pixel point relative to the adjacent pixel point is calculated, the pixel values of the two adjacent pixel points can be substituted into a first derivative calculation formula
Figure BDA0002156281010000041
f‘(x 0 ) Represents the calculatedThe pixel value variation amount, x, of the pixel point 0 Expressing the pixel value of the calculated pixel point, Δ x expressing the distance between the calculated pixel point and its adjacent pixel point, Δ y expressing the difference between the calculated pixel point and its adjacent pixel point, f (x) 0 + Δ x) represents the pixel value of a pixel adjacent to the calculated pixel, f (x) 0 ) Representing the pixel values of the calculated pixel points. The calculation method is specifically as follows, when filtering the vertical stripes in the image, the pixel values of the pixel points in a certain horizontal direction are 153, 156, 250, 257, 154, … …, respectively, and when calculating the pixel value variation of the pixel point with the pixel value 153, the calculated pixel value 153 of the pixel point, the pixel value 156 of the adjacent pixel point, and the distance 1 between two adjacent pixel points are substituted into the first derivative calculation formula to obtain ∑ or ∑ based>
Figure BDA0002156281010000042
Therefore, the pixel value variation amount calculated for the pixel point with the pixel value of 153 is 3, and the pixel value variation amounts of the other pixel points are calculated respectively in the same manner to obtain 3, 94,7, 103, … …. In practical application, the calculation process can be used as a primary processing of the image, and the pixel value variation of each pixel point obtained after the processing is used as the pixel value of each pixel point of the image after the primary processing. Assuming that an acquired initial image is as shown in fig. 2, a vertical stripe exists on the image, which interferes with the viewing experience of a user on the content of an image picture, and after a first-order derivation process is performed on the initial image, a processed image is obtained, as shown in fig. 3, in the processed image, an area of the vertical stripe in the initial image is significantly different from other background areas, that is, the size of a pixel value of each pixel point of the area where the vertical stripe is located and the background area is greatly different.
And 103, taking the area formed by the pixel points with the pixel value variation larger than the preset threshold value as an interference area. Specifically, since the pixel values of the points in the interference area and the area where the image content is located have a large difference, it is obvious from fig. 2 or fig. 3 that the pixel value of each pixel point in the area where the interference fringe is located is closer to white, and the pixel value of each pixel point in the background area is closer to black. Assuming that the preset threshold is 80, the pixel value variation calculated above is taken as an example, where two pixels with pixel value variations of 94 and 103 are in the interference region, and the other two pixels with pixel value variations of 3 and 7 are in the background region.
And 104, denoising the interference region to remove the interference signal of the interference region. Specifically, a previous frame image of the initial image is acquired in advance and used as a comparison image; acquiring contrast pixel points in the contrast image; the contrast pixel points correspond to all pixel points in an interference area of the initial image one by one; and replacing the pixel value of each pixel point of the interference area with the pixel value of the contrast pixel point. Because the image recorded by the electronic device is a dynamic image, the obtained image content of the previous frame of the initial image and the obtained image content of the initial image have small variation, and the pixel value of each pixel point of the previous frame of the initial image and the obtained pixel point of the initial image has small variation, the pixel point in the interference area of the initial image can be replaced by the pixel value of the pixel point at the same position of the previous frame, for example, a certain point of the interference area in the initial image is represented by a coordinate (20,4), a pixel point with a coordinate position of (20,4) is found in the previous frame of the initial image, that is, the comparison image, the pixel value of the point is obtained, and the obtained pixel value is used as the pixel value of the pixel point with the coordinate of the interference area of (20,4) in the initial image. And similarly, replacing the pixel value of each pixel point in the initial image to obtain a final image with the interference signal removed.
In addition, in practical application, denoising processing may be performed on the interference region in other manners, for example, the pixel value of each pixel point of the interference region may be estimated by analyzing the arrangement rule of each pixel point of the background region in the initial image; the pixel values of the interference regions can be fitted based on the position coordinates of the pixel points through the pixel values of all points in the initial image, so that a smooth image is obtained, and the purpose of removing interference signals is achieved. The specific manner of the noise removal processing for removing the interference signal in the interference region is not limited herein.
And 105, taking the image subjected to denoising processing on the interference region as a final image.
Compared with the prior art, the method and the device have the advantages that the interference fringes (horizontal fringes or vertical fringes) in the image have larger pixel value difference with the surrounding image, so that the original image content can be interfered, in order to remove the interference fringes in the image, the pixel values of all the pixel points in the image can be analyzed, the pixel points with larger pixel value difference with the surrounding pixel points are found out, the area formed by all the found pixel points with larger pixel value difference with the surrounding pixel points is used as an interference area, the interference area of the image is subjected to denoising treatment, the interference fringes in the interference area are removed, and the final image with the interference fringes removed is obtained. Therefore, interference signals in the images are filtered in a software algorithm calculation mode, the image content of the final shot images is clearer, and the recognition rate of the images after filtering processing is improved. On the other hand, the interference fringes in the image are removed in a software mode, so that the method is low in cost and easy to implement.
A second embodiment of the present invention relates to an image processing method. In the second embodiment of the present invention, the initial image is subjected to the first processing, the second processing, and the third processing, and the pixels meeting the requirements are selected from the processed image, and the area formed by all the pixels meeting the requirements is used as the interference area, and the specific flow is shown in fig. 4.
Step 401, obtaining an initial image and a pixel value of each pixel point of the initial image.
And step 402, solving a first derivative of the pixel value of each pixel point based on the position coordinate to obtain an image after primary processing.
Step 403, adjusting the pixel value of the pixel point with the pixel value smaller than the preset upper limit value to 0; and keeping the pixel value of the pixel point of which the pixel value is greater than or equal to the preset upper limit value unchanged.
And step 404, taking the image with the adjusted pixel value as an image after secondary processing.
Specifically, the image after the primary processing is subjected to secondary processing, and as shown in fig. 5, the pixel value of the pixel point of which the pixel value is smaller than the preset upper limit value is adjusted to 0, that is, the image in the background area is filled with black; the pixel values of the pixel points with the pixel values larger than or equal to the preset upper limit value are kept unchanged, so that the pixel points with smaller pixel values in the background area and the pixel points in the area where the interference signal is located can be distinguished.
And 405, performing filtering processing on the image subjected to the secondary processing to obtain an image subjected to the tertiary processing. Specifically, the image after the secondary processing is subjected to filtering processing, and an average value of data of a preset filtering area corresponding to each pixel point of the image after the secondary processing can be calculated; the data of the preset filtering area are specifically pixel values of all pixels of a rectangular area with the pixels as the centers; and finally, taking the calculated average value as the pixel value of each pixel point of the image after the three times of processing, wherein the image effect after the three times of processing is shown in fig. 6. In the following, a specific example is used to specifically describe the way of calculating the pixel values of each point of the image after the third processing, and it is assumed that in the image after the second processing, the pixel values of a certain pixel point and each pixel point of the rectangular area around the certain pixel point are respectively the pixel values
Figure BDA0002156281010000061
The pixel value of the pixel point is 5 and is located at the center of the rectangular area, the other pixel points are respectively arranged around the pixel point, all the pixel points form a preset filtering area, the pixel value of each pixel point in the preset filtering area is utilized to calculate the average value (2 +3+4+ 5+6+7+8+ 9)/9 of all the pixel points, which is about 5, the pixel value of the pixel point in the image after the three-time processing is 5, and the median value of each pixel value in the preset filtering area can also be selected to be used as the pixel value of the pixel point in the image after the three-time processing. Here, taking the rectangular area of the preset filtering area 3*3 as an example, in practical applications, the shape and size of the preset filtering area are adjusted according to practical situations, and are not limited herein.
In addition, in practical application, the preset filtering area can be averaged in other waysCalculating, in a manner that the numerical value of the preset filtering area in the above example is used to calculate the average value of other pixels, in the image after the secondary processing, the pixel values of a certain pixel and each pixel in the rectangular area around the certain pixel are respectively
Figure BDA0002156281010000071
Then the average value of the pixel point may be a ratio of the pixel value of the point to the sum of all pixel values in the preset filtering area, that is, the average value of the pixel point is: 5/(2 +3+4+ 5+6+7+8+ 9) =5/48, so that the interface between the interference region and the background region can be more obvious, and the method for calculating the average value of the preset filtering region is not limited herein.
And step 406, selecting all pixel points with pixel values larger than a preset threshold value from the image after the third processing, and taking the region formed by all the selected pixel points as an interference region.
Step 407, performing denoising processing on the interference region, and removing an interference signal of the interference region.
And step 408, taking the image obtained after the denoising processing is performed on the interference region as a final image.
Steps 407 and 408 correspond to steps 104 and 105 in the first embodiment one to one, and are not described herein again.
In the embodiment, threshold calculation is performed on the image after the primary processing, and all the pixel points smaller than the preset upper limit value are set to be black, so that the difference between the pixel values of the interference area and the background image is increased; and then, filtering the image after the secondary processing to make the difference between the black area and the white area more obvious in the image after the tertiary processing.
A third embodiment of the present invention relates to an image processing method. In the third embodiment of the present invention, the image after the three times of processing is processed four times, and the interference region obtained from the image after the four times of processing is closer to the region where the interference signal of the initial image is located, so that the final denoising processing has higher accuracy. The specific flow is shown in fig. 7.
Step 701, obtaining an initial image and pixel values of each pixel point of the initial image.
Step 702, a first derivative is obtained for the pixel value of each pixel point based on the position coordinate, and a once processed image is obtained.
Step 703, adjusting the pixel value of the pixel point with the pixel value smaller than the preset upper limit value to 0; and keeping the pixel value of the pixel point of which the pixel value is greater than or equal to the preset upper limit value unchanged.
Step 704, the image after adjusting the pixel value is taken as the image after the secondary processing.
Step 705, filtering the image after the secondary processing to obtain an image after the tertiary processing.
Steps 701 to 705 correspond to steps 401 to 405 in the second embodiment one to one, and are not described herein again.
Step 706, solving the intersection of each pixel point of the image after the third processing and each pixel point of the initial image to obtain the image after the fourth processing. Specifically, as shown in fig. 6, the image after the third processing is an image, and the interference area of the image after the threshold calculation and the filtering processing is significantly larger than the interference area of the initial image, and the interference area of the interference signal is within the interference area of the image after the third processing, intersection is obtained for each pixel point of the image after the third processing and the initial image, a pixel point with the same pixel value in the two images is selected, the pixel value of the selected pixel point is retained, and the pixel values of the remaining pixel points are all adjusted to 0, that is, the remaining pixel points are filled with black, so as to obtain the image after the fourth processing, as shown in fig. 8, so that the finally obtained interference area is closer to the area of the interference signal of the initial image, and the final denoising processing accuracy is higher.
And 707, selecting all pixel points with pixel values larger than a preset threshold value from the image after the four times of processing, and taking a region formed by all the selected pixel points as an interference region.
Step 708, performing denoising processing on the interference region, and removing the interference signal of the interference region.
And 709, taking the image subjected to denoising processing on the interference region as a final image.
Specifically, the original image may be subjected to denoising processing using the four-time processed image as a mask. And omitting the area of the initial image corresponding to the black area of the image after the four times of processing, and performing denoising treatment by taking the area of the initial image corresponding to the white area of the image after the four times of processing as an interference area.
In the embodiment, intersection is calculated for each pixel point of the image after the third processing and each pixel point of the initial image to obtain an image after the fourth processing, and the image after the fourth processing is used as a mask to perform denoising processing on the initial image, so that the finally obtained interference region is closer to the region where the interference signal of the initial image is located, and the accuracy of the final denoising processing is higher.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
A fourth embodiment of the present invention relates to an image processing apparatus, as shown in fig. 10, including: an acquisition module 1001, a calculation module 1002 and a denoising processing module 1003; the obtaining module 1001 is configured to obtain an initial image; the calculating module 1002 is configured to calculate a pixel value variation of each pixel point with respect to an adjacent pixel point; the adjacent pixel points are specifically adjacent pixel points in a preset direction; taking a region formed by pixel points with the pixel value variation larger than a preset threshold value as an interference region; the denoising module 1003 is configured to perform denoising processing on the interference region, and use an image obtained by performing denoising processing on the interference region as a final image.
It should be understood that the present embodiment is a system example corresponding to the first embodiment, and the present embodiment may be implemented in cooperation with the first embodiment. The related technical details mentioned in the first embodiment are still valid in this embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related-art details mentioned in the present embodiment can also be applied to the first embodiment.
It should be noted that each module referred to in this embodiment is a logical module, and in practical applications, one logical unit may be one physical unit, may be a part of one physical unit, and may be implemented by a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, a unit which is less closely related to solving the technical problem proposed by the present invention is not introduced in the present embodiment, but it does not indicate that no other unit exists in the present embodiment.
A fifth embodiment of the present invention relates to an image processing apparatus. In a fifth embodiment, the calculation module specifically includes: the primary processing module 10021, the secondary processing module 10022, the tertiary processing module 10023, and the quaternary processing module 10024.
The primary processing module 10021 is configured to solve a first derivative for the pixel value of each pixel point based on the position coordinate, so as to obtain a primarily processed image;
the secondary processing module 10022 is configured to, after obtaining the image after the primary processing, determine whether a pixel value of each pixel point of the image after the primary processing is greater than a preset upper limit value; adjusting the pixel value of the pixel point with the pixel value smaller than the preset upper limit value to be 0; keeping the pixel value of the pixel point with the pixel value larger than or equal to the preset upper limit value unchanged; taking the image with the adjusted pixel value as an image after secondary processing;
the third processing module 10023 is configured to perform filtering processing on the image after the second processing to obtain an image after the third processing;
the fourth-time processing module 10024 is configured to, after obtaining the image after the third processing, find an intersection between each pixel point of the image after the third processing and each pixel point of the initial image, so as to obtain an image after the fourth processing.
Since the third embodiment corresponds to the present embodiment, the present embodiment can be implemented in cooperation with the third embodiment. The related technical details mentioned in the third embodiment are still valid in this embodiment, and the technical effects that can be achieved in the third embodiment can also be achieved in this embodiment, and are not described herein again in order to reduce the repetition. Accordingly, the related-art details mentioned in the present embodiment can also be applied to the third embodiment.
A sixth embodiment of the present invention relates to an electronic device, as shown in fig. 12, including at least one processor 1201; and a memory 1202 communicatively coupled to the at least one processor 1201; the memory 1202 stores instructions executable by the at least one processor 1201, and the instructions are executed by the at least one processor 1201 to enable the at least one processor 1201 to perform the image processing method.
The memory 1202 and the processor 1201 are coupled together by a bus, which may include any number of interconnecting buses and bridges that couple one or more of the various circuits of the processor 1201 and the memory 1202. The bus may also connect various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor is transmitted over a wireless medium via an antenna, which further receives the data and passes the data to the processor 1201.
The processor 1201 is responsible for managing the bus and general processing, and may provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And memory 1202 may be used to store data used by processor 1201 in performing operations.
A seventh embodiment of the present invention relates to a computer-readable storage medium storing a computer program. The computer program realizes the above-described method embodiments when executed by a processor.
That is, as can be understood by those skilled in the art, all or part of the steps in the method for implementing the embodiments described above may be implemented by a program instructing related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the invention, and that various changes in form and details may be made therein without departing from the spirit and scope of the invention in practice.

Claims (10)

1. An image processing method, comprising:
acquiring an initial image and pixel values of all pixel points of the initial image;
calculating the pixel value variation of each pixel point relative to the adjacent pixel points; the adjacent pixel points are specifically adjacent pixel points in a preset direction;
taking a region formed by the pixel points with the pixel value variation larger than a preset threshold value as an interference region;
denoising the interference region to remove the interference signal of the interference region;
and taking the image subjected to denoising processing on the interference region as a final image.
2. The image processing method according to claim 1, wherein the calculating of the pixel value variation of each pixel point with respect to an adjacent pixel point specifically includes:
solving a first derivative of the pixel value of each pixel point based on the position coordinate to obtain an image after primary processing;
the area formed by the pixel points with the pixel value variation larger than the preset threshold is used as an interference area, and the method specifically includes:
selecting all pixel points with pixel values larger than a preset threshold value from the image after the primary processing;
and taking the area formed by all the pixel points as the interference area.
3. The image processing method according to claim 2, further comprising, after said obtaining the once-processed image:
judging whether the pixel value of each pixel point of the image after the primary processing is larger than a preset upper limit value or not;
adjusting the pixel value of the pixel point with the pixel value smaller than the preset upper limit value to be 0;
keeping the pixel value of the pixel point with the pixel value larger than or equal to the preset upper limit value unchanged;
taking the image with the adjusted pixel value as an image after secondary processing;
filtering the image after the secondary processing to obtain an image after the tertiary processing;
selecting all pixel points with pixel values larger than a preset threshold value from the image after the primary processing, specifically:
and selecting all pixel points with pixel values larger than a preset threshold value from the image after the three times of processing.
4. The image processing method according to claim 3, wherein the filtering the image after the secondary processing to obtain an image after the tertiary processing specifically includes:
calculating the average value of data of a preset filtering area corresponding to each pixel point of the image after the secondary processing; the data of the preset filtering area are specifically pixel values of all pixel points of a rectangular area with the pixel points as centers;
and taking the calculated average value as the pixel value of each pixel point of the image after the three times of processing.
5. The image processing method according to claim 3, further comprising, after said obtaining the three processed images:
solving intersection of each pixel point of the image after the third processing and each pixel point of the initial image to obtain an image after the fourth processing;
selecting all pixel points with pixel values larger than a preset threshold value from the image after the three times of processing, specifically:
and selecting all pixel points with pixel values larger than a preset threshold value from the image after the four times of processing.
6. The image processing method according to claim 1, wherein the denoising processing is performed on the interference region, specifically:
acquiring a previous frame image of the initial image in advance as a comparison image;
acquiring contrast pixel points in the contrast image; the contrast pixel points correspond to all pixel points of the interference area of the initial image one by one;
and replacing the pixel value of each pixel point of the interference area with the pixel value of the comparison pixel point.
7. An image processing apparatus characterized by comprising: the device comprises an acquisition module, a calculation module and a denoising processing module;
the acquisition module is used for acquiring an initial image and pixel values of all pixel points of the initial image;
the calculation module is used for calculating the pixel value variation of each pixel point relative to the adjacent pixel points; the adjacent pixel points are specifically adjacent pixel points in a preset direction; taking a region formed by the pixel points with the pixel value variation larger than a preset threshold value as an interference region;
the denoising processing module is used for denoising the interference region according to the initial image, removing an interference signal of the interference region, and taking the image subjected to denoising processing on the interference region as a final image.
8. The image processing apparatus according to claim 7, wherein the calculation module comprises at least: a primary processing module and an interference region selection module;
the primary processing module is used for solving a first derivative of the pixel value of each pixel point based on the position coordinate to obtain a primary processed image; selecting all pixel points with pixel values larger than a preset threshold value from the image after the primary processing;
and the interference region selection module is used for taking the region formed by all the pixel points as the interference region.
9. The image processing apparatus according to claim 8, wherein the calculation module further comprises: the secondary processing module and the tertiary processing module;
the secondary processing module is used for judging whether the pixel value of each pixel point of the image after primary processing is larger than a preset upper limit value or not after the image after primary processing is obtained; adjusting the pixel value of the pixel point with the pixel value smaller than the preset upper limit value to be 0; keeping the pixel value of the pixel point with the pixel value larger than or equal to the preset upper limit value unchanged; taking the image with the adjusted pixel value as an image after secondary processing;
and the third-time processing module is used for filtering the image after the second processing to obtain an image after the third processing, and selecting all pixel points with pixel values larger than a preset threshold value from the image after the third processing.
10. The image processing apparatus according to claim 9, wherein the calculation module further comprises: a fourth processing module;
the fourth-time processing module is used for solving intersection of each pixel point of the image after the third-time processing and each pixel point of the initial image after the third-time processing is obtained, obtaining an image after the fourth-time processing, and selecting all pixel points with pixel values larger than a preset threshold value from the image after the fourth-time processing.
CN201910718432.9A 2019-08-05 2019-08-05 Image processing method and device Active CN110516680B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910718432.9A CN110516680B (en) 2019-08-05 2019-08-05 Image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910718432.9A CN110516680B (en) 2019-08-05 2019-08-05 Image processing method and device

Publications (2)

Publication Number Publication Date
CN110516680A CN110516680A (en) 2019-11-29
CN110516680B true CN110516680B (en) 2023-04-07

Family

ID=68624481

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910718432.9A Active CN110516680B (en) 2019-08-05 2019-08-05 Image processing method and device

Country Status (1)

Country Link
CN (1) CN110516680B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112399150B (en) * 2020-11-16 2023-04-11 广州顶新时代电子系统科技有限公司 Method for optimizing imaging picture of monitoring camera

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105894460A (en) * 2015-12-14 2016-08-24 乐视云计算有限公司 Image filtering method and device
WO2018019128A1 (en) * 2016-07-29 2018-02-01 努比亚技术有限公司 Method for processing night scene image and mobile terminal

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105894460A (en) * 2015-12-14 2016-08-24 乐视云计算有限公司 Image filtering method and device
WO2018019128A1 (en) * 2016-07-29 2018-02-01 努比亚技术有限公司 Method for processing night scene image and mobile terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
局部自交干扰的无参模糊图像自适应去燥仿真;李秀明等;《计算机仿真》;20181015(第10期);全文 *

Also Published As

Publication number Publication date
CN110516680A (en) 2019-11-29

Similar Documents

Publication Publication Date Title
CN110473242B (en) Texture feature extraction method, texture feature extraction device and terminal equipment
CN105005973B (en) A kind of method and device of the quick denoising of image
CN109146855B (en) Image moire detection method, terminal device and storage medium
CN110766679A (en) Lens contamination detection method and device and terminal equipment
CN109214996B (en) Image processing method and device
CN102859555A (en) Image processing device, image processing method, and program therefor
JP2016505186A (en) Image processor with edge preservation and noise suppression functions
WO2013038833A1 (en) Image processing system, image processing method, and image processing program
CN110717922A (en) Image definition evaluation method and device
CN111402170A (en) Image enhancement method, device, terminal and computer readable storage medium
CN111368717A (en) Sight line determining method and device, electronic equipment and computer readable storage medium
US20130064470A1 (en) Image processing apparatus and image processing method for reducing noise
CN113298761B (en) Image filtering method, device, terminal and computer readable storage medium
US20140140620A1 (en) Image processing apparatus, image processing method and computer readable medium
CN109859124B (en) Depth image noise reduction method and device
CN113744256A (en) Depth map hole filling method and device, server and readable storage medium
CN111383178A (en) Image enhancement method and device and terminal equipment
CN113052754B (en) Method and device for blurring picture background
CN110516680B (en) Image processing method and device
CN111563517A (en) Image processing method, image processing device, electronic equipment and storage medium
JP5914046B2 (en) Image processing apparatus and image processing method
CN112073718B (en) Television screen splash detection method and device, computer equipment and storage medium
CN113744294A (en) Image processing method and related device
EP2908286A1 (en) Imaging system, imaging apparatus, and image processing apparatus
WO2021102704A1 (en) Image processing method and apparatus

Legal Events

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