CN107331029A - Bank note dislocation detection method, device, equipment and storage medium - Google Patents
Bank note dislocation detection method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN107331029A CN107331029A CN201710488561.4A CN201710488561A CN107331029A CN 107331029 A CN107331029 A CN 107331029A CN 201710488561 A CN201710488561 A CN 201710488561A CN 107331029 A CN107331029 A CN 107331029A
- Authority
- CN
- China
- Prior art keywords
- row
- vertical line
- bank note
- point number
- foreground point
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07D—HANDLING OF COINS OR VALUABLE PAPERS, e.g. TESTING, SORTING BY DENOMINATIONS, COUNTING, DISPENSING, CHANGING OR DEPOSITING
- G07D7/00—Testing 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/20—Testing patterns thereon
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/40—Analysis of texture
- G06T7/41—Analysis of texture based on statistical description of texture
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Probability & Statistics with Applications (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a kind of bank note dislocation detection method, device, equipment and storage medium, wherein, this method includes:Obtain the image in the feature vertical line region of bank note;Above-mentioned image is divided at least two image sections according to the direction parallel to the long side of bank note;The foreground point number of each column in each image sections is calculated respectively;The feature vertical line position of the image sections is determined according to the foreground point number of each column in image sections;According to the feature vertical line position detection bank note of adjacent image section with the presence or absence of dislocation.The present invention can interpolate that whether bank note has a case that lateral fold, slight crack or fracture in feature vertical line region by detecting whether feature vertical line position misplaces;Enter line misregistration detection using the foreground point number of each column, method is simple, it is easy to accomplish, efficiency high.
Description
Technical field
The present embodiments relate to image processing techniques, more particularly to a kind of bank note dislocation detection method, device, equipment and
Storage medium.
Background technology
Bank note is in the process of circulation, it may appear that folding line, fracture situations such as, for example, bank note is broken into two halves, user's transparent adhesive tape
Bank note is pasted by band, and bank note still can continue circulation and use, but the bank note actually re-pasted needs to reclaim and carried out
It is uniformly processed.
At present, can be by artificial detection, labor intensive and time for above-mentioned abnormal bank note.For most normal on bank note
The vertical folding line (i.e. perpendicular to the folding line on the long side of bank note) seen, can obtain folding by methods such as Threshold segmentation or edge extractings
Trace position, realizes the detection of abnormal bank note.
But, (laterally refer to the side parallel to the long side of bank note for bank note lateral fold, horizontal slight crack or transverse breakage
To) situation, effective detection scheme is not yet proposed at present.
The content of the invention
The present invention provides a kind of bank note dislocation detection method, device, equipment and storage medium, and bank note can be detected in feature
Whether vertical line region has a case that lateral fold, slight crack or fracture.
In a first aspect, the embodiments of the invention provide a kind of bank note dislocation detection method, including:
Obtain the image in the feature vertical line region of bank note;
Described image is divided at least two image sections according to the direction parallel to the long side of bank note;
The foreground point number of each column in each image sections is calculated respectively;
The feature vertical line position of the image sections is determined according to the foreground point number of each column in image sections;
Detect the bank note with the presence or absence of dislocation according to the feature vertical line position of adjacent image section.
Second aspect, the embodiment of the present invention additionally provides a kind of bank note dislocation detection means, including:
Image collection module, the image in the feature vertical line region for obtaining bank note;
Image sections division module, for described image to be divided into at least two figures according to the direction parallel to the long side of bank note
As section;
Foreground point number computing module, the foreground point number for calculating each column in each image sections respectively;
Feature vertical line position determination module, the spy for determining the image sections according to the foreground point number of each column in image sections
Levy vertical line position;
Misplace detection module, for detecting the bank note with the presence or absence of mistake according to the feature vertical line position of adjacent image section
Position.
The third aspect, the embodiment of the present invention additionally provides a kind of equipment, and the equipment includes:
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are by one or more of computing devices so that one or more of processing
Device realizes the bank note dislocation detection method as described in any embodiment of the present invention.
Fourth aspect, the embodiment of the present invention additionally provides a kind of computer-readable recording medium, is stored thereon with computer
Program, realizes the bank note dislocation detection method as described in any embodiment of the present invention when the program is executed by processor.
The present invention can interpolate that whether bank note has in feature vertical line region by detecting whether feature vertical line position misplaces
Bank note misalignment caused by lateral fold, slight crack or fracture;Enter line misregistration detection, method letter using the foreground point number of each column
It is single, it is easy to accomplish, efficiency high.
Brief description of the drawings
Fig. 1 is the flow chart for the bank note dislocation detection method that the embodiment of the present invention one is provided;
Fig. 2 is the gray level image schematic diagram in the bank note feature vertical line region that the embodiment of the present invention one is provided;
Fig. 3 is the bianry image schematic diagram of gray level image shown in Fig. 2 of the offer of the embodiment of the present invention one;
Fig. 4 is the gray level image schematic diagram in the feature vertical line region for the dislocation bank note that the embodiment of the present invention one is provided;
Fig. 5 is the bianry image schematic diagram of gray level image shown in Fig. 4 of the offer of the embodiment of the present invention one;
Fig. 6 is the structured flowchart for the bank note dislocation detection means that the embodiment of the present invention three is provided;
Fig. 7 is the structural representation for the equipment that the embodiment of the present invention four is provided.
Embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining the present invention, rather than limitation of the invention.It also should be noted that, in order to just
Part related to the present invention rather than entire infrastructure are illustrate only in description, accompanying drawing.
The detection object of the embodiment of the present invention is the bank note with feature vertical line, for example, hundred yuan notes.The embodiment of the present invention
Mainly whether misplaced according to bank note feature detection feature vertical line itself, if feature vertical line has dislocation, i.e. bank note and there is mistake
Position, represents that the bank note have larger lateral fold, horizontal slight crack or the bank note to be re-pasted after transverse breakage, it should right
The bank note is recycled.When its Cleaning Principle is that bank note feature vertical line region has lateral fold, slight crack or fracture, it is handed over
The dislocation of feature vertical line occurs in the place of connecing.Transverse direction in the embodiment of the present invention refers to the direction parallel to the long side of bank note, vertically
Or longitudinal direction refers to the direction perpendicular to the long side of bank note, wherein parallel can be substantially parallel or less parallel, can be vertically
Complete vertical or near normal.Feature vertical line in the embodiment of the present invention refers to the inherent feature of bank note, is hung down in banknote prints
Directly in the vertical linear feature on the long side of bank note.
Embodiment one
Fig. 1 is the flow chart for the bank note dislocation detection method that the embodiment of the present invention one is provided, and the present embodiment is applicable to inspection
Situation of the bank note with the presence or absence of dislocation is surveyed, whether there is lateral fold, slight crack in feature vertical line region specifically for detection bank note
Or fracture.This method can misplace detection means to perform by bank note, for example, the equipment with calculating with processing function.Such as Fig. 1
Shown, this method specifically includes following steps:
Step 110, the image in the feature vertical line region of bank note is obtained.
Wherein, feature vertical line refers to the inherent feature of bank note, is the vertical lines perpendicular to the long side of bank note in banknote prints
Feature.Feature vertical line region refers to include the part region of feature vertical line on bank note.Image acquired in this step can be
Bianry image, specific binarization method can use existing method, for example, percentage threshold method, OTSU methods etc., the present invention
To binarization without describing in detail.
Step 120, above-mentioned image is divided at least two image sections according to the direction parallel to the long side of bank note.
Wherein, the image in feature vertical line region is put according to banknote image identical orientation, so according to parallel to paper
The direction on the long side of coin divides image sections, just carries out horizontal partition to feature vertical line.
Step 130, the foreground point number of each column in each image sections is calculated respectively.
Wherein, foreground point is the white pixel point in bianry image.
Step 140, the feature vertical line position of the image sections is determined according to the foreground point number of each column in image sections.
Wherein, feature vertical line position refers to a certain row in feature vertical line, for example, it may be where the border of feature vertical line
Row.For bank note, there is also intrinsic pixel distribution feature for the pixel around its feature vertical line.Around feature vertical line
Pixel distribution feature, it may be determined that the feature vertical line position of bank note.
Step 150, according to the feature vertical line position detection bank note of adjacent image section with the presence or absence of dislocation.
Wherein, in the absence of lateral fold, slight crack or the bank note of fracture, its feature vertical line in the absence of dislocation, because
This, by the dislocation for detecting feature vertical line, it can be determined that whether bank note misplaces, i.e., bank note with the presence or absence of lateral fold, slight crack or
Fracture.
The technical scheme of the present embodiment, by detecting whether feature vertical line position misplaces, can interpolate that bank note is perpendicular in feature
Whether line region has lateral fold, slight crack or the caused bank note misalignment of fracture;Carried out using the foreground point number of each column
Dislocation detection, method is simple, it is easy to accomplish, efficiency high.
It is the gray level image in bank note feature vertical line region referring to Fig. 2, Fig. 3 is the bianry image of gray level image shown in Fig. 2,
Wherein, 3 pieces of black vertical line regions in Fig. 2 can regard feature vertical line as, and specific feature vertical line position can be that black is erected
3 pieces of white vertical line regions that black vertical line region in a certain row in line region, Fig. 2 corresponds in Fig. 3.Preferably, can be with
Preset the center-right black vertical line regions of Fig. 2 be characterized vertical line enter line misregistration detection, specific feature vertical line position can
To be that row (i.e. black region and gray area boundary) of the black vertical line region leftmost side.Fig. 4 is dislocation bank note
The gray level image in feature vertical line region, Fig. 5 is the bianry image of gray level image shown in Fig. 4, as shown in Figures 4 and 5, divides image sections
Afterwards, the feature vertical line position of adjacent image section can have skew.
On the basis of above-mentioned technical proposal, it is preferred that step 150 can include:The feature for calculating adjacent image section is erected
The columns of line position difference, is used as degrees of offset;If degrees of offset exceedes predetermined threshold value, it is determined that bank note has dislocation.
Wherein, feature vertical line position is which specific row.Predetermined threshold value is positive integer, its span can for x >=
3, specific value can be set according to accuracy requirement.Preferably, predetermined threshold value value is 5.In view of calculating feature vertical line position
Error, the span of predetermined threshold value is set to x >=3, with certain fault-tolerance.
If being divided into the image sections of 3 or more than 3, the skew journey of the feature vertical line position of arbitrary neighborhood image sections
Degree exceedes predetermined threshold value, then it is assumed that bank note has dislocation.
Embodiment two
On the basis of above-described embodiment one, present embodiments provide and the preferred of feature vertical line position is determined in step 140
Embodiment, is specifically included:According to preset rules, all row in present image section are traveled through, are calculated when prostatitis right side first is pre-
If the foreground point number sum of row and the second default foreground point number sum arranged on the left of prostatitis;According to the first default row
The foreground point number sum of foreground point number sum and the second default row, determines the feature vertical line position of present image section.
Wherein, preset rules are set in advance according to the pixel distribution feature in sample image feature vertical line region, wherein
Including setting feature vertical line position reference, the first default row, the second default row, the method for calculating foreground point number sum, with institute
The default row of the first of setting, second preset the corresponding specific method for determining feature vertical line position of row.Feature vertical line position reference
After setting, for each bank note detected, corresponding feature vertical line position is searched on the bank note according to preset rules
Put.First, which presets row and the second default row, may each be multiple row, for example, when the row of prostatitis right side 10 and when prostatitis left side 15 is arranged.
If when the left side or right side in prostatitis are arranged without other, then it is assumed that its corresponding foreground point number is 0;If when the left side in prostatitis
Or right side does not have enough columns, then how many row just calculates the foreground point number sum how much arranged.
, can be according to some around prostatitis based on the pixel distribution feature in feature vertical line region as shown in Figures 2 to 5
The difference of the foreground point number of row adds and determines feature vertical line position, specifically, according to the difference of the row of selection, as a result may
Being that maximum is corresponding is classified as feature vertical line position or minimum value is corresponding is classified as feature vertical line position.
The present embodiment by traveling through all row in feature vertical line region, calculate around prostatitis the difference of foreground point number or
Plus and, selection is most worth corresponding row as feature vertical line position, calculates easy and need to only travel through once, calculating speed is fast.Simultaneously
Feature vertical line position is determined by being most worth, without given threshold, noise can be avoided to influence, strong antijamming capability.
Exemplified by being below the border of the center-right white vertical line region leftmost sides of Fig. 3 by feature vertical line position, illustrate
Bright several embodiments for determining feature vertical line position.
(1) in the first default row, the second default row and in the case of the composition continuum of prostatitis, according to the first default row
Foreground point number sum and the second default row foreground point number sum determine present image section feature vertical line position this
One step can be accomplished by the following way:
Work as prostatitis for each, calculate the foreground point number sum and the foreground point number of the second default row of the first default row
The difference of sum;
Maximum difference is chosen in the corresponding difference of each row;
Determine the row corresponding to maximum difference as the feature vertical line position of present image section.
Based on the pixel distribution feature in the region of feature vertical line shown in Fig. 3, adjacent area is on the right side of feature vertical line position
Foreground point, left side adjacent area (black region i.e. in the middle of image) is some background dots, it is clear that in feature vertical line region, special
The difference for levying the foreground point number (A) of adjacent area and the foreground point number (B) of left side adjacent area on the right side of vertical line position is most
Big, because the characteristics of left and right sides adjacent area of other row is not present such, its difference can be smaller, for example, image is most
This row of the left margin in the white vertical line region on right side, the foreground point number of its right side adjacent area is significantly less than A, and its left side is adjacent
The foreground point number in region is significantly greater than B, therefore, and its difference can be less than A-B.
Therefore, the preset rules of the manner (1) are the first default row, the second default row and when prostatitis constitutes continuum,
That is, the first default row can be adjacent when multiple row in prostatitis on the right side of prostatitis, the second default row can be current
It is adjacent when multiple row in prostatitis on the left of row.First default row are with the second default value arranged according to sample image feature vertical line position
The actual columns setting of left and right sides adjacent area is put, for example, the first default row are 10 row on the right side of prostatitis, the second default row are
20 arrange on the left of prostatitis.
Wherein, the foreground point number sum for calculating the first default row can be added the foreground point number of respective column, together
Sample, the foreground point number sum for calculating the second default row can be added the foreground point number of respective column, calculate the two poor
Value then directly does subtraction to two " foreground point number sums ".
It is preferred that, before foreground point number sum and the second default row that the first default row can be calculated using below equation
The difference of sight spot number sum:
(aiColSum [i+m]-aiColSum [i])-(aiColSum [i]-aiColSum [i-n]),
Wherein, aiColSum [i] represents that the integration of the i-th row arranges and integrates row and represent to work as prostatitis and its before all row
Foreground point number sum, i.e. aiColSum [i] represent before i row foreground point number sum;I values are whole more than or equal to 0
Number, for example, N is arranged altogether, then i value is that 0 to N-1,0 expression the 1st is arranged;M represents the columns of the first default row on the right side of prostatitis;
N represents the columns of the second default row on the left of prostatitis;AiColSum [i+m] represent the i-th+m row integration row and;aiColSum
[i-n] represent the i-th-n row integration row and.
The calculating of integration row and aiColSum can be represented with following equation:
AiColSum [0]=aiCol [0],
AiColSum [i]=aiColSum [i-1]+aiCol [i],
Wherein, aiCol [i] represents the foreground point number of the i-th row;AiColSum [i] represent i-th row integration row and.
The difference of front and rear adjacent part foreground point number is calculated above by the mode of integration row sum, calculates simple, calculates
Speed is fast, it is easy to accomplish.
(2) it is default according to first in the case where first presets row, the second default row and constitute discontinuous interval when prostatitis
The foreground point number sum of row and the foreground point number sum of the second default row determine the feature vertical line position of present image section
The step for can be accomplished by the following way:
Work as prostatitis for each, calculate the foreground point number sum and the foreground point number of the second default row of the first default row
Sum plus and;
Corresponding plus and middle selection maximum is arranged each;
Row corresponding to determining maximum as present image section feature vertical line position.
Based on the pixel distribution feature in the region of feature vertical line shown in Fig. 3, adjacent area is on the right side of feature vertical line position
There are a large amount of foreground points in foreground point, the region (the white vertical line region i.e. on the left of image) that left side interval is necessarily arranged, it is clear that in spy
Levy in vertical line region, the region that the foreground point number (A) of adjacent area is necessarily arranged with left side interval on the right side of feature vertical line position
Foreground point number (C) plus and be maximum because other row same location relations region be not present it is such the characteristics of, its
Plus and can it is small, for example, the left margin in the white vertical line region of the image rightmost side this row, its right side adjacent area foreground point number
It is significantly less than A, the foreground point number in the region (i.e. the center-right white vertical line region of image) that its left side interval is necessarily arranged is bright
Aobvious to be less than C, therefore, it adds and can be less than A+C.
Therefore, the preset rules of the manner (2) are the first default row, the second default row and when prostatitis constitutes discontinuous area
Between, that is to say, that the first default row can be adjacent when multiple row in prostatitis on the right side of prostatitis, and the second default row can be worked as
Multiple row with currently showing certain intervals on the left of prostatitis.First default row are with the second default value arranged according to sample image
The feature vertical line position left and right sides meets the actual columns setting in the region of above-mentioned condition, for example, the first default row are to work as prostatitis
Right side the 1st to 10 is arranged, and the second default row are the 21st to 40 row on the left of prostatitis.
It should be noted that except above two mode, other preset rules can also be set and go to determine feature vertical line position
Put, for example, the maximum of the foreground point number sum of continuous several columns, the foreground point number sum of multiple discontinuity intervals are most
Small value (such as being calculated according to the black region foreground point number around feature vertical line position).In addition, if presetting
Feature vertical line position reference it is different from aforesaid way, then specific preset rules can also be gone according to its specific pixel distribution feature
Setting, in this regard, those skilled in the art can go change to realize according to specific image, the present invention is without describing in detail.This hair
It is bright to be not limited only to upper type, other more equivalent ways can also be included, it is without departing from the inventive concept, right
The mode for various obvious changes can be carried out for those skilled in the art, readjusting and substituting, all without departing from this hair
Bright protection domain.
In addition, bank note dislocation detection method or feature based vertical line region described in any embodiment of the present invention
Gray level image realize that compared with bianry image, it is foreground point number or background dot number that it, which distinguishes be to calculate, right
This, those skilled in the art can go change to realize according to the method for bianry image, herein without describing in detail.
Embodiment three
The present embodiment three provides a kind of bank note dislocation detection means, can be used for realizing described in above-described embodiment one and two
Bank note dislocation detection method.As shown in fig. 6, the device includes:It is image collection module 610, image sections division module 620, preceding
Sight spot number computing module 630, feature vertical line position determination module 640 and dislocation detection module 650.
Image collection module 610, the image in the feature vertical line region for obtaining bank note;
Image sections division module 620, for above-mentioned image to be divided into at least two according to the direction parallel to the long side of bank note
Individual image sections;
Foreground point number computing module 630, the foreground point number for calculating each column in each image sections respectively;
Feature vertical line position determination module 640, for determining the image sections according to the foreground point number of each column in image sections
Feature vertical line position;
Misplaced detection module 650, and dislocation is whether there is for the feature vertical line position detection bank note according to adjacent image section.
The technical scheme of the present embodiment, by detecting whether feature vertical line position misplaces, can interpolate that bank note is perpendicular in feature
Whether line region has lateral fold, slight crack or the caused bank note misalignment of fracture;Carried out using the foreground point number of each column
Dislocation detection, method is simple, it is easy to accomplish, efficiency high.
It is preferred that, feature vertical line position determination module 640 can include:Traversal Unit, for according to preset rules, traversal
All row in present image section, calculate on the right side of the prostatitis foreground point number sum of the first default row and the on the left of prostatitis
The foreground point number sum of two default row;Position determination unit, for the foreground point number sum according to the first default row and
The foreground point number sum of second default row, determines the feature vertical line position of present image section.
In the first default row, the second default row and in the case of the composition continuum of prostatitis, position determination unit is specific
For:Work as prostatitis for each, calculate the foreground point number sums of the first default row and the second default row foreground point number it
The difference of sum;Maximum difference is chosen in the corresponding difference of each row;Determine the row corresponding to maximum difference as present image section
Feature vertical line position.
It is preferred that, position determination unit can calculate the foreground point number sum of the first default row and the using below equation
The difference of the foreground point number sum of two default row:
(aiColSum [i+m]-aiColSum [i])-(aiColSum [i]-aiColSum [i-n]),
Wherein, aiColSum [i] represents that the integration of the i-th row arranges and integrates row and represent to work as prostatitis and its before all row
Foreground point number sum;M represents the columns of the first default row on the right side of prostatitis;N represents the second default row on the left of prostatitis
Columns.
In the case where first presets row, the second default row and constitutes discontinuous interval when prostatitis, position determination unit tool
Body is used for:Work as prostatitis for each, calculate the foreground point number sum and the foreground point number of the second default row of the first default row
Sum plus and;Corresponding plus and middle selection maximum is arranged each;Row corresponding to determining maximum are used as present image section
Feature vertical line position.
It is preferred that, dislocation detection module 650 can include:Degrees of offset computing unit, for calculating adjacent image section
The columns of feature vertical line position difference, is used as degrees of offset;Misplace detection unit, for exceeding predetermined threshold value in degrees of offset
In the case of, determine that bank note has dislocation.
The bank note dislocation detection means that the embodiment of the present invention is provided can perform the paper that any embodiment of the present invention is provided
Coin dislocation detection method, possesses the corresponding functional module of execution method and beneficial effect.
Example IV
Fig. 7 is the structural representation for the equipment that the embodiment of the present invention four is provided, as shown in fig. 7, the equipment includes:Processor
710th, memory 720, input unit 730 and output device 740;In equipment the quantity of processor 710 can be it is one or more,
In Fig. 7 by taking a processor 710 as an example;Processor 710, memory 720, input unit 730 and output device 740 in equipment
It can be connected by bus or other modes, in Fig. 7 exemplified by being connected by bus.
Memory 720 can perform journey as a kind of computer-readable recording medium available for storage software program, computer
Corresponding programmed instruction/the module of bank note dislocation detection method in sequence and module, such as embodiment of the present invention is (for example, bank note is wrong
Image collection module 610, image sections division module 620, foreground point number computing module 630, feature in level detecting apparatus are erected
Line position determining module 640 and dislocation detection module 650).Processor 710 is stored in the software in memory 720 by operation
Program, instruction and module, so as to perform various function application and the data processing of equipment, that is, realize above-mentioned bank note dislocation
Detection method.
Memory 720 can mainly include storing program area and storage data field, wherein, storing program area can store operation system
Application program needed for system, at least one function;Storage data field can be stored uses created data etc. according to terminal.This
Outside, memory 720 can include high-speed random access memory, can also include nonvolatile memory, for example, at least one
Disk memory, flush memory device or other non-volatile solid state memory parts.In some instances, memory 720 can enter one
Step includes the memory remotely located relative to processor 710, and these remote memories can pass through network connection to equipment.On
The example for stating network includes but is not limited to internet, intranet, LAN, mobile radio communication and combinations thereof.
Input unit 730 can be used for the numeral or character information for receiving input, and produce with the user of equipment set with
And the relevant key signals input of function control.Output device 740 may include the display devices such as display screen.
The equipment of the present embodiment can be the paper money identification equipments such as ATM, cash inspecting machine, paper money counter.
Embodiment five
The embodiment of the present invention five also provides a kind of computer-readable recording medium, is stored thereon with computer program (also referred to as
For computer executable instructions), the program is used to perform a kind of bank note dislocation detection method, this method when being executed by processor
Including:
Obtain the image in the feature vertical line region of bank note;
Above-mentioned image is divided at least two image sections according to the direction parallel to the long side of bank note;
The foreground point number of each column in each image sections is calculated respectively;
The feature vertical line position of the image sections is determined according to the foreground point number of each column in image sections;
According to the feature vertical line position detection bank note of adjacent image section with the presence or absence of dislocation.
Certainly, a kind of computer-readable recording medium that the embodiment of the present invention is provided, its program is not limited to perform as above
Described method operation, can also carry out the related behaviour in the bank note dislocation detection method that any embodiment of the present invention is provided
Make.
By the description above with respect to embodiment, it is apparent to those skilled in the art that, the present invention
It can be realized by software and required common hardware, naturally it is also possible to realized by hardware, but the former is more in many cases
Good embodiment.Understood based on such, what technical scheme substantially contributed to prior art in other words
Part can be embodied in the form of software product, and the computer software product can be stored in computer-readable recording medium
In, such as floppy disk, read-only storage (Read-Only Memory, ROM), the random access memory (Random of computer
Access Memory, RAM), flash memory (FLASH), hard disk or CD etc., including some instructions are to cause a computer to set
Standby (can be personal computer, server, or network equipment etc.) performs the method described in each embodiment of the invention.
It is worth noting that, in the embodiment of above-mentioned bank note dislocation detection means, included unit and module are only
Divided according to function logic, but be not limited to above-mentioned division, as long as corresponding function can be realized;Separately
Outside, the specific name of each functional unit is also only to facilitate mutually distinguish, the protection domain being not intended to limit the invention.
Note, above are only presently preferred embodiments of the present invention and institute's application technology principle.It will be appreciated by those skilled in the art that
The invention is not restricted to specific embodiment described here, can carry out for a person skilled in the art it is various it is obvious change,
Readjust and substitute without departing from protection scope of the present invention.Therefore, although the present invention is carried out by above example
It is described in further detail, but the present invention is not limited only to above example, without departing from the inventive concept, also
Other more equivalent embodiments can be included, and the scope of the present invention is determined by scope of the appended claims.
Claims (10)
- The detection method 1. a kind of bank note misplaces, it is characterised in that including:Obtain the image in the feature vertical line region of bank note;Described image is divided at least two image sections according to the direction parallel to the long side of bank note;The foreground point number of each column in each image sections is calculated respectively;The feature vertical line position of the image sections is determined according to the foreground point number of each column in image sections;Detect the bank note with the presence or absence of dislocation according to the feature vertical line position of adjacent image section.
- 2. according to the method described in claim 1, it is characterised in that the figure is determined according to the foreground point number of each column in image sections As the feature vertical line position of section, including:According to preset rules, all row in present image section are traveled through, are calculated when the foreground point of row is preset on prostatitis right side first The foreground point number sum of number sum and the second default row on the left of prostatitis;According to the foreground point number sum of the described first default row and the foreground point number sum of the second default row, it is determined that The feature vertical line position of the present image section.
- 3. method according to claim 2, it is characterised in that in the described first default row, the described second default row and institute State in the case of constituting continuum when prostatitis, according to the foreground point number sum of the described first default row and described second pre- If the foreground point number sum of row, the feature vertical line position of the present image section is determined, including:Work as prostatitis for each, calculate foreground point number sum and the foreground point of the described second default row of the described first default row The difference of number sum;Maximum difference is chosen in the corresponding difference of each row;Determine the row corresponding to the maximum difference as the feature vertical line position of present image section.
- 4. method according to claim 2, it is characterised in that in the described first default row, the described second default row and institute State in the case of constituting discontinuous interval when prostatitis, according to the foreground point number sum and described second of the described first default row The foreground point number sum of default row, determines the feature vertical line position of the present image section, including:Work as prostatitis for each, calculate foreground point number sum and the foreground point of the described second default row of the described first default row Number sum plus and;Corresponding plus and middle selection maximum is arranged each;Determine the row corresponding to the maximum as the feature vertical line position of present image section.
- 5. according to the method described in claim 1, it is characterised in that according to the feature vertical line position detection of adjacent image section Bank note whether there is dislocation, including:The columns of the feature vertical line position difference of adjacent image section is calculated, degrees of offset is used as;If the degrees of offset exceedes predetermined threshold value, it is determined that the bank note has dislocation.
- 6. method according to claim 3, it is characterised in that the prospect of the described first default row is calculated using below equation The difference of point number sum and the foreground point number sum of the described second default row:(aiColSum [i+m]-aiColSum [i])-(aiColSum [i]-aiColSum [i-n]),Wherein, aiColSum [i] represent the i-th row integration row and, integration row and represent when prostatitis and its before before all row Sight spot number sum;M represents the columns of the first default row on the right side of prostatitis;N represents the columns of the second default row on the left of prostatitis.
- The detection means 7. a kind of bank note misplaces, it is characterised in that including:Image collection module, the image in the feature vertical line region for obtaining bank note;Image sections division module, for described image to be divided into at least two images according to the direction parallel to the long side of bank note Section;Foreground point number computing module, the foreground point number for calculating each column in each image sections respectively;Feature vertical line position determination module, for determining that the feature of the image sections is erected according to the foreground point number of each column in image sections Line position;Misplace detection module, for detecting the bank note with the presence or absence of dislocation according to the feature vertical line position of adjacent image section.
- 8. device according to claim 7, it is characterised in that the feature vertical line position determination module includes:Traversal Unit, for according to preset rules, traveling through all row in present image section, is calculated when prostatitis right side first is default The foreground point number sum of the foreground point number sum of row and the second default row on the left of prostatitis;Position determination unit, before the foreground point number sum according to the described first default row and the second default row Sight spot number sum, determines the feature vertical line position of the present image section.
- 9. a kind of equipment, it is characterised in that the equipment includes:One or more processors;Memory, for storing one or more programs;When one or more of programs are by one or more of computing devices so that one or more of processors are real Now as described in any in claim 1 to 6 bank note dislocation detection method.
- 10. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the program is by processor The bank note dislocation detection method as described in any in claim 1 to 6 is realized during execution.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710488561.4A CN107331029B (en) | 2017-06-23 | 2017-06-23 | Bank note dislocation detection method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710488561.4A CN107331029B (en) | 2017-06-23 | 2017-06-23 | Bank note dislocation detection method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107331029A true CN107331029A (en) | 2017-11-07 |
CN107331029B CN107331029B (en) | 2019-09-20 |
Family
ID=60194223
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710488561.4A Active CN107331029B (en) | 2017-06-23 | 2017-06-23 | Bank note dislocation detection method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107331029B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004234565A (en) * | 2003-01-31 | 2004-08-19 | Ricoh Co Ltd | Displacement correction device, image processor, program, storage medium, and displacement correction method |
CN104122271A (en) * | 2014-07-09 | 2014-10-29 | 宁波摩视光电科技有限公司 | Automated optical inspection (AOI)-based bullet apparent defect detection method |
CN104361672A (en) * | 2014-10-14 | 2015-02-18 | 深圳怡化电脑股份有限公司 | Method for detecting folded corners of paper money |
CN105092597A (en) * | 2015-09-14 | 2015-11-25 | 广东电网有限责任公司电力科学研究院 | Detection method for cracks on surface of hard-plastic material |
CN105225335A (en) * | 2015-10-28 | 2016-01-06 | 深圳怡化电脑股份有限公司 | A kind of stained recognition methods of paper money number and system |
CN106408746A (en) * | 2016-08-25 | 2017-02-15 | 深圳怡化电脑股份有限公司 | Safety thread identification method and apparatus |
CN106875545A (en) * | 2017-03-01 | 2017-06-20 | 深圳怡化电脑股份有限公司 | The discrimination method and device of a kind of bank note |
-
2017
- 2017-06-23 CN CN201710488561.4A patent/CN107331029B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004234565A (en) * | 2003-01-31 | 2004-08-19 | Ricoh Co Ltd | Displacement correction device, image processor, program, storage medium, and displacement correction method |
CN104122271A (en) * | 2014-07-09 | 2014-10-29 | 宁波摩视光电科技有限公司 | Automated optical inspection (AOI)-based bullet apparent defect detection method |
CN104361672A (en) * | 2014-10-14 | 2015-02-18 | 深圳怡化电脑股份有限公司 | Method for detecting folded corners of paper money |
CN105092597A (en) * | 2015-09-14 | 2015-11-25 | 广东电网有限责任公司电力科学研究院 | Detection method for cracks on surface of hard-plastic material |
CN105225335A (en) * | 2015-10-28 | 2016-01-06 | 深圳怡化电脑股份有限公司 | A kind of stained recognition methods of paper money number and system |
CN106408746A (en) * | 2016-08-25 | 2017-02-15 | 深圳怡化电脑股份有限公司 | Safety thread identification method and apparatus |
CN106875545A (en) * | 2017-03-01 | 2017-06-20 | 深圳怡化电脑股份有限公司 | The discrimination method and device of a kind of bank note |
Also Published As
Publication number | Publication date |
---|---|
CN107331029B (en) | 2019-09-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3620981B1 (en) | Object detection method, device, apparatus and computer-readable storage medium | |
CN105809164A (en) | Character identification method and device | |
CN103455814B (en) | Text line segmenting method and text line segmenting system for document images | |
CN107437294B (en) | Character segmentation method, device, equipment and storage medium | |
CN109117814B (en) | Image processing method, image processing apparatus, electronic device, and medium | |
CN107067536B (en) | A kind of image boundary determines method, apparatus, equipment and storage medium | |
US8811750B2 (en) | Apparatus and method for extracting edge in image | |
CN111310746A (en) | Text line detection method, model training method, device, server and medium | |
CN103606221A (en) | Fault automatic diagnostic method of counter and device | |
CN103034848A (en) | Identification method of form type | |
CN110135225B (en) | Sample labeling method and computer storage medium | |
CN112712703A (en) | Vehicle video processing method and device, computer equipment and storage medium | |
CN115546809A (en) | Table structure identification method based on cell constraint and application thereof | |
CN104077765B (en) | Image segmentation device, image partition method | |
CN108734846B (en) | Method and device for denoising paper money image, terminal and storage medium | |
Tran et al. | A mixture model using Random Rotation Bounding Box to detect table region in document image | |
CN108510639A (en) | A kind of paper money discrimination method, apparatus, cash inspecting machine and storage medium | |
CN111814673A (en) | Method, device and equipment for correcting text detection bounding box and storage medium | |
CN111738252B (en) | Text line detection method, device and computer system in image | |
Suleyman et al. | An adaptive threshold algorithm for offline Uyghur handwritten text line segmentation | |
Choodowicz et al. | Hybrid algorithm for the detection and recognition of railway signs | |
CN107220981B (en) | Character segmentation method, device, equipment and storage medium | |
CN107331029A (en) | Bank note dislocation detection method, device, equipment and storage medium | |
CN108629786B (en) | Image edge detection method and device | |
CN112541505B (en) | Text recognition method, text recognition device and computer-readable storage medium |
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 |