CN107194389A - Bianry image bearing calibration based on morphology and cancellated structure - Google Patents

Bianry image bearing calibration based on morphology and cancellated structure Download PDF

Info

Publication number
CN107194389A
CN107194389A CN201710302995.0A CN201710302995A CN107194389A CN 107194389 A CN107194389 A CN 107194389A CN 201710302995 A CN201710302995 A CN 201710302995A CN 107194389 A CN107194389 A CN 107194389A
Authority
CN
China
Prior art keywords
image
frame
horizontal
vertical
grid
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
Application number
CN201710302995.0A
Other languages
Chinese (zh)
Other versions
CN107194389B (en
Inventor
颜臻杰
彭飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan University
Original Assignee
Hunan University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hunan University filed Critical Hunan University
Priority to CN201710302995.0A priority Critical patent/CN107194389B/en
Publication of CN107194389A publication Critical patent/CN107194389A/en
Application granted granted Critical
Publication of CN107194389B publication Critical patent/CN107194389B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/98Detection or correction of errors, e.g. by rescanning the pattern or by human intervention; Evaluation of the quality of the acquired patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns

Abstract

Present example, based on the bianry image bearing calibration for carrying frame, is digitized applied to paper image and reduced there is provided a kind of.This method for correcting image, including:By image scanning to be corrected into gray-scale map, then with an empirical value by its binaryzation;Is carried out by morphological dilations, filter and opens operation processing for the image of binaryzation, four, upper and lower, left and right frame equation is then fitted;Correction chart is set using one, print scanned processing is carried out, for generating vertical and horizontal-shift coefficient table.According to the frame equation of image to be corrected and vertical, horizontal-shift coefficient table construction grid, the ratio counted out finally according to monochrome pixels in each grid determines the value after the reduction of correspondence position pixel.Using this method, print scanned rotation, scaling and the nonhomogeneous deformation distortion come to picture strip is can effectively solve the problem that, the image and artwork difference after correction are smaller, and reduction effect is preferable.

Description

Bianry image bearing calibration based on morphology and cancellated structure
Technical field
The present invention relates to technical field of image processing, more particularly to a kind of method for correcting image for carrying frame.
Background technology
Papery data is usually used in carrying important information as the main media of daily exchange.And in the version to papery data Usually require to be digitized papery data reduction in power certification, and reduction required precision is higher.
, it is necessary to be first scanned to it in the digitlization reduction process of drawing, geometry inevitably occurs for the process Distortion, such as rotation, scaling, nonhomogeneous deformation.And in existing method for correcting image, majority needs the calculating of large amount of complex, The inclination angle of ability detection image solves rotation distortion, the method for such as Hough transform, the method based on Fourier conversion and base In the method for crossing dependency.Also method adds anchor point in the picture, by calculating the position of each in scan image pixel Relation correction chart picture between point and anchor point.But the above method is all difficult to reach required precision.This method for correcting image is not Any label information need to be added on image, it is adaptable to the occasion higher to image restoring required precision.
The content of the invention
The present invention proposes a kind of method for correcting image, it is desirable to which picture material carries frame, and correction for reduction precision height can be with Reach Pixel-level, it is adaptable to the digitlization reduction process in papery data copyright protection.
Bianry image bearing calibration based on cancellated structure, methods described includes:
(1) by image scanning to be corrected into gray-scale map, then by Binary Sketch of Grey Scale Image, it is fitted its frame equation.
(2) a print scanned correction chart, for generating vertical and horizontal-shift coefficient table.
(3) grid is constructed according to the frame equation of image to be corrected and vertical, horizontal-shift coefficient table.
(4) suitable threshold value is selected by gray-scale map binaryzation, the number of monochrome pixels in each grid to be counted, with true again After fixed reduction in image relevant position pixel value.
It is an empirical value by the threshold value selection of Binary Sketch of Grey Scale Image in step (1), can when seal ring thickness is smaller Threshold value is slightly tuned up.
In step (1), frame equation is fitted, it is necessary first to image is subjected to expansion process, it is ensured that frame is continuous;It is then sharp Morphology holes filling is used, hole maximum in image is found, retains content therein, the outer noise of frame is filtered out in order to avoid disturbing Frame is fitted;Finally traversal obtains object pixel point set, and frame equation is gone out with least square fitting.
In step (2), vertical and horizontal-shift coefficient table is generated, including:
(a) after correction chart is printed, binary map is scanned into, its frame equation is fitted;
(b) fit the lateral symmetry axle of all horizontal stripe rectangles in correct scan figure, obtain each lateral symmetry axle with The intersection point of left and right side frame, calculating obtains offset of vertical coefficient table;
(c) horizontal gridlines is generated by the frame equation of offset of vertical coefficient table and correct scan figure in the figure;
(d) the vertical symmetry axis of vertical bar rectangles all in correct scan figure is fitted, each vertical symmetry axis is obtained With the intersection point of each horizontal gridlines, calculating obtains horizontal-shift coefficient table.
According to the frame equation of image to be corrected and vertical, horizontal-shift coefficient table construction grid, each grid is calculated The ratio that middle monochrome pixels are counted out, to determine the value of relevant position pixel, now image to be corrected need to select threshold again It is worth binaryzation.
Constructed in image to be corrected after grid, Binary Sketch of Grey Scale Image is needed to carry out different threshold values exhaustive, system Black, white pixel the number of t+1 layers of image outermost after meter correction, selects monochrome pixels ratio closest to t:1 binary-state threshold As final threshold value, wherein t is original image seal ring thickness.
The present invention proposes a kind of method for correcting image, and the print scanned rotation brought and scaling are solved using grid is constructed Distortion, generates vertical, horizontal-shift coefficient table using correction chart and solves nonhomogeneous deformation distortion.
Brief description of the drawings
Fig. 1 is this bearing calibration flow chart
Fig. 2 is Morphological scale-space design sketch
Fig. 3 is horizontal frame fitting and residual plot
Fig. 4 is longitudinal frame fitting and residual plot
Fig. 5 is correction chart sample
Embodiment
Image rectification entire flow is as follows:
Step 1:Printing correction chart, which is calculated, obtains offset of vertical coefficient table and horizontal-shift coefficient table.
Step 2:By drawing scanning to be corrected into gray-scale map, then by its binaryzation, its frame equation is fitted, wherein on Lower frame fitting a straight line, left and right side frame is fitted with biquadratic curve.
Step 3:Calculated according to offset of vertical coefficient table and figure frame equation to be corrected and obtain horizontal gridlines Lineh
Step 4:According to LinehAnd horizontal-shift coefficient table calculates and obtains each grid element center point coordinates.
Step 5:Select suitable threshold value again by gray-scale map binaryzation.
Step 6:Grid is built according to grid element center point coordinates, the ratio that monochrome pixels are counted out inside each grid is calculated To determine the value after the reduction of correspondence position pixel, the image after being corrected is reduced.
By image scanning to be corrected into gray-scale map, selection empirical value is by its binaryzation, for being fitted frame equation.Follow-up Also need to reselect threshold value in correction for reduction by its binaryzation.
Frame is fitted, by taking the fitting of upper side frame as an example:
(a) morphological dilations and filtering process are carried out to the image M that scanning is obtained, obtains figure M '.
(b) open operation by morphology first to filter out the pixel band of vertical direction, then to each row from top to bottom time Go through, obtain the head and the tail coordinate of first continuous black picture element sequence in each row, try to achieve intermediate position coordinate, obtain sampled point Collection.
(c) to the sampling point set tried to achieve, it is fitted with least square method, so as to obtain frame multinomial gu
Similarly, can fit down, left and right frame multinomial gd、gl、gr.Wherein upper and lower side frame can use fitting a straight line such as Fig. 3, Left and right side frame biquadratic curve fitting such as Fig. 4.
Correction chart is set, and such as Fig. 5 shows.Correction chart size and location are consistent with image artwork to be corrected, horizontal frame And longitudinal frame is respectively W, H pixels, seal ring thickness is t (being defaulted as odd number).Flash trimming outer frame has n in figure1Individual thickness is t The horizontal stripe rectangle of (consistent with frame), n2Individual thickness is t vertical bar rectangles, and each two horizontal stripe rectangle is separated by k1Pixel, upper side frame and One horizontal stripe rectangle and lower frame are separated by k respectively with last horizontal stripe rectangle1、m1Pixel.Each two vertical bar rectangle is separated by k3Picture Element, left frame and first vertical bar rectangle and left frame are separated by k respectively with last vertical bar rectangle3、m3Pixel.
Lateral symmetry axle using upper side frame is x-axis, and the vertical symmetry axis of left frame sets up coordinate system for y-axis.If k2=k1+ t、m2=m1+t.Then lateral symmetry axle (hereinafter lateral symmetry axle) equation of i-th of horizontal stripe rectangle is y=k2× i, below The lateral symmetry paraxial equation of frame is y=n1×k2+m2.If k4=k3+t、m4=m3+t.Then j-th vertical bar rectangle is vertical symmetrical Axle (hereinafter vertical symmetry axis) equation is x=k4× j, the vertical symmetrical paraxial equation of left frame is x=n2×k4+m4
By correction chart after print scanned, frame equation is first fitted, four summits upper left p is tried to achievelu(xlu,ylu)、 Upper right pru(xru,yru), lower-left pld(xld,yld), bottom right prd(xrd,yrd) coordinate.Then fit all lateral symmetry in figure Axle, obtains fitting a straight line collectionAnd try to achieveIn all straight lines and left and right side frame gl、grIntersection point it is vertical Coordinate set:Its Middle function intersectY (g, l) tries to achieve two straight lines (curve) intersection point and returns to its Y-coordinate.
Generate offset of vertical coefficient table ratiol(rl,y|0≤y≤h-t)、ratior(rr,y| 0≤y≤h-t), with ratiol Calculating exemplified by, can similarly obtain ratior
When y be between the i-th -1 lateral symmetry axle and i-th lateral symmetry axle, i.e. (i-1) × k2≤y≤i×k2(1 ≤i≤n1) when, when i takes 1, i.e. y is between x-axis and first lateral symmetry axle.
When y is in n-th1Between the lateral symmetry axle of bar and the lateral symmetry axle of lower frame, i.e. n1×k2≤y≤n1×k2+m2When.
WhereinI-th lateral symmetry axle is represented with left frame intersection point in line segment plupldIn relative position beAnd the offset of vertical coefficient value between two lateral symmetry axles is tried to achieve in the way of local decile.
Generate horizontal gridlines Lineh, exemplified by constructing grid lines in correct scan figure, for generating horizontal-shift system Number table, step is as follows:
I. ratio is passed throughl、ratiorAnd the frame equation of correct scan figure, calculate point set Pl'={ p 'l,i(x′l,i, y′l,i)|0≤i≤H-t}、Pr'={ p 'r,i(x′r,i,y′r,i)|0≤i≤H-t}。p′l,iY-coordinate y 'l,iPublic affairs are calculated such as formula (3), it is taken in the fit equation of left frame (4).X coordinate x ' can be tried to achievel,i
y′l,i=(yld-ylu)×rl,y (3)
X=a × y4+b×y3+c×y2+d×y+e (4)
Ii. P is similarly calculatedr′。Pl′、Pr' middle summit is corresponded, and calculates horizontal gridlines collection
Correction chart is print scanned, wherein after tectonic level grid lines, with institute in the biquadratic curve equation model figure There is vertical symmetry axis to obtain matched curve collectionWillIn biquadratic curve and LinehCathetus intersects two-by-two tries to achieve it The abscissa collection of intersection pointWherein function intersectX (g, l) tries to achieve two straight lines (curve) intersection point and returns to its X-coordinate.
Offset of vertical coefficient table ratioh={ rh,i,x| 0≤i≤H-t, 0≤x≤W-t } be calculated as follows:
When x be between the vertical symmetry axis of jth -1 and the vertical symmetry axis of j-th strip, i.e. (j-1) × k4≤y≤j×k4(1 ≤j≤n2) when.When j takes 1, x is located between y-axis and first vertical symmetry axis.
Work as n2×k4≤x≤n2×k4+m4That is x is in n-th2Between the vertical symmetry axis of bar and the vertical symmetry axis of left frame.
Grid is constructed using deviation ratio:
For image to be corrected, first it is scanned into gray-scale map and selects empirical value by its binaryzation, be fitted its frame equation. According to frame equation and ratiol、ratiorCalculate point set Pl'={ (x 'l,i,y′l,i)|0≤i≤H-t}、Pr'={ (x 'r,i, y′r,i) | 0≤i≤H-t }, then tectonic level grid lines in the figure
Structural matrix C={ pc(i, j) | 0≤i≤H-t, 0≤j≤W-t }, pc(i, j) is grid element center point coordinates.It is horizontal Coordinate xc(i, j) calculation formula such as formula (7).Formula (8) is horizontal gridlines lh,iLinear equation, by xc(i, j) is substituted into and can asked Obtain yc(i,j):
xc(i, j)=x 'l,i+(x′r,i-x′l,i)×rh,i,j (7)
Y=ki×x+bi (8)
Construct binary map G={ Gi,j| 0≤i≤H-t, 0≤j≤W-t }, wherein G (i, j) value is depended on pc(i,j) Centered on, a length of (min (xru-xlu,xrd-xld))/(W-t), a width of (min (yld-ylu,yrd-yru)) black in the/rectangle of (H-t) The ratio that white pixel is counted out, wherein min (a, b) are to take smaller value function.The last outer layer in binary map G is plus thicknessFrame complete correction.
Gray scale turns two-value threshold selection:
After the completion of grid structure, exhaustive, the image outermost t that correction for reduction is obtained need to be carried out to different binary-state thresholds Layer should be frame i.e. black picture element, and t+1 layers should be white pixel.Count t+1 layers of monochrome pixels of image outermost after recovering Sum, selects monochrome pixels ratio closest to t:1 binary-state threshold is used as final threshold value.
Present invention is mainly applied to the situation higher to image restoring required precision, the digital watermarking of papery data is such as directed to Correlation detection of extraction, scan image and original image etc..This method need not add any positioning sign, and every operation all may be used It is automatically performed, without human assistance.
It the foregoing is only the case study on implementation of the present invention, every content without departing from technical solution of the present invention, according to this hair Bright technical spirit still falls within the technology of the present invention to any simple modifications, equivalents, and modifications made for any of the above embodiments In the range of scheme protection.

Claims (9)

1. the bianry image bearing calibration based on morphology and cancellated structure, it is characterised in that methods described includes:
A. by image scanning to be corrected into gray-scale map, empirical value is selected by its binaryzation;
B. framing mask equation is gone out using least square fitting;
C. by printing a correction chart set, vertical and horizontal-shift coefficient table is generated;
D. suitable threshold value is selected by gray-scale map binaryzation, to utilize framing mask equation to be corrected and vertical, horizontal-shift again Coefficient table constructs grid, and taking after the reduction of correspondence position pixel is determined according to the ratio that monochrome pixels are counted out in each grid Value.
2. according to the method described in claim 1, it is characterised in that the step A, the empirical value of selection 128 to 150 it Between.
3. according to the method described in claim 1, it is characterised in that the step B, including:
B1. image is subjected to morphological dilations processing, it is ensured that frame is continuously uninterrupted;
B2. morphology holes filling is utilized, hole maximum in image is found, retains content therein, filters out external noise Interference;
B3. operation is opened using morphology, the connection between horizontal frame and longitudinal frame is disconnected, from four, upper and lower, left and right side Object pixel point set is collected to traversal, frame equation is fitted.
4. according to the method described in claim 1, it is characterised in that the generation offset of vertical coefficient table, including:
Correction chart is print scanned, fit in its scan image frame equation and figure the lateral symmetry of each horizontal stripe rectangle Axle;The intersection point of each lateral symmetry axle and left and right side frame is tried to achieve, phase of each intersection point in left and right side frame respectively is calculated To position, offset of vertical coefficient table is generated.
5. according to the method described in claim 1, it is characterised in that the generation horizontal-shift coefficient table, including:
Using the frame equation and offset of vertical coefficient table of correct scan figure, horizontal gridlines is generated;Fitted with biquadratic curve The vertical symmetry axis of each vertical bar rectangle in correct scan figure, tries to achieve each vertical symmetry axis and each horizontal gridlines Intersection point, calculating obtain horizontal-shift coefficient table.
6. according to the method described in claim 1, it is characterised in that described to select suitable threshold value by Binary Sketch of Grey Scale Image, Including:
Different binary-state threshold is carried out exhaustive, t+1 layer of image outermost after statistical correction is black, white pixel point number, selects Monochrome pixels ratio is selected closest to t:1 binary-state threshold is as the threshold value of final binaryzation, and wherein t is that original image frame is thick Degree.
7. according to the method described in claim 1, it is characterised in that the construction grid, including:
According to framing mask equation to be corrected and vertical, horizontal-shift coefficient table, the central point seat for obtaining each grid is calculated Mark;The number of monochrome pixels point in the size of grid, statistics grid is determined, it is determined that going back taking for the position of this in original image pixel Value.
8. method according to claim 3, it is characterised in that upper and lower side frame uses four with a fitting a straight line, left and right side frame Secondary curve matching.
9. method according to claim 7, it is characterised in that the calculating of the sizing grid, including:
By frame equation simultaneous two-by-two, upper left p is tried to achievelu, upper right pru, lower-left pld, bottom right prdFour end points, the length of grid takesThe height of grid takesWherein W, H represent the width of original image frame respectively And highly, min (a, b) is represented and is taken smaller value function.
CN201710302995.0A 2017-05-03 2017-05-03 Binary image correction method based on morphology and grid structure Active CN107194389B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710302995.0A CN107194389B (en) 2017-05-03 2017-05-03 Binary image correction method based on morphology and grid structure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710302995.0A CN107194389B (en) 2017-05-03 2017-05-03 Binary image correction method based on morphology and grid structure

Publications (2)

Publication Number Publication Date
CN107194389A true CN107194389A (en) 2017-09-22
CN107194389B CN107194389B (en) 2020-07-24

Family

ID=59873993

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710302995.0A Active CN107194389B (en) 2017-05-03 2017-05-03 Binary image correction method based on morphology and grid structure

Country Status (1)

Country Link
CN (1) CN107194389B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110992286A (en) * 2019-12-03 2020-04-10 河海大学常州校区 Photovoltaic module image correction method based on CCD camera

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102254171A (en) * 2011-07-13 2011-11-23 北京大学 Method for correcting Chinese document image distortion based on text boundaries
CN104008359A (en) * 2014-04-18 2014-08-27 杭州晟元芯片技术有限公司 Accurate grid sampling method used for recognizing QR code
CN104597056A (en) * 2015-02-06 2015-05-06 北京中科纳新印刷技术有限公司 Method for detecting ink-jet printing ink dot positioning accuracy

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102254171A (en) * 2011-07-13 2011-11-23 北京大学 Method for correcting Chinese document image distortion based on text boundaries
CN104008359A (en) * 2014-04-18 2014-08-27 杭州晟元芯片技术有限公司 Accurate grid sampling method used for recognizing QR code
CN104597056A (en) * 2015-02-06 2015-05-06 北京中科纳新印刷技术有限公司 Method for detecting ink-jet printing ink dot positioning accuracy

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘宾武: "畸变图像校正系统及其工程应用", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110992286A (en) * 2019-12-03 2020-04-10 河海大学常州校区 Photovoltaic module image correction method based on CCD camera

