CN108256475A - A kind of bill image inversion detection method - Google Patents
A kind of bill image inversion detection method Download PDFInfo
- Publication number
- CN108256475A CN108256475A CN201810044894.2A CN201810044894A CN108256475A CN 108256475 A CN108256475 A CN 108256475A CN 201810044894 A CN201810044894 A CN 201810044894A CN 108256475 A CN108256475 A CN 108256475A
- Authority
- CN
- China
- Prior art keywords
- region
- value
- bill images
- average value
- gray
- 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
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/40—Document-oriented image-based pattern recognition
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/24—Aligning, centring, orientation detection or correction of the image
- G06V10/242—Aligning, centring, orientation detection or correction of the image by image rotation, e.g. by 90 degrees
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
Abstract
The present invention provides a kind of bill image inversion detection methods, are pre-processed including the bill images to acquisition;Region segmentation is equably carried out to pretreated bill images, calculates the gray value of each pixel in each region;For each region in bill images, same section of gray value interval is chosen from 0~255 gray value, each region calculates the gray value average value of all pixels point in the gray value interval respectively;It determines comparison of each region about gray value average value, the comparison and region each in judgment models is compared about the comparison of gray value average value, to judge whether bill images are inverted.Bill image inversion detection method provided by the invention by the use of region each in bill images about gray value average value comparison as basis for estimation, principle is simpler, the data volume smaller of operation, accuracy rate higher, testing result it is clear that using when can more meet the requirement of real-time and accuracy.
Description
Technical field
The present invention relates to technical field of image processing, more particularly to a kind of bill image inversion detection method.
Background technology
During image or Text region, the direction of captured image has important influence to final recognition effect.
During being split especially with standard form to image information, if being unable to recognisable image direction will result in image
It cannot correctly be identified.Traditional solution is mainly using OCR identifications and characteristics of image project, both operations
Method data volume is big, and operation accuracy is inadequate, the more difficult requirement for meeting real-time, accuracy in use.
Invention content
The purpose of the present invention is to provide a kind of bill image inversion detection method, it is straight that the detection method is based on multizone
The simple algorithm of square figure characteristic quantity analysis realizes bill image inversion detection, can improve bill image inversion detection speed and accurate
Property.
To achieve these goals, the present invention provides following first technical solution:A kind of bill image inversion detection method,
Include the following steps:
The bill images of acquisition are pre-processed, make the length and width of bill images and the length and width of judgment models Plays image
Unanimously;
Pretreated bill images are equably carried out with region segmentation, and partitioning scheme and standard when establishing judgment models
The partitioning scheme of image is consistent;Calculate the gray value of each pixel in each region;
For each region in bill images, same section of gray value interval is chosen from 0~255 gray value, and selected
Gray value interval and establish gray value interval selected during judgment models as same section;Each region is calculated respectively described
The gray value average value of all pixels point in gray value interval;
The gray value average value of gained is calculated according to each region, determines that each region is closed about the comparison of gray value average value
System, the comparison and region each in judgment models are compared about the comparison of gray value average value, if two kinds of ratios
Compared with relationship consistency, then the direction of bill images is consistent with the direction of judgment models Plays image.
Based on the first technical solution of the present invention, the first embodiment is:It further includes and establishes judgment models, and determine to sentence
Comparison of each region about gray value average value in disconnected model, specifically includes following steps:
Multiple equidirectional bill images of acquisition are pre-processed, the length and width of every bill images is made to be equal to approval book
The length and width of body, pretreated bill images are as standard picture;
Region segmentation is equably carried out to every standard picture, and the partitioning scheme of every standard picture is consistent, for every
Open the gray value that standard picture calculates each pixel in each region respectively;
For each region of every standard picture, same section of gray value interval is chosen from 0~255 gray value, and every
It is consistent to open the gray value interval that standard picture is chosen;Each region of every standard picture is calculated respectively in the gray value interval
The gray value average value of interior all pixels point;
For every standard picture, the gray value average value of gained is calculated according to each region, determines each region about gray scale
It is worth the comparison of average value;Comparison of each region about gray value average value in every standard picture is counted, from multiple
The comparison of proportion maximum is chosen in comparison as ratio of the region each in judgment models about gray value average value
Compared with relationship.
Based on the first technical solution of the present invention, second of embodiment is:The bill images of described pair of acquisition carry out pre-
Processing, specifically includes bill images size adjusting and Inclination maneuver;
The bill images size adjusting and Inclination maneuver, specially:Plane establishes flat square where bill images
Coordinate system;According to formula x=a0+a1u+a2v+a3Uv, y=b0+b1u+b2v+b3Uv, wherein (u, v) represent it is known in size and
Before Inclination maneuver in bill images each pixel coordinate, (x, y) represents each picture in bill images after size and Inclination maneuver
The coordinate of vegetarian refreshments chooses four pixels and sets coordinate of four pixels after size and Inclination maneuver, according to institute
It states the known coordinate before size and Inclination maneuver of four pixels and four pixels has been set in size and are inclined
Coordinate after the adjustment of angle, is calculated transformation coefficient a0、a1、a2、a3、b0、b1、b2、b3;According to the transformation coefficient obtained, calculate
Coordinate of each residual pixel point after size and Inclination maneuver, and then complete the size adjusting and Inclination maneuver of bill images.
Second of embodiment of the first technical solution and first technical solution based on the present invention, the third reality
The mode of applying is:Pretreated bill images are equably carried out with region segmentation, and partitioning scheme is with establishing judgment models markers
The partitioning scheme of quasi- image is consistent;Calculate the gray value of each pixel in each region;It specifically includes:
Pretreated bill images are divided at least two regions, the area equation shared by each region;It is and each
Each position of the region in plane right-angle coordinate be one by one in position and judgment models of the region in plane right-angle coordinate
It is corresponding;Each region corresponds to a number, and the number in each region is consistent with the number of corresponding region in judgment models;
Pass through formula
Gray value Gray [i, j], wherein i=1,2,3...W, j=1 are calculated, 2,3...H, W represents total row of pixel in bill images
Number, H represent total columns of pixel in bill images, and Gray [i, j] represents the gray value of pixel [i, j], and R [i, j] is represented
The red color component value of the RGB color of pixel [i, j], G [i, j] represent the green of the RGB color of pixel [i, j]
Component value, B [i, j] represent the blue color component value of the RGB color of pixel [i, j].
The third embodiment of the first technical solution and first technical solution based on the present invention, the 4th kind of reality
The mode of applying is:The gray value average value that gained is calculated according to each region, determines ratio of each region about gray value average value
Compared with relationship, the comparison and region each in judgment models are compared about the comparison of gray value average value, if two
Kind comparison is consistent, then the direction of bill images is consistent with the direction of judgment models Plays image;Specially:
Compare the gray value average value that each region in bill images calculates gained, from the gray scale for wherein choosing maximum or minimum
It is worth average value, using the number in region corresponding to maximum or minimum average gray as comparison;
Maximum gradation value in the number and judgment models in region corresponding to average gray maximum in bill images is averaged
The number in region corresponding to value compares, if two numbers are consistent, direction and the judgment models Plays image of bill images
Direction is consistent;
Alternatively, by minimum gradation value in the number and judgment models in region corresponding to minimal gray average value in bill images
The number in region corresponding to average value compares, if two numbers are consistent, direction and the judgment models Plays figure of bill images
The direction of picture is consistent.
The third embodiment of the first technical solution and first technical solution based on the present invention, the 5th kind of reality
The mode of applying is:The gray value average value that gained is calculated according to each region, determines ratio of each region about gray value average value
Compared with relationship, the comparison and region each in judgment models are compared about the comparison of gray value average value, if two
Kind comparison is consistent, then the direction of bill images is consistent with the direction of judgment models Plays image;Specially:
Compare the gray value average value that each region in bill images calculates gained, and according to gray value average value to bill
As each region is ranked up, using the clooating sequence as comparison;
By each region in the clooating sequence in region each in bill images and judgment models according to the sequence of gray value average value
Sequence compares, if two kinds of clooating sequences are consistent, the direction of bill images is consistent with the direction of judgment models Plays image.
Based on the first technical solution of the present invention, the 6th kind of embodiment is:It is carried out to pretreated bill images
Before region segmentation, further include and bill version is prejudged according to the RGB color component of bill images, specifically include:
For pretreated bill images, being averaged for the red color component value of all pixels point in bill images is calculated respectively
The average value of value, the average value of yellow color component value and blue color component value;
By the average value of the average value of the red color component value of bill images, the average value of yellow color component value and blue color component value
The average value and blue color component value of average value, yellow color component value with the red color component value of release criteria image each in judgment models
Average value be compared respectively, select the immediate judgment models of color component in a version, as bill images
Version.
6th kind of embodiment of the first technical solution and first technical solution based on the present invention, the 7th kind of reality
The mode of applying is:Further include average value, the yellow point for the red color component value for calculating each release criteria image in judgment models in advance
The step of average value of the average value of magnitude and blue color component value.
Compared with prior art, bill image inversion detection method provided by the invention is closed using region each in bill images
In gray value average value comparison as basis for estimation, principle is simpler, the data volume smaller of operation, accuracy rate higher,
Testing result it is clear that using when can more meet the requirement of real-time and accuracy.
Description of the drawings
It in order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached
Figure is briefly introduced, it should be understood that the following drawings illustrates only certain embodiments of the present invention, therefore is not construed as to model
The restriction enclosed, for those of ordinary skill in the art, without creative efforts, can also be according to these
Attached drawing obtains other relevant drawings.
Fig. 1 show the flow chart of the bill image inversion detection method of embodiment offer.
Fig. 2 show the method for establishing judgment models of embodiment offer.
Fig. 3 show bill images region segmentation schematic diagram in embodiment.
Fig. 4 show the grey level histogram of a-quadrant in bill images shown in Fig. 3.
Fig. 5 show the grey level histogram of B area in bill images shown in Fig. 3.
Fig. 6 show the grey level histogram in C regions in bill images shown in Fig. 3.
Fig. 7 show the grey level histogram in D regions in bill images shown in Fig. 3.
Fig. 8 show the grey value histograms of 0~40 gray value interval of a-quadrant in bill images shown in Fig. 3.
Fig. 9 show the grey value histograms of 0~40 gray value interval of B area in bill images shown in Fig. 3.
Figure 10 show the grey value histograms of 0~40 gray value interval in C regions in bill images shown in Fig. 3.
Figure 11 show the grey value histograms of 0~40 gray value interval in D regions in bill images shown in Fig. 3.
Specific embodiment
Below in conjunction with attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clearly complete
Description.It should be appreciated that specific embodiment described herein is used only for explaining the present invention, it is not intended to limit the present invention.Base
In the embodiment of the present invention, every other implementation that those skilled in the art are obtained under the premise of no creative work
Example, belongs to protection scope of the present invention.
In view of the data volume of current existing bill image inversion detection method operation, big and operation accuracy is not
Enough, when application, is difficult to the requirement for meeting real-time and accuracy, based on this, the present embodiment by taking Ticket Image is inverted detection as an example,
Provide a kind of bill image inversion detection method, the data volume smaller of the method operation, accuracy rate higher, testing result shows
And be clear to, when application, can more meet the requirement of real-time and accuracy.
Refering to Figure 1, the method includes S101, S102, S103 and S104 this four steps, wherein step for embodiment
It need to be by judgment models in S104.
It please refers to shown in Fig. 2, the method for building up of the judgment models includes:
S201:Multiple equidirectional bill images of acquisition are pre-processed, are equal to the length and width of every bill images
The length and width of bill in itself, pretreated bill images are as standard picture.
104 90*60mm are chosen in the present embodiment2Ticket, the image that this 104 ticket are just being put is acquired respectively, to every
The size and angle for opening ticket are adjusted.Specially:According to formula X=A0+A1U+A2V+A3UV, Y=B0+B1U+B2V+B3UV,
The coordinate of every Ticket Image each pixel before size and Inclination maneuver wherein known to (U, V) expression, (X, Y) represents every
The coordinate of Ticket Image each pixel after size and Inclination maneuver.In the present embodiment, choose on four angle points of Ticket Image
Pixel, and set the coordinate of four pixels after size and Inclination maneuver be respectively (0,0), (0,60), (90,60),
(90,0) (size for considering ticket is 90*60mm2), simultaneously because this seat of four pixels before size and Inclination maneuver
Mark according to this coordinate of four pixels before and after size and Inclination maneuver it is known that so can be calculated transformation coefficient A0、A1、
A2、A3、B0、B1、B2、B3;According to the transformation coefficient obtained, each residual pixel point can be quickly calculated in size and Inclination maneuver
Coordinate afterwards, and then the size adjusting and Inclination maneuver of Ticket Image is rapidly completed.
S202:Region segmentation is equably carried out to every standard picture, and the partitioning scheme of every standard picture is consistent, needle
The gray value of in each region each pixel is calculated every standard picture respectively.
It please refers to shown in Fig. 3, in the present embodiment, every standard picture is divided into tetra- regions of A, B, C, D.Pass through formula
Gray value Gray [i, j], wherein i=1,2,3...W, j=1 are calculated, 2,3...H, W represents total row of pixel in standard picture
Number, H represent total columns of pixel in standard picture, and Gray [i, j] represents the gray value of pixel [i, j], and R [i, j] is represented
The red color component value of the RGB color of pixel [i, j], G [i, j] represent the green of the RGB color of pixel [i, j]
Component value, B [i, j] represent the blue color component value of the RGB color of pixel [i, j].It please refers to shown in Fig. 4 to Fig. 7, utilizes
Histogram counts the result of calculation of each area grayscale value respectively.
S203:For each region of every standard picture, same section of gray value interval is chosen from 0~255 gray value,
And the gray value interval that every standard picture is chosen is consistent;Each region of every standard picture is calculated respectively in the gray value
The gray value average value of all pixels point in section.
It please refers to shown in Fig. 8 to Figure 11, in the present embodiment, for each region of every standard picture, from 0~255 ash
0~40 gray value interval is chosen in angle value, and every standard picture chooses this section of 0~40 gray value.To every standard
Pixel of all gray values between 0~40 calculates gray value average value in the a-quadrant of image, correspondingly, to every standard
B, C, D region of image carry out identical calculations.
It should be appreciated that gray value interval selected from 0~255 gray value is not limited to the example above, such as
The present embodiment even can be using 0~255 gray value as selected gray value interval.
S204:For every standard picture, the gray value average value of gained is calculated according to each region, determine each region about
The comparison of gray value average value;Comparison of each region about gray value average value in every standard picture is counted, from
In multiple comparisons choose proportion maximum comparison as region each in judgment models about gray value average value
Comparison.
In the present embodiment, by calculating and comparing the rule for thering are 102 standard pictures to present in 104 standard pictures
For:The gray value average value of four 0~40 gray value intervals of region is ordered as C>A>B>D, four regions, 0~255 gray value area
Between gray value average value be ordered as C>A>B>D.And the region of gray value average value maximum is C areas in all standard pictures
Domain.
In the present embodiment, the region for choosing the gray value average value maximum of 0~40 gray value interval is this spy of C regions
Point, as comparison of the region each in judgment models about gray value average value.
Or in the present embodiment, the gray value average value that can also choose four 0~40 gray value intervals of region is ordered as C
>A>B>This feature of D, as comparison of the region each in judgment models about gray value average value.
After judgment models are established, the present embodiment is with a 90*60mm2Ticket for, to the bill images
Detection method is inverted to describe in detail.
S101:The bill images of acquisition are pre-processed, make the length and width of bill images and judgment models Plays image
Length and width it is consistent.
Image preprocessing needs achieve the effect that by the length and width dimensions of Ticket Image adjust to disconnected model Plays
The length and width dimensions of image are consistent, while need to adjust the angle of Ticket Image, make Ticket Image without deflection.In the present embodiment first
Plane establishes plane right-angle coordinate where bill images;Then under the premise of Adjusting accuracy is ensured to Ticket Image into
Row linear change is adjusted Ticket Image size and inclination angle.
The size and inclination angle of Ticket Image are adjusted, specially:According to formula x=a0+a1u+a2v+a3Uv, y=b0+
b1u+b2v+b3Uv, wherein (u, v) represent it is known before size and Inclination maneuver in Ticket Image each pixel coordinate, (x,
Y) it represents the coordinate of each pixel in Ticket Image after size and Inclination maneuver, choose four pixels and sets described four
Coordinate of the pixel after size and Inclination maneuver, the seat according to known to four pixels before size and Inclination maneuver
The coordinate after size and Inclination maneuver that mark and four pixels have been set, is calculated transformation coefficient a0、a1、a2、
a3、b0、b1、b2、b3;According to the transformation coefficient obtained, coordinate of each residual pixel point after size and Inclination maneuver is calculated, into
And complete the size adjusting and Inclination maneuver of bill images.
In the present embodiment, the pixel on four angle points of Ticket Image is chosen, in order to make the vehicle after size and Inclination maneuver
The length and width dimensions of ticket image are consistent with the length and width dimensions of judgment models Plays image, and the present embodiment is by four pixels in ruler
Coordinate after very little and Inclination maneuver is respectively set as (0,0), (0,60), (90,60), (90,0).Simultaneously because this four pixels
Coordinate of the point before size and Inclination maneuver is it is known that so according to this coordinate of four pixels before and after size and Inclination maneuver
Transformation coefficient a can be calculated0、a1、a2、a3、b0、b1、b2、b3;According to the transformation coefficient obtained, can quickly calculate each surplus
Coordinate of the afterimage vegetarian refreshments after size and Inclination maneuver, and then the size adjusting and Inclination maneuver of Ticket Image is rapidly completed.
S102:Pretreated bill images are equably carried out with region segmentation, and partitioning scheme is with establishing judgment models
When standard picture partitioning scheme it is consistent;Calculate the gray value of each pixel in each region.
It is corresponding with judgment models in the present embodiment, pretreated Ticket Image is divided into tetra- areas of A, B, C, D
Domain.And tetra- regions of A, B, C, D and position one of tetra- regions of A, B, C, D in judgment models in plane right-angle coordinate are a pair of
It should.
Pass through formula
Gray value gray [i, j], wherein i=1,2,3...w, j=1 are calculated, 2,3...h, w represents total row of pixel in Ticket Image
Number, h represent total columns of pixel in Ticket Image, and gray [i, j] represents the gray value of pixel [i, j], and r [i, j] is represented
The red color component value of the RGB color of pixel [i, j], g [i, j] represent the green of the RGB color of pixel [i, j]
Component value, b [i, j] represent the blue color component value of the RGB color of pixel [i, j].
S103:For each region in bill images, same section of gray value interval, and institute are chosen from 0~255 gray value
The gray value interval of selection is with establishing gray value interval selected during judgment models as same section;Each region is calculated respectively to exist
The gray value average value of all pixels point in the gray value interval.
Corresponding with judgment models in the present embodiment, each region of Ticket Image is selected from 0~255 gray value
0~40 gray value interval is taken, gray value is calculated to pixel of all gray values in the a-quadrant of Ticket Image between 0~40
Average value, correspondingly, B, C, D region to every Ticket Image carry out identical calculations.
Or it is corresponding with judgment models, each region of Ticket Image chooses 0~255 from 0~255 gray value
Gray value interval calculates gray value average value to pixel of all gray values in the a-quadrant of Ticket Image between 0~255,
Correspondingly, B, C, D region to every Ticket Image carry out identical calculations.
S104:The gray value average value of gained is calculated according to each region, determines ratio of each region about gray value average value
Compared with relationship, the comparison and region each in judgment models are compared about the comparison of gray value average value, if two
Kind comparison is consistent, then the direction of bill images is consistent with the direction of judgment models Plays image slices.
As the citing of the first embodiment, the gray value for comparing each region calculating gained in bill images is averaged
Value, from maximum or minimum gray value average value is wherein chosen, by the volume in region corresponding to maximum or minimum average gray
Number be used as comparison;By maximum gray scale in the number and judgment models in region corresponding to average gray maximum in bill images
The number in region compares corresponding to value average value, if two numbers are consistent, direction and the judgment models Plays of bill images
The direction of image is consistent;Alternatively, by the number and judgment models in region corresponding to minimal gray average value in bill images most
The number in region compares corresponding to small gray value average value, if two numbers are consistent, the direction of bill images and judgment models
The direction of Plays image is consistent.
The region that judgment models choose the gray value average value maximum of 0~40 gray value interval is this feature of C regions, is made
For comparison of the region each in judgment models about gray value average value.It is corresponding, in the present embodiment, by calculating,
A, the ratio between gray value average value of tetra- 0~40 gray value intervals of region of B, C, D is 1.1377:1.1264:1.3387:1, wherein
The gray value average value in C regions is maximum.According to the above results it is found that the gray value average value in C regions is maximum in the ticket, judge
Equally it is the gray value average value maximum in C regions in model, so the direction of the Ticket Image and judgment models Plays image
Direction it is consistent.104 Ticket Images just put are chosen during due to establishing judgment models, then can determine whether out the Ticket Image for just
It puts.
If the region that judgment models choose the gray value average value maximum of 0~255 gray value interval is this spy of C regions
Point, as comparison of the region each in judgment models about gray value average value.It is corresponding, in the present embodiment, pass through
It calculates, the ratio between gray value average value of tetra- 0~255 gray value intervals of region of A, B, C, D is 1:1.1105:1.4933:
1.1568, the wherein gray value average value in C regions is maximum.According to the above results it is found that the Ticket Image is just puts.
As the citing of second of embodiment, the gray value for comparing each region calculating gained in bill images is averaged
Value, and to bill images, each region is ranked up according to gray value average value, using the clooating sequence as comparison;By ticket
It is compared according to each region in the clooating sequence and judgment models in region each in image according to the clooating sequence of gray value average value, if
Two kinds of clooating sequences are consistent, then the direction of bill images is consistent with the direction of judgment models Plays image.
If the gray value average value that judgment models choose four 0~40 gray value intervals of region is ordered as C>A>B>D this
Feature, as comparison of the region each in judgment models about gray value average value.It is corresponding, in the present embodiment, warp
It is 1.1377 to cross the ratio between calculating, the gray value average value of tetra- 0~40 gray value intervals of region of A, B, C, D:1.1264:
1.3387:1, the gray value average value sequence of four 0~40 gray value intervals of region is also C>A>B>D, can according to the above results
Know, the Ticket Image is just puts.
Include the ticket of red and blue two kinds of version in view of Ticket Image, the size of two kinds of version ticket, typesetting are equal
It is inconsistent.So before region segmentation is carried out to pretreated bill images, further include according to the RGB color of bill images point
Amount prejudges bill version.After ticket version is distinguished, the ticket of different editions corresponds to different region segmentation modes with
Comparison.
In the present embodiment, when progress ticket version judges, specifically include:For pretreated Ticket Image, difference
Calculate the average value of red color component value of all pixels point in Ticket Image, the average value of yellow color component value and blue color component value
Average value;
By the average value of the average value of the red color component value of Ticket Image, the average value of yellow color component value and blue color component value
The average value and blue color component value of average value, yellow color component value with the red color component value of release criteria image each in judgment models
Average value be compared respectively, select the immediate judgment models of color component in a version, as Ticket Image
Version.
As an example, can Ticket Image be subjected to red color component value with the Ticket Image of version each in judgment models successively
Average value ask poor, yellow color component value average value that difference and the average value of blue color component value is asked to ask poor, by the absolute of three differences
Value is added;If there are two types of versions for ticket, two absolute value sums are obtained, compare the big of the two absolute value sums
Small, the smaller corresponding version of value is the version of the Ticket Image.
Before bill version is prejudged according to the RGB color component of bill images, also need in advance in judgment models
Calculate the average value, the average value of yellow color component value and being averaged for blue color component value of the red color component value of each release criteria image
Value.
The above description is merely a specific embodiment, but protection scope of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can readily occur in change or replacement, should
Cover within the scope of the present invention.
Claims (8)
1. a kind of bill image inversion detection method, which is characterized in that include the following steps:
The bill images of acquisition are pre-processed, make the length and width of bill images and the length and width one of judgment models Plays image
It causes;
Pretreated bill images are equably carried out with region segmentation, and partitioning scheme and standard picture when establishing judgment models
Partitioning scheme it is consistent;Calculate the gray value of each pixel in each region;
For each region in bill images, same section of gray value interval, and selected ash are chosen from 0~255 gray value
Angle value section is with establishing gray value interval selected during judgment models as same section;Each region is calculated respectively in the gray scale
It is worth the gray value average value of all pixels point in section;
The gray value average value of gained is calculated according to each region, determines comparison of each region about gray value average value, it will
The comparison compares with region each in judgment models about the comparison of gray value average value, if two kinds of comparisons
Unanimously, then the direction of bill images is consistent with the direction of judgment models Plays image.
2. method according to claim 1, which is characterized in that further include and establish judgment models, and determine each in judgment models
Comparison of the region about gray value average value, specifically includes following steps:
Multiple equidirectional bill images of acquisition are pre-processed, the length and width of every bill images is made to be equal to bill in itself
Length and width, pretreated bill images are as standard picture;
Region segmentation is equably carried out to every standard picture, and the partitioning scheme of every standard picture is consistent, for every mark
Quasi- image calculates the gray value of each pixel in each region respectively;
For each region of every standard picture, same section of gray value interval, and every mark are chosen from 0~255 gray value
The gray value interval that quasi- image is chosen is consistent;Each region of every standard picture is calculated respectively in the gray value interval
The gray value average value of all pixels point;
For every standard picture, the gray value average value of gained is calculated according to each region, determines that each region is put down about gray value
The comparison of mean value;Comparison of each region about gray value average value in every standard picture is counted, from multiple comparisons
The comparison that proportion maximum is chosen in relationship is closed as comparison of the region each in judgment models about gray value average value
System.
3. method according to claim 1, which is characterized in that the bill images of described pair of acquisition pre-process, specific to wrap
Include bill images size adjusting and Inclination maneuver;
The bill images size adjusting and Inclination maneuver, specially:Plane establishes plane rectangular coordinates where bill images
System;According to formula x=a0+a1u+a2v+a3Uv, y=b0+b1u+b2v+b3Uv, wherein (u, v) represents known in size and inclination angle
Before adjustment in bill images each pixel coordinate, (x, y) represents each pixel in bill images after size and Inclination maneuver
Coordinate, choose four pixels simultaneously set coordinate of four pixels after size and Inclination maneuver, according to described four
The known coordinate before size and Inclination maneuver of a pixel and four pixels set in size and inclination angle tune
Transformation coefficient a is calculated in coordinate after whole0、a1、a2、a3、b0、b1、b2、b3;According to the transformation coefficient obtained, calculate each surplus
Coordinate of the afterimage vegetarian refreshments after size and Inclination maneuver, and then complete the size adjusting and Inclination maneuver of bill images.
4. method according to claim 3, which is characterized in that pretreated bill images are equably carried out with region point
Cut, and when partitioning scheme is with establishing judgment models standard picture partitioning scheme it is consistent;Calculate the ash of each pixel in each region
Angle value;It specifically includes:
Pretreated bill images are divided at least two regions, the area equation shared by each region;And each region
Position of each region in plane right-angle coordinate corresponds in position and judgment models in plane right-angle coordinate;
Each region corresponds to a number, and the number in each region is consistent with the number of corresponding region in judgment models;
Pass through formula
Gray value Gray [i, j], wherein i=1,2,3...W, j=1 are calculated, 2,3...H, W represents total row of pixel in bill images
Number, H represent total columns of pixel in bill images, and Gray [i, j] represents the gray value of pixel [i, j], and R [i, j] is represented
The red color component value of the RGB color of pixel [i, j], G [i, j] represent the pixel [green of the RGB color of i, j
Component value, B [i, j] represent the blue color component value of the RGB color of pixel [i, j].
5. method according to claim 4, which is characterized in that the gray value average value that gained is calculated according to each region,
Comparison of each region about gray value average value is determined, by each region in the comparison and judgment models about gray scale
The comparison of value average value compares, if two kinds of comparisons are consistent, direction and the judgment models Plays of bill images
The direction of image is consistent;Specially:
Compare the gray value average value that each region in bill images calculates gained, put down from maximum or minimum gray value is wherein chosen
Mean value, using the number in region corresponding to maximum or minimum average gray as comparison;
By maximum gradation value average value institute in the number and judgment models in region corresponding to average gray maximum in bill images
The number of corresponding region compares, if two numbers are consistent, the direction of bill images and the direction of judgment models Plays image
Unanimously;
Alternatively, minimum gradation value in the number and judgment models in region corresponding to minimal gray average value in bill images is averaged
The number in region corresponding to value compares, if two numbers are consistent, direction and the judgment models Plays image of bill images
Direction is consistent.
6. method according to claim 4, which is characterized in that the gray value average value that gained is calculated according to each region,
Comparison of each region about gray value average value is determined, by each region in the comparison and judgment models about gray scale
The comparison of value average value compares, if two kinds of comparisons are consistent, direction and the judgment models Plays of bill images
The direction of image is consistent;Specially:
Compare the gray value average value that each region in bill images calculates gained, and each to bill images according to gray value average value
Region is ranked up, using the clooating sequence as comparison;
By each region in the clooating sequence in region each in bill images and judgment models according to the clooating sequence of gray value average value
It compares, if two kinds of clooating sequences are consistent, the direction of bill images is consistent with the direction of judgment models Plays image.
7. method according to claim 1, which is characterized in that before region segmentation is carried out to pretreated bill images,
It further includes and bill version is prejudged according to the RGB color component of bill images, specifically include:
For pretreated bill images, calculate respectively the average value of the red color component value of all pixels point in bill images,
The average value of yellow color component value and the average value of blue color component value;
By the average value of the average value of the red color component value of bill images, the average value of yellow color component value and blue color component value with sentencing
The average value of red color component value of each release criteria image in disconnected model, the average value of yellow color component value and blue color component value it is flat
Mean value is compared respectively, selects a version in the immediate judgment models of color component, the version as bill images.
8. method according to claim 7, which is characterized in that further include and calculate each release criteria figure in judgment models in advance
The step of average value of the average value of the red color component value of picture, the average value of yellow color component value and blue color component value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810044894.2A CN108256475B (en) | 2018-01-17 | 2018-01-17 | Bill image inversion detection method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810044894.2A CN108256475B (en) | 2018-01-17 | 2018-01-17 | Bill image inversion detection method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108256475A true CN108256475A (en) | 2018-07-06 |
CN108256475B CN108256475B (en) | 2021-05-11 |
Family
ID=62741444
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810044894.2A Active CN108256475B (en) | 2018-01-17 | 2018-01-17 | Bill image inversion detection method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108256475B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109447067A (en) * | 2018-10-24 | 2019-03-08 | 北方民族大学 | A kind of bill angle detecting antidote and automatic ticket checking system |
CN114445467A (en) * | 2021-12-21 | 2022-05-06 | 贵州大学 | Specific target identification and tracking system of quad-rotor unmanned aerial vehicle based on vision |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102419817A (en) * | 2010-09-27 | 2012-04-18 | 贵州黔驰电力信息技术有限公司 | Automatic document scanning, analyzing and processing system based on intelligent image identification |
US20120113489A1 (en) * | 2010-11-05 | 2012-05-10 | Rdm Corporation | System for mobile image capture and processing of financial documents |
CN106530483A (en) * | 2016-11-10 | 2017-03-22 | 深圳怡化电脑股份有限公司 | Banknote face direction identification method and device |
-
2018
- 2018-01-17 CN CN201810044894.2A patent/CN108256475B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102419817A (en) * | 2010-09-27 | 2012-04-18 | 贵州黔驰电力信息技术有限公司 | Automatic document scanning, analyzing and processing system based on intelligent image identification |
US20120113489A1 (en) * | 2010-11-05 | 2012-05-10 | Rdm Corporation | System for mobile image capture and processing of financial documents |
CN106530483A (en) * | 2016-11-10 | 2017-03-22 | 深圳怡化电脑股份有限公司 | Banknote face direction identification method and device |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109447067A (en) * | 2018-10-24 | 2019-03-08 | 北方民族大学 | A kind of bill angle detecting antidote and automatic ticket checking system |
CN109447067B (en) * | 2018-10-24 | 2021-07-20 | 北方民族大学 | Bill direction detection and correction method and automatic bill checking system |
CN114445467A (en) * | 2021-12-21 | 2022-05-06 | 贵州大学 | Specific target identification and tracking system of quad-rotor unmanned aerial vehicle based on vision |
Also Published As
Publication number | Publication date |
---|---|
CN108256475B (en) | 2021-05-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105631880B (en) | Lane line dividing method and device | |
CN108537782B (en) | Building image matching and fusing method based on contour extraction | |
DE102009036474B4 (en) | Image data compression method, pattern model positioning method in image processing, image processing apparatus, image processing program and computer-readable recording medium | |
CN104850850B (en) | A kind of binocular stereo vision image characteristic extracting method of combination shape and color | |
US20150326845A1 (en) | Depth value restoration method and system | |
CN105868745B (en) | Weather recognition methods based on dynamic scene perception | |
US6466211B1 (en) | Data visualization apparatuses, computer-readable mediums, computer data signals embodied in a transmission medium, data visualization methods, and digital computer data visualization methods | |
CN106447020B (en) | A kind of intelligence method for counting colonies | |
CN104008542B (en) | A kind of Fast Corner matching process for specific plane figure | |
CN107392929A (en) | A kind of intelligent target detection and dimension measurement method based on human vision model | |
CN106295491B (en) | Lane line detection method and device | |
US20120189190A1 (en) | Automatic detection and grouping of straight lines in images for personalization | |
CN107729794A (en) | Flame detecting method, flame detecting device and electronic equipment | |
CN109961013A (en) | Recognition methods, device, equipment and the computer readable storage medium of lane line | |
CN109242834A (en) | It is a kind of based on convolutional neural networks without reference stereo image quality evaluation method | |
CN104751407A (en) | Method and device used for blurring image | |
CN110533686A (en) | Line-scan digital camera line frequency and the whether matched judgment method of speed of moving body and system | |
CN105068918B (en) | A kind of page method of testing and device | |
CN108256475A (en) | A kind of bill image inversion detection method | |
CN104599288A (en) | Skin color template based feature tracking method and device | |
CN106156691A (en) | The processing method of complex background image and device thereof | |
CN105354570B (en) | A kind of pinpoint method and system of license plate right boundary | |
CN109858484B (en) | Multi-class transformation license plate correction method based on deflection evaluation | |
CN105740867B (en) | The selection method of image texture window shape and scale | |
CN110415223A (en) | A kind of the stitching image quality evaluating method and system of no reference |
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 |