CN108364024A - Image matching method, device, computer equipment and storage medium - Google Patents

Image matching method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN108364024A
CN108364024A CN201810143256.6A CN201810143256A CN108364024A CN 108364024 A CN108364024 A CN 108364024A CN 201810143256 A CN201810143256 A CN 201810143256A CN 108364024 A CN108364024 A CN 108364024A
Authority
CN
China
Prior art keywords
image
shooting
scanning
characteristic point
password
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
CN201810143256.6A
Other languages
Chinese (zh)
Other versions
CN108364024B (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.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China 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 Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN201810143256.6A priority Critical patent/CN108364024B/en
Publication of CN108364024A publication Critical patent/CN108364024A/en
Application granted granted Critical
Publication of CN108364024B publication Critical patent/CN108364024B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07DHANDLING OF COINS OR VALUABLE PAPERS, e.g. TESTING, SORTING BY DENOMINATIONS, COUNTING, DISPENSING, CHANGING OR DEPOSITING
    • G07D7/00Testing specially adapted to determine the identity or genuineness of valuable papers or for segregating those which are unacceptable, e.g. banknotes that are alien to a currency
    • G07D7/20Testing patterns thereon
    • G07D7/2016Testing patterns thereon using feature extraction, e.g. segmentation, edge detection or Hough-transformation
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07DHANDLING OF COINS OR VALUABLE PAPERS, e.g. TESTING, SORTING BY DENOMINATIONS, COUNTING, DISPENSING, CHANGING OR DEPOSITING
    • G07D7/00Testing specially adapted to determine the identity or genuineness of valuable papers or for segregating those which are unacceptable, e.g. banknotes that are alien to a currency
    • G07D7/20Testing patterns thereon
    • G07D7/202Testing patterns thereon using pattern matching

Landscapes

  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

This application involves a kind of image matching method, device, computer equipment and storage mediums.The method includes:Get multiple shooting images and multiple scan images, each shooting image and each scan image are detected to obtain corresponding password area image, feature extraction is carried out to password area image and obtains multiple characteristic points in the multiple characteristic points and scan image password area in shooting image password area, the characteristic point of the characteristic point of each shooting image password area and each scan image password area is matched, the corresponding scan image of each shooting image is obtained.Matching accuracy rate between multiple shooting images and multiple scan images can be improved using this method.

Description

Image matching method, device, computer equipment and storage medium
Technical field
This application involves field of computer technology, more particularly to a kind of image matching method, device, computer equipment and Storage medium.
Background technology
With the development of computer technology, there is image matching technology, image matching technology mainly there are two major classes to be based on The matching process and feature-based matching method of gray scale, wherein the matching process based on gray scale is the gray scale using two images Difference is matched, and feature-based matching method is by extracting the structure feature progress stablized in two width figures and shared Match.And the carry out invoice reimbursement in enterprise at present can use image matching technology, conventional method generally only to utilize images match skill The matching process or feature-based matching method based on gray scale in art, however only use in image matching technology merely It is low that one of which matching process is easy to cause multiple matching accuracy rates taken pictures between invoice image and multiple scanning invoice images.
Invention content
Based on this, it is necessary in view of the above technical problems, provide a kind of images match side that can improve images match rate Method, device, computer equipment and storage medium.
A kind of image matching method, this method include:
Obtain multiple shooting images of input and multiple scan images;
Each shooting image and each scan image are detected, the shooting password area figure in each shooting image is obtained Scanning password area image in picture and each scan image;
Feature extraction is carried out to each shooting password area image and each scanning password area image, obtains each shooting password The scanning feature point in shooting characteristic point and each scanning password area image in area's image;
The corresponding shooting figure of each shooting characteristic point is calculated according to each shooting characteristic point and each scanning feature point As the matching distance between scan image corresponding with each scanning feature point;
The matching between shooting image scan image corresponding with each scanning feature point is corresponded to from each shooting characteristic point Object matching distance is chosen in distance;
Object matching is determined as matching image apart from corresponding shooting image and scan image.
Each shooting is calculated according to each shooting characteristic point and each scanning feature point in one of the embodiments, Matching distance between the corresponding shooting image of characteristic point scan image corresponding with each scanning feature point, including:Acquisition is worked as Current shooting characteristic point is carried out combination of two with each scanning feature point respectively, obtains multiple characteristic points by preceding shooting characteristic point Combination;Characteristic point in being combined according to each characteristic point is calculated the corresponding shooting image of current shooting characteristic point and is swept with each Retouch the matching distance between the corresponding scan image of characteristic point;Next shooting characteristic point is obtained as current shooting characteristic point, It returns and current shooting characteristic point is subjected to combination of two with each scanning feature point respectively, obtain the step of multiple characteristic point combinations Suddenly, until obtaining between the corresponding shooting image of each shooting characteristic point scan image corresponding with each scanning feature point With distance.
Current shooting characteristic point is calculated in characteristic point in being combined in one of the embodiments, according to each characteristic point The step of corresponding matching distance shot between image scan image corresponding with each scanning feature point, including:According to default Rule chooses certain amount of characteristic point combination from the combination of multiple characteristic points;Characteristic point in being combined according to the characteristic point of selection It is calculated and combines corresponding matching distance with characteristic point;Current shooting feature is calculated according to matching distance and specific quantity Matching distance between the corresponding shooting image of point scan image corresponding with each scanning feature point.
Shooting image to be corresponded to from each shooting characteristic point corresponding with each scanning feature point in one of the embodiments, In matching distance between scan image choose object matching apart from the step of, including:Each shooting characteristic point is corresponded to and is shot Matching distance between image scan image corresponding with each scanning feature point forms matching distance matrix;To matching distance square Battle array carries out the first dimension lookup, by minimal matching span in each first dimension matching distance in the matching distance matrix found It is determined as the first matching distance;Second dimension lookup is carried out to matching distance matrix, if the first matching distance is residing second Matching distance in dimension is minimum, then the first matching distance is determined as object matching distance.
Object matching is determined as matching figure apart from corresponding shooting image and scan image in one of the embodiments, Before the step of picture, including:Detect whether object matching distance is less than preset matching distance;When detecting object matching apart from small In preset matching apart from when, then enter and be determined as matching image apart from corresponding shooting image and scan image by object matching Step.
Each shooting image and each scan image are detected in one of the embodiments, obtain each shooting In image shooting password area image and each scan image in scanning password area image the step of, including:To each shooting Image and each scan image carry out rough detection, obtain the shooting password rough detection region in each shooting image and each scanning Scanning password rough detection region in image;Each shooting password rough detection region and each scanning password rough detection region are counted Calculation obtains each shooting password area edge image and each scanning password area edge image;To each shooting password area edge image Contour extraction is carried out with each scanning password area edge image, obtains each shooting password contour area and each scanning password wheels Wide region;It is calculated in each shooting image according to each shooting password contour area and each scanning password contour area Shoot the scanning password area image in password area image and each scan image.
This method further includes in one of the embodiments,:It is close to each shooting password rough detection region and each scanning Code rough detection region carries out denoising respectively, obtains each shooting password rough detection region after denoising and each scanning Rough Inspection Survey region.
In one of the embodiments, matching distance be by it is each shooting password area image in shooting characteristic point with Scanning feature point in each scanning password area image carries out similarity calculation and obtains.
Shooting image is that VAT invoice shoots image in one of the embodiments, and scan image is VAT invoice Scan image, when object matching is determined as matching apart from corresponding VAT invoice shooting image and VAT invoice scan image When, it indicates successfully to submit an expense account.
A kind of image matching apparatus, the device include:
Image collection module, multiple shooting images for obtaining input and multiple scan images;
Image detection module obtains each shooting figure for being detected to each shooting image and each scan image The scanning password area image in shooting password area image and each scan image as in;
Characteristic extracting module is obtained for carrying out feature extraction to each shooting password area image and scanning password area image To the scanning feature point in the shooting characteristic point and each scanning password area image in each shooting password area image;
Matching distance computing module, for each bat to be calculated according to each shooting characteristic point and each scanning feature point Take the photograph the matching distance between the corresponding shooting image of characteristic point scan image corresponding with each scanning feature point;
Matching distance chooses module, corresponding with each scanning feature point for corresponding to shooting image from each shooting characteristic point Scan image between matching distance in choose object matching distance;
Image detection module is matched, for object matching to be determined as matching apart from corresponding shooting image and scan image Image.
A kind of computer equipment, including memory, processor, the memory are stored with computer program, the processing Device realizes following steps when executing the computer program:
Obtain multiple shooting images of input and multiple scan images;
Each shooting image and each scan image are detected, the shooting password area figure in each shooting image is obtained Scanning password area image in picture and each scan image;
Feature extraction is carried out to each shooting password area image and each scanning password area image, obtains each shooting password The scanning feature point in shooting characteristic point and each scanning password area image in area's image;
The corresponding shooting figure of each shooting characteristic point is calculated according to each shooting characteristic point and each scanning feature point As the matching distance between scan image corresponding with each scanning feature point;
The matching between shooting image scan image corresponding with each scanning feature point is corresponded to from each shooting characteristic point Object matching distance is chosen in distance;
Object matching is determined as matching image apart from corresponding shooting image and scan image.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor Following steps are realized when row:
Obtain multiple shooting images of input and multiple scan images;
Each shooting image and each scan image are detected, the shooting password area figure in each shooting image is obtained Scanning password area image in picture and each scan image;
Feature extraction is carried out to each shooting password area image and each scanning password area image, obtains each shooting password The scanning feature point in shooting characteristic point and each scanning password area image in area's image;
The corresponding shooting figure of each shooting characteristic point is calculated according to each shooting characteristic point and each scanning feature point As the matching distance between scan image corresponding with each scanning feature point;
The matching between shooting image scan image corresponding with each scanning feature point is corresponded to from each shooting characteristic point Object matching distance is chosen in distance;
Object matching is determined as matching image apart from corresponding shooting image and scan image.
Above-mentioned image matching method, device, computer equipment and storage medium, terminal get multiple shooting images and more A scan image is detected each shooting image and each scan image to obtain corresponding password area image, to password area Image carries out feature extraction and obtains multiple features in the multiple characteristic points and scan image password area in shooting image password area The characteristic point of the characteristic point of each shooting image password area and each scan image password area is matched, is obtained each by point Shoot the corresponding scan image of image.Since the password area in image is the region for most having discrimination, by increasing password Area's detection can improve multiple matching accuracy rates taken pictures between invoice image and multiple scanning invoice images.
Description of the drawings
Fig. 1 is the applied environment figure of image matching method in one embodiment;
Fig. 2 is the flow diagram of image matching method in one embodiment;
Fig. 2 a are corresponding with each scanning feature point for the corresponding shooting image of each shooting characteristic point in one embodiment The flow diagram of matching distance generation step between scan image;
Fig. 3 is that current shooting characteristic point pair is calculated in the characteristic point in being combined according to each characteristic point in one embodiment The flow diagram of the matching distance step between image scan image corresponding with each scanning feature point should be shot;
To be shot from each shooting characteristic point correspondence in one embodiment, image is corresponding with each scanning feature point to be swept Fig. 4 Flow diagram of the object matching apart from step is chosen in tracing in the matching distance as between;
Fig. 5 is to be detected to each shooting image and each scan image in one embodiment, obtains each shooting figure The flow diagram of scanning password area image step in shooting password area image and each scan image as in;
Fig. 6 is the schematic diagram of VAT invoice image in one embodiment;
Fig. 7 is the principle schematic of image matching method in one embodiment;
Fig. 8 is the structure diagram of image matching apparatus in one embodiment;
Fig. 9 is the internal structure chart of one embodiment Computer equipment.
Specific implementation mode
It is with reference to the accompanying drawings and embodiments, right in order to make the object, technical solution and advantage of the application be more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not For limiting the application.
Image matching method provided by the present application can be applied in application environment as shown in Figure 1.Wherein, terminal 102 It is communicated by network with server 104 by network.Server obtains the multiple shooting images and correspondence that terminal is sent Multiple scan images;Each shooting image and each scan image are detected, the shooting in each shooting image is obtained Scanning password area image in password area image and each scan image;To each shooting password area image and scanning password area figure As carrying out feature extraction, sweeping in the shooting characteristic point in each shooting password area image and each scanning password area image is obtained Retouch characteristic point;The corresponding shooting figure of each shooting characteristic point is calculated according to each shooting characteristic point and each scanning feature point As the matching distance between scan image corresponding with each scanning feature point;From each shooting characteristic point correspond to shooting image with Object matching distance is chosen in matching distance between the corresponding scan image of each scanning feature point;By object matching apart from right The shooting image and scan image answered are determined as matching image.Wherein, terminal 102 can be, but not limited to be various individual calculus Machine, laptop, smart mobile phone, tablet computer and portable wearable device, server 104 can use independent server The either server cluster of multiple servers composition is realized.
In one embodiment, as shown in Fig. 2, providing a kind of image matching method, it is applied in Fig. 1 in this way It illustrates, includes the following steps for server or terminal:
Step 202, multiple shooting images of input and multiple scan images are obtained.
Wherein, it can be same image that scan image, which is shooting image, here, can also upload multiple scanning figures simultaneously Picture and corresponding multiple scan images, wherein shooting image includes but not limited to invoice value-added tax image etc..Specifically, can lead to The related application for crossing terminal carries out uploading multiple shooting images and corresponding multiple scan images, and so-called application program can To be but not limited to the various financial applications, Video Applications, social networking application etc. that can upload image.
Step 204, each shooting image and each scan image are detected, obtain the shooting in each shooting image Scanning password area image in password area image and each scan image.
Wherein, password area image is that most have identification or most characteristic region, password area image in shooting image The password area image that can be but not limited in VAT invoice image, the password area image in so-called VAT invoice image are Tax-supervise system billing system is by the main information on VAT invoice to encrypt formation.Wherein main information includes but not limited to Invoice codes, invoice number are made out an invoice the date, purchaser's duty paragraph, pin side's duty paragraph, the amount of money, amount of tax to be paid etc..Specifically, get it is multiple After shooting image and corresponding multiple scan images, it is detected, obtains to getting each shooting image and each scan image To the scanning password area image in the shooting password area image and each scan image in each shooting image.
Step 206, feature extraction is carried out to each shooting password area image and each scanning password area image, obtained each Shoot the scanning feature point in the shooting characteristic point and each scanning password area image in the image of password area.
Wherein, due to password area image be most have identification or a most characteristic region in shooting image, and due to The feature that the main information on the image of password area in each shooting image is all different, therefore is extracted from the image of password area Point has more identification or distinction compared to the characteristic point in other regions in shooting image.Specifically, each bat is being obtained After taking the photograph the scanning password area image in shooting password area image and each scan image in image, in each shooting image It shoots password area image and carries out feature extraction, obtain multiple shooting features with identification in each shooting password area image Point;Similarly, feature extraction is carried out to the scanning password area image in each scan image, obtains each scanning password area image In with identification multiple scanning feature points.
Step 208, each shooting characteristic point is calculated according to each shooting characteristic point and each scanning feature point to correspond to Corresponding with each scanning feature point scan image of shooting image between matching distance.
Wherein, each due to being obtained to each shooting password area image and the progress feature extraction of each scanning password area image The scanning feature point in the shooting characteristic point and each scanning password area image of password area image is shot, therefore need to be to each shooting Characteristic point and each scanning feature point all carry out matching so that be calculated the corresponding shooting image of each shooting characteristic point and respectively Matching distance between the corresponding scan image of a scanning feature point.So-called matching distance is according to each shooting characteristic point and to sweep Characteristic point is retouched to carry out similarity calculation to obtain the corresponding shooting image of each shooting characteristic point corresponding with each scanning feature point Similarity between scan image.Specifically, after getting each shooting characteristic point and each scanning feature point, by each bat It takes the photograph characteristic point and carries out similarity calculation with each scanning feature point, obtain multiple result of calculations, i.e. matching distance.
Step 210, from the corresponding shooting image of each shooting characteristic point scan image corresponding with each scanning feature point Between matching distance in choose object matching distance.
Step 212, object matching is determined as matching image apart from corresponding shooting image and scan image.
Wherein, object matching distance is that the matching distance for meeting preset requirement is chosen in multiple matching distances.Specifically, Matching between getting the corresponding shooting image of each shooting characteristic point scan image corresponding with each scanning feature point After distance, the object matching distance for meeting preset requirement is chosen from multiple matching distances.Further, due to the target of selection Matching distance is to be calculated with scanning feature point by shooting characteristic point, and shooting characteristic point has corresponding shooting figure Picture, scanning feature point have corresponding scanning feature point, therefore object matching is true apart from corresponding shooting image and scan image It is set to the image to match each other.
In above-mentioned image matching method, terminal gets multiple shooting images and multiple scan images, to each shooting figure Picture and each scan image are detected to obtain corresponding password area image, and carrying out feature extraction to password area image is shot Multiple characteristic points in multiple characteristic points and scan image password area in image password area, by each shooting image password area Characteristic point and the characteristic point of each scan image password area are matched, and the corresponding scan image of each shooting image is obtained.By Password area in image is the region for most having discrimination, therefore can improve multiple invoices of taking pictures by increasing password area detection Matching accuracy rate between image and multiple scanning invoice images.
As shown in Figure 2 a, in one embodiment, according to each shooting characteristic point and each scanning feature point Be calculated the corresponding shooting image of each shooting characteristic point scan image corresponding with each scanning feature point it Between matching distance, including:
Step 208a obtains current shooting characteristic point, and current shooting characteristic point is carried out with each scanning feature point respectively Combination of two obtains multiple characteristic point combinations.
Wherein, each due to being obtained to each shooting password area image and the progress feature extraction of each scanning password area image The scanning feature point in the shooting characteristic point and each scanning password area image of password area image is shot, therefore need to be to each shooting Characteristic point and each scanning feature point are all matched.Wherein, current shooting characteristic point is to take multiple shooting characteristic points at random One shooting characteristic point is as current shooting characteristic point.Specifically, multiple shooting characteristic points are randomly selected into a shooting feature As current shooting characteristic point, current shooting characteristic point is subjected to combination of two with each scanning feature point respectively, obtains and works as The corresponding multiple characteristic points combinations of preceding shooting characteristic point.Such as multiple shooting characteristic points are:A, B, C, multiple scanning feature points are: A, b, c carry out current shooting feature and each scanning feature point two-by-two using A shooting characteristic points as current shooting characteristic point Combination obtains multiple characteristic point combinations:Aa, Ab and Ac.Wherein, shooting characteristic point A, B and C includes multiple features Point.
The corresponding shooting of current shooting characteristic point is calculated in step 208b, the characteristic point in being combined according to each characteristic point Matching distance between image scan image corresponding with each scanning feature point.
Wherein, matching distance is the result obtained by carrying out similarity calculation between characteristic point.Due to each characteristic point Shooting characteristic point and scanning comprising shooting characteristic point and scanning feature point in combination, therefore in being combined according to each characteristic point is special Sign point carries out the corresponding shooting image of current shooting characteristic point that similarity calculation obtains in each characteristic point combination and is swept with each Retouch the similarity between the corresponding scan image of characteristic point, i.e. matching distance.Wherein, matching distance is bigger illustrates to shoot characteristic point Corresponding shooting image and the corresponding scan image similarity of scanning feature point are bigger.
Step 208c obtains next shooting characteristic point as current shooting characteristic point, returns current shooting characteristic point The step of carrying out combination of two with each scanning feature point respectively, obtaining multiple characteristic point combinations, until it is special to obtain each shooting Matching distance between the corresponding shooting image of sign point scan image corresponding with each scanning feature point.
Wherein, multiple due to being obtained to each shooting password area image and the progress feature extraction of each scanning password area image Characteristic point and multiple scanning features point are shot, and each shooting characteristic point and each scanning feature point need to all be matched.Cause This need to will randomly select a shooting characteristic point as current shooting characteristic point, by current shooting feature in multiple shooting characteristic points Point and each scanning feature point carry out after combination of two is calculated and combines corresponding matching distance, need to will be special from multiple shootings again A shooting characteristic point is randomly selected in sign point, will select the shooting characteristic point come as current shooting characteristic point, returning will Current shooting characteristic point carries out combination of two with each scanning feature point respectively, obtains the step of multiple characteristic points combine, until Corresponding shot between image scan image corresponding with each scanning feature point is all calculated in multiple shooting characteristic points With distance.
In one embodiment, as shown in figure 3, current shooting is calculated in the characteristic point in being combined according to each characteristic point Characteristic point corresponds to the step of matching distance between shooting image scan image corresponding with each scanning feature point, including:
Step 302, certain amount of characteristic point is chosen from the combination of multiple characteristic points according to preset rules to combine.
Wherein, since characteristic point is to shoot in password area image of the image either in scan image to have identification or generation The feature of table, but since when carrying out feature point extraction, the discrimination or identification of some possible characteristic points compare It is weak, therefore can choose that identification is strong or discrimination chooses by force certain amount of characteristic point combination from the combination of multiple characteristic points. Such as, specific quantity is 10 groups, and therefore, selection identification is strong from the combination of multiple characteristic points or discrimination chooses by force 10 groups of features Point combination.
Step 304, the characteristic point in being combined according to the characteristic point of selection, which is calculated, combines corresponding matching with characteristic point Distance.
Step 306, according to matching distance and specific quantity be calculated current shooting characteristic point correspond to shooting image with it is each Matching distance between the corresponding scan image of a scanning feature point.
Specifically, after certain amount of characteristic point combination is chosen in the combination of multiple characteristic points, in being combined due to characteristic point Including shooting characteristic point and scanning feature point, therefore need to be to the shooting characteristic point and scanning feature point progress phase in characteristic point combination Each characteristic point is calculated like degree and combines corresponding matching distance.Since average value can reflect that multiple matching distances are concentrated One index of gesture, therefore carry out average computation according to the multiple matching distances and specific quantity being calculated and obtain feature point group Matching distance between the corresponding shooting image of shooting characteristic point for including in conjunction and the corresponding scan image of scanning feature point.
In one embodiment, as shown in figure 4, corresponding to shooting image and each scanning feature point from each shooting characteristic point In matching distance between corresponding scan image choose object matching apart from the step of, including:
Step 402, by each shooting characteristic point correspond to corresponding with each scanning feature point scan image of shooting image it Between matching distance form matching distance matrix.
Wherein, matching distance matrix is the matching distance set arranged according to rectangular array.Specifically, each bat is being obtained After taking the photograph the matching distance between a little corresponding with each scanning feature point scan image of corresponding shooting image, by each matching away from From according to the matching distance matrix for being centainly regularly arranged into rectangular array.Wherein, so-called certain rule can be by same shooting spy Sign point is put into the same row in matching distance matrix.
Step 404, the first dimension lookup is carried out to matching distance matrix, by the matching distance matrix found each the Minimal matching span is determined as the first matching distance in dimension matching distance.
Wherein, the first dimension can be but not limited to the row and column of matching matrix.Specifically, due to matching distance matrix It is the matching distance set arranged according to rectangular array, therefore matching distance matrix is known as m* according to the element of matching distance matrix N matrix, m and n are respectively positive integer.Further, the first dimension lookup is carried out to matching distance matrix, i.e., to matching distance square Battle array each row in element searched, obtain matching distance minimum in each row matching distance be determined as the first matching away from From.
Step 406, the second dimension lookup is carried out to matching distance matrix, if the first matching distance is in the second residing dimension In matching distance be minimum, then the first matching distance is determined as object matching distance.
Specifically, the first dimension lookup is being carried out to matching distance matrix, after finding the first matching distance, similarly, Second dimension lookup is carried out to matching distance matrix, i.e., the element in each row of matching distance matrix is searched, detection the Whether the matching distance in the second residing dimension is minimum to the first matching distance that dimension is found, if so, can incite somebody to action First matching distance is determined as satisfactory object matching distance;It is on the contrary, then it is assumed that the corresponding shooting figure of the first matching distance As not finding matched scan image.
It is carried out it should be noted that the first dimension in step 402 can also be element in each row to matching distance matrix It searches, similarly, the second dimension in step 406 can also be that the element in each row to matching distance matrix is searched.
In one embodiment, object matching is determined as matching image apart from corresponding shooting image and scan image Before step, including:Detect whether object matching distance is less than preset matching distance;When detecting that it is pre- that object matching distance is less than If when matching distance, then entering the step that object matching is determined as to matching image apart from corresponding shooting image and scan image Suddenly.
Wherein, by object matching apart from corresponding shooting image and scan image be determined as match image the step of it Before, it also needs to be detected the object matching distance of selection.Specifically, whether detection object matching distance is less than preset Matching distance, when detect object matching distance be less than preset matching apart from when, then can enter object matching apart from corresponding bat It takes the photograph image and scan image is determined as the image that matches each other.Although conversely, choosing satisfactory mesh from matching distance matrix After marking matching distance, but when detecting that object matching distance is greater than or equal to preset matching distance, then it is assumed that mesh It is not the image to match each other to mark the corresponding shooting image of matching distance and scan image.By the screening of condition twice, improve The matching accuracy rate of shooting image and scan image.
In one embodiment, it as shown in figure 5, being detected to each shooting image and each scan image, obtains each In a shooting image shooting password area image and each scan image in scanning password area image the step of, including:
Step 502, rough detection is carried out to each shooting image and each scan image, obtains the bat in each shooting image Take the photograph the scanning password rough detection region in password rough detection region and each scan image.
Wherein, it is password area image due to most having identification or most characteristic region in VAT invoice image, Therefore rough detection need to be carried out to each shooting image and each scan image, obtains shooting password rough detection in each shooting image Scanning password rough detection region in region and each scan image.Specifically, as shown in fig. 6, Fig. 6 is shown in one embodiment The schematic diagram of VAT invoice image, according in VAT invoice synthesis seal ellipses detection and horizontal line to each shooting image Rough detection is carried out with each scan image, obtains the approximate region of the shooting password area in each shooting image and each scanning The approximate region of scanning password area in image in dotted line frame is shooting password rough detection region and scanning password in i.e. Fig. 6 Rough detection region.
Step 504, each shooting password rough detection region and each scanning password rough detection region are calculated each Shoot password area edge image and each scanning password area edge image.
Wherein, edge image is the shooting password rough detection region in the shooting image to VAT invoice and value-added tax hair Scanning password rough detection region in the scan image of ticket carries out the image obtained after edge extracting.Specifically, it is detecting respectively Behind the scanning password rough detection region in shooting password rough detection region and each scan image in a shooting shooting image, it is It, need to be to shooting password rough detection region and scanning password Rough Inspection after being further exactly found shooting password area and scanning password area It surveys region and carries out big law algorithm OTSU binary segmentations, obtain each shooting password area edge image and each scanning password area side Edge image.Wherein OTSU is a kind of for determining shooting password rough detection region and scanning password rough detection region binarization segmentation The algorithm of threshold value.
Step 506, Contour extraction is carried out to each shooting password area edge image and each scanning password area edge image, Obtain each shooting password contour area and each scanning password contour area.
Wherein, Contour extraction is to track boundary by sequentially finding out the marginal point in edge image.Specifically, it is counting After calculation obtains each shooting password area edge image and each scanning password area edge image, need close to each shooting to priority Code area edge image and each scanning password area edge image progress morphology closed operation and morphology open operation obtain it is corresponding Shoot password figure edge image and scanning password area edge image, then by sequentially find out each shooting password area edge image with Marginal point in each scanning password area edge image comes the boundary on the boundary and scanning password area of track up password area, obtains The scanning password contour area in shooting password contour area and each scan image in each shooting image.
Step 508, each bat is calculated according to each shooting password contour area and each scanning password contour area Take the photograph the scanning password area image in shooting password area image and each scan image in image.
Specifically, the scanning in the shooting password contour area and each scan image in obtaining each shooting image is close It is close in order to further obtain the scanning in the shooting password area and each scan image in each shooting image after code contour area Code area, need to it is each shooting image in shooting password contour area and each scan image in scanning password contour area into Row is calculated corresponding profile minimum in each shooting password contour area and each scanning password area contour area and surrounds square Battle array.Further, matrix need to be surrounded to each profile minimum to carry out in each shooting image after perspective transform is corrected Shoot the scanning password area image in password area image and each scan image.Wherein it is close to be commonly used for each shooting for perspective transform The correction of code contour area and each scanning password contour area.
In one embodiment, image matching method further includes:To each shooting password rough detection region and each scanning Password rough detection region carries out denoising respectively, obtains each shooting password rough detection region after denoising and each scanning is thick Detection zone.
In the present embodiment, in the shooting password rough detection region and each scan image in obtaining each shooting image Scanning password rough detection region after, shoot password area in order to further be accurately obtained in each shooting image and each sweep Tracing scans password area as in, due under truth, shoot image and scan image digitize and transmission process in often by To the influences such as imaging device and external environmental noise interference, therefore need to be to detecting the shooting password in obtained each shooting image Scanning password area in area and each scan image carries out image denoising processing, to the shooting password area in each shooting image With in each scan image scanning password area carry out denoising after obtain corresponding each shooting password rough detection region with Each scanning rough detection region.Wherein image denoising is the process for reducing noise in digital picture.
In one embodiment, matching distance be by it is each shooting password area image in shooting characteristic point with it is each Scanning feature point in scanning password area image carries out similarity calculation and obtains.
In the present embodiment, matching distance can be but not limited to be characterized with similarity.Wherein similarity is by each A shooting password area image and each scanning password area image carry out what similarity calculation obtained, and similarity can be described as similar again Property.Specifically, the scanning password area figure in the shooting password area image and each scan image in obtaining each shooting image As after, feature point extraction need to be carried out to each shooting password area image and each scanning password area image, carry out Feature Points Matching Obtain the scanning feature point in the shooting characteristic point and each scanning password area image of each shooting password area image.Further Ground, by each shooting characteristic point and each scanning feature point can with but be not limited to Gauss distance calculation formula correspondence be calculated Similarity, i.e. matching distance.
In one embodiment, shooting image is that VAT invoice shoots image, and scan image scans for VAT invoice Image, when object matching is determined as matching apart from corresponding VAT invoice shooting image and VAT invoice scan image, It indicates successfully to submit an expense account.When concrete application, as shown in fig. 7, will determine as the VAT invoice to match each other shooting image and increment Tax invoice scan image is thought to submit an expense account successfully.
In one embodiment, a kind of image matching method is provided, is applied to the server in Fig. 1 or end in this way It illustrates, includes the following steps for end:
Step 702, multiple shooting images of input and multiple scan images are obtained.
As shown in fig. 7, Fig. 7 shows the principle schematic of images match in one embodiment.Reimbursement personnel get multiple After VAT invoice papery shelves, the papery shelves of each VAT invoice are taken pictures and upload corresponding VAT invoice shooting image. Further, each VAT invoice is uploaded by relevant application program and shoots image, application program sends out each value-added tax Examination is identified in ticket shooting image, if after identification examination passes through, the papery shelves of VAT invoice are submitted to wealth by reimbursement personnel Each VAT invoice papery shelves that reimbursement personnel submit are scanned to obtain each scan image by business personnel, financial staff. Financial staff uploads the corresponding scan image of each VAT invoice by relevant application program.
Step 704, rough detection is carried out to each shooting image and each scan image, obtains the bat in each shooting image Take the photograph the scanning password rough detection region in password rough detection region and each scan image.
Step 706, each shooting password rough detection region and each scanning password rough detection region are calculated each Shoot password area edge image and each scanning password area edge image.
As shown in fig. 7, after the shooting image and scan image for getting each VAT invoice, need to will shooting image and Scan image carries out Auto-matching.Specifically, according to comprehensive in the shooting image of each VAT invoice and each scan image It closes seal ellipses detection and horizontal line and rough detection is carried out to each shooting image and each scan image, obtain in each shooting image Shooting password area approximate region and in each scan image scanning password area approximate region.Again to each shooting figure As in shooting password area approximate region and in each scan image scanning password area approximate region can according to but It is not limited to OTSU and corresponding edge image is calculated.
Step 708, Contour extraction is carried out to each shooting password area edge image and each scanning password area edge image, Obtain each shooting password contour area and each scanning password contour area.
Step 710, each bat is calculated according to each shooting password contour area and each scanning password contour area Take the photograph the scanning password area image in shooting password area image and each scan image in image.
Specifically, it is exactly found the scanning password for shooting password area and scan image for shooting image to accurately find Area need to carry out morphology closed operation to the edge image of each shooting image and each scan image and morphology opens operation, will The scanning of each shooting password area image and the corresponding edge image of each scan image for shooting the corresponding edge image of image Password area connection is got up.Each corresponding edge image of shooting image and the corresponding edge image of each scan image are carried out again Contour extraction, and filter out the scanning password wheels in the shooting password contour area and each scan image in each shooting image Wide region.It further, need to be close to the scanning in the shooting password contour area and each scan image in each shooting image Code contour area carries out that corresponding profile in each shooting password contour area and each scanning password contour area is calculated Minimum surrounds matrix.Further, matrix need to be surrounded to each profile minimum carry out each bat after perspective transform is corrected Take the photograph the scanning password area image in shooting password area image and each scan image in image.
Step 712, feature extraction is carried out to each shooting password area image and each scanning password area image, obtained each Shoot the scanning feature point in the shooting characteristic point and each scanning password area image in the image of password area.
Specifically, the scanning in the shooting password area image and each scan image in getting each shooting image is close After code area image, feature extraction is carried out to the shooting password area image in each shooting image, obtains each shooting password area figure The shooting characteristic point with identification as in;Similarly, feature is carried out to the scanning password area image in each scan image to carry It takes, obtains the scanning feature point with identification in each scanning password area image.
Step 714, current shooting characteristic point is obtained, current shooting characteristic point is carried out two with each scanning feature point respectively Two combinations obtain multiple characteristic point combinations.
Wherein, each due to being obtained to each shooting password area image and the progress feature extraction of each scanning password area image The scanning feature point in the shooting characteristic point and each scanning password area image of password area image is shot, therefore need to be to each shooting Characteristic point and each scanning feature point are all matched.Specifically, multiple shooting characteristic points are randomly selected into a shooting feature As current shooting characteristic point, current shooting characteristic point is subjected to combination of two with each scanning feature point respectively, obtains and works as The corresponding multiple characteristic points combinations of preceding shooting characteristic point.Such as multiple shooting characteristic points are:A, B, C, multiple scanning feature points are: A, b, c and d carry out current shooting characteristic point and each scanning feature point using A shooting characteristic points as current shooting characteristic point Combination of two obtains multiple characteristic point combinations:Aa, Ab, Ac and Ad.
Step 716, certain amount of characteristic point is chosen from the combination of multiple characteristic points according to preset rules to combine.
Specifically, due to characteristic point be shoot in password area image of the image either in scan image have identification or Representative feature, but due to when carrying out feature point extraction, the discrimination of some possible characteristic points is small or identification It is weak, therefore need to choose that identification is strong or discrimination chooses by force certain amount of characteristic point combination from the combination of multiple characteristic points. Such as, current shooting characteristic point is combined with the characteristic point that the combination of two of each scanning feature point obtains and is total up to:20 groups, from 20 groups Selection identification is strong in characteristic point combination or the big 10 groups of characteristic points of selection of discrimination combine, and is by this 10 groups of feature point group cooperations The corresponding characteristic point combination of current shooting characteristic point.
Step 718, the characteristic point in being combined according to the characteristic point of selection, which is calculated, combines corresponding matching with characteristic point Distance.
Step 720, according to matching distance and specific quantity be calculated current shooting characteristic point correspond to shooting image with it is each Matching distance between the corresponding scan image of a scanning feature point.
Specifically, in the feature point group in total obtained from the combination of two of current shooting characteristic point and each scanning feature point After choosing the combination of certain amount of feature according to specific quantity in conjunction, shooting characteristic point in need to being combined to the characteristic point of selection and Scanning feature point carries out similarity calculation and obtains the corresponding matching distance of characteristic point combination of each selection.Since average value can Reflect that each characteristic point combines an index of corresponding matching distance central tendency, therefore needs according to each spy being calculated Sign point combines corresponding matching distance and specific quantity carries out average computation and obtains the shooting characteristic point for including in characteristic point combination Matching distance between corresponding shooting image and the corresponding scan image of scanning feature point.Such as:Current shooting characteristic point with it is each The characteristic point combination that the combination of two of a scanning feature point obtains is total up to:20 groups, mark is chosen in being combined from 20 groups of characteristic points Property strong or discrimination is big chooses the combination of 10 groups of characteristic points, be that current shooting characteristic point is corresponding by this 10 groups of feature point group cooperations Characteristic point combines.Further, this 10 groups of characteristic points corresponding matching distance is combined to be added except 10 obtain current shooting feature Point matching distance corresponding with each scanning feature point.
Step 722, next shooting characteristic point is obtained as current shooting characteristic point, return to step 714, until obtaining each A matching distance shot between the corresponding shooting image of characteristic point scan image corresponding with each scanning feature point.
Specifically, more due to being obtained to each shooting password area image and the progress feature extraction of each scanning password area image A shooting characteristic point and multiple scanning features point, and each shooting characteristic point and each scanning feature point need to all be matched. Therefore a shooting characteristic point need to will be randomly selected in multiple shooting characteristic points as current shooting characteristic point, by current shooting spy It, need to will be again from multiple shootings after sign point is calculated with each scanning feature point progress combination of two and combines corresponding matching distance A shooting characteristic point is randomly selected in characteristic point, will be selected the shooting characteristic point come as current shooting characteristic point, is returned The step of current shooting characteristic point is carried out combination of two with each scanning feature point respectively, obtains multiple characteristic point combinations, directly It is all calculated between corresponding shooting image scan image corresponding with each scanning feature point to multiple shooting characteristic points Matching distance.
Step 724, by each shooting characteristic point correspond to corresponding with each scanning feature point scan image of shooting image it Between matching distance form matching distance matrix.
Step 726, the first dimension lookup is carried out to matching distance matrix, by the matching distance matrix found each the Minimal matching span is determined as the first matching distance in dimension matching distance.
Step 728, the second dimension lookup is carried out to matching distance matrix, if the first matching distance is in the second residing dimension In matching distance be minimum, then the first matching distance is determined as object matching distance.
Specifically, obtain the corresponding shooting image of each shooting point scan image corresponding with each scanning feature point it Between matching distance after, by each matching distance according to the matching distance matrix for being centainly regularly arranged into rectangular array, wherein It is as shown in table 1 with distance matrix:
1 bi-directional matching matrix of table
Image S1 S2 S3 S4 S5
P1 22 13 22 28 26
P2 11 26 24 23 21
P3 20 22 15 21 23
P4 29 23 27 18 25
P5 23 22 25 7 26
As upper table S1-S5 indicates that scanning invoice image, P1-P5 are invoice image of taking pictures.Matching rule is:It takes pictures invoice figure As minimum each other with the matching distance of scanning invoice image.Matching process is exemplified below:
(a) to P1 elder generations Horizon Search minimum range, it is known that P1 and S2 matching distances minimum 13.Again to S2 longitudinal searchings, Known to the matching distance of S2 and P1 be minimum, it is determined that 13 to be object matching distance.
(b) similarly to P2, first Horizon Search minimum range, it is known that P2 and S1 matching distances minimum 11.Again to the longitudinal directions S1 Search, it is known that S1 is minimum with P2 matching distances, it is determined that for 11 be object matching distance.
(c) similarly to P3, first Horizon Search minimum range, it is known that P3 and S3 matching distances minimum 15.Again to the longitudinal directions S3 Search, it is known that S3 is minimum with P3 matching distances, it is determined that for 15 be object matching distance.
(d) similarly to P4, first Horizon Search minimum range, it is known that P4 and S4 matching distances minimum 18.Again to the longitudinal directions S4 Search, it is known that S4 and P5 matching distances minimum 7.So think that it fails to match by P4 at this time.
(e) similarly to P5, first Horizon Search minimum range, it is known that P5 and S4 matching distances minimum 7.S4 is longitudinally searched again Rope, it is known that S4 is minimum with P5 matching distances, it is determined that for 7 be object matching distance.
Step 730, whether detection object matching distance is less than preset matching distance, if so, entering step 732.
Wherein, the figure to match each other is found between multiple shooting image and multiple scan images in order to be more accurate Picture, need to detect whether object matching distance is less than preset matching distance, be preset when detecting that object matching distance is less than When matching distance, then 732 are entered step.It is on the contrary, then it is assumed that object matching is matched apart from corresponding shooting image and scan image Failure.
Step 732, object matching is determined as matching image apart from corresponding shooting image and scan image.
Specifically, the scanning corresponding with each scanning feature point of the corresponding shooting image of each shooting characteristic point is being got After matching distance between image, the object matching distance for meeting preset requirement is chosen from multiple matching distances.Further, Since the object matching distance of selection is to be calculated with scanning feature point by shooting characteristic point, and shooting characteristic point has Corresponding shooting image, scanning feature point have corresponding scanning feature point, therefore by object matching apart from corresponding shooting image It is determined as the image to match each other with scan image.If object matching is apart from corresponding 1st shooting image and the 2nd scanning Image, thus can regard as the 1st shooting image and the 2nd scan image be determined as the image to match each other.Such as Fig. 7 institutes Show, will determine as the VAT invoice to match each other shooting image and VAT invoice scan image is thought to submit an expense account successfully.
In the present embodiment, by carrying out password area detection and bi-directional matching strategy to shooting image and scan image, not only The matching accuracy rate between each shooting image and each scan image can be improved, and passes through multiple shooting images and scanning Image Auto-matching can reduce the work ratio of financial staff, effectively promote the reimbursement efficiency of reimbursement VAT invoice.
It should be understood that although each step in above-mentioned flow chart is shown successively according to the instruction of arrow, this A little steps are not that the inevitable sequence indicated according to arrow executes successively.Unless expressly state otherwise herein, these steps It executes there is no the limitation of stringent sequence, these steps can execute in other order.Moreover, in above-mentioned flow chart at least A part of step may include that either these sub-steps of multiple stages or stage are not necessarily in same a period of time to multiple sub-steps Quarter executes completion, but can execute at different times, the execution in these sub-steps or stage be sequentially also not necessarily according to Secondary progress, but can either the sub-step of other steps or at least part in stage in turn or replace with other steps Ground executes.
In one embodiment, as shown in figure 8, providing a kind of image matching apparatus 900, including:Image collection module 902, image detection module 904, characteristic extracting module 906, matching distance computing module 908, matching distance choose 910 and of module Matching distance chooses module 912, wherein:
Image collection module 902, multiple shooting images for obtaining input and multiple scan images.
Image detection module 904 obtains each shooting for being detected to each shooting image and each scan image The scanning password area image in shooting password area image and each scan image in image.
Characteristic extracting module 906, for carrying out feature to each shooting password area image and each scanning password area image Extraction obtains the scanning feature point in the shooting characteristic point and each scanning password area image in each shooting password area image.
Matching distance computing module 908, based on according to each shooting characteristic point and each scanning feature point Calculation obtains between the corresponding shooting image of each shooting characteristic point scan image corresponding with each scanning feature point Matching distance;
Matching distance chooses module 910, for corresponding to shooting image and each scanning feature point from each shooting characteristic point Object matching distance is chosen in matching distance between corresponding scan image.
Image detection module 912 is matched, for object matching to be determined as apart from corresponding shooting image and scan image Match image.
In one embodiment, matching distance computing module 908 includes:
Current shooting characteristic point acquiring unit (not shown), for obtaining current shooting characteristic point, by current shooting Characteristic point carries out combination of two with each scanning feature point respectively, obtains multiple characteristic point combinations.
Matching distance computing unit (not shown) is calculated for the characteristic point in being combined according to each characteristic point Matching distance between the corresponding shooting image of current shooting characteristic point scan image corresponding with each scanning feature point.
Current shooting characteristic point acquiring unit is additionally operable to obtain next shooting characteristic point as current shooting characteristic point, It is additionally operable to current shooting characteristic point carrying out combination of two with each scanning feature point respectively with metrics calculation unit, obtain multiple The step of characteristic point combines, up to obtaining, the corresponding shooting image of each shooting characteristic point is corresponding with each scanning feature point to be swept Matching distance of the tracing as between.
In one embodiment, matching distance computing module 908 is additionally operable to be combined from multiple characteristic points according to preset rules It is middle to choose certain amount of characteristic point combination;Characteristic point in being combined according to the characteristic point of selection is calculated to be combined with characteristic point Corresponding matching distance;According to matching distance and specific quantity be calculated current shooting characteristic point correspond to shooting image with it is each Matching distance between the corresponding scan image of scanning feature point.
In one embodiment, matching distance selection module 910 includes:
Matching distance matrix generation unit (not shown), for by each shooting characteristic point correspondence shooting image and respectively Matching distance between the corresponding scan image of a scanning feature point forms matching distance matrix.
First searching unit (not shown) will be found for carrying out the first dimension lookup to matching distance matrix Matching distance matrix in each first dimension matching distance minimal matching span be determined as the first matching distance.
Second searching unit (not shown), for carrying out the second dimension lookup to matching distance matrix, if first Matching distance with distance in the second residing dimension is minimum, then the first matching distance is determined as object matching distance.
In one embodiment, image matching apparatus 900 further includes object matching apart from detection module (not shown), Wherein:
Object matching is apart from detection module, for detecting whether object matching distance is less than preset matching distance.Work as detection To object matching distance be less than preset matching apart from when, then enter matching image detection module 912.
In one embodiment, image detection module 904 includes rough detection unit (not shown), computing unit (figure In be not shown), tracking cell (not shown) and password area image acquisition unit (not shown), wherein:
Rough detection unit obtains each shooting figure for carrying out rough detection to each shooting image and each scan image The scanning password rough detection region in shooting password rough detection region and each scan image as in.
Computing unit, for each shooting password rough detection region and each scanning password rough detection region to be calculated Each shooting password area edge image and each scanning password area edge image.
Tracking cell, for carrying out profile to each shooting password area edge image and each scanning password area edge image Tracking, obtains each shooting password contour area and each scanning password contour area.
Password area image acquisition unit, for according to each shooting password contour area and each scanning password contour area The scanning password area image in the shooting password area image and each scan image in each shooting image is calculated.
In one embodiment, image matching apparatus 900 is additionally operable to each shooting password rough detection region and each sweeps It retouches password rough detection region and carries out denoising respectively, obtain each shooting password rough detection region and each scanning after denoising Rough detection region.
In one embodiment, matching distance be by it is each shooting password area image in shooting characteristic point with it is each Scanning feature point in scanning password area image carries out similarity calculation and obtains.
In one embodiment, shooting image is that VAT invoice shoots image, and scan image scans for VAT invoice Image, when object matching is determined as matching apart from corresponding VAT invoice shooting image and VAT invoice scan image, It indicates successfully to submit an expense account.
Specific about image processing apparatus limits the restriction that may refer to above for image processing method, herein not It repeats again.Modules in above-mentioned image processing apparatus can be realized fully or partially through software, hardware and combinations thereof.On Stating each module can be embedded in or independently of in the processor in computer equipment, can also store in a software form in the form of hardware In memory in computer equipment, the corresponding operation of the above modules is executed in order to which processor calls.
In one embodiment, a kind of computer equipment is provided, which can be terminal, internal structure Figure can be as shown in Figure 9.The computer equipment includes the processor connected by system bus, memory, network interface, display Screen and input unit.Wherein, the processor of the computer equipment is for providing calculating and control ability.The computer equipment is deposited Reservoir includes non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system and computer journey Sequence.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculating The network interface of machine equipment is used to communicate by network connection with external terminal.When the computer program is executed by processor with Realize a kind of image matching method.The display screen of the computer equipment can be liquid crystal display or electric ink display screen, The input unit of the computer equipment can be the touch layer covered on display screen, can also be to be arranged on computer equipment shell Button, trace ball or Trackpad, can also be external keyboard, Trackpad or mouse etc..Those skilled in the art can manage It solves, structure is not constituted only with the block diagram of the relevant part-structure of application scheme to the application side shown in Fig. 9 The restriction for the computer equipment that case is applied thereon, specific computer equipment may include more more or less than as shown in the figure Component, either combine certain components or arranged with different components.
In one embodiment, a kind of computer equipment, including memory and processor are provided, is stored in memory Computer program, the processor realize following steps when executing computer program:Obtain multiple shooting images and more of input A scan image;Each shooting image and each scan image are detected, the shooting password in each shooting image is obtained Scanning password area image in area's image and each scan image;To each shooting password area image and each scanning password area figure As carrying out feature extraction, sweeping in the shooting characteristic point in each shooting password area image and each scanning password area image is obtained Retouch characteristic point;The corresponding shooting figure of each shooting characteristic point is calculated according to each shooting characteristic point and each scanning feature point As the matching distance between scan image corresponding with each scanning feature point;From each shooting characteristic point correspond to shooting image with Object matching distance is chosen in matching distance between the corresponding scan image of each scanning feature point;By object matching apart from right The shooting image and scan image answered are determined as matching image.
In one embodiment, each shooting feature is calculated according to each shooting characteristic point and each scanning feature point Matching distance between the corresponding shooting image of point scan image corresponding with each scanning feature point, including:Obtain current clap Characteristic point is taken the photograph, current shooting characteristic point is subjected to combination of two with each scanning feature point respectively, obtains multiple characteristic point combinations; It is special with each scanning that the corresponding shooting image of current shooting characteristic point is calculated in characteristic point in being combined according to each characteristic point Matching distance between the corresponding scan image of sign point;Next shooting characteristic point is obtained as current shooting characteristic point, is returned The step of current shooting characteristic point is carried out combination of two with each scanning feature point respectively, obtains multiple characteristic point combinations, directly To the matching obtained between corresponding with each scanning feature point scan image of the corresponding shooting image of each shooting characteristic point away from From.
In one embodiment, the characteristic point in being combined according to each characteristic point is calculated current shooting characteristic point and corresponds to The step of shooting the matching distance between image scan image corresponding with each scanning feature point, including:According to preset rules Certain amount of characteristic point combination is chosen from the combination of multiple characteristic points;Characteristic point in being combined according to the characteristic point of selection calculates It obtains combining corresponding matching distance with characteristic point;Current shooting characteristic point pair is calculated according to matching distance and specific quantity The matching distance between image scan image corresponding with each scanning feature point should be shot.
In one embodiment, the scanning corresponding with each scanning feature point of shooting image is corresponded to from each shooting characteristic point In matching distance between image choose object matching apart from the step of, including:Each shooting characteristic point is corresponded into shooting image Matching distance between scan image corresponding with each scanning feature point forms matching distance matrix;To matching distance matrix into The first dimension of row is searched, and minimal matching span in each first dimension matching distance in the matching distance matrix found is determined For the first matching distance;Second dimension lookup is carried out to matching distance matrix, if the first matching distance is in the second residing dimension In matching distance be minimum, then the first matching distance is determined as object matching distance.
In one embodiment, object matching is determined as matching image apart from corresponding shooting image and scan image Before step, including:Detect whether object matching distance is less than preset matching distance;When detecting that it is pre- that object matching distance is less than If when matching distance, then entering the step that object matching is determined as to matching image apart from corresponding shooting image and scan image Suddenly.
In one embodiment, each shooting image and each scan image are detected, obtain each shooting image In shooting password area image and each scan image in scanning password area image the step of, including:To each shooting image Rough detection is carried out with each scan image, obtains the shooting password rough detection region in each shooting image and each scan image In scanning password rough detection region;Each shooting password rough detection region and each scanning password rough detection region are calculated To each shooting password area edge image and each scanning password area edge image;To each shooting password area edge image and respectively A scanning password area edge image carries out Contour extraction, obtains each shooting password contour area and each scanning password profile region Domain;The shooting in each shooting image is calculated according to each shooting password contour area and each scanning password contour area Scanning password area image in password area image and each scan image.
In one embodiment, this method further includes:It is thick to each shooting password rough detection region and each scanning password Detection zone carries out denoising respectively, obtains each shooting password rough detection region after denoising and each scanning rough detection area Domain.
In one embodiment, matching distance be by it is each shooting password area image in shooting characteristic point with it is each Scanning feature point in scanning password area image carries out similarity calculation and obtains.
In one embodiment, shooting image is that VAT invoice shoots image, and scan image scans for VAT invoice Image, when object matching is determined as matching apart from corresponding VAT invoice shooting image and VAT invoice scan image, It indicates successfully to submit an expense account.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated Machine program realizes following steps when being executed by processor:Obtain multiple shooting images of input and multiple scan images;To each A shooting image and each scan image are detected, and obtain the shooting password area image in each shooting image and each scanning Scanning password area image in image;Feature extraction is carried out to each shooting password area image and each scanning password area image, Obtain the scanning feature point in the shooting characteristic point and each scanning password area image in each shooting password area image;According to each It is special with each scanning that the corresponding shooting image of each shooting characteristic point is calculated in a shooting characteristic point and each scanning feature point Matching distance between the corresponding scan image of sign point;Shooting image and each scanning feature point are corresponded to from each shooting characteristic point Object matching distance is chosen in matching distance between corresponding scan image;By object matching apart from corresponding shooting image and Scan image is determined as matching image.
In one embodiment, each shooting feature is calculated according to each shooting characteristic point and each scanning feature point Matching distance between the corresponding shooting image of point scan image corresponding with each scanning feature point, including:Obtain current clap Characteristic point is taken the photograph, current shooting characteristic point is subjected to combination of two with each scanning feature point respectively, obtains multiple characteristic point combinations; It is special with each scanning that the corresponding shooting image of current shooting characteristic point is calculated in characteristic point in being combined according to each characteristic point Matching distance between the corresponding scan image of sign point;Next shooting characteristic point is obtained as current shooting characteristic point, is returned The step of current shooting characteristic point is carried out combination of two with each scanning feature point respectively, obtains multiple characteristic point combinations, directly To the matching obtained between corresponding with each scanning feature point scan image of the corresponding shooting image of each shooting characteristic point away from From.
In one embodiment, the characteristic point in being combined according to each characteristic point is calculated current shooting characteristic point and corresponds to The step of shooting the matching distance between image scan image corresponding with each scanning feature point, including:According to preset rules Certain amount of characteristic point combination is chosen from the combination of multiple characteristic points;Characteristic point in being combined according to the characteristic point of selection calculates It obtains combining corresponding matching distance with characteristic point;Current shooting characteristic point pair is calculated according to matching distance and specific quantity The matching distance between image scan image corresponding with each scanning feature point should be shot.
In one embodiment, the scanning corresponding with each scanning feature point of shooting image is corresponded to from each shooting characteristic point In matching distance between image choose object matching apart from the step of, including:Each shooting characteristic point is corresponded into shooting image Matching distance between scan image corresponding with each scanning feature point forms matching distance matrix;To matching distance matrix into The first dimension of row is searched, and minimal matching span in each first dimension matching distance in the matching distance matrix found is determined For the first matching distance;Second dimension lookup is carried out to matching distance matrix, if the first matching distance is in the second residing dimension In matching distance be minimum, then the first matching distance is determined as object matching distance.
In one embodiment, object matching is determined as matching image apart from corresponding shooting image and scan image Before step, including:Detect whether object matching distance is less than preset matching distance;When detecting that it is pre- that object matching distance is less than If when matching distance, then entering the step that object matching is determined as to matching image apart from corresponding shooting image and scan image Suddenly.
In one embodiment, each shooting image and each scan image are detected, obtain each shooting image In shooting password area image and each scan image in scanning password area image the step of, including:To each shooting image Rough detection is carried out with each scan image, obtains the shooting password rough detection region in each shooting image and each scan image In scanning password rough detection region;Each shooting password rough detection region and each scanning password rough detection region are calculated To each shooting password area edge image and each scanning password area edge image;To each shooting password area edge image and respectively A scanning password area edge image carries out Contour extraction, obtains each shooting password contour area and each scanning password profile region Domain;The shooting in each shooting image is calculated according to each shooting password contour area and each scanning password contour area Scanning password area image in password area image and each scan image.
In one embodiment, this method further includes:It is thick to each shooting password rough detection region and each scanning password Detection zone carries out denoising respectively, obtains each shooting password rough detection region after denoising and each scanning rough detection area Domain.
In one embodiment, matching distance be by it is each shooting password area image in shooting characteristic point with it is each Scanning feature point in scanning password area image carries out similarity calculation and obtains.
In one embodiment, shooting image is that VAT invoice shoots image, and scan image scans for VAT invoice Image, when object matching is determined as matching apart from corresponding VAT invoice shooting image and VAT invoice scan image, It indicates successfully to submit an expense account.
One of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer In read/write memory medium, the computer program is when being executed, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, Any reference to memory, storage, database or other media used in each embodiment provided herein, Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above example can be combined arbitrarily, to keep description succinct, not to above-described embodiment In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance Shield is all considered to be the range of this specification record.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art It says, under the premise of not departing from the application design, various modifications and improvements can be made, these belong to the protection of the application Range.Therefore, the protection domain of the application patent should be determined by the appended claims.

Claims (15)

1. a kind of image matching method, which is characterized in that the method includes:
Obtain multiple shooting images of input and multiple scan images;
Each shooting image and each scan image are detected, the shooting in each shooting image is obtained Scanning password area image in password area image and each scan image;
Feature extraction is carried out to each shooting password area image and each scanning password area image, is obtained each described Shoot the scanning feature point in the shooting characteristic point and each scanning password area image in the image of password area;
Each shooting characteristic point is calculated according to each shooting characteristic point and each scanning feature point to correspond to Shooting image scan image corresponding with each scanning feature point between matching distance;
From between the corresponding shooting image of each shooting characteristic point scan image corresponding with each scanning feature point Matching distance in choose object matching distance;
The object matching is determined as matching image apart from the corresponding shooting image and the scan image.
2. according to the method described in claim 1, it is characterized in that, described according to each shooting characteristic point and each described It is corresponding with each scanning feature point that the corresponding shooting image of each shooting characteristic point is calculated in scanning feature point Matching distance between scan image, including:
Current shooting characteristic point is obtained, the current shooting characteristic point is subjected to group two-by-two with each scanning feature point respectively It closes, obtains multiple characteristic point combinations;
The corresponding shooting of the current shooting characteristic point is calculated according to the characteristic point in each characteristic point combination Matching distance between image scan image corresponding with each scanning feature point;
Next shooting characteristic point is obtained as current shooting characteristic point, return by the current shooting characteristic point respectively with it is each The scanning feature point carries out combination of two, obtains the step of multiple characteristic points combine, until obtaining each shooting characteristic point pair Matching distance between the shooting image scan image corresponding with each scanning feature point answered.
3. according to the method described in claim 2, it is characterized in that, the characteristic point according in each characteristic point combination The current shooting characteristic point is calculated and corresponds to shooting image scan image corresponding with each scanning feature point Between matching distance the step of, including:
Certain amount of characteristic point combination is chosen from the combination of the multiple characteristic point according to preset rules;
Characteristic point in being combined according to the characteristic point of the selection is calculated combines corresponding matching distance with the characteristic point;
According to the matching distance and the specific quantity be calculated the current shooting characteristic point correspond to shooting image with it is each Matching distance between the corresponding scan image of a scanning feature point.
4. according to the method described in claim 1, it is characterized in that, it is described from the corresponding shooting image of each shooting characteristic point with Chosen in matching distance between the corresponding scan image of each scanning feature point object matching apart from the step of, including:
Each shooting characteristic point is corresponded between shooting image scan image corresponding with each scanning feature point Matching distance forms matching distance matrix;
First dimension lookup is carried out to the matching distance matrix, by the matching distance matrix found each described the Minimal matching span is determined as the first matching distance in dimension matching distance;
Second dimension lookup is carried out to the matching distance matrix, if first matching distance is in residing second dimension In matching distance be minimum, then first matching distance is determined as object matching distance.
5. according to the method described in claim 1, it is characterized in that, it is described by the object matching apart from the corresponding shooting Image and the scan image were determined as before the step of matching image, including:
Detect whether the object matching distance is less than preset matching distance;
When detect object matching distance be less than preset matching apart from when, then enter the object matching apart from corresponding The shooting image and the scan image are determined as the step of matching image.
6. according to the method described in claim 1, it is characterized in that, described to each shooting image and each scanning Image is detected, and obtains the scanning in the shooting password area image and each scan image in each shooting image The step of password area image, including:
Rough detection is carried out to each shooting image and each scan image, obtains the bat in each shooting image Take the photograph the scanning password rough detection region in password rough detection region and each scan image;
Each shooting password rough detection region and each scanning password rough detection region are calculated each described Shoot password area edge image and each scanning password area edge image;
Contour extraction is carried out to each shooting password area edge image and each scanning password area edge image, is obtained Each shooting password contour area and each scanning password contour area;
Each bat is calculated according to each shooting password contour area and each scanning password contour area Take the photograph the scanning password area image in shooting password area image and each scan image in image.
7. according to the method described in claim 6, it is characterized in that, the method further includes:
Denoising is carried out respectively to each shooting password rough detection region and each scanning password rough detection region, Obtain each shooting password rough detection region after denoising and each scanning rough detection region.
8. according to the method described in claim 1, it is characterized in that, the matching distance is by each shooting password Shooting characteristic point in area's image carries out similarity calculation with the scanning feature point in each scanning password area image and obtains.
9. according to the method described in claim 1, it is characterized in that, the shooting image, which is VAT invoice, shoots image, institute It is VAT invoice scan image to state scan image, when the object matching shoots image apart from the corresponding VAT invoice When being determined as matching with the VAT invoice scan image, indicate successfully to submit an expense account.
10. a kind of image matching apparatus, which is characterized in that described device includes:
Image collection module, multiple shooting images for obtaining input and multiple scan images;
Image detection module obtains each institute for being detected to each shooting image and each scan image State the scanning password area image in the shooting password area image and each scan image in shooting image;
Characteristic extracting module is carried for carrying out feature to each shooting password area image and scanning password area image It takes, the scanning obtained in the shooting characteristic point and each scanning password area image in each shooting password area image is special Sign point;
Matching distance computing module, for being calculated respectively according to each shooting characteristic point and each scanning feature point Matching between the corresponding shooting image of a shooting characteristic point scan image corresponding with each scanning feature point away from From;
Matching distance chooses module, is used for from each corresponding shooting image of shooting characteristic point and each scanning feature Object matching distance is chosen in matching distance between the corresponding scan image of point;
Image detection module is matched, for the object matching is true apart from the corresponding shooting image and the scan image It is set to matching image.
11. device according to claim 10, which is characterized in that the matching distance computing module includes:
Current shooting characteristic point acquiring unit, for obtaining current shooting characteristic point, by the current shooting characteristic point respectively with Each scanning feature point carries out combination of two, obtains multiple characteristic point combinations;
Matching distance computing unit, for the current shooting to be calculated according to the characteristic point in each characteristic point combination Matching distance between the corresponding shooting image of characteristic point scan image corresponding with each scanning feature point;
Current shooting characteristic point acquiring unit is additionally operable to obtain next shooting characteristic point as current shooting characteristic point, matching away from It is additionally operable to the current shooting characteristic point carrying out combination of two with each scanning feature point respectively from computing unit, obtain The step of multiple characteristic point combinations, until obtaining the corresponding shooting image of each shooting characteristic point and each scanning feature point Matching distance between corresponding scan image.
12. device according to claim 10, which is characterized in that the matching distance chooses module and includes:
Matching distance matrix generation unit, for each shooting characteristic point to be corresponded to shooting image and each scanning spy Matching distance between the corresponding scan image of sign point forms matching distance matrix;
First searching unit, for the matching distance matrix carry out the first dimension lookup, by the matching found away from From in matrix, minimal matching span is determined as the first matching distance in each first dimension matching distance;
Second searching unit, for carrying out the second dimension lookup to the matching distance matrix, if first matching distance exists Matching distance in residing second dimension is minimum, then first matching distance is determined as object matching distance.
13. device according to claim 10, which is characterized in that described image detection module includes:
Rough detection unit obtains each institute for carrying out rough detection to each shooting image and each scan image State the scanning password rough detection region in the shooting password rough detection region and each scan image in shooting image;
Computing unit, for calculating each shooting password rough detection region and each scanning password rough detection region Obtain each shooting password area edge image and each scanning password area edge image;
Tracking cell, for being carried out to each shooting password area edge image and each scanning password area edge image Contour extraction obtains each shooting password contour area and each scanning password contour area;
Password area image acquisition unit, for according to each shooting password contour area and each scanning password profile The scanning password in the shooting password area image and each scan image in each shooting image is calculated in region Area's image.
14. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists In when the processor executes the computer program the step of any one of realization claim 1 to 9 the method.
15. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The step of method described in any one of claim 1 to 9 is realized when being executed by processor.
CN201810143256.6A 2018-02-11 2018-02-11 Image matching method and device, computer equipment and storage medium Active CN108364024B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810143256.6A CN108364024B (en) 2018-02-11 2018-02-11 Image matching method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810143256.6A CN108364024B (en) 2018-02-11 2018-02-11 Image matching method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108364024A true CN108364024A (en) 2018-08-03
CN108364024B CN108364024B (en) 2021-05-07

Family

ID=63006010

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810143256.6A Active CN108364024B (en) 2018-02-11 2018-02-11 Image matching method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108364024B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111860608A (en) * 2020-06-28 2020-10-30 浙江大华技术股份有限公司 Invoice image registration method and equipment and computer storage medium
CN112257712A (en) * 2020-10-29 2021-01-22 湖南星汉数智科技有限公司 Train ticket image rectification method and device, computer device and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3032459A1 (en) * 2014-12-10 2016-06-15 Ricoh Company, Ltd. Realogram scene analysis of images: shelf and label finding
CN106023182A (en) * 2016-05-13 2016-10-12 广州视源电子科技股份有限公司 printed circuit board image matching method and system
CN107067044A (en) * 2017-05-31 2017-08-18 北京空间飞行器总体设计部 A kind of finance reimbursement unanimous vote is according to intelligent checks system
CN107358490A (en) * 2017-06-19 2017-11-17 北京奇艺世纪科技有限公司 A kind of image matching method, device and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3032459A1 (en) * 2014-12-10 2016-06-15 Ricoh Company, Ltd. Realogram scene analysis of images: shelf and label finding
CN106023182A (en) * 2016-05-13 2016-10-12 广州视源电子科技股份有限公司 printed circuit board image matching method and system
CN107067044A (en) * 2017-05-31 2017-08-18 北京空间飞行器总体设计部 A kind of finance reimbursement unanimous vote is according to intelligent checks system
CN107358490A (en) * 2017-06-19 2017-11-17 北京奇艺世纪科技有限公司 A kind of image matching method, device and electronic equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111860608A (en) * 2020-06-28 2020-10-30 浙江大华技术股份有限公司 Invoice image registration method and equipment and computer storage medium
CN112257712A (en) * 2020-10-29 2021-01-22 湖南星汉数智科技有限公司 Train ticket image rectification method and device, computer device and computer readable storage medium
CN112257712B (en) * 2020-10-29 2024-02-27 湖南星汉数智科技有限公司 Train ticket image alignment method and device, computer device and computer readable storage medium

Also Published As

Publication number Publication date
CN108364024B (en) 2021-05-07

Similar Documents

Publication Publication Date Title
Ye et al. Robust registration of multimodal remote sensing images based on structural similarity
Chen et al. A Siamese network based U-Net for change detection in high resolution remote sensing images
US9665789B2 (en) Device and method for analyzing the correlation between an image and another image or between an image and a video
Tursun et al. The state of the art in HDR deghosting: A survey and evaluation
CN109753838B (en) Two-dimensional code identification method, device, computer equipment and storage medium
Sharma et al. Image stitching using AKAZE features
Chen et al. Iterative scale-invariant feature transform for remote sensing image registration
US11699283B2 (en) System and method for finding and classifying lines in an image with a vision system
CN108764325A (en) Image-recognizing method, device, computer equipment and storage medium
Guerreiro et al. Connectivity-enforcing Hough transform for the robust extraction of line segments
Shi et al. An affine invariant approach for dense wide baseline image matching
CN111444964B (en) Multi-target rapid image matching method based on adaptive ROI (region of interest) division
Feng et al. Geometric representation learning for document image rectification
US11574492B2 (en) Efficient location and identification of documents in images
CN108364024A (en) Image matching method, device, computer equipment and storage medium
Xu et al. Robust hierarchical structure from motion for large-scale unstructured image sets
Wang et al. Rethinking video rain streak removal: A new synthesis model and a deraining network with video rain prior
Liu et al. Unsupervised global and local homography estimation with motion basis learning
Zeng et al. Ro-SOS: Metric Expression Network (MEnet) for Robust Salient Object Segmentation
Qian et al. A reliable online method for joint estimation of focal length and camera rotation
Dong et al. ESA-Net: An efficient scale-aware network for small crop pest detection
Pan et al. Research on seamless image stitching based on fast marching method
CN116485858B (en) Heterogeneous image registration method and device based on multi-scale cross-modal neighborhood descriptor
Matusiak et al. Unbiased evaluation of keypoint detectors with respect to rotation invariance
CN116311391A (en) High-low precision mixed multidimensional feature fusion fingerprint retrieval method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant