CN105335948B - Splicing apparatus, method and the scanner of file and picture - Google Patents

Splicing apparatus, method and the scanner of file and picture Download PDF

Info

Publication number
CN105335948B
CN105335948B CN201410389424.1A CN201410389424A CN105335948B CN 105335948 B CN105335948 B CN 105335948B CN 201410389424 A CN201410389424 A CN 201410389424A CN 105335948 B CN105335948 B CN 105335948B
Authority
CN
China
Prior art keywords
spliced
file
picture
piece
unit
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
CN201410389424.1A
Other languages
Chinese (zh)
Other versions
CN105335948A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to CN201410389424.1A priority Critical patent/CN105335948B/en
Publication of CN105335948A publication Critical patent/CN105335948A/en
Application granted granted Critical
Publication of CN105335948B publication Critical patent/CN105335948B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)

Abstract

The embodiment of the present invention provides a kind of splicing apparatus of file and picture, method and scanner, wherein, which includes:Unit is corrected, for carrying out preliminary corrections to each file and picture to be spliced;Detection unit, for detecting the optimal piece of each file and picture to be spliced after the correction unit preliminary corrections, wherein, the optimal piece passes through the white space of the file and picture, and minimum along the variation of the affine field of the optimal piece;Concatenation unit, for according to optimal piece detected by the detecting unit, splicing to each file and picture to be spliced.Stablize the two factors due to being considered simultaneously across document white space and affine field when detecting optimal piece, the complete and correct stitching image of content can be obtained.

Description

