CN113159058B - Method and device for identifying image noise points - Google Patents

Method and device for identifying image noise points Download PDF

Info

Publication number
CN113159058B
CN113159058B CN202110583763.3A CN202110583763A CN113159058B CN 113159058 B CN113159058 B CN 113159058B CN 202110583763 A CN202110583763 A CN 202110583763A CN 113159058 B CN113159058 B CN 113159058B
Authority
CN
China
Prior art keywords
row
gray
column
pixel point
pixel
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
CN202110583763.3A
Other languages
Chinese (zh)
Other versions
CN113159058A (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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110583763.3A priority Critical patent/CN113159058B/en
Publication of CN113159058A publication Critical patent/CN113159058A/en
Application granted granted Critical
Publication of CN113159058B publication Critical patent/CN113159058B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour

Landscapes

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

Abstract

The embodiment of the application provides a method and a device for identifying image noise points, wherein the method comprises the following steps: obtaining a gray image corresponding to an original image to be identified; distributing at least one identification code for each pixel point based on the gray value of each pixel point in the gray image; and identifying image noise points in the original image to be identified according to the number information of the pixel points in the group corresponding to each identification code. The method and the device have high identification accuracy rate on the isolated noise points, have low resource consumption, reduce the calculated amount and improve the identification rate.

Description

Method and device for identifying image noise points
Technical Field
The application relates to the technical field of computers, in particular to a method and a device for identifying image noise points.
Background
The image is often interfered and influenced by various noises in the generation and transmission processes, and the image noises can blur the image and even submerge the image characteristics, thereby bringing difficulties for identification and analysis. Image noise generally has the following characteristics:
the distribution and the size of the noise in the image are irregular, namely random;
there is generally a correlation between the image and the noise;
the noise has a superposition.
Therefore, in order to improve the quality of an image and remove noise, it is necessary to efficiently recognize the noise, and a K-nearest neighbor algorithm, a support vector machine, or the like is mainly used as a noise recognition and detection method which is currently mainstream. The analysis of the image adopts a mode of transforming a space domain into a transform domain.
The invention provides an image noise point identification method based on a probability statistical model, which uses the statistical distribution characteristics of an image to identify, reduces the data dimensionality and ensures the data characteristics. Meanwhile, in order to improve the flexibility of noise point identification, a dispersion calculation mode with variable scale is introduced.
Disclosure of Invention
Aiming at the problems in the prior art, the application provides an image noise point identification method and device, and the method comprises the steps of firstly obtaining a gray image corresponding to an original image to be identified; distributing at least one identification code for each pixel point based on the gray value of each pixel point in the gray image; and identifying image noise points in the original image to be identified according to the quantity information of the pixel points in the group corresponding to each identification code. The invention has higher identification accuracy rate to the isolated noise point, has small resource consumption, reduces the calculated amount and improves the identification rate.
In one aspect of the present invention, a method for identifying an image noise point is provided, including:
obtaining a gray image corresponding to an original image to be identified;
distributing at least one identification code for each pixel point based on the gray value of each pixel point in the gray image;
and identifying image noise points in the original image to be identified according to the quantity information of the pixel points in the group corresponding to each identification code.
In a preferred embodiment, the obtaining a grayscale image corresponding to the original image to be identified includes:
acquiring the original image to be identified;
and converting the original image to be identified into a gray image.
In a preferred embodiment, the gray image includes mxn pixel points, m is a number of rows, and n is a number of columns, and the allocating at least one identification code to each pixel point based on the gray value of each pixel point in the gray image includes:
aiming at each row of pixel points, allocating an identification code to each pixel point based on the gray value of each pixel point in the row;
aiming at each row of pixel points, distributing another identification code for each pixel point based on the gray value of each pixel point in the row; the one identification code and the other identification code may be the same or different.
In a preferred embodiment, the allocating an identification code to each pixel point based on the gray value of each pixel point in the row includes:
calculating the gray level difference value of each pixel point and the next adjacent pixel point in the same row to generate a row gray level difference value sequence corresponding to the row;
acquiring a median of the line gray level difference sequence;
and allocating an identification code to each pixel point in the row according to the row gray difference value sequence and the median of the row gray difference value sequence.
In a preferred embodiment, the allocating an identification code to each pixel in the row according to the row gray difference sequence and the median of the row gray difference sequence includes:
if the row gray difference value of the pixel point is smaller than a preset value and the absolute value of the row gray difference value is smaller than the median of the row gray difference value sequence, a first identification code is distributed to the pixel point;
if the line gray difference value of the pixel point is smaller than the preset value and the absolute value of the gray difference value is larger than or equal to the median of the line gray difference value sequence, distributing a second identification code for the pixel point;
if the gray difference value of the pixel point is greater than or equal to the preset value and the absolute value of the gray difference value is less than the median of the row gray difference value sequence, distributing a third identification code for the pixel point;
and if the row gray difference value of the pixel point is greater than or equal to the preset value and the absolute value of the gray difference value is greater than or equal to the median of the row gray difference value sequence, allocating a fourth identification code to the pixel point.
In a preferred embodiment, the allocating another identification code to each pixel point based on the gray value of each pixel point in the column includes:
calculating the gray difference value of each pixel point and the next adjacent pixel point in the same column, and generating a column gray difference value sequence corresponding to the column;
acquiring a median of the column gray difference sequence;
and allocating an identification code to each pixel point in the column according to the column gray difference sequence and the median of the column gray difference sequence.
In a preferred embodiment, the allocating an identification code to each pixel in the column according to the column gray difference sequence and the median of the column gray difference sequence includes:
if the column gray difference value of the pixel point is smaller than a preset value and the absolute value of the gray difference value is smaller than the median of the column gray difference value sequence, a first identification code is distributed to the pixel point;
if the column gray difference value of the pixel point is smaller than the preset value and the absolute value of the gray difference value is larger than or equal to the median of the column gray difference value sequence, distributing a second identification code for the pixel point;
if the column gray difference value of the pixel point is greater than or equal to the preset value and the absolute value of the gray difference value is less than the median of the column gray difference value sequence, distributing a third identification code for the pixel point;
and if the column gray difference value of the pixel point is greater than or equal to the preset value and the absolute value of the gray difference value is greater than or equal to the median of the column gray difference value sequence, allocating a fourth identification code to the pixel point.
In a preferred embodiment, the identification code comprises one or more of a number, a letter and a symbol.
In a preferred embodiment, the identifying, according to the number information of the pixel points in the group corresponding to each identification code, the image noise point in the original image to be identified includes:
generating line dispersion information of each group according to the counted information of the number of the pixels of each group in each line of pixels, wherein the line dispersion information comprises the absolute value of the difference between the number of the pixels of each group of the line and the average number of the pixels of each group of the adjacent line;
generating column dispersion information of each group according to the counted information of the number of the pixel points of each group in each column of the pixel points, wherein the column dispersion information comprises the absolute value of the difference between the number of the pixel points of each group of the column and the average number of the pixel points of each group of the adjacent column;
and identifying the noise point of the original image to be identified according to the row dispersion information of each group and the column dispersion information of each group.
In a preferred embodiment, the generating the line dispersion information of each group according to the counted information of the number of pixels of each group in each line of pixels includes:
counting the number information of the pixel points of each group aiming at the pixel points of each row;
generating average number information of each grouped pixel point of the adjacent row of the row according to the number information of the pixel points of each group of the adjacent upper N rows and the adjacent lower N rows of the row, wherein N is a positive integer greater than zero;
and determining the absolute value of the difference value between the average number information of each grouped pixel point of the adjacent row and the number information of each grouped pixel point corresponding to the row as the row deviation information of each group of the row.
In a preferred embodiment, the generating column deviation information of each group according to the counted information of the number of pixel points of each group in each several pixel points includes:
counting the number information of the pixel points of each group aiming at each column of pixel points;
generating average number information of each grouped pixel point of the adjacent column of the column according to the number information of the pixel points of each group of the adjacent front N columns and the adjacent back N columns of the column, wherein N is a positive integer greater than zero;
and determining the absolute value of the difference value between the average number information of each grouped pixel point of the adjacent column and the number information of each grouped pixel point corresponding to the column as the column dispersion information of each group of the column.
In a preferred embodiment, the identifying, according to the row dispersion information of each group and the column dispersion information of each group, a noise point of the original image to be identified includes:
screening out elements with element values larger than a preset value in the row dispersion information of each group, and acquiring a noise point row sequence number set;
screening out elements with element values larger than the preset value in the column dispersion information of each group, and acquiring a noise point column sequence number set;
and taking all elements in the noise point row sequence number set as a noise point horizontal coordinate, and taking all elements in the noise point column sequence number set as a noise point vertical coordinate, and further identifying the noise point of the original image to be identified.
In still another aspect of the present invention, an apparatus for identifying noise points in an image includes:
the image obtaining module is used for obtaining a gray image corresponding to the original image to be identified;
the pixel point identification module is used for allocating at least one identification code to each pixel point based on the gray value of each pixel point in the gray image;
and the noise point identification module is used for identifying the image noise points in the original image to be identified according to the number information of the pixel points in the group corresponding to each identification code.
In another aspect of the present invention, the present application provides an electronic device, which includes a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for identifying the image noise point when executing the program.
In still another aspect of the present invention, the present application provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements the method for identifying noise points in an image.
According to the technical scheme, the method for identifying the image noise points comprises the following steps: obtaining a gray image corresponding to an original image to be identified; distributing at least one identification code for each pixel point based on the gray value of each pixel point in the gray image; and identifying image noise points in the original image to be identified according to the number information of the pixel points in the group corresponding to each identification code. The invention has higher identification accuracy rate to the isolated noise point, has small resource consumption, reduces the calculated amount and improves the identification rate.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following descriptions are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flow chart of a method for identifying noise points in an image.
Fig. 2 is a schematic view of a gray scale image obtaining process.
Fig. 3 is a schematic diagram of a pixel point identification flow.
Fig. 4 is a schematic diagram of a row pixel point identification flow.
FIG. 5 is a schematic diagram of a column pixel point identification flow.
Fig. 6 is a schematic diagram of a noise point identification process.
Fig. 7 is a schematic diagram of a row deviation information generation flow.
Fig. 8 is a schematic diagram of a column dispersion information generation flow.
Fig. 9 is a schematic diagram of a noise point locating process.
Fig. 10 is a schematic structural diagram of an image noise point identification device.
Fig. 11 is a schematic structural diagram of an electronic device in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
It should be noted that the method and apparatus for identifying image noise points disclosed in the present application can be used in the field of computer technology, and can also be used in any field other than the field of computer technology.
The image is often interfered and influenced by various noises in the generation and transmission processes, and the image noises can blur the image and even submerge the image characteristics, thereby bringing difficulties for identification and analysis. Image noise generally has the following characteristics:
the distribution and the size of the noise in the image are irregular, namely random;
there is generally a correlation between the image and the noise;
the noise has a superposition.
Therefore, in order to improve the quality of an image and remove noise, it is necessary to efficiently recognize the noise, and a K-nearest neighbor algorithm, a support vector machine, or the like is mainly used in a noise recognition and detection method which is currently mainstream. The analysis of the image adopts a mode of transforming a space domain into a transform domain.
The invention provides an image noise point identification method based on a probability statistical model, which uses the statistical distribution characteristics of an image to identify, reduces the data dimensionality and ensures the data characteristics. Meanwhile, in order to improve the flexibility of noise point identification, a dispersion calculation mode with variable scale is introduced.
Aiming at the problems in the prior art, the application provides an identification method and device of image noise points, and the method comprises the steps of firstly obtaining a gray image corresponding to an original image to be identified; distributing at least one identification code for each pixel point based on the gray value of each pixel point in the gray image; the image noise points in the original image to be recognized are recognized according to the number information of the pixel points in the group corresponding to each identification code, so that the method has higher recognition accuracy rate on the isolated noise points, has low resource consumption, reduces the calculated amount and improves the recognition rate.
The following describes the method and apparatus for identifying image noise points in detail with reference to the accompanying drawings.
In a specific embodiment, the present application provides a method for identifying an image noise point, as shown in fig. 1, specifically including:
s1, obtaining a gray image corresponding to an original image to be identified;
in particular, the original image acquired by the image acquisition device may be single-channel, i.e. using 0-255 to represent the intensity of the acquired light, such an image being referred to as a grayscale image. The original image collected by the image can also be three-channel (RGB three-channel), each color channel also adopts 0-255 to represent the intensity of the corresponding channel color, and the collected image is a color image. In a specific embodiment of the present invention, if the original image to be identified is a color image, the obtaining of the gray image corresponding to the original image to be identified needs to be performed, as shown in fig. 2, and the specific steps include:
s11, acquiring the original image to be identified;
and S12, converting the original image to be identified into a gray image.
In a specific embodiment, three methods for converting an image from a color image to a gray-scale image are a weighting method, an averaging method and a maximum value method. The weighted method is GRAY = 0.3R + 0.59G + 0.11B, the average method is GRAY = R + G + B)/3, and the maximum method is GRAY = max (R, G, B). The gray value of each pixel point in the converted gray image is any integer from 0 to 255, generally, the gray value 0 represents pure black, and the light intensity corresponding to the gray value is the minimum. The gray value 255 represents pure white, and the gray value corresponds to the maximum light intensity value.
S2, distributing at least one identification code for each pixel point based on the gray value of each pixel point in the gray image;
specifically, the gray image includes mxn pixel points, m is a row number, and n is a column number, and at least one identification code is allocated to each pixel point based on the gray value of each pixel point in the gray image, as shown in fig. 3, including:
s21, aiming at each row of pixel points, distributing an identification code for each pixel point based on the gray value of each pixel point in the row;
in a specific embodiment, each line in the image is used as an analysis unit, and the allocating an identification code to each pixel point based on the gray value of each pixel point in the line, as shown in fig. 4, includes:
s211, calculating the gray difference value of each pixel point and the adjacent next pixel point in the same row to generate a row gray difference value sequence corresponding to the row;
specifically, from the first pixel point, the gray difference between the first pixel point and the next adjacent pixel point is calculated in sequence. And the gray difference value corresponding to the last pixel point is the difference value between the gray value of the pixel point and the gray value of the adjacent previous pixel point. And finally, arranging the corresponding gray difference values of each pixel point into the row gray difference value sequence according to the sequence of the pixel points in the row.
S212, acquiring a median of the row gray level difference sequence;
specifically, the median refers to arranging a group of data in a sequence from small to large (or from large to small), and if the number of the data is an odd number, the number in the middle position is called as the median of the group of data; if the number of data is even, the average of the two data in the middle is called the median of the data. Therefore, the row gray level difference sequence is firstly sequenced from small to large, if an image has an odd number of rows, the gray level difference value at the middle position after sequencing is taken as the median of the row gray level difference sequence, and if the image has an even number of rows, the average value of the two gray level difference values at the middle position is also taken as the median of the row gray level difference sequence.
And S213, distributing an identification code for each pixel point in the row according to the row gray difference sequence and the median of the row gray difference sequence.
In a specific embodiment, after the row gray difference sequence and the corresponding median are obtained, each pixel point may be marked by using an identification code, where the identification code includes one or more of a number, a letter, and a symbol. In a specific embodiment, four identification codes are adopted to mark pixel points according to the positive and negative conditions of the line gray difference value and the comparison condition of the absolute value of the line gray difference value and the corresponding median. The allocating an identification code to each pixel point in the row according to the row gray difference value sequence and the median of the row gray difference value sequence comprises:
if the row gray difference value of the pixel point is smaller than a preset value and the absolute value of the row gray difference value is smaller than the median of the row gray difference value sequence, a first identification code is distributed to the pixel point;
if the row gray difference value of the pixel point is smaller than the preset value and the absolute value of the gray difference value is larger than or equal to the median of the row gray difference value sequence, distributing a second identification code for the pixel point;
if the gray difference value of the pixel point is greater than or equal to the preset value and the absolute value of the gray difference value is less than the median of the row gray difference value sequence, distributing a third identification code for the pixel point;
and if the row gray difference value of the pixel point is greater than or equal to the preset value and the absolute value of the gray difference value is greater than or equal to the median of the row gray difference value sequence, allocating a fourth identification code to the pixel point.
S22, aiming at each row of pixel points, distributing another identification code for each pixel point based on the gray value of each pixel point in the row; the one identification code and the other identification code may be the same or different.
In a specific embodiment, the analysis units are arranged in columns, and an identification code can be assigned to each pixel point. The allocation of the column identification code and the row identification code of each pixel point are completely independent, so that the column identification code and the row identification code of the same pixel can be the same or different. The allocating an identification code to each pixel point based on the gray value of each pixel point in the column, as shown in fig. 5, includes:
s221, calculating the gray difference value of each pixel point and the next adjacent pixel point in the same row to generate a row gray difference value sequence corresponding to the row;
s222, acquiring a median of the column gray difference sequence;
and S223, allocating an identification code to each pixel point in the row according to the row gray difference sequence and the median of the row gray difference sequence.
In a specific embodiment, the allocating an identification code to each pixel in the column according to the column gray difference sequence and the median of the column gray difference sequence includes:
if the column gray difference value of the pixel point is smaller than a preset value and the absolute value of the column gray difference value is smaller than the median of the column gray difference value sequence, a first identification code is distributed to the pixel point;
if the column gray difference value of the pixel point is smaller than the preset value and the absolute value of the gray difference value is larger than or equal to the median of the column gray difference value sequence, distributing a second identification code for the pixel point;
if the gray difference value of the pixel point is greater than or equal to the preset value and the absolute value of the gray difference value is less than the median of the row gray difference value sequence, distributing a third identification code for the pixel point;
and if the column gray difference value of the pixel point is greater than or equal to the preset value and the absolute value of the gray difference value is greater than or equal to the median of the column gray difference value sequence, allocating a fourth identification code to the pixel point.
And S3, identifying the image noise points in the original image to be identified according to the number information of the pixel points in the group corresponding to each identification code.
Specifically, the identifying the image noise point in the original image to be identified according to the quantity information of the pixel points in the group corresponding to each identification code, as shown in fig. 6, includes:
s31, generating row deviation information of each group according to the counted information of the number of the pixel points of each group in each row of the pixel points, wherein the row deviation information comprises the absolute value of the difference value of the number of the pixel points of each group of the row and the average number of the pixel points of each group of the adjacent row;
specifically, the generating of the row deviation information of each group according to the counted information of the number of the pixels of each group in each row of the pixels, as shown in fig. 7, includes:
s311, counting the number information of the pixel points of each group aiming at the pixel points of each row;
in a specific embodiment, the pixel point identification codes in each line of the image are counted, and the information of the number of the grouped pixel points corresponding to each identification code is counted. For example, 10 pixels in a certain row of the image are respectively marked as 1,3, 2,1,2,3,4, and the number of the counted four grouped pixels is 3,2,3,2 in sequence.
S312, generating average number information of each grouped pixel point of the adjacent row of the row according to the number information of each grouped pixel point of the adjacent upper N rows and the adjacent lower N rows of the row, wherein N is a positive integer larger than zero;
in a specific embodiment, the current behavior center is used for selecting the upper N rows and the lower N rows adjacent to the row, counting the number of pixel points of each group of the adjacent rows, and calculating the average number of each group. N is an integer value larger than zero, the smaller the value of N is, the better identification effect is also achieved on small noise points, the identification precision is improved, and meanwhile, normal pixel points can be identified as noise points, and the identification rate is reduced. By selecting a suitable value of N, the recognition accuracy and the recognition rate are in relative balance.
S313, determining the absolute value of the difference value between the average number information of each grouped pixel of the adjacent row and the number information of each grouped pixel corresponding to the row as the row deviation information of each group of the row.
In a specific embodiment, assuming that the number of pixels in four groups of the current row is 3,2, respectively, and the average number of pixels in four groups of the adjacent row is 3,2, respectively, the row dispersion of the current row is 0,1, 0.
S32, generating column dispersion information of each group according to the counted information of the number of the pixel points of each group in each column of the pixel points, wherein the column dispersion information comprises the absolute value of the difference between the number of the pixel points of each group of the column and the average number of the pixel points of each group of the adjacent column;
specifically, the generating of the line dispersion information of each group according to the counted information of the number of pixels of each group in each line of pixels, as shown in fig. 8, includes:
s321, counting the number information of the pixel points of each group aiming at the pixel points of each row;
s322, generating average number information of each grouped pixel point of the adjacent row of the row according to the number information of each grouped pixel point of the adjacent upper N rows and the adjacent lower N rows of the row, wherein N is a positive integer larger than zero;
s323, determining the absolute value of the difference value between the average number information of each grouped pixel point of the adjacent row and the number information of each grouped pixel point corresponding to the row as the row deviation information of each group of the row.
In a specific embodiment, assuming that the number of pixels in four groups of a current column is 4,2,5, and 2, respectively, and the average number of pixels in four groups of an adjacent column is 3, and 2, respectively, the column dispersion of the current column is 1,2, and 0.
And S33, identifying the noise point of the original image to be identified according to the row dispersion information of each group and the column dispersion information of each group.
Specifically, the identifying, according to the row dispersion information of each group and the column dispersion information of each group, a noise point of the original image to be identified, as shown in fig. 9, includes:
s331, screening out elements of which the element values are greater than a preset value in the row dispersion information of each group, and acquiring a noise point row sequence number set;
s332, screening out elements with element values larger than the preset value in the column dispersion information of each group, and acquiring a noise point column sequence number set;
and S333, identifying the noise points of the original image to be identified by taking all elements in the noise point row sequence number set as horizontal coordinates of the noise points and all elements in the noise point column sequence number set as vertical coordinates of the noise points.
In a specific embodiment, assuming that the image has 6 rows and 7 columns, a matrix a with 6 rows and 4 columns of row deviation information of each group is obtained according to the above steps, and a matrix B with 4 rows and 7 columns of column deviation information of each group is obtained. The dispersion between the normal pixel and the adjacent pixel is 0, so the preset value is 0, if the dispersion is greater than 0, the corresponding pixel is probably a noise point. If the row number of the element having a value greater than 0 is selected from the matrix a as 1,3 and the column number of the element having a value greater than 0 is selected from the matrix B as 2,5, the noise points of the identified image are (1, 2), (3, 5).
The invention is further described below in conjunction with a specific implementation scenario.
Supposing that the gray level image of the original image to be recognized is 8 rows and 7 columns, according to the steps of the invention, firstly, the gray level difference value of each pixel point in each row and the next pixel point adjacent to the same row is calculated by using a row analysis unit, then the median of each row is calculated and is respectively 0, -1, -1, -2,0,2 and 3, an identification code is distributed to each pixel point according to the obtained median and the gray level difference value of each pixel point, 4 identifications are adopted for marking, and the 4 identifications are P, Q, X and Y, and the specific rule is shown in the following table
Absolute value greater than or equal to the median Absolute value less than median
Greater than or equal to 0 P X
Less than 0 Q Y
After each row is marked, the number of the pixel points marked as P, Q, X and Y is respectively counted, and the result is obtained as follows:
Figure BDA0003087266970000111
and then calculating the dispersion of the average value of each line and the adjacent lines, selecting the upper 2 lines and the lower 2 lines of each line, and complementing by self if the average value of each line is insufficient to obtain the following line difference information:
Figure BDA0003087266970000112
and performing the identification, counting and calculating dispersion on each column to obtain column dispersion information as follows:
Figure BDA0003087266970000113
Figure BDA0003087266970000121
screening out the corresponding row number of the point which is not 0 from the obtained row deviation to be 4,5,6,7,8; if the column number of the point corresponding to a point other than 0 is 3,5 is selected from the column deviations, the noise points of the image can be determined to be (4,3), (5,3), (6,3), (7,3), (8,3), (4,5), (5,5), (6,5), (7,5), (8,5).
As can be seen from the above description, the method for identifying the noise point of the image according to the present invention first obtains the grayscale image corresponding to the original image to be identified; distributing at least one identification code for each pixel point based on the gray value of each pixel point in the gray image; the image noise points in the original image to be recognized are recognized according to the number information of the pixel points in the group corresponding to each identification code, so that the method has higher recognition accuracy rate on the isolated noise points, has low resource consumption, reduces the calculated amount and improves the recognition rate.
In terms of software, the present application provides an embodiment of an apparatus for identifying image noise points for performing all or part of the method for identifying image noise points, and referring to fig. 10, the apparatus for identifying image noise points specifically includes the following contents:
the image obtaining module is used for obtaining a gray image corresponding to the original image to be identified;
the pixel point identification module is used for allocating at least one identification code to each pixel point based on the gray value of each pixel point in the gray image;
and the noise point identification module is used for identifying the image noise points in the original image to be identified according to the number information of the pixel points in the group corresponding to each identification code.
According to the image noise point identification device provided by the invention, the gray level image corresponding to the original image to be identified is obtained; distributing at least one identification code for each pixel point based on the gray value of each pixel point in the gray image; and identifying image noise points in the original image to be identified according to the quantity information of the pixel points in the group corresponding to each identification code. The invention has higher identification accuracy rate on the isolated noise points, has small resource consumption, reduces the calculated amount and improves the identification rate.
In a specific embodiment, the present application provides an apparatus for identifying an image noise point, configured to perform the following steps:
s1, obtaining a gray image corresponding to an original image to be identified;
in particular, the original image acquired by the image acquisition device may be single-channel, i.e. using 0-255 to represent the intensity of the acquired light, such an image being referred to as a grayscale image. The original image collected by the image can also be three-channel (RGB three-channel), each color channel also adopts 0-255 to represent the intensity of the corresponding channel color, and the collected image is a color image. In a specific embodiment of the present invention, the image obtaining module is specifically configured to perform the following steps:
s11, acquiring the original image to be identified;
and S12, converting the original image to be identified into a gray image.
In a specific embodiment, three methods for converting an image from a color image to a gray-scale image are a weighting method, an averaging method and a maximum value method. The weighted method is GRAY = 0.3R + 0.59G + 0.11B, the average method is GRAY = R + G + B)/3, and the maximum method is GRAY = max (R, G, B). The gray value of each pixel point in the converted gray image is any integer from 0 to 255, generally, the gray value 0 represents pure black, and the light intensity corresponding to the gray value is the minimum. The gray value 255 represents pure white, and the gray value corresponds to the maximum light intensity value.
It is understood that the image obtaining module performing the above steps can be understood as including an original image acquiring unit and a gray image generating unit. The original image obtaining unit is configured to perform step S11, and the grayscale image generating unit is configured to perform step S12, which are not described in detail in the following related embodiments.
S2, distributing at least one identification code for each pixel point based on the gray value of each pixel point in the gray image;
specifically, the grayscale image includes mxn pixel points, m is a row number, and n is a column number, and the pixel point identification module is configured to execute the following steps:
s21, aiming at each row of pixel points, distributing an identification code for each pixel point based on the gray value of each pixel point in the row;
in a specific embodiment, the method for assigning an identification code to each pixel point based on the gray value of each pixel point in each line by using each line in the image as an analysis unit includes:
s211, calculating the gray difference value of each pixel point and the next adjacent pixel point in the same row to generate a row gray difference value sequence corresponding to the row;
specifically, from the first pixel point, the gray difference between the first pixel point and the next adjacent pixel point is calculated in sequence. And the gray difference value corresponding to the last pixel point is the difference value between the gray value of the last pixel point and the gray value of the last adjacent pixel point. And finally, arranging the corresponding gray difference values of each pixel point into the row gray difference value sequence according to the sequence of the pixel points in the row.
S212, acquiring a median of the row gray level difference sequence;
specifically, the median refers to arranging a group of data in a sequence from small to large (or from large to small), and if the number of the data is an odd number, the number in the middle position is called as the median of the group of data; if the number of data is even, the average of the two data in the middle is called the median of the data. Therefore, the row gray level difference sequence is firstly sequenced from small to large, if an image has an odd number of rows, the gray level difference value at the middle position after sequencing is taken as the median of the row gray level difference sequence, and if the image has an even number of rows, the average value of the two gray level difference values at the middle position is also taken as the median of the row gray level difference sequence.
And S213, distributing an identification code for each pixel point in the row according to the row gray difference sequence and the median of the row gray difference sequence.
In a specific embodiment, after the row gray difference sequence and the corresponding median are obtained, each pixel point may be marked by using an identification code, where the identification code includes one or more of a number, a letter, and a symbol. In a specific embodiment, four identification codes are adopted to mark pixel points according to the positive and negative conditions of the line gray difference value and the comparison condition of the absolute value of the line gray difference value and the corresponding median. The allocating an identification code to each pixel point in the row according to the row gray difference value sequence and the median of the row gray difference value sequence comprises the following steps:
if the row gray difference value of the pixel point is smaller than a preset value and the absolute value of the row gray difference value is smaller than the median of the row gray difference value sequence, a first identification code is distributed to the pixel point;
if the line gray difference value of the pixel point is smaller than the preset value and the absolute value of the gray difference value is larger than or equal to the median of the line gray difference value sequence, distributing a second identification code for the pixel point;
if the gray difference value of the pixel point is greater than or equal to the preset value and the absolute value of the gray difference value is less than the median of the row gray difference value sequence, distributing a third identification code for the pixel point;
and if the line gray difference value of the pixel point is greater than or equal to the preset value and the absolute value of the gray difference value is greater than or equal to the median of the line gray difference value sequence, allocating a fourth identification code to the pixel point.
S22, aiming at each row of pixel points, distributing another identification code for each pixel point based on the gray value of each pixel point in the row; the one identification code and the other identification code may be the same or different.
In a specific embodiment, the column-based analysis unit can also assign an identification code to each pixel. The allocation of the column identification code and the row identification code of each pixel point are completely independent, so the column identification code and the row identification code of the same pixel can be the same or different. The allocating an identification code to each pixel point based on the gray value of each pixel point in the row comprises:
s221, calculating the gray difference value of each pixel point and the next adjacent pixel point in the same row to generate a row gray difference value sequence corresponding to the row;
s222, acquiring a median of the column gray difference sequence;
and S223, distributing an identification code for each pixel point in the column according to the column gray difference value sequence and the median of the column gray difference value sequence.
In a specific embodiment, the allocating an identification code to each pixel in the column according to the column gray difference sequence and the median of the column gray difference sequence includes:
if the column gray difference value of the pixel point is smaller than a preset value and the absolute value of the column gray difference value is smaller than the median of the column gray difference value sequence, a first identification code is allocated to the pixel point;
if the column gray difference value of the pixel point is smaller than the preset value and the absolute value of the gray difference value is larger than or equal to the median of the column gray difference value sequence, distributing a second identification code for the pixel point;
if the gray difference value of the pixel point is greater than or equal to the preset value and the absolute value of the gray difference value is less than the median of the row gray difference value sequence, distributing a third identification code for the pixel point;
and if the column gray difference value of the pixel point is greater than or equal to the preset value and the absolute value of the gray difference value is greater than or equal to the median of the column gray difference value sequence, allocating a fourth identification code to the pixel point.
And S3, identifying the image noise points in the original image to be identified according to the number information of the pixel points in the group corresponding to each identification code.
Specifically, the noise point identification module is configured to execute the following steps:
s31, generating row deviation information of each group according to the counted information of the number of the pixel points of each group in each row of the pixel points, wherein the row deviation information comprises the absolute value of the difference value of the number of the pixel points of each group of the row and the average number of the pixel points of each group of the adjacent row;
specifically, the generating of the row deviation information of each group according to the counted information of the number of the pixels of each group in each row of the pixels includes:
s311, counting the number information of the pixel points of each group aiming at the pixel points of each row;
in a specific embodiment, the identification codes of the pixel points in each row of the image are counted, and the information of the number of the pixel points of each group corresponding to each identification code is counted. For example, 10 pixels in a certain row of the image are respectively marked as 1,3, 2,1,2,3,4, and the number of the counted pixels in four groups is 3,2,3,2 in sequence.
S312, generating average number information of each grouped pixel point of the adjacent row of the row according to the number information of each grouped pixel point of the adjacent upper N rows and the adjacent lower N rows of the row, wherein N is a positive integer larger than zero;
in a specific embodiment, the current row center is used for selecting the upper N rows and the lower N rows adjacent to the row, the number of pixels of each group of the adjacent rows is counted, and the average number of each group is calculated. N is an integer value larger than zero, the smaller the value of N is, the better identification effect is also achieved on small noise points, the identification precision is improved, and meanwhile, normal pixel points can be identified as noise points, and the identification rate is reduced. By selecting a suitable value of N, the recognition accuracy and the recognition rate are in relative balance.
S313, determining the absolute value of the difference between the average number information of each grouped pixel point of the adjacent line and the number information of each grouped pixel point corresponding to the line as the line deviation information of each group of the line.
In a specific embodiment, assuming that the number of pixels in four groups of the current row is 3,2, respectively, and the average number of pixels in four groups of the adjacent row is 3,2, respectively, the row dispersion of the current row is 0,1, 0.
S32, generating column dispersion information of each group according to the counted information of the number of the pixel points of each group in each column of the pixel points, wherein the column dispersion information comprises the absolute value of the difference between the number of the pixel points of each group of the column and the average number of the pixel points of each group of the adjacent column;
specifically, the generating of the row deviation information of each group according to the counted information of the number of the pixel points of each group in each row of the pixel points includes:
s321, counting the number information of the pixel points of each group aiming at the pixel points of each row;
s322, generating average number information of each grouped pixel point of the adjacent row of the row according to the number information of each grouped pixel point of the adjacent upper N rows and the adjacent lower N rows of the row, wherein N is a positive integer larger than zero;
s323, determining the absolute value of the difference value between the average number information of each grouped pixel point of the adjacent row and the number information of each grouped pixel point corresponding to the row as the row deviation information of each group of the row.
In a specific embodiment, assuming that the number of pixels in four groups of the current column is 4,2,5, and 2, respectively, and the average number of pixels in four groups of the adjacent column is 3, and 2, respectively, the column dispersion of the current column is 1,2, and 0.
And S33, identifying the noise point of the original image to be identified according to the row dispersion information of each group and the column dispersion information of each group.
Specifically, the identifying the noise point of the original image to be identified according to the row dispersion information of each group and the column dispersion information of each group includes:
s331, screening out elements with element values larger than a preset value in the row dispersion information of each group, and acquiring a noise point row sequence number set;
s332, screening out elements with element values larger than the preset value in the column dispersion information of each group, and acquiring a noise point column sequence number set;
and S333, identifying the noise points of the original image to be identified by taking all elements in the noise point row sequence number set as horizontal coordinates of the noise points and all elements in the noise point column sequence number set as vertical coordinates of the noise points.
In a specific embodiment, assuming that the image has 6 rows and 7 columns, a matrix a with 6 rows and 4 columns of row deviation information of each group is obtained according to the above steps, and a matrix B with 4 rows and 7 columns of column deviation information of each group is obtained. The dispersion between the normal pixel and the adjacent pixel is 0, so that the preset value is 0, and if the dispersion is greater than 0, the corresponding pixel is probably a noise point. If the row number of the element having a value greater than 0 is selected from the matrix a as 1,3 and the column number of the element having a value greater than 0 is selected from the matrix B as 2,5, the noise points of the identified image are (1, 2), (3, 5).
The invention is further described below in conjunction with a specific implementation scenario.
Supposing that the gray level image of the original image to be recognized is 8 rows and 7 columns, according to the steps of the invention, firstly, the gray level difference value of each pixel point in each row and the next pixel point adjacent to the same row is calculated by using a row analysis unit, then the median of each row is calculated and is respectively 0, -1, -1, -2,0,2 and 3, an identification code is distributed to each pixel point according to the obtained median and the gray level difference value of each pixel point, 4 identifications are adopted for marking, and the 4 identifications are P, Q, X and Y, and the specific rule is shown in the following table
Absolute value greater than or equal to the median Absolute value less than median
Greater than or equal to 0 P X
Less than 0 Q Y
After each row is marked, the number of the pixel points marked as P, Q, X and Y is respectively counted, and the result is obtained as follows:
Figure BDA0003087266970000171
and then calculating the dispersion of the average value of each line and the adjacent lines, selecting the upper 2 lines and the lower 2 lines of each line, and complementing by self if the average value is insufficient to obtain the following line difference information:
Figure BDA0003087266970000172
and performing the identification, counting and calculating dispersion on each column to obtain column dispersion information as follows:
Figure BDA0003087266970000173
Figure BDA0003087266970000181
screening out the corresponding row number of the point which is not 0 from the obtained row deviation to be 4,5,6,7,8; if the column number of the point corresponding to a point other than 0 is 3,5 is selected from the column deviations, the noise points of the image can be determined to be (4,3), (5,3), (6,3), (7,3), (8,3), (4,5), (5,5), (6,5), (7,5), (8,5).
As can be seen from the above description, the apparatus for identifying image noise points provided by the present invention includes an image obtaining module, configured to obtain a grayscale image corresponding to an original image to be identified; the pixel point identification module is used for allocating at least one identification code for each pixel point based on the gray value of each pixel point in the gray image; and the noise point identification module is used for identifying the image noise points in the original image to be identified according to the quantity information of the pixel points in the group corresponding to each identification code. The invention has higher identification accuracy rate on the isolated noise points, has small resource consumption, reduces the calculated amount and improves the identification rate.
In terms of hardware, the present application provides an embodiment of an electronic device for implementing all or part of contents in an image noise point identification method, where the electronic device specifically includes the following contents:
fig. 11 is a schematic block diagram of a system configuration of an electronic device 9600 according to an embodiment of the present application. As shown in fig. 11, the electronic device 9600 can include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. Notably, this FIG. 11 is exemplary; other types of structures may also be used in addition to or in place of the structures to implement telecommunications or other functions.
In one embodiment, the image noise point identification method function may be integrated into a central processor. Wherein the central processor may be configured to control:
s1, obtaining a gray image corresponding to an original image to be identified;
s2, distributing at least one identification code for each pixel point based on the gray value of each pixel point in the gray image;
and S3, identifying the image noise points in the original image to be identified according to the number information of the pixel points in the group corresponding to each identification code.
From the above description, the electronic device provided in the embodiment of the present application has a higher identification accuracy for the isolated noise point, and has a small resource consumption, and the calculation amount is reduced, thereby increasing the identification rate.
In another embodiment, the device for identifying image noise points may be configured separately from the central processor 9100, for example, the device for identifying image noise points may be configured as a chip connected to the central processor 9100, and the function of the method for identifying image noise points is realized by the control of the central processor.
As shown in fig. 11, the electronic device 9600 may further include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is noted that the electronic device 9600 also does not necessarily include all of the components shown in fig. 11; in addition, the electronic device 9600 may further include components not shown in fig. 11, which may be referred to in the prior art.
As shown in fig. 11, a central processor 9100, sometimes referred to as a controller or operational control, can include a microprocessor or other processor device and/or logic device, which central processor 9100 receives input and controls the operation of the various components of the electronic device 9600.
The memory 9140 can be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. The information relating to the failure may be stored, and a program for executing the information may be stored. And the central processing unit 9100 can execute the program stored in the memory 9140 to realize information storage or processing, or the like.
The input unit 9120 provides input to the central processor 9100. The input unit 9120 is, for example, a key or a touch input device. The power supply 9170 is used to provide power to the electronic device 9600. The display 9160 is used for displaying display objects such as images and characters. The display may be, for example, an LCD display, but is not limited thereto.
The memory 9140 can be a solid state memory, e.g., read Only Memory (ROM), random Access Memory (RAM), a SIM card, or the like. There may also be a memory that holds information even when power is off, can be selectively erased, and is provided with more data, an example of which is sometimes called an EPROM or the like. The memory 9140 could also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application/function storage portion 9142, the application/function storage portion 9142 being used for storing application programs and function programs or for executing a flow of operations of the electronic device 9600 by the central processor 9100.
The memory 9140 can also include a data store 9143, the data store 9143 being used to store data, such as contacts, digital data, pictures, sounds, and/or any other data used by an electronic device. The driver storage portion 9144 of the memory 9140 may include various drivers for the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging applications, contact book applications, etc.).
The communication module 9110 is a transmitter/receiver 9110 that transmits and receives signals via an antenna 9111. The communication module (transmitter/receiver) 9110 is coupled to the central processor 9100 to provide input signals and receive output signals, which may be the same as in the case of a conventional mobile communication terminal.
A plurality of communication modules 9110, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, can be provided in the same electronic device based on different communication technologies. The communication module (transmitter/receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide audio output via the speaker 9131 and receive audio input from the microphone 9132, thereby implementing ordinary telecommunications functions. The audio processor 9130 may include any suitable buffers, decoders, amplifiers and so forth. In addition, the audio processor 9130 is also coupled to the central processor 9100, thereby enabling recording locally through the microphone 9132 and enabling locally stored sounds to be played through the speaker 9131.
An embodiment of the present application further provides a computer-readable storage medium capable of implementing all the steps in the method for identifying an image noise point in the foregoing embodiment, where the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor, implements all the steps in the method for identifying an image noise point, where the execution subject of the computer program is a server or a client, for example, the processor implements the following steps when executing the computer program:
s1, obtaining a gray image corresponding to an original image to be identified;
s2, distributing at least one identification code for each pixel point based on the gray value of each pixel point in the gray image;
and S3, identifying the image noise points in the original image to be identified according to the number information of the pixel points in the group corresponding to each identification code.
As can be seen from the foregoing description, the computer-readable storage medium provided in the embodiments of the present application has a high recognition accuracy for isolated noise points, and is low in resource consumption, so that the amount of computation is reduced, and the recognition rate is increased.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principle and the implementation mode of the invention are explained by applying specific embodiments in the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (13)

1. A method for identifying noise points in an image, comprising:
obtaining a gray image corresponding to an original image to be identified;
distributing at least one identification code for each pixel point based on the gray value of each pixel point in the gray image;
identifying image noise points in the original image to be identified according to the number information of the pixel points in the group corresponding to each identification code;
the gray image comprises mxn pixel points, m is the number of lines, and n is the number of columns, and the gray value based on each pixel point in the gray image allocates at least one identification code for each pixel point, which comprises:
aiming at each row of pixel points, distributing an identification code based on the gray difference value of each pixel point in the row and the adjacent next pixel point in the same row and the median of each gray difference value in the row;
aiming at each row of pixel points, distributing another identification code based on the gray difference value of each pixel point in the row and the adjacent next pixel point in the same row and the median of each gray difference value in the row;
the one identification code and the other identification code may be the same or different;
the identifying the image noise points in the original image to be identified according to the number information of the pixel points in the group corresponding to each identification code comprises the following steps:
generating row deviation information of each group according to the counted information of the number of the pixel points of each group in each row of the pixel points, wherein the row deviation information comprises the absolute value of the difference value of the number of the pixel points of each group of the row and the average number of the pixel points of each group of the adjacent row;
generating column dispersion information of each group according to the counted information of the number of the pixel points of each group in each column of the pixel points, wherein the column dispersion information comprises the absolute value of the difference between the number of the pixel points of each group of the column and the average number of the pixel points of each group of the adjacent column;
and identifying the noise point of the original image to be identified according to the row dispersion information of each group and the column dispersion information of each group.
2. The method for identifying the image noise point according to claim 1, wherein the obtaining of the grayscale image corresponding to the original image to be identified comprises:
acquiring the original image to be identified;
and converting the original image to be identified into a gray image.
3. The method according to claim 1, wherein the assigning an identification code based on the gray scale difference between each pixel point in the row and the next pixel point adjacent to the pixel point in the same row and the median of the gray scale differences in the row comprises:
calculating the gray difference value of each pixel point and the adjacent next pixel point in the same row to generate a row gray difference value sequence corresponding to the row;
acquiring a median of the row gray level difference sequence;
and allocating an identification code to each pixel point in the row according to the row gray difference value sequence and the median of the row gray difference value sequence.
4. The method according to claim 3, wherein the assigning an identification code to each pixel in the row according to the row gray scale difference sequence and the median of the row gray scale difference sequence comprises:
if the row gray difference value of the pixel point is smaller than a preset value and the absolute value of the row gray difference value is smaller than the median of the row gray difference value sequence, a first identification code is distributed to the pixel point;
if the line gray difference value of the pixel point is smaller than the preset value and the absolute value of the gray difference value is larger than or equal to the median of the line gray difference value sequence, distributing a second identification code for the pixel point;
if the gray difference value of the pixel point is greater than or equal to the preset value and the absolute value of the gray difference value is less than the median of the row gray difference value sequence, distributing a third identification code for the pixel point;
and if the row gray difference value of the pixel point is greater than or equal to the preset value and the absolute value of the gray difference value is greater than or equal to the median of the row gray difference value sequence, allocating a fourth identification code to the pixel point.
5. The method of claim 1, wherein the assigning another identification code based on the gray scale difference between each pixel point in the column and the next pixel point in the same column and the median of the gray scale differences in the column comprises:
calculating the gray difference value of each pixel point and the next adjacent pixel point in the same column, and generating a column gray difference value sequence corresponding to the column;
acquiring a median of the column gray difference sequence;
and allocating an identification code to each pixel point in the column according to the column gray difference sequence and the median of the column gray difference sequence.
6. The method according to claim 5, wherein the assigning an identification code to each pixel in the column according to the column gray difference sequence and the median of the column gray difference sequence comprises:
if the column gray difference value of the pixel point is smaller than a preset value and the absolute value of the gray difference value is smaller than the median of the column gray difference value sequence, a first identification code is allocated to the pixel point;
if the column gray difference value of the pixel point is smaller than the preset value and the absolute value of the gray difference value is larger than or equal to the median of the column gray difference value sequence, distributing a second identification code for the pixel point;
if the column gray difference value of the pixel point is greater than or equal to the preset value and the absolute value of the gray difference value is less than the median of the column gray difference value sequence, distributing a third identification code for the pixel point;
and if the column gray difference value of the pixel point is greater than or equal to the preset value and the absolute value of the gray difference value is greater than or equal to the median of the column gray difference value sequence, allocating a fourth identification code to the pixel point.
7. The method for identifying the noise point in the image according to claim 1, wherein the identification code comprises one or more of a number, a letter and a symbol.
8. The method for identifying the image noise point according to claim 1, wherein the generating the line dispersion information of each group according to the counted information of the number of the pixel points of each group in each line of the pixel points comprises:
counting the number information of the pixel points of each group aiming at each row of the pixel points;
generating average number information of each grouped pixel point of the adjacent row of the row according to the number information of the pixel points of each group of the adjacent upper N rows and the adjacent lower N rows of the row, wherein N is a positive integer greater than zero;
and determining the absolute value of the difference value between the average number information of each grouped pixel point of the adjacent row and the number information of each grouped pixel point corresponding to the row as the row deviation information of each group of the row.
9. The method for identifying image noise points according to claim 1, wherein the generating column deviation information of each group according to the counted information of the number of pixel points of each group in each pixel point comprises:
counting the number information of the pixel points of each group aiming at each column of pixel points;
generating average number information of each grouped pixel point of the adjacent row according to the number information of the pixel points of each group of the adjacent front N row and the adjacent back N row of the row, wherein N is a positive integer larger than zero;
and determining the absolute value of the difference value between the average number information of each grouped pixel point of the adjacent column and the number information of each grouped pixel point corresponding to the column as the column dispersion information of each group of the column.
10. The method for identifying the noise point of the image according to claim 1, wherein the identifying the noise point of the original image to be identified according to the row dispersion information of each group and the column dispersion information of each group comprises:
screening out elements with element values larger than a preset value in the row dispersion information of each group, and acquiring a noise point row sequence number set;
screening out elements with element values larger than the preset value in the column dispersion information of each group, and acquiring a noise point column sequence number set;
and taking all elements in the noise point row sequence number set as a noise point horizontal coordinate, and taking all elements in the noise point column sequence number set as a noise point vertical coordinate, and further identifying the noise point of the original image to be identified.
11. An apparatus for recognizing noise points in an image, comprising:
the image obtaining module is used for obtaining a gray image corresponding to the original image to be identified;
the pixel point identification module is used for allocating at least one identification code for each pixel point based on the gray value of each pixel point in the gray image;
the noise point identification module is used for identifying image noise points in the original image to be identified according to the quantity information of the pixel points in the group corresponding to each identification code;
the gray image comprises mxn pixel points, m is the number of lines, and n is the number of columns, and the gray value based on each pixel point in the gray image allocates at least one identification code for each pixel point, which comprises:
aiming at each row of pixel points, distributing an identification code based on the gray difference value of each pixel point in the row and the adjacent next pixel point in the same row and the median of each gray difference value in the row;
for each column of pixel points, distributing another identification code based on the gray difference value of each pixel point in the column and the next adjacent pixel point in the same column and the median of each gray difference value in the column;
the one identification code and the other identification code may be the same or different;
the identifying the image noise points in the original image to be identified according to the number information of the pixel points in the group corresponding to each identification code comprises the following steps:
generating row deviation information of each group according to the counted information of the number of the pixel points of each group in each row of the pixel points, wherein the row deviation information comprises the absolute value of the difference value of the number of the pixel points of each group of the row and the average number of the pixel points of each group of the adjacent row;
generating column dispersion information of each group according to the counted information of the number of the pixel points of each group in each column of the pixel points, wherein the column dispersion information comprises the absolute value of the difference between the number of the pixel points of each group of the column and the average number of the pixel points of each group of the adjacent column;
and identifying the noise point of the original image to be identified according to the row dispersion information of each group and the column dispersion information of each group.
12. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method for identifying image noise points according to any one of claims 1 to 10 when executing the program.
13. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of identifying noise points of an image according to any one of claims 1 to 10.
CN202110583763.3A 2021-05-27 2021-05-27 Method and device for identifying image noise points Active CN113159058B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110583763.3A CN113159058B (en) 2021-05-27 2021-05-27 Method and device for identifying image noise points

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110583763.3A CN113159058B (en) 2021-05-27 2021-05-27 Method and device for identifying image noise points

Publications (2)

Publication Number Publication Date
CN113159058A CN113159058A (en) 2021-07-23
CN113159058B true CN113159058B (en) 2022-11-11

Family

ID=76877795

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110583763.3A Active CN113159058B (en) 2021-05-27 2021-05-27 Method and device for identifying image noise points

Country Status (1)

Country Link
CN (1) CN113159058B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114881895B (en) * 2022-07-08 2022-09-30 托伦斯半导体设备启东有限公司 Infrared image stripe noise processing method based on interframe difference

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106910169A (en) * 2017-01-26 2017-06-30 苏州大学 A kind of image salt-pepper noise minimizing technology for preventing edge blurry
CN109741278A (en) * 2019-01-04 2019-05-10 北京环境特性研究所 A kind of image de-noising method
WO2019223068A1 (en) * 2018-05-25 2019-11-28 平安科技(深圳)有限公司 Iris image local enhancement method, device, equipment and storage medium
CN110675337A (en) * 2019-09-11 2020-01-10 哈尔滨工程大学 Diffusion type traversal method for image noise reduction
CN111160209A (en) * 2019-12-24 2020-05-15 北京爱医生智慧医疗科技有限公司 Method and device for eliminating noise line segments in text image

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11417124B2 (en) * 2018-02-26 2022-08-16 Videonetics Technology Private Limited System for real-time automated segmentation and recognition of vehicle's license plates characters from vehicle's image and a method thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106910169A (en) * 2017-01-26 2017-06-30 苏州大学 A kind of image salt-pepper noise minimizing technology for preventing edge blurry
WO2019223068A1 (en) * 2018-05-25 2019-11-28 平安科技(深圳)有限公司 Iris image local enhancement method, device, equipment and storage medium
CN109741278A (en) * 2019-01-04 2019-05-10 北京环境特性研究所 A kind of image de-noising method
CN110675337A (en) * 2019-09-11 2020-01-10 哈尔滨工程大学 Diffusion type traversal method for image noise reduction
CN111160209A (en) * 2019-12-24 2020-05-15 北京爱医生智慧医疗科技有限公司 Method and device for eliminating noise line segments in text image

Also Published As

Publication number Publication date
CN113159058A (en) 2021-07-23

Similar Documents

Publication Publication Date Title
CN110443140B (en) Text positioning method, device, computer equipment and storage medium
US10349005B2 (en) Techniques for frame repetition control in frame rate up-conversion
CN109493814B (en) Picture compensation method, picture compensation device, display device and computer readable storage medium
CN109005368B (en) High dynamic range image generation method, mobile terminal and storage medium
CN113379680B (en) Defect detection method, defect detection device, electronic device and computer readable storage medium
CN110070115B (en) Single-pixel attack sample generation method, device, equipment and storage medium
EP1717755A3 (en) System and method for large scale information analysis using data visualization techniques
CN113077748A (en) Gray scale compensation method, gray scale compensation device and gray scale compensation system of display panel
CN108596908B (en) LED display screen detection method and device and terminal
CN109919992B (en) Method for estimating depth in image
CN112380978B (en) Multi-face detection method, system and storage medium based on key point positioning
CN108288064B (en) Method and device for generating pictures
CN113159058B (en) Method and device for identifying image noise points
US20180314916A1 (en) Object detection with adaptive channel features
CN112001331B (en) Image recognition method, device, equipment and storage medium
CN110866900A (en) Water body color identification method and device
CN110910326B (en) Image processing method and device, processor, electronic equipment and storage medium
CN113850238B (en) Document detection method and device, electronic equipment and storage medium
CN106709393B (en) QR two-dimensional code binarization method and system
CN110119459A (en) Image data retrieval method and image data retrieving apparatus
CN113516739B (en) Animation processing method and device, storage medium and electronic equipment
CN113255456B (en) Inactive living body detection method, inactive living body detection device, electronic equipment and storage medium
US20130083377A1 (en) Image processing apparatus and image processing method
CN111814818B (en) Display device and image processing method thereof
CN113516738B (en) Animation processing method and device, storage medium and electronic equipment

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