CN105513010B - A kind of file scanning processing method - Google Patents

A kind of file scanning processing method Download PDF

Info

Publication number
CN105513010B
CN105513010B CN201510989613.7A CN201510989613A CN105513010B CN 105513010 B CN105513010 B CN 105513010B CN 201510989613 A CN201510989613 A CN 201510989613A CN 105513010 B CN105513010 B CN 105513010B
Authority
CN
China
Prior art keywords
file
picture
gray scale
max
card
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510989613.7A
Other languages
Chinese (zh)
Other versions
CN105513010A (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.)
Changsha Tianzhi Zhichuang Electronic Technology Co., Ltd.
Original Assignee
Star View Creation (changsha) Intelligent Equipment 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 Star View Creation (changsha) Intelligent Equipment Co Ltd filed Critical Star View Creation (changsha) Intelligent Equipment Co Ltd
Priority to CN201510989613.7A priority Critical patent/CN105513010B/en
Publication of CN105513010A publication Critical patent/CN105513010A/en
Application granted granted Critical
Publication of CN105513010B publication Critical patent/CN105513010B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/14Transformations for image registration, e.g. adjusting or mapping for alignment of images
    • G06T3/147Transformations for image registration, e.g. adjusting or mapping for alignment of images using affine transformations

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Character Input (AREA)
  • Image Processing (AREA)

Abstract

A kind of file scanning processing equipment and processing method have embedded system, and embedded system includes CPU;It is connect by memory interface with CPU, and has cured DDR the or NandFlash memory of operating system and computer vision special purpose function library;The camera being connect with CPU by I/O interface, SD card/CF card memory interface, USB interface, Ethernet or WIFI coffret, file scanning processing include: to obtain original color file and picture;By original color file and picture gray processing;Matching enhancing is carried out to gray scale file and picture, obtains enhancing gray scale file and picture;The document edges image of binaryzation is obtained to the global binaryzation of enhancing gray scale file and picture;Determine effective coverage largest contours and boundary point;Affine recovery transformation is carried out to original image;To the affine image progress histogram equalization for restoring transformation and obtaining, contrast and brightness are adjusted, the color document images after being adjusted, color document images adjusted are transmitted through USB, Ethernet or wifi, or are saved in SD card or CF card.

Description