Also Published As

Publication number Publication date
CN107194389B (en) 2020-07-24

Similar Documents

Publication Publication Date Title
US9665759B2 (en) Decoding method for matrix two-dimensional code
US20170293992A1 (en) Image code for processing information and device and method for generating and parsing same
US10769758B2 (en) Resolving method and system based on deep learning
CN108921158A (en) Method for correcting image, device and computer readable storage medium
CN106384094A (en) Chinese word stock automatic generation method based on writing style modeling
CN107895345A (en) A kind of method and apparatus for improving facial image resolution ratio
CN103839058A (en) Information locating method for document image based on standard template
CN102930268A (en) Accurate positioning method for data matrix code under pollution and multi-view situation
WO2015096462A1 (en) Method and system for focused display of 2-dimensional bar code
CN101527043B (en) Video picture segmentation method based on moving target outline information
CN108416292A (en) A kind of unmanned plane image method for extracting roads based on deep learning
WO2019056346A1 (en) Method and device for correcting tilted text image using expansion method
CN108133216A (en) The charactron Recognition of Reading method that achievable decimal point based on machine vision is read
CN110059769A (en) The semantic segmentation method and system rebuild are reset based on pixel for what streetscape understood
CN106778739A (en) A kind of curving transmogrified text page-images antidote
CN106709952B (en) A kind of automatic calibration method of display screen
CN103984963A (en) Method for classifying high-resolution remote sensing image scenes
CN105608689A (en) Method and device for eliminating image feature mismatching for panoramic stitching
CN108898609A (en) A kind of method for detecting image edge, detection device and computer storage medium
CN107194389A (en) Bianry image bearing calibration based on morphology and cancellated structure
CN104376544B (en) Non-local super-resolution reconstruction method based on multi-region dimension zooming compensation
CN109389085B (en) Lip language recognition model training method and device based on parameterized curve
Nascimento et al. Super-resolution of license plate images using attention modules and sub-pixel convolution layers
CN108335266B (en) Method for correcting document image distortion
CN112241695A (en) Method for recognizing portrait without safety helmet and with face recognition function

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