Splicing apparatus, method and the scanner of file and picture
Technical field
The present invention relates to a kind of image processing field more particularly to splicing apparatus of file and picture, method and scanners.
Background technology
In recent years, since data preserves and the needs of informationization, the demand that electronization is carried out to document information increasingly increases It is long.Document is damaged in order to prevent, and the general method using non-contact scanning carries out the electronization of document.It is and larger for size Document, such as books and file in a large amount of ancient times and modern age, need to take multiple scan after these document flip horizontals or Person is scanned using more scanners, and the multiple file and pictures obtained to scanning splice, so as to obtain entire document Image.Existing image split-joint method is generally directed to natural scene image, it is desirable that meets between each image of Same Scene Fixed geometric transform relation.
It should be noted that the introduction of technical background is intended merely to above it is convenient technical scheme of the present invention is carried out it is clear, Complete explanation, and facilitate the understanding of those skilled in the art and illustrate.Cannot merely because these schemes the present invention Background technology part is expounded and thinks that above-mentioned technical proposal is known to those skilled in the art.
Invention content
Since file and picture is because of the repeatability of its own texture, it is difficult to extract stable feature, while the fluctuating of paper becomes Change so that the condition of fixed geometric transformation no longer meets.Therefore, file and picture is carried out using existing image split-joint method The problems such as splicing can generate content and be distorted, text line misregistration.
The embodiment of the present invention provides a kind of splicing apparatus of file and picture, method and scanner, due to optimal in detection It is considered simultaneously across document white space and affine field during piece and stablizes the two factors, complete and content can obtained just True stitching image.
One side according to embodiments of the present invention, provides a kind of splicing apparatus of file and picture, and described device includes:School Positive unit, the correction unit are used to carry out preliminary corrections to each file and picture to be spliced;Detection unit, the detection are single Member for detect it is described correction unit preliminary corrections after each file and picture to be spliced optimal piece, wherein, it is described most Excellent piece passes through the white space of the file and picture, and minimum along the variation of the affine field of the optimal piece;Splicing Unit, the concatenation unit is used for according to optimal piece detected by the detecting unit, to each file and picture to be spliced Spliced.
Other side according to embodiments of the present invention, provides a kind of scanner, and the scanner is included according to above-mentioned one The splicing apparatus of file and picture described in a aspect.
Another aspect according to embodiments of the present invention provides a kind of joining method of file and picture, the method includes: Preliminary corrections are carried out to each file and picture to be spliced;Detect the optimal of each file and picture to be spliced after preliminary corrections Piece, wherein, the optimal piece passes through the white space of the file and picture, and along the affine field of the optimal piece Variation it is minimum;According to the optimal piece detected, each file and picture to be spliced is spliced.
The beneficial effects of the present invention are:The factor that affine field is stablized is considered when detecting optimal piece, select across The piece of the variation minimum of the white space of file and picture and affine field is based on the optimal piece into style of writing as optimal piece The splicing of shelves image, so as to obtain the complete and correct stitching image of content.
With reference to following explanation and attached drawing, only certain exemplary embodiments of this invention is disclosed in detail, specifies the original of the present invention Reason can be in a manner of adopted.It should be understood that embodiments of the present invention are not so limited in range.In appended power In the range of the spirit and terms of profit requirement, embodiments of the present invention include many changes, modifications and are equal.
The feature for describing and/or showing for a kind of embodiment can be in a manner of same or similar one or more Used in a other embodiment, with the feature in other embodiment it is combined or substitute other embodiment in feature.
It should be emphasized that term "comprises/comprising" refers to the presence of feature, one integral piece, step or component when being used herein, but simultaneously It is not excluded for the presence or additional of one or more other features, one integral piece, step or component.
Description of the drawings
Included attached drawing is used for providing being further understood from the embodiment of the present invention, and which constitute one of specification Point, for illustrating embodiments of the present invention, and come together with word description to illustrate the principle of the present invention.Under it should be evident that Attached drawing in the description of face is only some embodiments of the present invention, for those of ordinary skill in the art, is not paying wound Under the premise of the property made is laborious, other attached drawings are can also be obtained according to these attached drawings.In the accompanying drawings:
Fig. 1 is the composition schematic diagram of the splicing apparatus 100 of the file and picture of the embodiment of the present invention 1;
Fig. 2 is the composition schematic diagram of the detection unit 102 of the embodiment of the present invention 1;
Fig. 3 is the composition schematic diagram of the first detection module 202 of the embodiment of the present invention 1;
Fig. 4 is the schematic diagram of the optimal piece of two file and pictures to be spliced up and down of the embodiment of the present invention 1;
Fig. 5 is the composition schematic diagram of the concatenation unit 103 of the embodiment of the present invention 1;
Fig. 6 is the schematic diagram that coordinate transform is carried out to the pixel in file and picture of the embodiment of the present invention 1;
Fig. 7 is the schematic diagram of the file and picture of the completion splicing of the embodiment of the present invention 1;
Fig. 8 is the schematic block diagram that the system of the scanner 800 of the embodiment of the present invention 2 is formed;
Fig. 9 is the flow chart of the file and picture joining method of the embodiment of the present invention 3.
Specific embodiment
With reference to attached drawing, by following specification, aforementioned and other feature of the invention will be apparent.In specification In attached drawing, only certain exemplary embodiments of this invention is specifically disclosed, which show the portions for the principle that the present invention wherein may be used Divide embodiment, it will thus be appreciated that the present invention is not limited to described embodiment, on the contrary, the present invention includes falling into appended power Whole modifications, modification and equivalent in the range of profit requirement.
Embodiment 1
Fig. 1 is the composition schematic diagram of the splicing apparatus 100 of the file and picture of the embodiment of the present invention 1.As shown in Figure 1, the dress It puts 100 and includes correction unit 101, detection unit 102 and concatenation unit 103, wherein,
Unit 101 is corrected to be used to carry out preliminary corrections to each file and picture to be spliced;
Detection unit 102 is optimal for each file and picture to be spliced after detection correction 102 preliminary corrections of unit Piece, wherein, which passes through the white space of the document image, and the variation of the affine field along the optimal piece It is minimum;
Concatenation unit 103 is used for the optimal piece detected according to detection unit 102, to each file and picture to be spliced Spliced.
By above-described embodiment it is found that due to being considered simultaneously when detecting optimal piece across document white space and affine The two factors are stablized in field, can obtain the complete and correct stitching image of content.
In the present embodiment, each file and picture to be spliced can be scanned document using existing scan method And obtain, wherein, each file and picture to be spliced is ranked up according to the sequence of document content, adjacent two documents to be spliced There is overlapping region between image.In addition, the document is, for example, books, newspaper, data, calligraphy or paint etc., the present invention Embodiment is to the type of document and is not limited.
In the present embodiment, the quantity of file and picture to be spliced is for example by the size of document and the scanning model of scanner It encloses and determines.The embodiment of the present invention is illustrated by taking two file and pictures to be spliced as an example, but the embodiment of the present invention is not treated The quantity of the file and picture of splicing is limited.
It in the present embodiment, can be by document content when the quantity of file and picture to be spliced is three or three or more Sequence treat stitching image and be ranked up, for example, sharing N number of file and picture to be spliced, N >=3 can be first to first and second A file and picture to be spliced is spliced, and then again spells the spliced image file and picture to be spliced with third It connects, until completing the splicing with n-th file and picture to be spliced.
Wherein, by first and second spliced images of file and picture to be spliced and third document map to be spliced As the side that when being spliced, the joining method used and first and second file and pictures to be spliced use when being spliced Method is identical, and so on, until completing the splicing of all file and pictures to be spliced.
In the present embodiment, existing any method can be used to each file and picture to be spliced in correction unit 101 Carry out preliminary corrections.Wherein, existing method can be used to carry out global rigid body translation to file and picture to be spliced, such as right File and picture is into line tilt correction and translational alignment etc..
In the present embodiment, the optimal spelling of each file and picture to be spliced after the detection of detection unit 102 preliminary corrections Seam, the optimal piece meet following two conditions, i.e.,:Optimal piece passes through the white space of the document image, and along this The variation of the affine field of optimal piece is minimum.Wherein, refer to along the affine field of the optimal piece along each of the optimal piece The set of the affine transformation of a pixel.
In the present embodiment, based on two above condition, detection unit 102 detects optimal piece.Below to of the invention real It applies the structure of the detection unit 102 of example and the method for the optimal piece of detection is illustratively illustrated.
Fig. 2 is the composition schematic diagram of the detection unit 102 of the present embodiment.As shown in Fig. 2, detection unit 102 includes first Determining module 201 and first detection module 202, wherein,
First determining module 201 is used to determine one of them multiple piece to be selected to be spliced;
First detection module 202 is used to determine the energy of each piece to be selected in multiple piece to be selected, and selects In the piece to be selected of minimum energy along the minimum piece to be selected of the variation of the affine field of the piece to be selected as this one of them The optimal piece of file and picture to be spliced, according to this optimal piece of one of them file and picture to be spliced determine with this its In the optimal piece of other file and pictures to be spliced that is spliced of a file and picture to be spliced.
In the present embodiment, existing any method can be used to determine multiple pieces to be selected for the first determining module 201.Example Such as, piece to be selected is determined using the methods of gradient information of image, entropy or histogram of gradients.
In the present embodiment, multiple pieces to be selected that first detection module 202 can be determined from the first determining module 201 In, the optimal piece for meeting both of the aforesaid condition is found, that is, determining the energy of each piece to be selected and selection energy level Along the piece to be selected that the variation of the affine field of the piece to be selected is minimum in small piece to be selected.
For example, first detection module 202 can determine the energy of each piece to be selected according to following formula (1):
E (s)=λ1E1(s)+λ2E2(s) (1)
Wherein, E (s) represents the energy of piece s to be selected, E1(s) energy of the texture along piece s to be selected, E are represented2(s) Represent the variance of the affine parameter of the affine field along piece s to be selected, λ1、λ2E is represented respectively1(s) and E2(s) weights, λ12 =1, and 0<λ12<1。
Wherein, by adjusting λ1、λ2Value, E can be adjusted1(s) and E2(s) equilibrium relation between, λ1、λ2Value can root It is preset according to actual needs, the embodiment of the present invention is not to λ1、λ2Value specifically limited.
First detection module 202 can traverse each piece s to be selected, affine ginseng in the piece to be selected for selecting ENERGY E (s) minimum Several variance E2(s) minimum piece to be selected is as the optimal piece.
For example, by traversing each piece s to be selected, obtain the minimum of 3 ENERGY Es (s), that is, filter out 3 it is to be selected Piece, this 3 pieces to be selected correspond respectively to the variance of 3 affine parameters, and the variance of selection wherein affine parameter is minimum to be treated Piece is selected as optimal piece.
Fig. 3 is the composition schematic diagram of the first detection module 202 of the present embodiment.As shown in figure 3, first detection module 202 Including extraction unit 301, matching unit 302, estimation unit 303, first detection unit 304 and second detection unit 305, In,
Extraction unit 301 is used to extract the characteristic point near the line and these lines in each file and picture to be spliced;
Matching unit 302 is used for line and spy in each file and picture to be spliced for extracting extraction unit 301 Sign point is matched;
Estimation unit 303 is used to, according to 302 matched line of matching unit and characteristic point, estimate each document map to be spliced The affine field of picture;
First detection unit 304 is used for binary image and estimation unit according to one of them file and picture to be spliced The affine field of 303 one of them file and picture to be spliced estimated selects to treat along this in the piece to be selected of minimum energy The optimal piece for piece to be selected one of them file and picture to be spliced as this for selecting the variation of the affine field of piece minimum;
Second detection unit 305 is used for one of them document map to be spliced detected according to first detection unit 304 The affine field of one of them file and picture to be spliced that the optimal piece and estimation unit 303 of picture estimate determines and is somebody's turn to do The optimal piece of other file and pictures to be spliced that one of them file and picture to be spliced is spliced.
In the present embodiment, existing any method can be used to extract each document map to be spliced for extraction unit 301 The characteristic point near line and these lines as in.Wherein, these lines may include line of text and framing mask etc..
In the present embodiment, after the characteristic point near the line extracted and these lines is obtained, matching unit 302 Existing any method can be used to match the line in each file and picture to be spliced extracted and characteristic point. For example, when the quantity of file and picture to be spliced is 2, by the line and feature in upper and lower two file and pictures to be spliced Point carries out corresponding matching.
In the present embodiment, estimation unit 303 estimates each document to be spliced according to matched line and characteristic point is completed The affine field of image.Wherein, the affine field of each file and picture to be spliced refers to all of each file and picture to be spliced The set of the affine transformation of pixel.
In the present embodiment, the affine field of existing any method estimation file and picture can be used.For example, upper and lower two It is known that the transformation matrix of matched line and characteristic point is completed in file and picture to be spliced, i.e., these complete matched line And the affine transformation of the pixel corresponding to characteristic point is known.It is available for the affine transformation of other pixels So that the minimum constraints of the sum of deviation after the mapping of these known points and obtain.
In the present embodiment, after the affine field of file and picture to be spliced is estimated, first detection unit 304 is according to it In the binary image of file and picture to be spliced and one of them document map to be spliced that estimates of estimation unit 303 The affine field of picture is selected in the piece to be selected of minimum energy along the piece to be selected that the variation of the affine field of the piece to be selected is minimum Optimal piece of one of them file and picture to be spliced as this.
In the present embodiment, it can equally be selected to be selected along this in the piece to be selected of minimum energy according to above-mentioned formula (1) The optimal piece of piece to be selected one of them file and picture to be spliced as this of the variation minimum of the affine field of piece.Wherein, The binary image of file and picture to be spliced can be used for calculating the energy for representing the texture along piece to be selected, i.e. above-mentioned formula (1) E in1(s)。
In the present embodiment, after the optimal piece for obtaining one of them file and picture to be spliced, second detection unit 305 are used for the optimal piece of one of them file and picture to be spliced detected according to first detection unit 304 and estimation The affine field for one of them file and picture to be spliced that unit 303 estimates determines and one of them file and picture to be spliced The optimal piece of other file and pictures to be spliced spliced.Fig. 4 is two file and pictures to be spliced up and down of the present embodiment Optimal piece schematic diagram.As shown in figure 4, dotted line represents the boundary of overlapping region, epigraph I is being obtained1Optimal piece S1 Later, the epigraph I estimated is utilized1Affine field directly to S1It is mapped, so as to obtain hypograph I2Optimal piece S2
In the present embodiment, after the optimal piece for obtaining each file and picture to be spliced, 103 basis of concatenation unit The optimal piece splices each file and picture to be spliced.Below to the knot of the concatenation unit of the embodiment of the present invention 103 Structure and according to optimal piece carry out image mosaic method illustratively illustrated.
Fig. 5 is the composition schematic diagram of the concatenation unit 103 of the present embodiment.As shown in figure 5, concatenation unit 503 includes transformation Unit 501 and synthesis unit 502, wherein,
Converter unit 501 is used for the affine field according to one of them file and picture to be spliced, and to this, one of them is to be spliced Each pixel in file and picture carries out coordinate transform;
Synthesis unit 502 is used to carrying out converter unit 501 into one of them described document map to be spliced after coordinate transform As being spliced with other file and pictures to be spliced according to the optimal piece.
For example, converter unit 501 can carry out coordinate transform according to the following conditions:For one of them file and picture to be spliced In with the pixel in the overlapping region of other file and pictures to be spliced, it is optimal closer to one of them file and picture to be spliced The pixel of piece, when carrying out coordinate transform, the weights of the affine transformation matrix of the pixel are higher in affine field.In this way, For the pixel far from optimal piece, retain its raw information as possible, and for the pixel close to optimal piece, make as possible It is mapped with affine transformation matrix, so as to the integrality of further stitching image and the correctness of document content.
Fig. 6 is the schematic diagram that coordinate transform is carried out to the pixel in file and picture of the present embodiment.It is as shown in fig. 6, right The pixel P above the optimal piece in overlapping region in upper figure to be spliced, is sat using following formula (2) Mark transformation:
R (P)=λ A (P)+(1- λ) I (2)
Wherein, R (P) represents the transformation matrix of coordinates of the pixel P in the overlapping region, and A (P) represents pixel P's Affine transformation matrix, I represent unit matrix, and λ represents the weights of the affine transformation matrix of pixel P,λ≤1, | | AP | | represent the distance on the boundary of pixel P and the overlapping region, | | AC | | represent the boundary of the overlapping region with it is described The distance of optimal piece.
The transformation matrix of coordinates obtained using formula (2) obtains the picture above the optimal piece in upper figure in overlapping region Vegetarian refreshments P corresponds to the mapping point P ' in overlapping region in figure below, and phase is performed for all pixels point in the overlapping region of upper figure Same operation, so as to obtain each mapping point in the overlapping region of figure below.Along most when being spliced due to upper figure and figure below Excellent piece is spliced, therefore the pixel below the optimal piece of overlapping region in upper figure is not needed to carry out coordinate change It changes.And for the pixel other than overlapping region in upper figure, then directly coordinate transform is carried out using unit matrix.
Fig. 7 is the schematic diagram of the file and picture of the completion splicing of the present embodiment.As shown in fig. 7, by by coordinate transform Upper figure is synthesized with figure below along optimal piece, so as to obtain spliced file and picture.
In the present embodiment, after spliced file and picture is obtained, can also light compensation be carried out to the document image, with Improve display effect.Wherein, any one of existing method can be used in the method for carrying out light compensation.
By above-described embodiment it is found that due to being considered simultaneously when detecting optimal piece across document white space and affine The two factors are stablized in field, can obtain the complete and correct stitching image of content.
Embodiment 2
Fig. 8 is the schematic block diagram that the system of the scanner 800 of the embodiment of the present invention 2 is formed.As shown in figure 8, scanner 800 can include central processing unit 801 and memory 802;Memory 802 is coupled to central processing unit 801.The figure is exemplary 's;Other types of structure can also be used, to supplement or instead of the structure, to realize telecommunications functions or other functions.
As shown in figure 8, the scanner 800 can also include:Input unit 803, display 804, optical module 805 and Power supply 806.
In one embodiment, the function of the splicing apparatus of file and picture can be integrated into central processing unit 801. Wherein, central processing unit 801 can be configured as:Preliminary corrections are carried out to each file and picture to be spliced;Detect preliminary school The optimal piece of each file and picture to be spliced after just, wherein, the optimal piece passes through the blank of the file and picture Region, and it is minimum along the variation of the affine field of the optimal piece;According to the optimal piece detected, to each to be spliced File and picture spliced.
Wherein, the step of optimal piece of each file and picture to be spliced after the detection preliminary corrections can wrap It includes:Determine multiple pieces to be selected of one of them file and picture to be spliced;It determines each to treat in the multiple piece to be selected The energy of piece is selected, and selects the variation of affine field in the piece to be selected of minimum energy along the piece to be selected minimum Optimal piece of the piece to be selected as one of them file and picture to be spliced, according to one of them described text to be spliced The optimal piece of shelves image determines the other documents to be spliced spliced with one of file and picture with splicing The optimal piece of image..
Wherein, it is described to determine the energy of each piece to be selected in the multiple piece to be selected, and select minimum energy Piece to be selected in along the minimum piece to be selected of the variation of the affine field of the piece to be selected as it is described one of them wait to spell The optimal piece of the file and picture connect, according to the optimal piece of one of them file and picture to be spliced determine with it is described its In one with splicing file and picture spliced the optimal piece of other file and pictures to be spliced the step of can include: Extract the line in each file and picture to be spliced and the characteristic point near the line;The extraction unit is extracted each Line and characteristic point in a file and picture to be spliced are matched;According to the matched line of the matching unit and characteristic point, Estimate the affine field of each file and picture to be spliced;According to the binary image of one of them file and picture to be spliced and institute The affine field of one of them file and picture to be spliced that estimation unit estimates is stated, in the piece to be selected for selecting minimum energy Along the minimum piece to be selected of the variation of the affine field of the piece to be selected as one of them file and picture to be spliced Optimal piece;The optimal piece of one of them file and picture to be spliced detected according to the first detection unit and The affine field of one of them file and picture to be spliced that the estimation unit estimates, determine with it is described one of them wait to spell Connect the optimal piece of other file and pictures to be spliced that file and picture is spliced.
Wherein, the step of optimal piece that the basis detects splices each file and picture to be spliced can be with Including:According to the affine field of one of them file and picture to be spliced, to each in one of them described file and picture to be spliced Pixel carries out coordinate transform;By one of them described file and picture to be spliced after coordinate transform and other document maps to be spliced As being spliced according to the optimal piece.
Wherein it is possible to carry out the coordinate transform according to the following conditions:For one of them described file and picture to be spliced In with the pixel in the overlapping region of other file and pictures to be spliced, closer to one of them file and picture to be spliced The pixel of optimal piece, the weights of the affine transformation matrix of pixel described in the affine field are got over when carrying out coordinate transform It is high.
In another embodiment, the splicing apparatus of file and picture can with 801 separate configuration of central processing unit, such as Can be the chip being connect with central processing unit 801 by the splicing apparatus of file and picture, by the control of central processing unit 801 come Realize the function of the splicing apparatus of file and picture.
Scanner 800 is also not necessary to include all components shown in fig. 8 in the present embodiment.
As shown in figure 8, central processing unit 801 be otherwise referred to as controller or operational controls, can include microprocessor or Other processor devices and/or logic device, central processing unit 801 receive input and control all parts of scanner 800 Operation.
Memory 802, such as can be buffer, flash memory, hard disk driver, removable medium, volatile memory, non-volatile One or more in memory or other appropriate devices.The above-mentioned information related with failure can be stored, can additionally be stored Perform program for information about.And central processing unit 801 can perform the program of the memory 802 storage, to realize information Storage or processing etc..The function of other components is with existing similar, and details are not described herein again.Each component of scanner 800 can pass through Specialized hardware, firmware, software or its with reference to realizing, be made without departing from the scope of the present invention.
By above-described embodiment it is found that due to being considered simultaneously when detecting optimal piece across document white space and affine The two factors are stablized in field, can obtain the complete and correct stitching image of content.
The embodiment of the present invention additionally provides a kind of joining method of file and picture, as described in the following examples 3, due to this The principle that method solves the problems, such as is similar with the function of each component part of the splicing apparatus of embodiment 1, therefore its specific implementation The implementation of the splicing apparatus of embodiment 1 is referred to, content something in common is not repeated to illustrate.
Embodiment 3
Fig. 9 is the flow chart of the joining method of the file and picture of the embodiment of the present invention 3.As shown in figure 9, this method includes:
Step 901:Preliminary corrections are carried out to each file and picture to be spliced;
Step 902:The optimal piece of each file and picture to be spliced after preliminary corrections is detected, wherein, it is described optimal Piece passes through the white space of the file and picture, and minimum along the variation of the affine field of the optimal piece;
Step 903:According to the optimal piece detected, each file and picture to be spliced is spliced.
By above-described embodiment it is found that due to being considered simultaneously when detecting optimal piece across document white space and affine The two factors are stablized in field, can obtain the complete and correct stitching image of content.
The present embodiment progress preliminary corrections method, detection preliminary corrections after each file and picture to be spliced most The method of excellent piece and the method and reality spliced according to the optimal piece detected to each file and picture to be spliced The record applied in example 1 is identical, and details are not described herein again.
For example,
In the embodiment of the present embodiment, each file and picture to be spliced after the detection preliminary corrections The step of optimal piece, can include:Determine multiple pieces to be selected of one of them file and picture to be spliced;It determines described more The energy of each piece to be selected in a piece to be selected, and select in the piece to be selected of minimum energy along the piece to be selected Affine field optimal piece of the minimum piece to be selected of variation as one of them file and picture to be spliced, according to institute The optimal piece for stating one of them file and picture to be spliced determines to be spelled with one of file and picture with splicing The optimal piece of other file and pictures to be spliced connect.
In the embodiment of the present embodiment, each piece to be selected determined in the multiple piece to be selected Energy, and select the piece to be selected for changing minimum of the affine field in the piece to be selected of minimum energy along the piece to be selected As the optimal piece of one of them file and picture to be spliced, according to one of them file and picture to be spliced Optimal piece determines the other file and pictures to be spliced spliced with one of file and picture with splicing most The step of excellent piece, can include:Extract the line in each file and picture to be spliced and the characteristic point near the line;It will Line and characteristic point in each file and picture to be spliced that the extraction unit extracts are matched;According to the matching The line and characteristic point of units match estimate the affine field of each file and picture to be spliced;According to one of them document to be spliced The affine field of one of them file and picture to be spliced that the binary image of image and the estimation unit estimate, choosing Select the minimum piece to be selected of variation of the affine field in the piece to be selected of minimum energy along the piece to be selected as it is described its In a file and picture to be spliced optimal piece;According to the first detection unit detect described one of them is to be spliced The affine field of one of them file and picture to be spliced that the optimal piece and the estimation unit of file and picture estimate, Determine the optimal piece of other file and pictures to be spliced spliced with one of them described file and picture to be spliced.In this reality In an embodiment for applying example, what optimal piece that the basis detects spliced each file and picture to be spliced Step includes:According to the affine field of one of them file and picture to be spliced, in one of them described file and picture to be spliced Each pixel carries out coordinate transform;By one of them described file and picture to be spliced after coordinate transform and other texts to be spliced Shelves image is spliced according to the optimal piece.
Wherein it is possible to carry out the coordinate transform according to the following conditions:For one of them described file and picture to be spliced In with the pixel in the overlapping region of other file and pictures to be spliced, closer to one of them file and picture to be spliced The pixel of optimal piece, the weights of the affine transformation matrix of pixel described in the affine field are got over when carrying out coordinate transform It is high.
The embodiment of the present invention also provides a kind of computer-readable program, wherein when the splicing apparatus in file and picture or scanning When described program is performed in instrument, described program causes computer to perform reality in the splicing apparatus or scanner of the file and picture Apply the joining method described in example 3.
The embodiment of the present invention also provides a kind of storage medium for being stored with computer-readable program, wherein the computer can Reader causes computer to perform joining method described in embodiment 3 in the splicing apparatus or scanner of file and picture.
The device and method more than present invention can also be realized by hardware realization by combination of hardware software.The present invention It is related to such computer-readable program, when the program is performed by logical block, can realizes the logical block above The device or component parts make the logical block realize various method or steps described above.The invention further relates to For storing the storage medium of procedure above, such as hard disk, disk, CD, DVD, flash memory.
Above in association with specific embodiment, invention has been described, it will be appreciated by those skilled in the art that this A little descriptions are all exemplary, and are not limiting the scope of the invention.Those skilled in the art can be according to the present invention Spirit and principle various variants and modifications are made to the present invention, these variants and modifications are also within the scope of the invention.
About the embodiment including above example, following note is also disclosed:
Note 1, a kind of splicing apparatus of file and picture, described device include:
Unit is corrected, the correction unit is used to carry out preliminary corrections to each file and picture to be spliced;
Detection unit, the detection unit are used to detect each document to be spliced after the correction unit preliminary corrections The optimal piece of image, wherein, the optimal piece passes through the white space of the file and picture, and along the optimal spelling The variation of the affine field of seam is minimum;
Concatenation unit, the concatenation unit are used for according to optimal piece detected by the detecting unit, wait to spell to each The file and picture connect is spliced.
Note 2, the device according to note 1, wherein, the detection unit includes:
First determining module, first determining module are used to determine that the multiple of one of them file and picture to be spliced treat Select piece;
First detection module, the first detection module are used to determine each piece to be selected in the multiple piece to be selected Energy, and the spelling to be selected for selecting the variation of affine field in the piece to be selected of minimum energy along the piece to be selected minimum The optimal piece as one of them file and picture to be spliced is stitched, according to one of them described file and picture to be spliced Optimal piece determine and other file and pictures to be spliced that file and picture that one of band splices is spliced Optimal piece.
Note 3, the device according to note 2, wherein, the first detection module includes:
Extraction unit, the extraction unit are used to extract near line and the line in each file and picture to be spliced Characteristic point;
Matching unit, the matching unit are used in each file and picture to be spliced for extracting the extraction unit Line and characteristic point matched;
Estimation unit, the estimation unit are used for according to the matched line of the matching unit and characteristic point, and estimation is each to be treated The affine field of the file and picture of splicing;
First detection unit, the first detection unit are used for the binary picture according to one of them file and picture to be spliced The affine field of one of them file and picture to be spliced that picture and the estimation unit estimate, selects treating for minimum energy The piece to be selected for selecting the variation of the affine field in piece along the piece to be selected minimum is as one of them described text to be spliced The optimal piece of shelves image;
Second detection unit, the second detection unit are used for according to detecting the first detection unit wherein One of them described document map to be spliced that the optimal piece and the estimation unit of one file and picture to be spliced estimate The affine field of picture determines the optimal of the other file and pictures to be spliced spliced with one of them described file and picture to be spliced Piece.
Note 4, the device according to note 2, wherein, the first detection module is determined according to following formula (1) The energy of each piece to be selected:
E (s)=λ1E1(s)+λ2E2(s) (1)
Wherein, E (s) represents the energy of piece s to be selected, E1(s) energy of the texture along the piece s to be selected, E are represented2 (s) variance of the affine parameter of the affine field along the piece s to be selected, λ are represented1、λ2E is represented respectively1(s) and E2(s) power Value, λ12=1, and 0<λ12<1,
Also, the variance E of affine parameter in the minimum piece to be selected of the first detection module selection ENERGY E (s)2(s) Minimum piece to be selected is as the optimal piece.
Note 5, the device according to note 1, wherein, the concatenation unit includes:
Converter unit, the converter unit are used for according to the affine field of one of them file and picture to be spliced, to it is described its In each pixel in a file and picture to be spliced carry out coordinate transform;
Synthesis unit, the synthesis unit be used for by the converter unit carry out coordinate transform after it is described one of them treat Splicing file and picture is spliced with other file and pictures to be spliced according to the optimal piece.
Note 6, the device according to note 5, wherein, the converter unit carries out the coordinate change according to the following conditions It changes:For in one of them described file and picture to be spliced with the pixel in the overlapping region of other file and pictures to be spliced, Closer to the pixel of the optimal piece of one of them file and picture to be spliced, affine field during coordinate transform is carried out Described in pixel affine transformation matrix weights it is higher.
Note 7, the device according to note 6, wherein, the converter unit is according to carrying out following formula (2) The coordinate transform of pixel in overlapping region:
R (P)=λ A (P)+(1- λ) I (2)
Wherein, R (P) represents the transformation matrix of coordinates of the pixel P in the overlapping region, and A (P) represents pixel P's Affine transformation matrix, I represent unit matrix, and λ represents the weights of the affine transformation matrix of pixel P,λ≤1, | | AP | | represent the distance on the boundary of pixel P and the overlapping region, | | AC | | represent the boundary of the overlapping region with it is described The distance of optimal piece.
Note 8, a kind of scanner, the scanner include the splicing apparatus according to the file and picture described in note 1.
Note 9, a kind of joining method of file and picture, the method includes:
Preliminary corrections are carried out to each file and picture to be spliced;
The optimal piece of each file and picture to be spliced after preliminary corrections is detected, wherein, the optimal piece passes through The white space of the file and picture, and it is minimum along the variation of the affine field of the optimal piece;
According to the optimal piece detected, each file and picture to be spliced is spliced.
Note 10, the method according to note 9, wherein, each document to be spliced after the detection preliminary corrections The step of optimal piece of image, includes:
Determine multiple pieces to be selected of one of them file and picture to be spliced;
It determines the energy of each piece to be selected in the multiple piece to be selected, and selects the piece to be selected of minimum energy In along the minimum piece to be selected of the variation of the affine field of the piece to be selected as one of them described document map to be spliced The optimal piece of picture determines to spell with one of band according to the optimal piece of one of them file and picture to be spliced The optimal piece of other file and pictures to be spliced that the file and picture connect is spliced.
Note 11, the method according to note 10, wherein, it is each to be selected in the determining the multiple piece to be selected The energy of piece, and select the variation of affine field in the piece to be selected of minimum energy along the piece to be selected is minimum to treat Optimal piece of the piece as one of them file and picture to be spliced is selected, according to one of them described document to be spliced The optimal piece of image determines the other document maps to be spliced spliced with one of file and picture with splicing The step of optimal piece of picture, includes:
Extract the line in each file and picture to be spliced and the characteristic point near the line;
Line in each file and picture to be spliced extracted and characteristic point are matched;
According to matched line and characteristic point, the affine field of each file and picture to be spliced is estimated;
According to the binary image of one of them file and picture to be spliced and estimate described one of them is to be spliced The affine field of file and picture, the variation for selecting affine field in the piece to be selected of minimum energy along the piece to be selected are minimum Optimal piece of the piece to be selected as one of them file and picture to be spliced;
Described according to the optimal piece of one of them file and picture to be spliced detected and estimating wherein The affine field of one file and picture to be spliced determines other to wait to spell with what one of them described file and picture to be spliced was spliced Connect the optimal piece of file and picture.
Note 12, the method according to note 10, wherein, each piece to be selected is determined according to following formula (1) Energy:
E (s)=λ1E1(s)+λ2E2(s) (1)
Wherein, E (s) represents the energy of piece s to be selected, E1(s) energy of the texture along the piece s to be selected, E are represented2 (s) variance of the affine parameter of the affine field along the piece s to be selected, λ are represented1、λ2E is represented respectively1(s) and E2(s) power Value, λ12=1, and 0<λ12<1,
The variance E of affine parameter in the piece to be selected for selecting ENERGY E (s) minimum2(s) described in minimum piece to be selected is used as Optimal piece.
Note 13, the method according to note 9, wherein, the optimal piece that the basis detects, to each to be spliced File and picture the step of being spliced include:
According to the affine field of one of them file and picture to be spliced, to every in one of them described file and picture to be spliced A pixel carries out coordinate transform;
To carry out one of them described file and picture to be spliced and other file and pictures to be spliced after coordinate transform according to The optimal piece is spliced.
Note 14, the method according to note 13, wherein, carry out the coordinate transform according to the following conditions:For institute It states with the pixel in the overlapping region of other file and pictures to be spliced in one of them file and picture to be spliced, it is closer described The pixel of the optimal piece of one of them file and picture to be spliced carries out pixel described in affine field during coordinate transform The weights of the affine transformation matrix of point are higher.
Note 15, the method according to note 14, wherein, it is carried out in the overlapping region according to following formula (2) Pixel coordinate transform:
R (P)=λ A (P)+(1- λ) I (2)
Wherein, R (P) represents the transformation matrix of coordinates of the pixel P in the overlapping region, and A (P) represents pixel P's Affine transformation matrix, I represent unit matrix, and λ represents the weights of the affine transformation matrix of pixel P,λ≤1, | | AP | | represent the distance on the boundary of pixel P and the overlapping region, | | AC | | represent the boundary of the overlapping region with it is described The distance of optimal piece.

Claims (8)

1. a kind of splicing apparatus of file and picture, described device include:
Unit is corrected, the correction unit is used to carry out preliminary corrections to each file and picture to be spliced;
Detection unit, the detection unit are used to detect each file and picture to be spliced after the correction unit preliminary corrections Optimal piece, wherein, the optimal piece passes through the white space of the file and picture, and along the optimal piece The variation of affine field is minimum;
Concatenation unit, the concatenation unit is used for according to optimal piece detected by the detecting unit, to each to be spliced File and picture is spliced,
The detection unit includes:
First determining module, first determining module are used to determine multiple spellings to be selected of one of them file and picture to be spliced Seam;
First detection module, the first detection module are used to determine the energy of each piece to be selected in the multiple piece to be selected Amount, and the minimum piece to be selected that changes of the affine field in the piece to be selected of minimum energy along the piece to be selected is selected to make For the optimal piece of one of them file and picture to be spliced, according to one of them described file and picture to be spliced most Excellent piece determines the optimal of the other file and pictures to be spliced spliced with one of them described file and picture to be spliced Piece.
2. the apparatus according to claim 1, wherein, the first detection module includes:
Extraction unit, the extraction unit are used to extract the line in each file and picture to be spliced and the spy near the line Sign point;
Matching unit, the matching unit are used for the line in each file and picture to be spliced for extracting the extraction unit And characteristic point is matched;
Estimation unit, the estimation unit are used to, according to the matched line of the matching unit and characteristic point, estimate each to be spliced File and picture affine field;
First detection unit, the first detection unit be used for according to the binary image of one of them file and picture to be spliced with And the affine field of one of them file and picture to be spliced that the estimation unit estimates, select the spelling to be selected of minimum energy Along the minimum piece to be selected of the variation of the affine field of the piece to be selected as one of them described document map to be spliced in seam The optimal piece of picture;
Second detection unit, the second detection unit be used for according to the first detection unit detect it is described one of them One of them file and picture to be spliced that the optimal piece and the estimation unit of file and picture to be spliced estimate Affine field determines the optimal spelling of other file and pictures to be spliced spliced with one of them described file and picture to be spliced Seam.
3. the apparatus according to claim 1, wherein, the first detection module determines each according to following formula (1) The energy of piece to be selected:
E (s)=λ1E1(s)+λ2E2(s) (1)
Wherein, E (s) represents the energy of piece s to be selected, E1(s) energy of the texture along the piece s to be selected, E are represented2(s) Represent the variance of the affine parameter of the affine field along the piece s to be selected, λ1、λ2E is represented respectively1(s) and E2(s) weights, λ12=1, and 0 < λ12< 1,
Also, the variance E of affine parameter in the minimum piece to be selected of the first detection module selection ENERGY E (s)2(s) it is minimum Piece to be selected is as the optimal piece.
4. the apparatus according to claim 1, wherein, the concatenation unit includes:
Converter unit, the converter unit is used for the affine field according to one of them file and picture to be spliced, to described wherein one Each pixel in a file and picture to be spliced carries out coordinate transform;
Synthesis unit, the synthesis unit be used to carrying out the converter unit after coordinate transform described one of them is to be spliced File and picture is spliced with other file and pictures to be spliced according to the optimal piece.
5. device according to claim 4, wherein, the converter unit carries out the coordinate transform according to the following conditions: For, with the pixel in the overlapping region of other file and pictures to be spliced, more being connect in one of them described file and picture to be spliced The pixel of the optimal piece of nearly one of them file and picture to be spliced carries out during coordinate transform institute in the affine field The weights for stating the affine transformation matrix of pixel are higher.
6. device according to claim 5, wherein, the converter unit carries out described overlapping according to following formula (2) The coordinate transform of pixel in region:
R (P)=λ A (P)+(1- λ) I (2)
Wherein, R (P) represents the transformation matrix of coordinates of the pixel P in the overlapping region, and A (P) represents that pixel P's is affine Transformation matrix, I represent unit matrix, and λ represents the weights of the affine transformation matrix of pixel P,λ≤1, wherein, | | AP | | represent the distance on the boundary of pixel P and the overlapping region, | | AC | | represent the boundary of the overlapping region with it is described The distance of optimal piece.
7. a kind of scanner, the scanner includes the splicing apparatus of file and picture according to claim 1.
8. a kind of joining method of file and picture, the method includes:
Preliminary corrections are carried out to each file and picture to be spliced;
The optimal piece of each file and picture to be spliced after preliminary corrections is detected, wherein, the optimal piece passes through described The white space of file and picture, and it is minimum along the variation of the affine field of the optimal piece;
According to the optimal piece detected, each file and picture to be spliced is spliced,
The step of optimal piece of each file and picture to be spliced after the detection preliminary corrections, includes:
Determine multiple pieces to be selected of one of them file and picture to be spliced;
It determines the energy of each piece to be selected in the multiple piece to be selected, and selects edge in the piece to be selected of minimum energy The piece to be selected of variation minimum of the affine field of the piece to be selected as one of them file and picture to be spliced Optimal piece determines what is spliced with one of band according to the optimal piece of one of them file and picture to be spliced The optimal piece of other file and pictures to be spliced that file and picture is spliced.
CN201410389424.1A 2014-08-08 2014-08-08 Splicing apparatus, method and the scanner of file and picture Active CN105335948B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410389424.1A CN105335948B (en) 2014-08-08 2014-08-08 Splicing apparatus, method and the scanner of file and picture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410389424.1A CN105335948B (en) 2014-08-08 2014-08-08 Splicing apparatus, method and the scanner of file and picture

