CN105139363A - Document image binding hole automatic restoration method and system - Google Patents

Document image binding hole automatic restoration method and system Download PDF

Info

Publication number
CN105139363A
CN105139363A CN201510651924.2A CN201510651924A CN105139363A CN 105139363 A CN105139363 A CN 105139363A CN 201510651924 A CN201510651924 A CN 201510651924A CN 105139363 A CN105139363 A CN 105139363A
Authority
CN
China
Prior art keywords
hole
module
file
initialization
binding hole
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
CN201510651924.2A
Other languages
Chinese (zh)
Other versions
CN105139363B (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.)
Shanghai Xinlian Information Development Co., Ltd
Original Assignee
SHANGHAI ZHONGXIN INFORMATION DEVELOPMENT Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHANGHAI ZHONGXIN INFORMATION DEVELOPMENT Co Ltd filed Critical SHANGHAI ZHONGXIN INFORMATION DEVELOPMENT Co Ltd
Priority to CN201510651924.2A priority Critical patent/CN105139363B/en
Publication of CN105139363A publication Critical patent/CN105139363A/en
Application granted granted Critical
Publication of CN105139363B publication Critical patent/CN105139363B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Color Image Communication Systems (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Manufacture Or Reproduction Of Printing Formes (AREA)
  • Cosmetics (AREA)

Abstract

The invention discloses a document image binding hole automatic restoration method and system. The system comprises a hole positioning module, a ranking module, a color-taking module, an initialization module, a setting module and a restoration module. The hole positioning module obtains hole information, wherein the hole information comprises circle center coordinates and radiuses of holes; the ranking module ranks all hole information according to the sequence from the outermost edge of document pages to the inner edge gradually; the color-taking module calculates initial color-taking value of each hole; the initialization module initializes areas to be restored with the color-taking values in a reversed-order manner; the setting module enlarges mask control radius; and the restoration module restores the control area by utilizing a BSCB algorithm and finishes restoration when according with the judging conditions. The document image binding hole automatic restoration method and system can support both black and white scanning and color scanning document images, and greatly improve the final restoration effect.

Description

The self-repairing method of file and picture binding hole and system
Technical field
The present invention relates to image repair method and system, more particularly, relate to a kind of self-repairing method and system of file and picture binding hole.
Background technology
Prior art CN102117481A employs according to the feature such as isophot curve and degree of confidence, partial differential iteration repairs the method in region to be filled, because the application direction of this patent be process large area and the irregular breakage in edge as the reparation of Tang's tomb mural painting, first determining area to be repaired to need man-machine interactively determine, next step is the priority of the color lump being starting point calculating filling leading edge according to pixel on edge line, thus successively advances renewal priority.The application direction of this patent is the pixel value in order to go out disappearance according to broken edges pixel " reckoning ", if binding hole edge aberration can be diffused into whole area to be repaired on the contrary in this way, therefore the improper reference that differs greatly.
Although prior art CN102034228B is also the reparation for binding hole, but the location first for binding hole needs manually to demarcate masterplate, secondly image block minimum for adjacent for area to be repaired eight region internal variances is filled and reached repairing object, although algorithm is simple but effect is stiff unnatural, repairing mark when changing appears in district's backcolor is repaired for file and picture obviously visible, relatively be applicable to the consistent occasion history archive image of backcolor because of of the remote past, paper distortion gauffer, it is smoothly discontinuous that the file and picture such as to go mouldy repairs district's backcolor distribution, the inapplicable repairing effect as history archive image of visible the method.
Summary of the invention
For the problem that the document repairing effect existed in prior art is not good, the object of this invention is to provide a kind of self-repairing method and system of file and picture binding hole.
For achieving the above object, the present invention adopts following technical scheme:
A self-repairing method for file and picture binding hole, comprises the following steps: step 1, and obtain hole information, hole information comprises central coordinate of circle and the radius of hole; Step 2, arranges all hole information according to the order inside gradually from file page outer most edge; Step 3, colour is got in the initialization calculating each hole; Step 4, backward is with getting colour initialization area to be repaired; Step 5, expands mask Control Radius; Step 6, uses BSCB algorithm to repair control area; Step 7, when meeting decision condition, completes reparation.
According to one embodiment of the invention, step 2 comprises further: if page two ends place exists doubtful hole information, then delete doubtful hole information.
According to one embodiment of the invention, step 5 comprises further: the width mask edge generated for each circle during acquisition hole information being expanded 7 pixels, expands and control restoring area.
According to one embodiment of the invention, step 6 comprises further: use BSCB algorithm from the boundary line of mask control area, every two pixels are that step-length carries out partial differential iteration to center.
According to one embodiment of the invention, step 7 comprises further: decision condition is be less than Laplce's evaluation factors with the forward difference of all pixels in isophot curve vertical direction and backward difference value.
For achieving the above object, the present invention also adopts following technical scheme:
An automatic repair system for file and picture binding hole, comprise hole locating module, order module, get look module, initialization module, arrange module, repair module.Hole locating module obtains hole information, and hole information comprises central coordinate of circle and the radius of hole; All hole information arranges according to the order inside gradually from file page outer most edge by order module; Get the initialization that look module calculates each hole and get colour; Initialization module backward is with getting colour initialization area to be repaired; Module is set and expands mask Control Radius; Repairing module uses BSCB algorithm to repair control area, and when meeting specified conditions, completes reparation.
According to one embodiment of the invention, if page two ends place exists doubtful hole information, then order module deletes doubtful hole information.
According to one embodiment of the invention, the width that the mask edge generated is expanded 7 pixels by module is set, expands and control restoring area during acquisition hole information for each circle.
According to one embodiment of the invention, repair module and use BSCB algorithm from the boundary line of mask control area, every two pixels are that step-length carries out partial differential iteration to center.
According to one embodiment of the invention, decision condition is: be less than Laplce's evaluation factors with the forward difference of pixels all in isophot curve vertical direction and backward difference value.
In technique scheme, the self-repairing method of file and picture binding hole of the present invention and system not only support black and white scan and also can support chromoscan file and picture, drastically increase the final effect of reparation.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of the self-repairing method of file and picture binding hole of the present invention.
Embodiment
Technical scheme of the present invention is further illustrated below in conjunction with drawings and Examples.
The present invention is based upon in the characteristic of paper document hole, and such as image is all high definition pixel and preserves, therefore the area image noise of binding hole periphery clearly, and binding hole void shape is various, and hole edge place is the pixel chromaticity region of undergoing mutation often.The object of binding hole reparation by perforated " floating ", to be close to the same with the area pixel value that surrounding is not punched.
Therefore, with reference to Fig. 1, the present invention discloses a kind of automatic repair system of file and picture binding hole and the method for correspondence thereof.System of the present invention mainly comprises hole locating module, order module, gets look module, initialization module, arrange module, repair module.Further describe the function of above-mentioned modules and the method step of execution thereof below.
As shown in Figure 1, the method performed by above-mentioned modules can be divided into 7 key steps.
S1: hole locating module obtains hole information, and hole information comprises central coordinate of circle and the radius of hole.
S2: all hole information arranges according to the order inside gradually from file page outer most edge by order module.
Further, if page two ends place exists doubtful hole information, then order module deletes doubtful hole information.This step is the characteristic specialized designs according to history archive, and bookbinding hole can occur after margin edge.S3: get the initialization that look module calculates each hole and get colour.Specifically, extract the pixel value on external foursquare four summits of each circle by the storage order of previous step, the random value between the value of getting these four points is as getting colour.
S4: initialization module backward is with getting colour initialization area to be repaired.Specifically, one by one the value of color taking point is inserted circular hole region according to the opposite sequence of storing before, as the initialization of repairing.This step is the characteristic specialized designs according to history archive, and the color of such as paper is darker the closer to edge, may have the vestige repeatedly punched, so need to arrange according to the order of color gradient, is equivalent to from shallow to deep successively initialization area to be repaired like this.
S5: module is set and expands mask Control Radius.
The mask edge generated for each circle during acquisition hole information by step 1 expands the width of 7 pixels (this width slightly can be done to change depending on different document), expands and controls restoring area.Guarantee is set like this and normal for circular hole periphery pixel value iteration can be entered area to be repaired.
S6: repair module and use BSCB algorithm to repair control area, namely use BSCB algorithm from the boundary line of mask control area, every two pixels are that step-length carries out partial differential iteration to center.
S7: when meeting decision condition, completes reparation.In this step, decision condition is: be less than Laplce's evaluation factors with the forward difference of pixels all in isophot curve vertical direction and backward difference value, now, and iteration stopping.
In sum, the present invention identifies hole location and radius first automatically, colour is got in the initialization that (this is the step of CN102034228B) secondly calculates each circle, backward fills fourth contact to be repaired one by one with getting colour, expand mask Control Radius, then use BSCB algorithm to repair area to be repaired until meet end condition to stop iteration.The present invention not only support black and white scan and also can support chromoscan file and picture, have employed successively initialized method in image repair link, more natural to the edge treated of binding hole, drastically increase the final effect of reparation.Those of ordinary skill in the art will be appreciated that, above embodiment is only used to the present invention is described, and be not used as limitation of the invention, as long as in spirit of the present invention, all will drop in Claims scope of the present invention the change of the above embodiment, modification.

Claims (10)

1. a self-repairing method for file and picture binding hole, is characterized in that, comprises the following steps:
Step 1, obtain hole information, described hole information comprises central coordinate of circle and the radius of hole;
Step 2, arranges all hole information according to the order inside gradually from file page outer most edge;
Step 3, colour is got in the initialization calculating each hole;
Step 4, backward with described in get colour initialization area to be repaired;
Step 5, expands mask Control Radius;
Step 6, uses BSCB algorithm to repair control area;
Step 7, when meeting specified conditions, completes reparation.
2. the self-repairing method of file and picture binding hole as claimed in claim 1, it is characterized in that, step 2 comprises further: if page two ends place exists doubtful hole information, then delete described doubtful hole information.
3. the self-repairing method of file and picture binding hole as claimed in claim 1, it is characterized in that, step 5 comprises further: the width mask edge generated for each circle during acquisition hole information being expanded 7 pixels, expands and control restoring area.
4. the self-repairing method of file and picture binding hole as claimed in claim 1, it is characterized in that, described step 6 comprises further: use BSCB algorithm from the boundary line that mask control area is corresponding, every two pixels are that step-length carries out partial differential iteration to center.
5. the self-repairing method of file and picture binding hole as claimed in claim 1, it is characterized in that, described step 7 comprises further: described specified conditions are be less than Laplce's evaluation factors with the forward difference of all pixels in isophot curve vertical direction and backward difference value.
6. an automatic repair system for file and picture binding hole, is characterized in that, comprising:
Hole locating module, order module, get look module, initialization module, module is set, repair module;
Described hole locating module obtains hole information, and described hole information comprises central coordinate of circle and the radius of hole; All hole information arranges according to the order inside gradually from file page outer most edge by described order module; Describedly get the initialization that look module calculates each hole and get colour; Described initialization module backward with described in get colour initialization area to be repaired; The described module that arranges expands mask Control Radius; Described reparation module uses BSCB algorithm to repair control area, and when meeting specified conditions, completes reparation.
7. the automatic repair system of file and picture binding hole as claimed in claim 6, is characterized in that, if page two ends place exists doubtful hole information, then order module deletes described doubtful hole information.
8. the automatic repair system of file and picture binding hole as claimed in claim 6, is characterized in that, arranges the width that the mask edge generated for each circle during acquisition hole information is expanded 7 pixels by module, expands and control restoring area.
9. the automatic repair system of file and picture binding hole as claimed in claim 6, is characterized in that, repair module and use BSCB algorithm from the boundary line of mask control area, every two pixels are that step-length carries out partial differential iteration to center.
10. the automatic repair system of file and picture binding hole as claimed in claim 6, it is characterized in that, described decision condition is: be less than Laplce's evaluation factors with the forward difference of pixels all in isophot curve vertical direction and backward difference value.
CN201510651924.2A 2015-10-10 2015-10-10 The self-repairing method and system of file and picture binding hole Active CN105139363B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510651924.2A CN105139363B (en) 2015-10-10 2015-10-10 The self-repairing method and system of file and picture binding hole

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510651924.2A CN105139363B (en) 2015-10-10 2015-10-10 The self-repairing method and system of file and picture binding hole

Publications (2)

Publication Number Publication Date
CN105139363A true CN105139363A (en) 2015-12-09
CN105139363B CN105139363B (en) 2018-02-27

Family

ID=54724696

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510651924.2A Active CN105139363B (en) 2015-10-10 2015-10-10 The self-repairing method and system of file and picture binding hole

Country Status (1)

Country Link
CN (1) CN105139363B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111145305A (en) * 2019-12-04 2020-05-12 宁波华高信息科技有限公司 Document image processing method

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04265070A (en) * 1991-02-20 1992-09-21 Pfu Ltd White level correcting method for image reader
US5383754A (en) * 1992-02-27 1995-01-24 Ricoh Company, Ltd. Image forming apparatus having an image orientation identifying device and a binding device
US5448376A (en) * 1991-01-31 1995-09-05 Ricoh Company, Ltd. Image processing apparatus for deleting undesired image from image of document
JPH099041A (en) * 1995-06-23 1997-01-10 Ricoh Co Ltd Image forming device
US20030202700A1 (en) * 2002-04-25 2003-10-30 Malvar Henrique S. "Don't care" pixel interpolation
JP2004080341A (en) * 2002-08-16 2004-03-11 Ricoh Co Ltd Image processor, image processing method, program, and recording medium
JP2006229858A (en) * 2005-02-21 2006-08-31 Canon Electronics Inc Image processor
JP2006244083A (en) * 2005-03-02 2006-09-14 Canon Electronics Inc Image processing apparatus
JP2007174151A (en) * 2005-12-21 2007-07-05 Kyocera Mita Corp Document image reading device, and image forming apparatus
JP2008109361A (en) * 2006-10-25 2008-05-08 Matsushita Electric Ind Co Ltd Image processor and processing method
US20080279474A1 (en) * 2007-05-11 2008-11-13 Xerox Corporation Punched hole detection and removal
US20100027076A1 (en) * 2008-07-29 2010-02-04 Xerx Corporation Semi automatic punch hole removal
CN102034228A (en) * 2010-12-13 2011-04-27 汉王科技股份有限公司 Ancient book image inpainting method and device
CN102117481A (en) * 2011-03-17 2011-07-06 西安交通大学 Automatic digital repair method of damaged images

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5448376A (en) * 1991-01-31 1995-09-05 Ricoh Company, Ltd. Image processing apparatus for deleting undesired image from image of document
JPH04265070A (en) * 1991-02-20 1992-09-21 Pfu Ltd White level correcting method for image reader
US5383754A (en) * 1992-02-27 1995-01-24 Ricoh Company, Ltd. Image forming apparatus having an image orientation identifying device and a binding device
JPH099041A (en) * 1995-06-23 1997-01-10 Ricoh Co Ltd Image forming device
US20030202700A1 (en) * 2002-04-25 2003-10-30 Malvar Henrique S. "Don't care" pixel interpolation
JP2004080341A (en) * 2002-08-16 2004-03-11 Ricoh Co Ltd Image processor, image processing method, program, and recording medium
JP2006229858A (en) * 2005-02-21 2006-08-31 Canon Electronics Inc Image processor
JP2006244083A (en) * 2005-03-02 2006-09-14 Canon Electronics Inc Image processing apparatus
JP2007174151A (en) * 2005-12-21 2007-07-05 Kyocera Mita Corp Document image reading device, and image forming apparatus
JP2008109361A (en) * 2006-10-25 2008-05-08 Matsushita Electric Ind Co Ltd Image processor and processing method
US20080279474A1 (en) * 2007-05-11 2008-11-13 Xerox Corporation Punched hole detection and removal
US20100027076A1 (en) * 2008-07-29 2010-02-04 Xerx Corporation Semi automatic punch hole removal
CN102034228A (en) * 2010-12-13 2011-04-27 汉王科技股份有限公司 Ancient book image inpainting method and device
CN102117481A (en) * 2011-03-17 2011-07-06 西安交通大学 Automatic digital repair method of damaged images

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111145305A (en) * 2019-12-04 2020-05-12 宁波华高信息科技有限公司 Document image processing method

Also Published As

Publication number Publication date
CN105139363B (en) 2018-02-27

Similar Documents

Publication Publication Date Title
CN110795976B (en) Method, device and equipment for training object detection model
US7606439B2 (en) Method for extracting raw data from an image resulting from a camera shot
CN111353956B (en) Image restoration method and device, computer equipment and storage medium
US20130215234A1 (en) Method and apparatus for stereo matching
CN104517110A (en) Binarization method and system of two-dimensional code image
US8433104B2 (en) Image processing method for background removal
CN104252700A (en) Histogram equalization method for infrared image
CN104966092B (en) A kind of image processing method and device
CN111062903A (en) Automatic processing method and system for image watermark, electronic equipment and storage medium
CN101393635B (en) Watermark information embedding, extracting method and processing system
CN103578085A (en) Image empty region inpainting method based on variable blocks
CN105069454A (en) Image identification method and apparatus
CN112184585A (en) Image completion method and system based on semantic edge fusion
CN110866455A (en) Pavement water body detection method
CN104680492A (en) Image repairing method based on sample structure consistency
CN111724327A (en) Image restoration model training method and system and image restoration method
CN105139363A (en) Document image binding hole automatic restoration method and system
JP2002165105A (en) Image processing device, its method, and recording medium
CN113744142A (en) Image restoration method, electronic device and storage medium
CN107798649A (en) The recognition methods of picture and device
CN116863476A (en) Image generation method and system for removing seal noise based on mask guidance
CN107292840B (en) Image restoration method and device, computer-readable storage medium and terminal
CN115619796A (en) Method and device for obtaining photovoltaic module template and nonvolatile storage medium
KR101189003B1 (en) Method for converting image file of cartoon contents to image file for mobile
CN113516593B (en) Human eye image detection and restoration method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: 200040, room 710, 302 Changping Road, Shanghai, Jingan District

Patentee after: Shanghai Xinlian Information Development Co., Ltd

Address before: 200333 11 world software park, No. 879, Zhongjiang Road, Shanghai, Putuo District

Patentee before: SHANGHAI ZHONGXIN INFORMATION DEVELOPMENT Co.,Ltd.

CP03 Change of name, title or address