A kind of file scanning processing method
Technical field
The present invention relates to the processing equipments and processing method that are applied to file scanning, sweep more particularly, to one kind for document During retouching, there are affine deformations to be distorted for image, inclination, the document that improves of the defects of brightness is lower, contrast is lower are swept Retouch processing equipment and processing method.
Background technique
As the electronic degree of daily life and working environment is higher and higher, people can face a large amount of paper documents To be stored in computer after scanning, to be stored in computer after document material scanning, keep the preservation, transmitting and management of file more convenient Quick and specification.Electronic document is saved and is backed up in information department, Finance Department, departments such as file administration and other Industrial and commercial enterprises gradually popularize.In the prior art, since the placement position of document is not fixed, the imaging in camera often has There is phenomena such as biggish affine deformation and certain inclination, luminance shortage, so that the text information of file and picture is not easy to see It surveys and reads, reduce the reading and backup value of electronic document.
File scanning equipment mostly uses embedded circuit board to carry out merely the file and picture acquired of taking pictures at present Transmission, and image is handled using dedicated software program at the end PC, need artificial settings to need to rotate in treatment process The region of correction and the type of correction, lack certain artificial intelligence, and working efficiency is lower.
CN1908964A disclosed a kind of method of linearity geometry deformation automatic straightening on 2 7th, 2007, specifically A kind of method for having separated linearity geometry deformation automatic straightening, comprising the following steps:
(1) image information of image capture device acquisition identification object, and object images are converted into bianry image;
(2) object images that step (1) obtains are subjected to similitude judgement with the target image prestored in systems, If similar, (3) are entered step, if dissimilar, system directly determines the target figure prestored in object images and system As different, described target images is bianry image;
(3) deformation behaviour for analyzing object images, determines the linear deformation relationship between object images and target image, In plane coordinate system, the relative deformation of computing object image and target image in X, Y-axis, to calculate X, in Y-axis Relative deformation coefficient;
(4) using one of target image and object images as reference standard, according to deformation coefficient pair obtained in step (3) Another image carries out mathematical interpolation correction, obtains the best match of two images;
(5) image after best match is identified using system, judge object images it is identical as target image or Difference, to correctly judge the authenticity of object images.
This method provides adaptive line geometry deformation corrections opposite between target image and object images, but to sweeping Phenomena such as affine deformation and certain inclination, luminance shortage during retouching, can not be effectively treated automatically.
Summary of the invention
The present invention in view of the deficiencies of the prior art, designs a kind of file scanning processing equipment and processing method, for text Shelves scanning process in, image there are affine deformation be distorted, inclination, brightness is lower, contrast is lower the defects of improve.
In order to solve the above-mentioned technical problem, on the one hand, the present invention provides a kind of file scanning processing equipment, it has insertion Formula system, the embedded system include CPU processor;The DDR that is connect by memory interface with the CPU processor or NandFlash memory;The camera being connect with the CPU processor by I/O interface, SD card/CF card memory interface, USB Interface, Ethernet or WIFI coffret;DDR the or NandFlash memory has cured operating system and computer vision Special purpose function library.
As optimal technical scheme, file scanning processing equipment provided by the invention, the CPU processor is ARM processing Device.
In order to solve the above-mentioned technical problem, on the other hand, the present invention provides a kind of file scanning processing method, is based on document The application of scan process equipment, the file scanning processing equipment have embedded system, and the embedded system includes at CPU Manage device;DDR the or NandFlash memory being connect by memory interface with the CPU processor;With the CPU processor The camera connected by I/O interface, SD card/CF card memory interface, USB interface, Ethernet or WIFI coffret;It is described DDR or NandFlash memory has cured operating system and computer vision special purpose function library;File scanning processing includes following Step:
1) original color file and picture is obtained by camera;
2) by original color file and picture gray processing, gray scale file and picture is obtained;
3) it usesMatching enhance operator KmatchMatching enhancing is carried out to the gray scale file and picture, is obtained To enhancing gray scale file and picture;
4) the global binaryzation threshold values T of the enhancing gray scale file and picture is obtained using Da-Jin algorithm, and with new threshold values T1 =k1T and T2=k2T carries out segmentation binaryzation to the enhancing gray scale file and picture, by gray value in T1And T2Between pixel assign Value is 1, remaining gray-value pixel is assigned a value of 0, obtains the document edges image of binaryzation;Wherein 0.5≤k11,1 < k of <2≤ 1.5;
5) function is found using the profile in computer vision special purpose function library to the document edges image, finds out Its all profile, and structural body contours is saved as, the corresponding boundary of each profile is contained in structural body contours The coordinate of point;
6) area that each profile is surrounded is calculated, and traversal is used relatively to obtain with maximum area and for four sides The boundary point coordinate of the profile of shape, and corresponding four boundaries of maximum area profile are obtained according to the relative position of coordinate points sequence Point coordinate P1,P2,P3,P4
7) according to PiThe coordinate position of point is obtained to the affine maximum width W for restoring regionmaxWith maximum height Hmax, Wmax =max { W1,W2, Hmax=max { H1,H2};
Wherein width
Wherein Pi_X and Pi_Y respectively represents the x coordinate and y-coordinate of i-th of boundary point, i=1, and 2,3,4;
8) an empty objective matrix is initialized, wherein the original width of the matrix is Wmax, it is highly Hmax, and according to imitative Penetrate affine transform matrix of the transformational relation function acquisition from gray scale file and picture to objective matrix;
9) according to affine transform matrix, original color file and picture is converted into targeted color file and picture;
10) the histogram equalization function for using standard carries out histogram equalization, adjustment to targeted color file and picture Its contrast and brightness, the color document images after being adjusted, color document images adjusted through USB, Ethernet or Wifi transmission, or be saved in SD card or CF card.
As optimal technical scheme, file scanning processing method provided by the invention obtains the enhancing using Da-Jin algorithm The global binaryzation threshold values T of gray scale file and picture, and with new threshold values T1=k1T and T2=k2T is to the enhancing gray scale document map As carrying out in segmentation binarization, k1=0.8, k2=1.25.
Technical solution provided by the invention proposes that embedded circuit board carries embedded OS, is installed by transplanting Computer vision function library etc. can carry out online processing and affine correction to the image that scanning obtains in embedded circuit board, And its brightness and contrast is adjusted automatically, it is detected convenient for manual read and later period Intelligent Character.
Detailed description of the invention
Attached drawing is used to provide further understanding of the present invention, and is constituted part of this application, schematic reality of the invention It applies example and its explanation is used to explain the present invention, but do not constitute improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is embodiment file scanning processing equipment composition schematic diagram;
Fig. 2 is the relative position figure of four anchor points of quadrangular configuration in embodiment.
Specific embodiment
The present invention is described in further detail below in conjunction with the accompanying drawings.
File scanning processing equipment as shown in Figure 1, has embedded system, and the embedded system includes ARM processing Device;DDR the or NandFlash memory being connect by memory interface with arm processor;Pass through I/O interface with arm processor The camera of connection, SD card/CF card memory interface, USB interface, Ethernet and WIFI coffret;DDR or NandFlash are deposited Storage has cured operating system and computer vision special purpose function library.
File scanning processing equipment uses the embedded OS based on ARM kernel, such as Windows CE, Windows 10, Linux, Android etc., and can be transplanted on the embedded OS and all kinds of computer vision libraries are installed, such as OpenCV, HALCON etc., more efficiently and rapidly to manipulate camera and carry out image procossing.File scanning processing the following steps are included:
1) original color file and picture is obtained by camera;
2) by original color file and picture gray processing, gray scale file and picture is obtained;
3) it usesMatching enhance operator KmatchMatching enhancing is carried out to the gray scale file and picture, is obtained To enhancing gray scale file and picture;
4) the global binaryzation threshold values T of the enhancing gray scale file and picture is obtained using Da-Jin algorithm, and with new threshold values T1 =k1T and T2=k2T carries out segmentation binaryzation to the enhancing gray scale file and picture, by gray value in T1And T2Between pixel assign Value is 1, remaining gray-value pixel is assigned a value of 0, obtains the document edges image of binaryzation;Wherein 0.5≤k11,1 < k of <2≤ 1.5;
5) function is found using the profile in computer vision special purpose function library to the document edges image, finds out Its all profile, and structural body contours is saved as, the corresponding boundary of each profile is contained in structural body contours The coordinate of point;
6) area that each profile is surrounded is calculated, and traversal is used relatively to obtain with maximum area and for four sides The boundary point coordinate of the profile of shape, and corresponding four boundaries of maximum area profile are obtained according to the relative position of coordinate points sequence Point coordinate P1,P2,P3,P4
7) according to PiThe coordinate position of point is obtained to the affine maximum width W for restoring regionmaxWith maximum height Hmax, Wmax =max { W1,W2, Hmax=max { H1,H2};
Wherein width
Fig. 2 is referred to, P is usedi_X and Pi_Y respectively represents the x coordinate and y-coordinate of i-th of boundary point,
I=1,2,3,4;
8) an empty objective matrix is initialized, wherein the original width of the matrix is Wmax, it is highly Hmax, and according to imitative Penetrate affine transform matrix of the transformational relation function acquisition from gray scale file and picture to objective matrix;
9) according to affine transform matrix, original color file and picture is converted into targeted color file and picture;
10) the histogram equalization function for using standard carries out histogram equalization, adjustment to targeted color file and picture Its contrast and brightness, the color document images after being adjusted, color document images adjusted through USB, Ethernet or Wifi transmission, or be saved in SD card or CF card.
Technical solution provided by the invention proposes that embedded circuit board carries embedded OS, is installed by transplanting Computer vision function library etc. can carry out online processing and affine correction to the image that scanning obtains in embedded circuit board, And its brightness and contrast is adjusted automatically, it saves to the time of document process in PC machine, convenient for manual read with after The detection of phase Intelligent Character.
It is clear that the invention is not restricted to which the above preferred embodiment, can also limit in the claims in the present invention and specification In spirit, the transformation and improvement of diversified forms are carried out, can solve same technical problem, and obtains expected technical effect, therefore It does not repeat.Those skilled in the art can from present disclosure directly or all schemes for associating, if Within the spirit that claim limits, protection scope of the present invention is also belonged to.