Publications (2)

Publication Number Publication Date
CN105335948A CN105335948A (en) 2016-02-17
CN105335948B true CN105335948B (en) 2018-06-29

Family

ID=55286456

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410389424.1A Active CN105335948B (en) 2014-08-08 2014-08-08 Splicing apparatus, method and the scanner of file and picture

Country Status (1)

Country Link
CN (1) CN105335948B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107945113B (en) * 2017-11-17 2019-08-30 北京天睿空间科技股份有限公司 The antidote of topography's splicing dislocation

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009210502A (en) * 2008-03-06 2009-09-17 Furukawa Electric Co Ltd:The Method for determining polygonal fiber rotation reference position, and optical fiber fusion splicing apparatus
JP2010117600A (en) * 2008-11-13 2010-05-27 Furukawa Electric Co Ltd:The Fusion splicer, and connection control method for fusion splicer
CN101896920A (en) * 2008-03-19 2010-11-24 东莞市步步高教育电子产品有限公司 Image processing method and device based on motion scan
CN101976449A (en) * 2010-11-25 2011-02-16 上海合合信息科技发展有限公司 Method for shooting and matching multiple text images
CN102074001A (en) * 2010-11-25 2011-05-25 上海合合信息科技发展有限公司 Method and system for stitching text images
CN102194212A (en) * 2010-03-08 2011-09-21 佳能株式会社 Image processing method, device and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140161356A1 (en) * 2012-12-10 2014-06-12 Rawllin International Inc. Multimedia message from text based images including emoticons and acronyms

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009210502A (en) * 2008-03-06 2009-09-17 Furukawa Electric Co Ltd:The Method for determining polygonal fiber rotation reference position, and optical fiber fusion splicing apparatus
CN101896920A (en) * 2008-03-19 2010-11-24 东莞市步步高教育电子产品有限公司 Image processing method and device based on motion scan
JP2010117600A (en) * 2008-11-13 2010-05-27 Furukawa Electric Co Ltd:The Fusion splicer, and connection control method for fusion splicer
CN102194212A (en) * 2010-03-08 2011-09-21 佳能株式会社 Image processing method, device and system
CN101976449A (en) * 2010-11-25 2011-02-16 上海合合信息科技发展有限公司 Method for shooting and matching multiple text images
CN102074001A (en) * 2010-11-25 2011-05-25 上海合合信息科技发展有限公司 Method and system for stitching text images

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Camera-based analysis of text and documents: a survey;Liang J 等;《 International Journal on Document Analysis and Recognition》;20050731;第7卷(第2期);84-104 *
基于手持相机的文档图像拼接算法;苗立刚;《中国图象图形学报》;20090831;第14卷(第8期);1656-1662 *
多镜头文档图像拼接技术研究;赵聪;《中国优秀硕士学位论文全文数据库-信息科技辑》;20130215(第02期);第I138-1658页正文第15,37,42,44,45,46,46页 *

