CN113256870B - Method and device for detecting thickness abnormality of sheet medium, storage medium and equipment - Google Patents

Method and device for detecting thickness abnormality of sheet medium, storage medium and equipment Download PDF

Info

Publication number
CN113256870B
CN113256870B CN202011512154.0A CN202011512154A CN113256870B CN 113256870 B CN113256870 B CN 113256870B CN 202011512154 A CN202011512154 A CN 202011512154A CN 113256870 B CN113256870 B CN 113256870B
Authority
CN
China
Prior art keywords
thickness
column
detected
effective
sheet medium
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
CN202011512154.0A
Other languages
Chinese (zh)
Other versions
CN113256870A (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.)
Shenzhen Yihua Time Technology Co Ltd
Original Assignee
Shenzhen Yihua Time 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 Shenzhen Yihua Time Technology Co Ltd filed Critical Shenzhen Yihua Time Technology Co Ltd
Priority to CN202011512154.0A priority Critical patent/CN113256870B/en
Publication of CN113256870A publication Critical patent/CN113256870A/en
Application granted granted Critical
Publication of CN113256870B publication Critical patent/CN113256870B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07DHANDLING OF COINS OR VALUABLE PAPERS, e.g. TESTING, SORTING BY DENOMINATIONS, COUNTING, DISPENSING, CHANGING OR DEPOSITING
    • G07D7/00Testing specially adapted to determine the identity or genuineness of valuable papers or for segregating those which are unacceptable, e.g. banknotes that are alien to a currency
    • G07D7/16Testing the dimensions
    • G07D7/164Thickness
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07DHANDLING OF COINS OR VALUABLE PAPERS, e.g. TESTING, SORTING BY DENOMINATIONS, COUNTING, DISPENSING, CHANGING OR DEPOSITING
    • G07D7/00Testing specially adapted to determine the identity or genuineness of valuable papers or for segregating those which are unacceptable, e.g. banknotes that are alien to a currency
    • G07D7/20Testing patterns thereon
    • G07D7/2008Testing patterns thereon using pre-processing, e.g. de-blurring, averaging, normalisation or rotation

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Controlling Sheets Or Webs (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The embodiment of the invention discloses a method and a device for detecting thickness abnormality of a sheet medium, a storage medium and equipment, wherein the determination of an effective column channel is realized by acquiring thickness data and a target image of the sheet medium to be detected, and the search of the boundary of the sheet medium to be detected is realized; a thickness fluctuation matrix is generated through the effective column channels and the thickness data, and is used for representing thickness fluctuation values of all positions in the sheet medium to be detected to deviate from the median thickness fluctuation value of the thickness value of the sheet medium to be detected, so that determination of thickness fluctuation conditions of the sheet medium to be detected can be effectively improved, whether the thickness of the sheet medium to be detected is abnormal or not can be determined by utilizing the thickness fluctuation matrix and the thickness detection template, accuracy of thickness abnormality detection can be effectively improved, and false detection and omission rate are reduced.

Description

Method and device for detecting thickness abnormality of sheet medium, storage medium and equipment
Technical Field
The present invention relates to the technical field of financial devices, and in particular, to a method and apparatus for detecting thickness abnormality of a sheet medium, a storage medium, and a device.
Background
Currently, detection of abnormal banknote thickness is generally performed by presetting a raised proportion threshold based on the average value of the current banknote thickness, and if the raised proportion of the banknote thickness is higher than the set threshold and reaches a set window range, judging that the banknote thickness is abnormal. However, the current method for detecting the abnormal thickness of the paper currency has the following problems: the thickness protrusion of each position of the banknote to be detected cannot be accurately determined. Therefore, the current method for detecting the thickness abnormality of the paper money is low in detection accuracy and is easy to cause false detection and missing detection.
Disclosure of Invention
Based on the above, it is necessary to provide a method and a device for detecting thickness abnormality of a sheet medium, a storage medium and a device, which are aimed at improving the accuracy of detecting thickness abnormality of a sheet medium by establishing a thickness fluctuation matrix of a sheet medium to be detected, and judging whether the thickness of the sheet medium to be detected is abnormal or not according to the thickness fluctuation matrix and a corresponding thickness detection template.
In a first aspect, the present application provides a method for detecting thickness abnormality of a sheet medium, the method comprising:
acquiring thickness data of a sheet medium to be detected in each row of channels, and acquiring a target image of the sheet medium to be detected after the image of the sheet medium to be detected is screwed;
According to the thickness data and the target image, determining an effective channel occupied by the sheet medium to be detected in the channel;
determining a thickness fluctuation matrix of the target image according to the effective channel and the thickness data;
and detecting thickness abnormality of the sheet medium to be detected according to the thickness fluctuation matrix and the thickness detection template.
Optionally, the determining, according to the thickness data and the target image, an effective channel occupied by the sheet medium to be detected in the channel includes:
detecting row boundaries of row channels according to the thickness data, and determining effective rows of the sheet medium to be detected in each row channel;
and detecting effective column channels according to the target image, and determining the effective column channels occupied by the sheet medium to be detected in each column channel.
Optionally, the detecting the row boundary of the row channel according to the thickness data, determining the effective row of the sheet medium to be detected in each row channel includes:
determining a preliminary rising edge and a preliminary falling edge of a target column channel according to the thickness data, wherein the target column channel is any column channel in the column channels;
And determining the row between the primary rising edge and the primary falling edge of each column of channels, and taking the row as the effective row of the sheet medium to be detected in each column of channels.
Optionally, the determining the preliminary rising edge and the preliminary falling edge of the target column channel according to the thickness data includes:
determining rising edges and falling edges of the target column channels according to the thickness data;
selecting a preliminary rising edge and a preliminary falling edge from the rising edge and the falling edge based on a preset rule, wherein the preset rule is as follows: there is a continuous thickness value between the preliminary rising edge and the preliminary falling edge, and the sum of the continuous thickness values is the largest.
Optionally, after the preliminary rising edge and the preliminary falling edge are selected from the rising edge and the falling edge based on a preset rule, the method further includes:
taking a preset number of sampling lines in the target column channel from the line where the preliminary rising edge is located to the preliminary falling edge direction as a rising edge sampling area, and taking the preset number of sampling lines in the target column channel from the line where the preliminary falling edge is located to the preliminary rising edge direction as a falling edge sampling area;
selecting a target rising edge from the rising edge sampling region, and selecting a target falling edge from the falling edge sampling region;
Said determining the row between said preliminary rising edge and said preliminary falling edge of said column channels and as the active row of said sheet media to be detected in each column channel comprises:
and determining the row between the target rising edge and the target falling edge of each column of channels, and taking the row as the effective row of the sheet medium to be detected in each column of channels.
Optionally, the detecting an effective column channel according to the target image, determining an effective column channel occupied by the sheet medium to be detected in each column channel, includes:
determining an effective column channel number reference value of the sheet medium to be detected according to the width of the target image and the preset mapping width of the column channels in the target image;
and determining the effective column channels occupied by the target image in each column channel according to the actual occupied column channel number of the target image and the effective column channel number reference value, wherein the actual occupied column channels consist of continuous column channels with the primary rising edges and the primary falling edges.
Optionally, the determining the effective column channels occupied by the target image in the column channels according to the actual number of occupied column channels and the reference value of the effective column channels of the target image includes:
If the number of the actually occupied column channels is larger than the reference value of the number of the effective column channels, comparing the effective line numbers between the initial rising edge and the initial falling edge in each column channel in the actually occupied column channels, and removing the column channel with the least effective line number, wherein the rest column channels are the effective column channels;
if the effective line numbers in all the column channels in the actually occupied column channel are the same, comparing the average value of the thickness data in all the column channels in the actually occupied column channel, and removing the column channel with the smallest average value of the thickness data, wherein the remaining column channels are the effective column channels;
if the number of the actually occupied column channels is smaller than the reference value of the number of the effective column channels, judging whether effective rows exist in the column channels except the actually occupied column channels, and taking the actually occupied column channels and the column channels with the effective rows as the effective column channels.
Optionally, after determining the thickness fluctuation matrix of the target image according to the effective channel and the thickness data, the method further includes:
determining whether the sheet medium to be detected is front-side positive or not by using the target image;
if the front direction is not the front direction, normalization is carried out on the thickness fluctuation matrix to obtain the thickness fluctuation matrix of the front direction of the sheet medium to be detected, and the normalization is as follows: and performing operation of preset transformation according to preset standards.
Optionally, after determining the thickness fluctuation matrix of the target image according to the effective channel and the thickness data, the method further includes:
and taking an average value of thickness fluctuation values of two adjacent rows from the first row of the thickness fluctuation matrix as the thickness fluctuation value after the two adjacent rows are combined into one row, so as to realize dimension reduction treatment of the thickness fluctuation matrix and obtain the dimension-reduced thickness fluctuation matrix.
Optionally, the determining the thickness fluctuation matrix of the target image according to the effective channel and the thickness data includes:
and generating a thickness fluctuation matrix of the sheet medium to be detected according to the effective rows, the effective column channels and the thickness data, wherein the thickness fluctuation matrix is used for representing thickness fluctuation values of all positions in the sheet medium to be detected, which deviate from the median value of the thickness values, and the positions are determined based on the effective rows and the effective column channels.
Optionally, the method further comprises:
and selecting the maximum thickness fluctuation value of a target position from a thickness fluctuation matrix of a preset number of template sheet media as the value of the target position in the thickness detection template, and generating the thickness detection template, wherein the target position is any position in the sheet media.
In a second aspect, the present application provides a sheet medium thickness abnormality detection apparatus, the apparatus comprising:
the acquisition module is used for acquiring thickness data of the sheet medium to be detected in each row of channels and acquiring a target image of the sheet medium to be detected after the image of the sheet medium to be detected is rotated;
the first determining module is used for determining an effective channel occupied by the sheet medium to be detected in the channel according to the thickness data and the target image;
the second determining module is used for determining a thickness fluctuation matrix of the target image according to the effective channel and the thickness data;
and the execution module is used for detecting thickness abnormality of the sheet medium to be detected according to the thickness fluctuation matrix and the thickness detection template.
In a third aspect, the present application provides a computer readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
acquiring thickness data of a sheet medium to be detected in each row of channels, and acquiring a target image of the sheet medium to be detected after the image of the sheet medium to be detected is screwed;
according to the thickness data and the target image, determining an effective channel occupied by the sheet medium to be detected in the channel;
Determining a thickness fluctuation matrix of the target image according to the effective channel and the thickness data;
and detecting thickness abnormality of the sheet medium to be detected according to the thickness fluctuation matrix and the thickness detection template.
In a fourth aspect, the present application provides a computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of:
acquiring thickness data of a sheet medium to be detected in each row of channels, and acquiring a target image of the sheet medium to be detected after the image of the sheet medium to be detected is screwed;
according to the thickness data and the target image, determining an effective channel occupied by the sheet medium to be detected in the channel;
determining a thickness fluctuation matrix of the target image according to the effective channel and the thickness data;
and detecting thickness abnormality of the sheet medium to be detected according to the thickness fluctuation matrix and the thickness detection template.
The embodiment of the invention has the following beneficial effects:
by adopting the method for detecting the thickness abnormality of the sheet medium, the determination of the effective column channels is realized by acquiring the thickness data and the target image of the sheet medium to be detected, and the search of the boundary of the sheet medium to be detected is realized; generating a thickness fluctuation matrix through the effective column channels and the thickness data, wherein the thickness fluctuation matrix is used for representing thickness fluctuation values of all positions in the sheet medium to be detected, which deviate from the median value of the thickness values of the sheet medium to be detected, so that the determination of the thickness fluctuation condition of the sheet medium to be detected can be effectively improved, and whether the thickness of the sheet medium to be detected is abnormal or not can be determined by utilizing the thickness fluctuation matrix and the thickness detection template, the accuracy of thickness abnormality detection can be effectively improved, and the probability of false detection and omission detection is reduced;
By adopting the device for detecting the thickness abnormality of the sheet medium, disclosed by the invention, the acquisition module, the first determination module, the second determination module and the execution module are called to execute the method for detecting the thickness abnormality of the sheet medium, so that the thickness abnormality of the sheet medium to be detected is detected by the method, the accuracy of the thickness abnormality detection can be effectively improved, and the probability of false detection and omission detection is reduced;
by adopting the computer readable storage medium, the processor can realize the method for detecting the thickness abnormality of the sheet medium by calling the computer program in the storage medium, thereby realizing the detection of the thickness abnormality of the sheet medium to be detected by the method, further effectively improving the accuracy of the detection of the thickness abnormality and reducing the probability of false detection and omission detection;
by adopting the computer equipment, the processor in the computer equipment can realize the method for detecting the thickness abnormality of the sheet medium by calling the computer program stored in the memory, so that the method can realize the thickness abnormality detection of the sheet medium to be detected, further can effectively improve the accuracy of the thickness abnormality detection, and reduces the probability of false detection and omission detection.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Wherein:
FIG. 1 is a schematic flow chart of a method for detecting thickness anomalies of a sheet medium according to an embodiment of the present application;
FIG. 2 is a flow chart of the refining step of step 102 in the embodiment of FIG. 1 of the present application;
FIG. 3 is a flow chart illustrating the refinement step of step 201 in the embodiment shown in FIG. 2 of the present application;
FIG. 4 is a flow chart of the refining step of step 301 in the embodiment of FIG. 3 of the present application;
FIG. 5 is a schematic diagram showing the distribution of thickness data in a target column channel according to an embodiment of the present application;
FIG. 6 is a flow chart illustrating additional steps of the method for detecting thickness anomalies in sheet media according to the embodiment of FIG. 4 of the present application;
FIG. 7 is a schematic diagram of a rising edge sampling region and a falling edge sampling region in an embodiment of the present application;
FIG. 8 is a flow chart illustrating the refinement step of step 202 in the embodiment of FIG. 2 of the present application;
FIG. 9 is a flow chart illustrating the refinement step of step 802 in the embodiment of FIG. 8 of the present application;
FIG. 10 is a flow chart illustrating additional steps of the method for detecting thickness anomalies in sheet media according to the embodiment of FIG. 1 of the present application;
FIG. 11 is another flow chart of a method for detecting thickness anomalies in a sheet medium according to an embodiment of the present application;
FIG. 12 is a schematic view showing the structure of a sheet medium thickness abnormality detection apparatus in the embodiment of the present application;
fig. 13 is a block diagram of a computer device in an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, a flow chart of a method for detecting thickness anomalies of a sheet medium according to an embodiment of the present application is shown, where the method includes:
step 101, acquiring thickness data of a sheet medium to be detected in each row of channels, and acquiring a target image of the sheet medium to be detected after the image of the sheet medium to be detected is rotated;
In the embodiment of the present application, the foregoing method for detecting a thickness anomaly of a sheet medium is implemented by a device for detecting a thickness anomaly of a sheet medium, where the device may be a device having an image processing function and a data processing function, and the device includes an image sensor for image acquisition and a thickness sensor for thickness data acquisition, or the device may receive image data acquired by image sensors of other devices and thickness data acquired by thickness sensors of other devices.
In this embodiment of the present application, specifically, the image capturing range of the image sensor may be referred to as an image capturing area, where the image capturing area is generally a rectangular area with a size larger than that of the sheet medium to be detected, a relatively longer side of the image capturing area is defined as an image data capturing width, and a relatively shorter side is defined as an image data capturing height. Each column channel corresponds to one thickness sensor, a plurality of rows are arranged in each column channel, each thickness sensor collects thickness data of each row in the corresponding column channel, and the sheet medium to be detected can be placed in an image collecting area of the image sensor, so that an image collected by the image sensor contains a target image of the sheet medium to be detected, and in the image collecting area, the thickness data of each column channel in the thickness collecting channel can be collected through the thickness sensor.
For example, when the number of thickness sensors is 12, then corresponding areas of 12 column channels are generated in the image acquisition area of the image sensor, the number of rows in each column channel may be 117, and then corresponding 117 thickness data are present in each column channel.
The specific type of the target image may be an RGB color mode image, a gray level image, an infrared reflection image, etc., and in practical application, the target image may also be another type of image, which is not limited herein.
102, determining an effective channel occupied by the sheet medium to be detected in the channel according to the thickness data and the target image;
in this embodiment of the present application, the detection of the effective column channels is performed according to the target image of the sheet medium to be detected after the rotation, so as to determine that the effective column channels occupied by the target image in each column channel, for example, 12 column channels exist in the image acquisition area, and after the detection of the effective column channels based on the target image, it is determined that the target image occupies 8 column channels in the 12 column channels, then the 8 column channels are the effective column channels.
Step 103, determining a thickness fluctuation matrix of the target image according to the effective channel and the thickness data;
In the embodiment of the application, the thickness fluctuation value of each position in the thickness fluctuation matrix corresponds to the thickness data of the corresponding position in the sheet medium to be detected one by one.
And 104, detecting thickness abnormality of the sheet medium to be detected according to the thickness fluctuation matrix and the thickness detection template.
In this embodiment of the present application, after a preset number of sheet media sequentially pass through the processes from step 101 to step 103, corresponding thickness fluctuation matrices are obtained respectively, and then a thickness detection template of the sheet media is determined according to the preset number of thickness fluctuation matrices, where the preset number may be determined based on needs, and is not limited herein.
In the embodiment of the application, the determination of the effective column channels is realized by acquiring the thickness data and the target image of the sheet medium to be detected, so that the search of the boundary of the sheet medium to be detected is realized; a thickness fluctuation matrix is generated through the effective column channels and the thickness data, and is used for representing thickness fluctuation values of all positions in the sheet medium to be detected to deviate from the median thickness fluctuation value of the thickness value of the sheet medium to be detected, so that determination of thickness fluctuation conditions of the sheet medium to be detected can be effectively improved, whether the thickness of the sheet medium to be detected is abnormal or not can be determined by utilizing the thickness fluctuation matrix and the thickness detection template, accuracy of thickness abnormality detection can be effectively improved, and false detection and omission rate are reduced.
Referring to fig. 2, a flowchart of a refinement step of step 102 in the embodiment shown in fig. 1 of the present application is shown, where the method includes:
step 201, detecting row boundaries of row channels according to the thickness data, and determining effective rows of the sheet medium to be detected in each row of channels;
in the embodiment of the present invention, line boundary detection may be performed on each column of channels according to thickness data in each column of channels to determine a line boundary of each column of channels, so as to determine an effective line of each column of channels further based on the line boundary, and it should be noted that, in the embodiment of the present invention, the thickness of the sheet medium to be detected used in the embodiment of the present invention is greater than the thickness threshold, so that, for a location where the sheet medium to be detected exists in each column of channels, if a change from a thickness of less than or equal to the thickness threshold to a thickness of greater than the thickness threshold is detected, a line where the thickness data greater than the thickness threshold is located may be determined to be a line boundary of the sheet medium to be detected, and similarly, if a change from a thickness of greater than the thickness threshold to a thickness of less than or equal to the thickness threshold is detected, a line where the thickness data greater than the thickness threshold is located is detected to be another line boundary of the sheet medium to be detected, so that all line boundaries of each column of channels may be determined based on the determined line boundary.
Referring to fig. 3, a flowchart of a refinement step of step 201 in the embodiment shown in fig. 2 of the present application is shown, where the method includes:
step 301, determining a preliminary rising edge and a preliminary falling edge of a target column channel according to the thickness data, wherein the target column channel is any column channel in the column channels;
in this embodiment of the present application, the target column channel is any one column channel in the thickness acquisition channel, and the thickness value in the continuous thickness values is a thickness value greater than the thickness threshold of the sheet medium. The specific implementation manner of determining the rising edge and the falling edge of the target column channel according to the thickness data can be as follows: the method comprises the steps of firstly determining a foreground region and a background region of thickness data in a thickness acquisition channel, wherein the foreground region is a region formed by the thickness data obtained by pressing a thickness roller on a sheet medium to be detected and some other objects which are not to be detected and possibly exist in the thickness acquisition channel, all the thickness data in the foreground region are thickness data larger than a thickness threshold value, the background region is a region formed by the thickness data when the thickness roller is pressed, the thickness data in the background region are all thickness data smaller than or equal to the thickness threshold value, so that rising edges and falling edges in a target column channel can be determined through the foreground region of the thickness data, specifically, the corresponding thickness data is smaller than or equal to the thickness threshold value to the corresponding thickness data which is larger than the thickness threshold value, the corresponding thickness data is larger than the rising edge of the thickness threshold value, and the corresponding thickness data which is larger than the thickness threshold value is smaller than or equal to the corresponding thickness data which is larger than the falling edge of the thickness threshold value.
In the embodiment of the present application, the thickness threshold of the sheet medium may be set to be different according to a specific type of the sheet medium, which is not limited herein.
Further, referring to fig. 4, a flowchart of a refinement step of step 301 in the embodiment of fig. 3 of the present application is shown, where the method includes:
step 401, determining rising edges and falling edges of the target column channels according to the thickness data;
step 402 selects a preliminary rising edge and a preliminary falling edge from the rising edge and the falling edge based on a preset rule, where the preset rule is: there is a continuous thickness value between the preliminary rising edge and the preliminary falling edge, and the sum of the continuous thickness values is the largest.
Further, since there may be other objects having a certain thickness than the sheet medium to be detected, such as fragments of other sheet media, in each target column passage, there may be a plurality of rising edges and a plurality of falling edges in the target column passage, the rising edges and the falling edges belonging to the thickness data foreground region of the sheet medium to be detected need to be found among the plurality of rising edges and the plurality of falling edges in the target column passage according to a preset rule that there should be continuous thickness data larger than the thickness threshold value between the rising edges and the falling edges that need to be found in the target column passage, and the sum of all continuous thickness data larger than the thickness threshold value is maximum.
For example, as shown in fig. 5, a schematic distribution diagram of thickness data in a target column channel in the embodiment of the present application is shown, where the identifier in each row in the target column channel indicates thickness data of the sheet medium to be detected at the position corresponding to the row, and the thickness threshold of the thickness data of the sheet medium is 20 micrometers, where the thickness data is: a1, a2, a3, B1, … …, by, C1, C2 are all thickness data greater than 20 microns, indicating the presence of sheet media to be detected or other non-sheet media having thickness data greater than 20 microns in rows a through B, C through D, and E through F.
It will be appreciated that there are 3 rising edges in the target column channel: row a, row C and row E, there are 3 falling edges: row B, row D and row F, all thickness data between the rising edge a from the first traversal to the falling edge B from the first traversal is collected: a1, a2, a3, it is apparent that a1, a2, a3 are continuous thickness data greater than 20 microns, and therefore, the sum of all thickness data between row a and row B of the rising edge is calculated to be a1+a2+a3; searching the falling edge D line of the second traversed rising edge C line, corresponding to all the continuous thickness data between the rising edges, which is larger than 20 microns, and calculating the sum of all the thickness data between the rising edge C line and the falling edge D line as follows: and searching all continuous thickness data between the E-th row of the rising edge which is traversed by the third step and corresponds to the rising edge, wherein the thickness data between the E-th row and the D-th row of the rising edge are larger than 20 microns, calculating the sum of all thickness data between the E-th row and the F-th row of the falling edge to be c1+c2, comparing the obtained a1+a2+a3, b1+b2+ … … +by and c1+c2 to find the maximum value, determining the rising edge and the falling edge which correspond to the maximum value as the preliminary rising edge and the preliminary falling edge of the sheet medium to be detected in the target column channel, and obviously, as can be seen from fig. 4, the thickness data between the C-th row and the D-th row of the rising edge are the most, and the sum of all corresponding thickness data, b1+b2+ … … +by of the rising edge is the maximum, and the preliminary rising edge of the sheet medium to be detected in the target column channel is the preliminary rising edge, and the falling edge of the sheet medium to be detected in the target column channel is the preliminary falling edge.
Further, the above operation is also performed on other column channels, and the rising edge and the falling edge, which meet the preset rule, in each column channel are found to serve as the preliminary rising edge and the preliminary falling edge of the sheet medium to be detected in the column channel.
Step 302, determining the row between the primary rising edge and the primary falling edge of each column of channels, and taking the row as the effective row of the sheet medium to be detected in each column of channels.
In this embodiment of the present application, after determining the preliminary rising edge and the preliminary falling edge in each target column channel, the line where the preliminary rising edge is located and the line where the preliminary falling edge is located and the line between the preliminary rising edge and the preliminary falling edge may be used as the effective line of the sheet medium to be detected in each column channel, and specifically, the operation method of the effective line number is: the effective line number is equal to the difference between the line number of the primary rising edge and the line number of the primary falling edge plus one.
In a possible implementation manner, in order to obtain a more accurate row boundary of the thickness data collecting area of the sheet medium to be detected, a more accurate target rising edge and a more accurate target falling edge in each column of channels may be determined, referring specifically to fig. 6, which is a schematic flow chart of an additional step of the method for detecting thickness abnormality of the sheet medium in the embodiment shown in fig. 4 of the present application, where the method includes:
Step 601, taking a preset number of sampling lines in the target column channel from the line where the preliminary rising edge is located to the preliminary falling edge direction as a rising edge sampling area, and taking the preset number of sampling lines in the target column channel from the line where the preliminary falling edge is located to the preliminary rising edge direction as a falling edge sampling area;
step 602, selecting a target rising edge from the rising edge sampling area, and selecting a target falling edge from the falling edge sampling area;
thus, step 302 may specifically include:
step 603, determining a row between the target rising edge and the target falling edge of each column of channels, and taking the row as an effective row of the sheet medium to be detected in each column of channels.
In this embodiment of the present application, in order to determine an accurate target rising edge and an accurate target falling edge in each target column channel, a search for the target rising edge and the target falling edge needs to be performed in a sampling area between the initial rising edge and the initial falling edge in each target column channel, where the sampling area includes: the device comprises a rising edge sampling area and a falling edge sampling area, wherein the rising edge sampling area is an area formed by taking a preset number of rows from a primary rising edge to a primary falling edge, the falling edge sampling area is an area formed by taking a preset number of rows from a primary falling edge to a primary rising edge, the average value of all thickness data traversed in the rising edge sampling area is used as a first reference value, the average value of all thickness data traversed in the falling edge sampling area is used as a second reference value, and the maximum value between the median value and the average value of the thickness data in each target column channel is used as a third reference value; traversing thickness data from the initial rising edge in the rising edge sampling area, and taking the row, which corresponds to the first traversed thickness data and is larger than the first reference value and the third reference value, as an accurate target rising edge; traversing thickness data from the initial falling edge in the falling edge sampling area, and taking the row, which is traversed and corresponds to the first thickness data and is larger than the second reference value and the third reference value, as an accurate target falling edge.
Specifically, as shown in fig. 7, a schematic diagram of a rising edge sampling area and a falling edge sampling area in the embodiment of the present application is shown, where in the embodiment of the present application, 7 rows are taken from a primary rising edge line C to a primary falling edge line D, the formed areas b1 to b8 are rising edge sampling areas, 7 rows are taken from a primary falling edge line D to a primary rising edge line C, and the formed areas by-1 to by-8 are falling edge sampling areas. Taking the average value of all the thickness data traversed in the rising edge sampling area as a first reference value Q 1 Taking the average value of all the thickness data traversed in the falling edge sampling area as a second reference value Q 2 Taking the maximum value between the median value and the average value of the thickness data in each row of channels as a third reference value Q 3 The method comprises the steps of carrying out a first treatment on the surface of the Traversing thickness data from the initial rising edge line C in the rising edge sampling area, and enabling the traversed first corresponding thickness data b3 to be larger than a first reference value Q 1 And a third reference value Q 3 As an exact target rising edge; traversing thickness data from the D line of the initial falling edge in the falling edge sampling area, and enabling the traversed first corresponding thickness data by-2 to be larger than a second reference value Q 2 And a third reference value Q 3 Is taken as the exact target falling edge. Thus, the active rows within the target column channel include: row C1, row D1, and all rows between row C1 and row D1.
In the embodiment of the application, the primary rising edge and the primary falling edge in each column of channels are determined according to the thickness data, then the effective row occupied by the sheet medium to be detected in each column of channels is determined according to the row where the primary rising edge and the primary falling edge are located and the row between the primary rising edge and the primary falling edge, and further the row boundary is determined for the acquisition of the thickness data of the sheet medium to be detected. Further, a rising edge sampling area and a falling edge sampling area can be determined in an area between a preliminary rising edge and a preliminary falling edge in each column of channels, then thickness data corresponding to the rising edge traversed in the rising edge sampling area and the falling edge sampling area are compared with thickness data corresponding to the falling edge, a first reference value, a second reference value and a third reference value to determine an accurate target rising edge and an accurate target falling edge in each column of channels, and a more accurate row boundary is determined for collecting the thickness data of the sheet medium.
Step 202, detecting effective column channels according to the target image, and determining the effective column channels occupied by the sheet medium to be detected in each column channel.
In the embodiment of the application, a thickness fluctuation matrix of the sheet medium to be detected is generated according to the effective row, the effective column channels and the thickness data, wherein the thickness fluctuation matrix is used for representing thickness fluctuation values of all positions in the sheet medium to be detected, which deviate from a median value of the thickness values, and the positions are determined based on the effective row and the effective column channels.
In the embodiment of the application, the number of rows and the number of effective rows of the generated thickness fluctuation matrix of the sheet medium to be detected are the same, the number of columns and the number of effective column channels are the same, and the thickness fluctuation value of each position in the thickness fluctuation matrix corresponds to the thickness data of the corresponding position in the sheet medium to be detected one by one. For example, if the number of effective rows is N and the number of effective column channels is M, the thickness fluctuation matrix may be determined to be a matrix of n×m, and the position n×m represents the nth thickness data in the mth column of the thickness fluctuation matrix. The median value of the thickness values of the sheet medium to be detected may be the median value of the thickness values of each position in the whole sheet medium to be detected, or may be the median value of the thickness values in each effective column channel first, and then the median value is selected from the median values of the thickness values in each effective column channel, where in practical application, the median value may be determined based on practical situations, and the median value is not limited herein.
For a better understanding of the technical solution in the embodiment of the present application, please refer to fig. 8, which is a schematic flow chart of the refinement step of step 202 in the embodiment of fig. 2 of the present application, the method includes:
step 801, determining an effective column channel number reference value of the sheet medium to be detected according to the width of the target image and the preset mapping width of the column channels in the target image;
specifically, the reference value of the number of valid column channels is equal to the ratio of the width of the target image to the mapping width of the column channels in the target image plus one. The mapping width of the column channels in the target image is the width of each column channel in the set thickness acquisition channel, and the target image width is the actual width of the sheet medium to be detected, and the sum of the actual width is added to enable the detection result to be more accurate.
Step 802, determining an effective column channel occupied by the target image in each column channel according to the actual occupied column channel number of the target image and the effective column channel number reference value, wherein the actual occupied column channel is composed of continuous column channels with the primary rising edge and the primary falling edge.
In a possible implementation manner, the effective column channels occupied by the target image in each column channel may be determined by actually occupying the number of column channels and the reference value of the number of effective column channels, and referring specifically to fig. 9, a flowchart of a refinement step of step 802 in the embodiment shown in fig. 8 of the present application includes:
Step 901, if the number of actually occupied column channels is greater than the reference value of the number of effective column channels, comparing the effective number of rows between the preliminary rising edge and the preliminary falling edge in each column channel in the actually occupied column channels, and removing the column channel with the least effective number of rows, wherein the remaining column channels are the effective column channels; if the effective line numbers in all the column channels in the actually occupied column channel are the same, comparing the average value of the thickness data in all the column channels in the actually occupied column channel, and removing the column channel with the smallest average value of the thickness data, wherein the remaining column channels are the effective column channels;
and 902, if the number of actually occupied column channels is smaller than the reference value of the number of effective column channels, judging whether effective rows exist in the column channels except for the actually occupied column channels, and taking the actually occupied column channels and the column channels with the effective rows as the effective column channels.
It will be appreciated that in the embodiment of the present application, in order to obtain an accurate thickness detection template and to accurately detect whether the thickness of the sheet medium to be detected is abnormal, it is necessary to ensure that the thickness data used to generate the thickness detection template is all positive, and the sheet medium to be detected is also positive, and before the sheet medium to be detected is put into the apparatus, it may be determined by an operator that it is positive, or may be adjusted in the following manner to ensure that the front is positive. Taking the rmb as an example, the front forward direction of the rmb refers to that when the rmb is put into the apparatus, the target image of the rmb collected by the image collecting sensor is the side with the chairman image and the chairman image is the forward direction, at this time, the rmb is determined to be the front forward direction, or the front forward direction of the sheet medium to be detected may also be the direction of a predetermined sheet medium, and the direction is compared with the front forward direction in the later detection process. Specifically, referring to fig. 10, a flow chart illustrating additional steps of the method for detecting abnormal thickness of a sheet medium according to the embodiment shown in fig. 1 of the present application is shown, and the additional steps may be performed after the step 103, where the additional steps include:
Step 1001, determining whether the sheet medium to be detected is positive by using the target image;
step 1002, if the front direction is not the front direction, performing normalization on the thickness fluctuation matrix to obtain the thickness fluctuation matrix of the front direction of the sheet medium to be detected, where the normalization is: and performing operation of preset transformation according to preset standards.
In a possible implementation, it is considered that in a practical situation, there may be an inclination of the line boundary of the sheet medium to be detected, and accordingly there may be column channels with different effective line numbers, where the effective line number is the median of the effective line numbers in each effective column channel.
For example, the number of rows in the M active column channels is: n (N) 1 、N 2 、……、N M Then the effective number of M effective column channels is determined to be N 1 、N 2 、……、N M When the effective line number is N and the effective column channel number is M, the thickness fluctuation matrix is an n×m order matrix, N effective lines exist in each column channel in M effective column channels, one thickness data can be collected in each effective line, n×m thickness data can be collected in each effective column channel and effective line channel, n×m thickness data form a thickness data matrix according to the positions determined by the effective column channels and the effective line, the median value of N thickness data in each effective column channel is calculated, the median value of M thickness data can be obtained, the median value of M thickness data is calculated, the median value of thickness data of a sheet medium to be detected can be obtained, and the median value of thickness data in each position in the thickness data matrix And carrying out difference operation on the median value of the thickness data and the thickness data to obtain a thickness fluctuation matrix of the sheet medium to be detected. Each thickness fluctuation value in the thickness fluctuation matrix of the sheet medium to be detected can represent the thickness characteristics of the corresponding position of the sheet medium to be detected.
Specifically, performing normalization on the thickness fluctuation matrix includes: if the sheet medium to be detected is in the front reverse direction, performing up-and-down normalization and left-and-right normalization on the thickness fluctuation matrix; if the sheet medium to be detected is in the reverse forward direction, performing left-right normalization on the thickness fluctuation matrix; and if the sheet medium to be detected is reverse in reverse, performing up-and-down normalization on the thickness fluctuation matrix.
The normalization is performed according to a preset transformation operation executed by a preset standard, and the specific implementation method of the normalization is as follows: when the image parameters of the sheet medium to be detected, which are displayed by the target image of the sheet medium to be detected and are acquired by the equipment, are different from the preset positive image parameters of the sheet medium to be detected, determining the type of the actual orientation of the sheet medium to be detected according to the acquired image parameters of the target image of the sheet medium to be detected, and if the sheet medium to be detected is positive and negative, performing up-and-down normalization on the thickness fluctuation matrix corresponding to the sheet medium to be detected, wherein the specific implementation mode of up-and-down normalization is as follows: rearranging the rows of the thickness fluctuation matrix in a descending order, for example, for an n×m order thickness fluctuation matrix, vertically normalizing the thickness fluctuation matrix to rearrange all the rows of the n×m order thickness fluctuation matrix in an order of N to 1; and then carrying out left and right normalization on the thickness fluctuation matrix corresponding to the sheet medium to be detected, wherein the specific implementation mode of the left and right normalization is as follows: rearranging the columns of the thickness fluctuation matrix in a descending order, for example, for an n×m order thickness fluctuation matrix, vertically normalizing the thickness fluctuation matrix to rearrange all columns of the n×m order thickness fluctuation matrix in an order of M to 1; and finally obtaining a thickness fluctuation matrix corresponding to the positive direction of the sheet medium to be detected. Similarly, the sheet medium to be inspected is identified and processed similarly when the reverse side is the forward side or the reverse side.
In the embodiment of the application, whether the sheet medium to be detected is positive or not is judged through the obtained target image of the sheet medium to be detected, and the thickness data fluctuation matrix corresponding to the sheet medium to be detected is normalized according to the judgment, so that the thickness data fluctuation matrix corresponding to the positive direction of the sheet medium to be detected is obtained.
In a possible implementation manner, the obtained thickness fluctuation matrix may be further subjected to dimension reduction processing after step 103, which specifically includes: and taking the average value of the thickness fluctuation values of two adjacent rows from the first row of the thickness fluctuation matrix as the thickness fluctuation value after the two adjacent rows are combined into one row, so as to realize the dimension reduction treatment of the thickness fluctuation matrix and obtain the dimension-reduced thickness fluctuation matrix.
It can be understood that the thickness fluctuation matrix after the dimension reduction is a matrix of (N/2) ×m order, and the dimension reduction process is to use the average value of the thickness fluctuation values of every two adjacent rows as the thickness fluctuation value in one row of the thickness fluctuation matrix after the dimension reduction from the first row of the thickness fluctuation matrix, when the number N of rows of the thickness fluctuation matrix is an odd number, the last row remaining after calculating the average value from every two adjacent rows from the first row of the thickness fluctuation matrix is omitted, and the part of the sheet medium to be detected in the omitted last row is few, so that the evaluation of the sheet medium to be detected is not affected.
By performing dimension reduction processing on the obtained thickness fluctuation matrix, the occupied space of a thickness detection template generated subsequently can be reduced, the calculation speed is improved, and misjudgment caused by foreign matters existing on a sheet medium is avoided.
In one possible implementation, the specific generation mode of the thickness detection template is as follows: and selecting the maximum thickness fluctuation value of the target position from a thickness fluctuation matrix of a preset number of template sheet media as the value of the target position in the thickness detection template, and generating the thickness detection template, wherein the target position is any position in the sheet media.
It should be noted that, the thickness fluctuation matrix of the template sheet medium is the same as the obtaining manner of the thickness fluctuation matrix of the sheet medium to be detected, and the obtaining manner of the thickness fluctuation matrix of the template sheet medium may be specifically referred to the content in the foregoing embodiment, which is not described herein in detail.
It can be understood that, for each template sheet medium, the thickness fluctuation matrix of the template sheet medium can be obtained according to the generation mode of the thickness fluctuation matrix of the sheet medium to be detected, and the processing mode of obtaining the thickness fluctuation matrix of each template sheet medium is the same, so that the thickness detection template can be obtained based on the thickness fluctuation matrix of the template sheet medium with a preset number, and whether the thickness of the sheet medium to be detected is abnormal or not can be accurately detected based on the thickness detection template.
Specifically, if the thickness fluctuation matrix of the X template sheet mediums is obtained, it can be understood from the foregoing that the thickness fluctuation matrix is determined by the effective rows, the effective columns, and the thickness data, so that the thickness fluctuation matrix of the X template sheet mediums has the same number of rows and columns, the maximum value of the thickness fluctuation values of the positions determined by the corresponding rows and columns of the thickness fluctuation matrix of the X template sheet mediums is taken as the maximum thickness fluctuation value of the position, and the matrix formed by the maximum thickness fluctuation values of each position in the thickness fluctuation matrix of the template sheet mediums is taken as the thickness detection template, and it can be understood that the thickness detection template is a two-dimensional matrix, and the number of rows of the two-dimensional matrix is equal to the effective number of rows and the number of columns of the two-dimensional matrix is equal to the number of effective columns.
For example, the thickness fluctuation matrix of the template sheet medium can be expressed as:
/>
wherein,the thickness fluctuation value of the j-th column and i-th row of the k-th template sheet medium is shown. Taking the maximum value of X thickness fluctuation values at each position in the X N M-order thickness fluctuation matrixes, and taking the N M-order matrixes formed by the maximum values as a thickness detection template, wherein the thickness detection template comprises the following componentsThe specific form of the thickness detection template is as follows:
Wherein,is->Is the maximum value of (a).
Further, when the sheet medium to be detected is placed in the device to detect thickness abnormality, the device performs the processing from step 101 to step 103 on the sheet medium to be detected to obtain a thickness fluctuation matrix of the sheet medium to be detected, and then detects thickness abnormality of the sheet medium to be detected according to the thickness fluctuation matrix of the sheet medium to be detected and the thickness detection template.
In the embodiment of the application, the determination of the effective column channels is realized by acquiring the thickness data and the target image of the template sheet medium, so that the search of the boundary of the template sheet medium is realized; the thickness fluctuation matrix is generated through the effective column channels and the thickness data, and is used for representing the thickness fluctuation value of each position in the template sheet medium, which deviates from the median thickness fluctuation value of the thickness values of the template sheet medium, so that the maximum thickness fluctuation value of the thickness fluctuation matrix of the preset number of template sheet mediums at each position can be utilized to generate a thickness detection template, whether the thickness of the sheet medium to be detected is abnormal or not can be determined by utilizing the thickness detection template, the purpose of determining the limiting value of the thickness data fluctuation of the corresponding position based on the maximum thickness fluctuation value of each position through a plurality of template sheet mediums is achieved, and the thickness detection template of the sheet medium obtained based on the limiting value has the advantage of high accuracy, the effect of effectively improving the thickness abnormality detection accuracy of the sheet medium can be achieved, and the probability of false detection and omission detection is reduced.
Further, referring to fig. 11, another flow chart of a method for detecting thickness anomalies of a sheet medium according to an embodiment of the present application is shown, where the method includes:
1101, performing difference operation on the thickness fluctuation matrix and the thickness detection template to obtain a thickness difference matrix, and determining a convex connected domain by using the thickness difference matrix, wherein the convex connected domain is formed by continuous positions with a difference value greater than 0 in the thickness difference matrix;
step 1102, determining the number of the difference values in the protruding communication domains to be larger than a preset first threshold value;
and step 1103, determining that the thickness of the sheet medium to be detected is abnormal when the number of the protruding connected domains is larger than or equal to a preset second threshold value.
In the embodiment of the application, a thickness fluctuation matrix of a sheet medium to be detected and a thickness detection template are subjected to difference operation to obtain a thickness difference matrix, the value in the thickness difference matrix is a value larger than 0 and equal to 0 or smaller than 0, wherein the value larger than 0 represents that thickness data of the position of the sheet medium to be detected is larger than thickness data corresponding to the corresponding position of the thickness detection template, a continuous corresponding position, which is in the actual thickness fluctuation matrix of the sheet medium to be detected and has a value larger than 0, of the thickness difference matrix is taken as a protrusion communicating domain, the number of thickness fluctuation values larger than a preset first threshold in each protrusion communicating domain of the sheet medium to be detected is determined, the number is compared with a second threshold, and when the number is larger than the second threshold, the thickness of the sheet medium to be detected is determined to have abnormality, wherein the first threshold is a numerical threshold corresponding to the thickness fluctuation value larger than the first threshold, and the second threshold is a numerical threshold corresponding to the number of the thickness fluctuation values larger than the first threshold. It should be noted that, the number of the first threshold value and the second threshold value may be determined according to the actual situation, which is not limited herein; all the protruding communicating areas can determine that the sheet medium to be detected has abnormal thickness as long as one protruding communicating area satisfies the above condition.
In the embodiment of the present application, for example, the set primary threshold includes: a first threshold 3 and a second threshold 3, the set secondary threshold includes: a first threshold 7 and a second threshold 2, the third threshold set comprising: a first threshold 10 and a second threshold 1; and comparing the thickness fluctuation value in the thickness fluctuation matrix of the sheet medium to be detected corresponding to each protrusion communication domain with a first-level threshold value, a second-level threshold value and a third-level threshold value in all protrusion communication domains consisting of continuous positions larger than 0 of the thickness difference matrix of the sheet medium to be detected, and considering that the thickness of the sheet medium to be detected is abnormal if the number of the thickness fluctuation values corresponding to one or more protrusion communication domains is larger than 3 or the number of the thickness fluctuation values corresponding to one or more protrusion communication domains is larger than 7 and is larger than 2 or the number of the thickness fluctuation values corresponding to one or more protrusion communication domains is larger than 10 and is larger than 1.
In the embodiment of the application, the thickness abnormality detection is carried out on the sheet medium to be detected through the thickness detection template which is determined by a plurality of column channels and a plurality of rows and is generated by a preset number of template sheet mediums and can reflect the thickness condition of each position of the sheet medium, so that the accuracy of the thickness abnormality detection result of the sheet medium is improved, whether the sheet medium has abnormal conditions such as double-sheet, adhesive tape, splicing and the like can be accurately and finely detected, and the rejection capability of equipment on the sheet medium is improved.
Referring to fig. 12, a schematic structural diagram of an apparatus for detecting thickness anomalies of a sheet medium according to an embodiment of the present application includes:
the acquisition module 1201 is used for acquiring thickness data of the sheet medium to be detected in each row of channels and acquiring a target image of the sheet medium to be detected after the image of the sheet medium to be detected is rotated;
a first determining module 1202, configured to determine, according to the thickness data and the target image, an effective channel occupied by the sheet medium to be detected in the channel;
a second determining module 1203, configured to determine a thickness fluctuation matrix of the target image according to the effective channel and the thickness data;
and the executing module 1204 is used for detecting thickness abnormality of the sheet medium to be detected according to the thickness fluctuation matrix and the thickness detection template.
In the embodiment of the application, the acquisition module 1201 is called to acquire the thickness data and the target image of the sheet medium to be detected, and the first determination module 1202 is used for determining the effective column channels occupied by the sheet medium to be detected in the thickness acquisition channels, so that the boundary of the sheet medium to be detected is searched; the second determining module 1203 is called to generate a thickness fluctuation matrix according to the effective column channels and the thickness data, and the thickness fluctuation matrix is used for representing thickness fluctuation values of all positions in the sheet medium to be detected, which deviate from the median thickness fluctuation value of the sheet medium to be detected, so that determination of thickness fluctuation conditions of the sheet medium to be detected can be effectively improved, and the executing module 1204 is called to determine whether the thickness of the sheet medium to be detected is abnormal or not according to the thickness fluctuation matrix and the thickness detection template, so that accuracy of thickness abnormality detection can be effectively improved, and false detection and omission rate can be reduced.
FIG. 13 illustrates an internal block diagram of a computer device in one embodiment. The computer device may specifically be a terminal or a server. As shown in fig. 13, the computer device includes a processor, a memory, and a network interface connected by a system bus. The memory includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system, and may also store a computer program that, when executed by a processor, causes the processor to implement a sheet medium thickness anomaly detection method. The internal memory may also store a computer program that, when executed by the processor, causes the processor to perform a sheet medium thickness abnormality detection method. It will be appreciated by those skilled in the art that the structure shown in fig. 13 is merely a block diagram of a portion of the structure associated with the present application and is not limiting of the computer device to which the present application applies, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is presented comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of:
Acquiring thickness data of a sheet medium to be detected in each row of channels, and acquiring a target image of the sheet medium to be detected after the image of the sheet medium to be detected is screwed;
according to the thickness data and the target image, determining an effective channel occupied by the sheet medium to be detected in the channel;
determining a thickness fluctuation matrix of the target image according to the effective channel and the thickness data;
and detecting thickness abnormality of the sheet medium to be detected according to the thickness fluctuation matrix and the thickness detection template.
In one embodiment, a computer-readable storage medium is provided, storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
acquiring thickness data of a sheet medium to be detected in each row of channels, and acquiring a target image of the sheet medium to be detected after the image of the sheet medium to be detected is screwed;
according to the thickness data and the target image, determining an effective channel occupied by the sheet medium to be detected in the channel;
determining a thickness fluctuation matrix of the target image according to the effective channel and the thickness data;
and detecting thickness abnormality of the sheet medium to be detected according to the thickness fluctuation matrix and the thickness detection template.
Those skilled in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by a computer program for instructing relevant hardware, where the program may be stored in a non-volatile computer readable storage medium, and where the program, when executed, may include processes in the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (11)

1. A sheet medium thickness anomaly detection method, characterized in that the method comprises:
acquiring thickness data of a sheet medium to be detected in each row of channels, and acquiring a target image of the sheet medium to be detected after the image of the sheet medium to be detected is screwed;
according to the thickness data and the target image, determining an effective channel occupied by the sheet medium to be detected in the channel;
Determining a thickness fluctuation matrix of the target image according to the effective channel and the thickness data;
detecting thickness abnormality of the sheet medium to be detected according to the thickness fluctuation matrix and the thickness detection template;
the determining the effective channel occupied by the sheet medium to be detected in the channel according to the thickness data and the target image comprises the following steps:
detecting row boundaries of row channels according to the thickness data, and determining effective rows of the sheet medium to be detected in each row channel;
detecting effective column channels according to the target image, and determining the effective column channels occupied by the sheet medium to be detected in each column channel;
the detecting the row boundary of the row channel according to the thickness data, determining the effective row of the sheet medium to be detected in each row channel, includes:
determining a preliminary rising edge and a preliminary falling edge of a target column channel according to the thickness data, wherein the target column channel is any column channel in the column channels;
determining the rows between the primary rising edge and the primary falling edge of each column of channels and taking the rows as the effective rows of the sheet medium to be detected in each column of channels;
The detecting the effective column channels according to the target image, determining the effective column channels occupied by the sheet medium to be detected in each column channel, includes:
determining an effective column channel number reference value of the sheet medium to be detected according to the width of the target image and the preset mapping width of the column channels in the target image;
and determining the effective column channels occupied by the target image in each column channel according to the actual occupied column channel number of the target image and the effective column channel number reference value, wherein the actual occupied column channels consist of continuous column channels with the primary rising edges and the primary falling edges.
2. The method according to claim 1, wherein determining the preliminary rising edge and the preliminary falling edge of the target column channel based on the thickness data comprises:
determining rising edges and falling edges of the target column channels according to the thickness data;
selecting a preliminary rising edge and a preliminary falling edge from the rising edge and the falling edge based on a preset rule, wherein the preset rule is as follows: there is a continuous thickness value between the preliminary rising edge and the preliminary falling edge, and the sum of the continuous thickness values is the largest.
3. The method according to claim 2, wherein after the preliminary rising edge and the preliminary falling edge are selected based on a preset rule from the rising edge and the falling edge, further comprising:
taking a preset number of sampling lines in the target column channel from the line where the preliminary rising edge is located to the preliminary falling edge direction as a rising edge sampling area, and taking the preset number of sampling lines in the target column channel from the line where the preliminary falling edge is located to the preliminary rising edge direction as a falling edge sampling area;
selecting a target rising edge from the rising edge sampling region, and selecting a target falling edge from the falling edge sampling region;
said determining the row between said preliminary rising edge and said preliminary falling edge of said column channels and as the active row of said sheet media to be detected in each column channel comprises:
and determining the row between the target rising edge and the target falling edge of each column of channels, and taking the row as the effective row of the sheet medium to be detected in each column of channels.
4. The method according to claim 1, wherein the determining the effective column channels occupied by the target image in the column channels based on the actual number of occupied column channels of the target image and the reference value of the effective column channels comprises:
If the number of the actually occupied column channels is larger than the reference value of the number of the effective column channels, comparing the effective line numbers between the initial rising edge and the initial falling edge in each column channel in the actually occupied column channels, and removing the column channel with the least effective line number, wherein the rest column channels are the effective column channels;
if the effective line numbers in all the column channels in the actually occupied column channel are the same, comparing the average value of the thickness data in all the column channels in the actually occupied column channel, and removing the column channel with the smallest average value of the thickness data, wherein the remaining column channels are the effective column channels;
if the number of the actually occupied column channels is smaller than the reference value of the number of the effective column channels, judging whether effective rows exist in the column channels except the actually occupied column channels, and taking the actually occupied column channels and the column channels with the effective rows as the effective column channels.
5. The method according to claim 1, wherein after determining the thickness fluctuation matrix of the target image based on the effective channel and the thickness data, further comprising:
determining whether the sheet medium to be detected is front-side positive or not by using the target image;
If the front direction is not the front direction, normalization is carried out on the thickness fluctuation matrix to obtain the thickness fluctuation matrix of the front direction of the sheet medium to be detected, and the normalization is as follows: and performing operation of preset transformation according to preset standards.
6. The method according to claim 1, wherein after determining the thickness fluctuation matrix of the target image based on the effective channel and the thickness data, further comprising:
and taking an average value of thickness fluctuation values of two adjacent rows from the first row of the thickness fluctuation matrix as the thickness fluctuation value after the two adjacent rows are combined into one row, so as to realize dimension reduction treatment of the thickness fluctuation matrix and obtain the dimension-reduced thickness fluctuation matrix.
7. The method according to claim 1, wherein the determining a thickness fluctuation matrix of the target image based on the effective channel, the thickness data, comprises:
and generating a thickness fluctuation matrix of the sheet medium to be detected according to the effective rows, the effective column channels and the thickness data, wherein the thickness fluctuation matrix is used for representing thickness fluctuation values of all positions in the sheet medium to be detected, which deviate from the median value of the thickness values, and the positions are determined based on the effective rows and the effective column channels.
8. The sheet medium thickness abnormality detection method according to claim 1, characterized in that the method further comprises:
and selecting the maximum thickness fluctuation value of a target position from a thickness fluctuation matrix of a preset number of template sheet media as the value of the target position in the thickness detection template, and generating the thickness detection template, wherein the target position is any position in the sheet media.
9. A sheet medium thickness abnormality detection device, characterized by comprising:
the acquisition module is used for acquiring thickness data of the sheet medium to be detected in each row of channels and acquiring a target image of the sheet medium to be detected after the image of the sheet medium to be detected is rotated;
the first determining module is used for determining an effective channel occupied by the sheet medium to be detected in the channel according to the thickness data and the target image;
the second determining module is used for determining a thickness fluctuation matrix of the target image according to the effective channel and the thickness data;
the execution module is used for detecting thickness abnormality of the sheet medium to be detected according to the thickness fluctuation matrix and the thickness detection template;
the first determining module is specifically configured to: detecting row boundaries of row channels according to the thickness data, and determining effective rows of the sheet medium to be detected in each row channel; detecting effective column channels according to the target image, and determining the effective column channels occupied by the sheet medium to be detected in each column channel;
The detecting the row boundary of the row channel according to the thickness data, determining the effective row of the sheet medium to be detected in each row channel, includes:
determining a preliminary rising edge and a preliminary falling edge of a target column channel according to the thickness data, wherein the target column channel is any column channel in the column channels; determining the rows between the primary rising edge and the primary falling edge of each column of channels and taking the rows as the effective rows of the sheet medium to be detected in each column of channels;
the detecting the effective column channels according to the target image, determining the effective column channels occupied by the sheet medium to be detected in each column channel, includes:
determining an effective column channel number reference value of the sheet medium to be detected according to the width of the target image and the preset mapping width of the column channels in the target image; and determining the effective column channels occupied by the target image in each column channel according to the actual occupied column channel number of the target image and the effective column channel number reference value, wherein the actual occupied column channels consist of continuous column channels with the primary rising edges and the primary falling edges.
10. A computer readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of the method of any one of claims 1 to 8.
11. A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method of any of claims 1 to 8.
CN202011512154.0A 2020-12-19 2020-12-19 Method and device for detecting thickness abnormality of sheet medium, storage medium and equipment Active CN113256870B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011512154.0A CN113256870B (en) 2020-12-19 2020-12-19 Method and device for detecting thickness abnormality of sheet medium, storage medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011512154.0A CN113256870B (en) 2020-12-19 2020-12-19 Method and device for detecting thickness abnormality of sheet medium, storage medium and equipment

Publications (2)

Publication Number Publication Date
CN113256870A CN113256870A (en) 2021-08-13
CN113256870B true CN113256870B (en) 2024-02-02

Family

ID=77180667

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011512154.0A Active CN113256870B (en) 2020-12-19 2020-12-19 Method and device for detecting thickness abnormality of sheet medium, storage medium and equipment

Country Status (1)

Country Link
CN (1) CN113256870B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1191991A (en) * 1997-09-25 1999-04-06 Oki Electric Ind Co Ltd Correction method for detecting device for paper sheet thickness
CN104048628A (en) * 2014-06-16 2014-09-17 山东中科普锐检测技术有限公司 Method for accurately detecting thickness through ultrasonic wave equivalent peak value and device using method
WO2016088279A1 (en) * 2014-12-05 2016-06-09 グローリー株式会社 Paper sheet thickness determination method and thickness determination device
CN106875540A (en) * 2017-02-17 2017-06-20 深圳怡化电脑股份有限公司 A kind of banknote thickness abnormity detection method and device
CN106997635A (en) * 2017-03-03 2017-08-01 深圳怡化电脑股份有限公司 The detection method and its device of a kind of note surface foreign matter
CN107507330A (en) * 2017-08-17 2017-12-22 深圳怡化电脑股份有限公司 Detection method, detection means and the terminal device of banknote thickness abnormity
CN108198326A (en) * 2017-12-28 2018-06-22 深圳怡化电脑股份有限公司 For the transmission method of bank note data, device, electronic equipment and storage medium
CN108932788A (en) * 2017-05-22 2018-12-04 深圳怡化电脑股份有限公司 A kind of detection method, device and the equipment of banknote thickness abnormity grade
CN109737859A (en) * 2018-12-26 2019-05-10 广州国瀚计算机通讯科技有限公司 The stickup foreign matter detecting method and its device of flaky medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103679914B (en) * 2013-12-12 2016-06-15 广州广电运通金融电子股份有限公司 A kind of banknote recognition methods based on thickness signal identification and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1191991A (en) * 1997-09-25 1999-04-06 Oki Electric Ind Co Ltd Correction method for detecting device for paper sheet thickness
CN104048628A (en) * 2014-06-16 2014-09-17 山东中科普锐检测技术有限公司 Method for accurately detecting thickness through ultrasonic wave equivalent peak value and device using method
WO2016088279A1 (en) * 2014-12-05 2016-06-09 グローリー株式会社 Paper sheet thickness determination method and thickness determination device
CN106875540A (en) * 2017-02-17 2017-06-20 深圳怡化电脑股份有限公司 A kind of banknote thickness abnormity detection method and device
CN106997635A (en) * 2017-03-03 2017-08-01 深圳怡化电脑股份有限公司 The detection method and its device of a kind of note surface foreign matter
CN108932788A (en) * 2017-05-22 2018-12-04 深圳怡化电脑股份有限公司 A kind of detection method, device and the equipment of banknote thickness abnormity grade
CN107507330A (en) * 2017-08-17 2017-12-22 深圳怡化电脑股份有限公司 Detection method, detection means and the terminal device of banknote thickness abnormity
CN108198326A (en) * 2017-12-28 2018-06-22 深圳怡化电脑股份有限公司 For the transmission method of bank note data, device, electronic equipment and storage medium
CN109737859A (en) * 2018-12-26 2019-05-10 广州国瀚计算机通讯科技有限公司 The stickup foreign matter detecting method and its device of flaky medium

Also Published As

Publication number Publication date
CN113256870A (en) 2021-08-13

Similar Documents

Publication Publication Date Title
CN110414507B (en) License plate recognition method and device, computer equipment and storage medium
CN110738236B (en) Image matching method and device, computer equipment and storage medium
CN110807491A (en) License plate image definition model training method, definition detection method and device
CN112906695B (en) Form recognition method adapting to multi-class OCR recognition interface and related equipment
CN113516661A (en) Defect detection method and device based on feature fusion
CN111178203B (en) Signature verification method and device, computer equipment and storage medium
CN114581446B (en) Battery core abnormity detection method and system of laminated battery
CN112465807A (en) License plate image authenticity identification method, device, equipment and medium
CN113487607A (en) Defect detection method and device based on multi-view-field image
US8787702B1 (en) Methods and apparatus for determining and/or modifying image orientation
CN106204616B (en) Method and device for identifying currency value of Iran paper money
CN113256870B (en) Method and device for detecting thickness abnormality of sheet medium, storage medium and equipment
CN107680246B (en) Method and equipment for positioning curve boundary in paper money pattern
CN113192252B (en) Method, device, equipment and readable medium for detecting note duplicate
CN115661131B (en) Image identification method and device, electronic equipment and storage medium
CN107886615B (en) Edge detection method and currency detection equipment
CN115601564A (en) Colloid contour detection method and system based on image recognition
CN115205882A (en) Intelligent identification and processing method for expense voucher in medical industry
CN112183454B (en) Image detection method and device, storage medium and terminal
CN113269708B (en) Method and device for determining new and old media, computer equipment and storage medium
CN112233060B (en) Screening method, device, equipment and medium for digital pathological image abnormal samples
US9122944B2 (en) Paper medium identifying device and identifying method
CN110674830B (en) Image privacy identification method and device, computer equipment and storage medium
CN112132139A (en) Character recognition method and device
CN115424062B (en) Method, device, equipment and storage medium for automatically identifying diagonal network

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