Claims (2)

1. a kind of file scanning processing method, based on the application of file scanning processing equipment, the file scanning processing equipment tool There is embedded system, the embedded system includes CPU processor;It is connect by memory interface with the CPU processor DDR or NandFlash memory;The camera being connect with the CPU processor by I/O interface, SD card/CF card storage connect Mouth, USB interface, Ethernet or WIFI coffret;DDR the or NandFlash memory has cured operating system and calculating Machine vision special purpose function library, which is characterized in that file scanning processing the following steps are included:
1) original color file and picture is obtained by camera;
2) by original color file and picture gray processing, gray scale file and picture is obtained;
3) it usesMatching enhance operator KmatchMatching enhancing is carried out to the gray scale file and picture, is increased Strong lime degree file and picture;
4) the global binaryzation threshold values T of the enhancing gray scale file and picture is obtained using Da-Jin algorithm, and with new threshold values T1=k1T And T2=k2T carries out segmentation binaryzation to the enhancing gray scale file and picture, by gray value in T1And T2Between pixel assignment be 1, remaining gray-value pixel is assigned a value of 0, obtains the document edges image of binaryzation;Wherein 0.5≤k11,1 < k of <2≤1.5;
5) function is found using the profile in computer vision special purpose function library to the document edges image, finds out its institute There is profile, and save as structural body contours, the corresponding boundary point of each profile is contained in structural body contours Coordinate;
6) area that each profile is surrounded is calculated, and traversal is used relatively to obtain with maximum area and for quadrangle The boundary point coordinate of profile, and obtain corresponding four boundary points of maximum area profile according to the relative position of coordinate points sequence and sit Mark P1,P2,P3,P4
7) according to PiThe coordinate position of point is obtained to the affine maximum width W for restoring regionmaxWith maximum height Hmax, Wmax=max {W1,W2, Hmax=max { H1,H2};
Wherein width
Wherein Pi_X and Pi_Y respectively represents the x coordinate and y-coordinate of i-th of boundary point, i=1, and 2,3,4;
8) an empty objective matrix is initialized, wherein the original width of the matrix is Wmax, it is highly Hmax, and according to affine turn Change affine transform matrix of the relation function acquisition from gray scale file and picture to objective matrix;
9) according to affine transform matrix, original color file and picture is converted into targeted color file and picture;
10) the histogram equalization function for using standard carries out histogram equalization to targeted color file and picture, it is right to adjust its Than degree and brightness, color document images after being adjusted, color document images adjusted are passed through USB, Ethernet or wifi It is defeated, or be saved in SD card or CF card.
2. file scanning processing method according to claim 1, it is characterised in that: obtain the enhancing ash using Da-Jin algorithm The global binaryzation threshold values T of file and picture is spent, and with new threshold values T1=k1T and T2=k2T is to the enhancing gray scale file and picture It carries out in segmentation binarization, k1=0.8, k2=1.25.
CN201510989613.7A 2015-12-28 2015-12-28 A kind of file scanning processing method Active CN105513010B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510989613.7A CN105513010B (en) 2015-12-28 2015-12-28 A kind of file scanning processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510989613.7A CN105513010B (en) 2015-12-28 2015-12-28 A kind of file scanning processing method