Also Published As

Publication number Publication date
CN105335948A (en) 2016-02-17

Similar Documents

Publication Publication Date Title
US11317081B2 (en) Gaze correction of multi-view images
WO2018188534A1 (en) Face image processing method and device, and electronic device
US9495735B2 (en) Document unbending systems and methods
US20160321242A1 (en) Natural Language Processing Utilizing Grammar Templates
US20090252439A1 (en) Method and system for straightening out distorted text-lines on images
US20240046539A1 (en) System and method for generating a digital image collage
BRPI1100230A2 (en) image processing device and method, program executable by a computer, and image processing device
US10169891B2 (en) Producing three-dimensional representation based on images of a person
US9294655B2 (en) Apparatus for and method of processing document image
JP2006304265A (en) Image output apparatus, image output method, and image output program
CN111860527A (en) Image correction method, image correction device, computer device, and storage medium
CN106530219A (en) Image splicing method and device
CN107679442A (en) Method, apparatus, computer equipment and the storage medium of document Data Enter
JP2013250974A (en) Image processing device, image processing method, scanner, and storage medium
JP6311372B2 (en) Image processing apparatus and image processing method
CN106611406B (en) Method for correcting image and image correcting device
CN105335948B (en) Splicing apparatus, method and the scanner of file and picture
Wang et al. INSPIRATION: A reinforcement learning-based human visual perception-driven image enhancement paradigm for underwater scenes
US20140299669A1 (en) Optical-reading code preparation device
JP6137464B2 (en) Image processing apparatus and image processing program
Dai et al. Improved digital image restoration algorithm based on criminisi
EP3107032A1 (en) Method and device for facial landmark annotation and corresponding computer program product and computer-readable medium
US9324013B2 (en) Image used commercial goods creating apparatus, image used commercial goods creating method, and non-transitory computer readable recording medium
CN109344710A (en) A kind of localization method of image characteristic point, device, storage medium and processor
US20230090313A1 (en) Autonomously removing scan marks from digital documents utilizing content-aware filters

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