Publications (2)

Publication Number Publication Date
CN105513010A CN105513010A (en) 2016-04-20
CN105513010B true CN105513010B (en) 2019-01-18

Family

ID=55720968

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510989613.7A Active CN105513010B (en) 2015-12-28 2015-12-28 A kind of file scanning processing method

Country Status (1)

Country Link
CN (1) CN105513010B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113259539A (en) * 2020-02-12 2021-08-13 北京小米移动软件有限公司 Document scanning method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1790378A (en) * 2005-12-21 2006-06-21 北大方正集团有限公司 Binary method and system for image
CN101504716A (en) * 2009-03-13 2009-08-12 重庆大学 QR two-dimension bar code recognition method and system based on field programmable gate array
CN103295001A (en) * 2013-06-03 2013-09-11 哈尔滨理工大学 Invoice information recognition equipment and invoice information recognition method both applied to handhold equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7978900B2 (en) * 2008-01-18 2011-07-12 Mitek Systems, Inc. Systems for mobile image capture and processing of checks

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1790378A (en) * 2005-12-21 2006-06-21 北大方正集团有限公司 Binary method and system for image
CN101504716A (en) * 2009-03-13 2009-08-12 重庆大学 QR two-dimension bar code recognition method and system based on field programmable gate array
CN103295001A (en) * 2013-06-03 2013-09-11 哈尔滨理工大学 Invoice information recognition equipment and invoice information recognition method both applied to handhold equipment

Also Published As

Publication number Publication date
CN105513010A (en) 2016-04-20

Similar Documents

Publication Publication Date Title
US7283676B2 (en) Method and device for identifying objects in digital images
CN109409366B (en) Distorted image correction method and device based on angular point detection
US11156564B2 (en) Dirt detection on screen
CN111612765B (en) Method for identifying and positioning round transparent lens
CN110473221B (en) Automatic target object scanning system and method
CA3115811C (en) Methods and systems for processing an image in which a machine-readable code is at least partially obscured
EP3576052B1 (en) Image processing systems and methods
CN108121982B (en) Method and device for acquiring facial single image
CN113766209B (en) Camera offset processing method and device
CN107864337A (en) Sketch image processing method, device and equipment
Han et al. Research and implementation of an improved canny edge detection algorithm
CN115170669A (en) Identification and positioning method and system based on edge feature point set registration and storage medium
CN109829510A (en) A kind of method, apparatus and equipment of product quality classification
CN112288726B (en) Method for detecting foreign matters on belt surface of underground belt conveyor
CN114049499A (en) Target object detection method, apparatus and storage medium for continuous contour
Kanter Color Crack: Identifying Cracks in Glass
CN110502948B (en) Restoration method and device for folding two-dimensional code image and code scanning equipment
CN111879777A (en) Soft material fitting defect detection method, device, equipment and storage medium
CN101464953A (en) Outline extracting apparatus and method
CN105513010B (en) A kind of file scanning processing method
CN107194342A (en) Method for detecting lane lines based on inverse perspective mapping
KR20200036353A (en) Apparatus and method for estimating 3d pose
CN109741302B (en) SD card form recognition system and method based on machine vision
CN109712121A (en) A kind of method, equipment and the device of the processing of medical image picture
CN113870190B (en) Vertical line detection method, device, equipment and storage medium

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20190218

Address after: 410100 Room 401, Unit 1, Block B1, Jinke Yida Science and Technology City, 77 South Section of Dongliu Road, Changsha County, Changsha City, Hunan Province

Patentee after: Changsha Tianzhi Zhichuang Electronic Technology Co., Ltd.

Address before: 410129 No. 2 Xinghu Road, Rongli Street, Changsha Economic and Technological Development Zone, Changsha City, Hunan Province

Patentee before: Star view creation (Changsha) Intelligent Equipment Co., Ltd.