CN104050279A - Method and device for feature matching and image identification device - Google Patents

Method and device for feature matching and image identification device Download PDF

Info

Publication number
CN104050279A
CN104050279A CN201410298545.5A CN201410298545A CN104050279A CN 104050279 A CN104050279 A CN 104050279A CN 201410298545 A CN201410298545 A CN 201410298545A CN 104050279 A CN104050279 A CN 104050279A
Authority
CN
China
Prior art keywords
storehouse
subpattern
feature
hash
sub
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
CN201410298545.5A
Other languages
Chinese (zh)
Other versions
CN104050279B (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.)
TCL Corp
Original Assignee
TCL Corp
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 TCL Corp filed Critical TCL Corp
Priority to CN201410298545.5A priority Critical patent/CN104050279B/en
Publication of CN104050279A publication Critical patent/CN104050279A/en
Application granted granted Critical
Publication of CN104050279B publication Critical patent/CN104050279B/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention is suitable for the field of image identification, and provides a method and device for feature matching and an image identification device. The method includes the steps that features obtained at a time point are stored in one sub-model-bank, after the sub-model-banks are added into a model bank, the features of the sub-model-banks added each time only need to be mapped into corresponding Hash addresses of a Hash table, when a tested bank needs to be matched with the model bank, newly-added sub-tested-banks are firstly mapped into corresponding Hash addresses of the Hash table, then features of the sub-tested-banks are matched with the features in the mapped Hash addresses, and the matching results can be obtained. Compared with the prior art, the method, the device and the image identification device have the advantages that when matching is carried out each time, the whole model bank does not need to be mapped into corresponding Hash addresses of the Hash table, the spent time is short, and the matching efficiency is easily improved; in addition, matching is carried out according to the Hash function, wrong identification generated when a Brun filter is adopted can be avoided, and the matching accuracy is high.

Description

A kind of method, device and image recognition apparatus of characteristic matching
Technical field
The invention belongs to field of image recognition, relate in particular to a kind of method, device and image recognition apparatus of characteristic matching.
Background technology
Carrying out in the process of characteristics of image comparison, all often many times that the feature of existing pattern base is all calculated in advance, then be stored in the position of an appointment, thereby finally compare and obtain comparison result getting the feature of storing in feature in test library and pattern base.Here the pattern base sayed often all prior off-line complete or establish, but in actual application, there will be under some environmental demand, pattern base is to change along with extraneous changes in demand, in the time that compared amount is little, hardware and software environment based on current can reach the requirement of appointment, but the amount of working as comparison is very large, specifying in very short time period while comparing based on up to ten thousand or more pattern features, current hardware environment and conventional algorithm all can not address this problem efficiently, if only based on hash algorithm, only embody the high efficiency of its comparison, when the comparison pattern amount in fixed time section strengthens, each all needs is mapped to a large amount of pattern bases in hash table, cost is more in time, if adopt cloth dragon wave filter (bloom filter) although can add counting to show to realize the deletion action of data in his-and-hers watches, but along with the amount of pattern base increases and the variation in various storehouses in external environment, the self shortcoming " false identification " that is easy to occur bloom filter is also mistake identification.
Summary of the invention
The embodiment of the present invention provides a kind of method, device and image recognition apparatus of characteristic matching, is intended to solve the method for the characteristic matching that prior art provides, relatively spended time or easily occur the problem of mistake identification.
On the one hand, provide a kind of method of characteristic matching, described method comprises:
The feature that current point in time is obtained deposits in subpattern storehouse;
Described subpattern storehouse is added in pattern base;
Described subpattern storehouse is mapped in the corresponding Hash address of Hash table by hash function;
Receive identical entry matching request;
According to described identical entry matching request, set up the feature of sub-test library and the mapping relations of described Hash table of current point in time by hash function;
If map to the feature that stores a sub-pattern base in the Hash address of described Hash table, the affiliated storehouse of the sub-test library that described subpattern storehouse is described current point in time;
If map to the feature that stores at least two sub-pattern bases in the Hash address of described Hash table, the feature of the feature of the sub-test library of described current point in time and described at least two sub-pattern bases is compared one by one to the affiliated storehouse of the sub-test library that the subpattern storehouse identical with the feature of the sub-test library of described current point in time is described current point in time.
Further, described described subpattern storehouse is added to pattern base in after, also comprise:
The feature in described subpattern storehouse is divided into p feature segmentation, and p is more than or equal to 2 natural number;
P feature segmentation of the feature in described subpattern storehouse mapped to respectively in the corresponding Hash address of p Hash table by hash function;
Receive similar matching request;
According to described similar matching request, set up p feature segmentation of sub-test library feature and the mapping relations of a described p Hash table of current point in time by hash function;
If k feature segmentation maps to the feature segmentation that stores subpattern storehouse in the Hash address of k Hash table, obtain one by one the feature in each subpattern storehouse, and the eigenwert of the eigenwert of each subpattern planting modes on sink characteristic segmentation and the segmentation of sub-test library feature is compared, if the number of same characteristic features segmentation is more than or equal to the threshold value of setting, the feature similarity in the feature of described test library and described subpattern storehouse, wherein, k is more than or equal to 1 natural number that is less than or equal to p.
Further, the described corresponding Hash address that described subpattern storehouse is mapped to Hash table by hash function comprises:
If there is no other subpattern storehouse link on the Hash address that the feature in described subpattern storehouse is shone upon, directly with chained list, the feature in described subpattern storehouse and the Hash address of shining upon linked;
If have other subpattern storehouse link on the Hash address that the feature in subpattern storehouse is shone upon, the character chain in described subpattern storehouse be connected to shone upon Hash address backmost.
Further, described described subpattern storehouse is added to pattern base in before, also comprise:
If the subpattern storehouse of storing in pattern base has arrived maximum quantity, delete the subpattern storehouse that the earliest time point stored in described pattern base obtains;
Find Hash address corresponding to subpattern storehouse obtaining with earliest time point by hash function;
Judge feature residing position in described Hash address in the subpattern storehouse that earliest time point obtains;
The subpattern storehouse link that earliest time point obtains if only have on described Hash address, directly deletes linking of subpattern storehouse that earliest time point obtains and described Hash address;
If the subpattern storehouse link that also has other below in the subpattern storehouse that earliest time point obtains, linking between the subpattern storehouse first earliest time point being obtained and described Hash address broken, linking between the subpattern storehouse again earliest time point being obtained and the rear sub-pattern base linking thereafter broken, finally, the address pointer of described Hash address being stored points to the head of a rear sub-pattern base.
On the other hand, provide a kind of device of characteristic matching, described device comprises:
Subpattern storehouse creating unit, deposits subpattern storehouse in for the feature that current point in time is obtained;
Warehouse-in unit, subpattern storehouse, for adding pattern base by described subpattern storehouse;
Subpattern storehouse map unit, for mapping to described subpattern storehouse by hash function the corresponding Hash address of Hash table;
The first request reception unit, for receiving identical entry matching request;
Sub-test library map unit, for according to described identical entry matching request, sets up the feature of sub-test library and the mapping relations of described Hash table of current point in time by hash function;
The first matching unit, if store the feature of a sub-pattern base for mapping to the Hash address of described Hash table, the affiliated storehouse of the sub-test library that described subpattern storehouse is described current point in time;
The second matching unit, if store the feature of at least two sub-pattern bases for mapping to the Hash address of described Hash table, the feature of the feature of the sub-test library of described current point in time and described at least two sub-pattern bases is compared one by one to the affiliated storehouse of the sub-test library that the subpattern storehouse identical with the feature of the sub-test library of described current point in time is described current point in time.
Further, described device also comprises:
Feature segmenting unit, for the feature in described subpattern storehouse is divided into p feature segmentation, p is more than or equal to 2 natural number;
First Characteristic segmentation map unit, for mapping to p feature segmentation of the feature in described subpattern storehouse respectively the corresponding Hash address of p Hash table by hash function;
The second request reception unit, for receiving similar matching request;
Second Characteristic segmentation map unit, for according to described similar matching request, sets up p feature segmentation of sub-test library feature and the mapping relations of a described p Hash table of current point in time by hash function;
Similar matching unit, if the Hash address that maps to k Hash table for k feature segmentation stores the feature segmentation in subpattern storehouse, obtain one by one the feature in each subpattern storehouse, and the eigenwert of the eigenwert of each subpattern planting modes on sink characteristic segmentation and the segmentation of sub-test library feature is compared, if the number of same characteristic features segmentation is more than or equal to the threshold value of setting, the feature similarity in the feature of described test library and described subpattern storehouse, wherein, k is more than or equal to 1 natural number that is less than or equal to p.
Further, described subpattern storehouse map unit comprises:
The first mapping block, if there is no other subpattern storehouse link on the Hash address of shining upon for the feature in described subpattern storehouse, directly links the feature in described subpattern storehouse and the Hash address of shining upon with chained list;
The second mapping block, if there is other subpattern storehouse link on the Hash address of shining upon for the feature in subpattern storehouse, is connected to shone upon Hash address backmost the character chain in described subpattern storehouse.
Further, described device also comprises:
Subpattern storehouse delete cells, if the subpattern storehouse of storing for pattern base has arrived maximum quantity, deletes the subpattern storehouse that the earliest time point stored in described pattern base obtains;
Hash address search unit, for finding Hash address corresponding to subpattern storehouse obtaining with earliest time point by hash function;
Position judgment unit, for the feature that judges the subpattern storehouse that earliest time point obtains in residing position, described Hash address;
The first mapping delete cells, if for only having the subpattern storehouse link that earliest time point obtains on described Hash address, directly deletes linking of subpattern storehouse that earliest time point obtains and described Hash address;
The second mapping delete cells, if the subpattern storehouse link that also has other below in the subpattern storehouse obtaining for earliest time point, linking between the subpattern storehouse first earliest time point being obtained and described Hash address broken, linking between the subpattern storehouse again earliest time point being obtained and the rear sub-pattern base linking thereafter broken, finally, the address pointer of described Hash address being stored points to the head of a rear sub-pattern base.
In the embodiment of the present invention, in a sub-pattern base, store the feature that a time point obtains, in pattern base, increase behind subpattern storehouse, only the subpattern storehouse at every turn increasing need to be mapped in the corresponding Hash address of Hash table, compared to existing technology, while coupling, whole pattern base need to be mapped in the corresponding Hash address of Hash table at every turn, cost in time seldom, is conducive to improve matching efficiency.And, adopt hash function to mate, the mistake identification problem occurring can avoid adopting cloth dragon wave filter time, matching precision is very high.
Brief description of the drawings
Fig. 1 is the realization flow figure of the method for the characteristic matching that provides of the embodiment of the present invention one;
Fig. 2 is the pattern base that provides of the embodiment of the present invention one and the relation in subpattern storehouse, and mapping relations schematic diagram between the Hash address of the feature in subpattern storehouse and Hash table;
Fig. 3 adds behind new subpattern storehouse in the pattern base that provides of the embodiment of the present invention one, the mapping relations schematic diagram between the feature in the variation of pattern base and each subpattern storehouse and the Hash address of Hash table;
Fig. 4 is sub-test library in the test library that provides of the embodiment of the present invention one and the mapping relations schematic diagram between Hash table;
Fig. 5 is the realization flow figure of the method for the characteristic matching that provides of the embodiment of the present invention two;
Fig. 6 is that the feature in the antithetical phrase test library that provides of the embodiment of the present invention two is carried out segmentation, is divided into the schematic diagram of p feature segmentation;
Fig. 7 is the 1st feature segmentation in every sub-test library of providing of the embodiment of the present invention two and the mapping relations schematic diagram of Hash table 1;
Fig. 8 is p feature segmentation in every sub-test library of providing of the embodiment of the present invention two and the mapping relations schematic diagram of Hash table p;
Fig. 9 be the 1st to p feature segmentation in the sub-test library test_ti that provides of the embodiment of the present invention two respectively with the mapping relations schematic diagram of Hash table 1 to Hash table p;
Figure 10 is the structured flowchart of the device of the characteristic matching that provides of the embodiment of the present invention three;
Figure 11 is the structured flowchart of the device of the characteristic matching that provides of the embodiment of the present invention four.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
In embodiments of the present invention, feature current point in time being obtained deposits in subpattern storehouse; Described subpattern storehouse is added in pattern base; Described subpattern storehouse is mapped in the corresponding Hash address of Hash table by hash function; Receive identical entry matching request; According to described identical entry matching request, set up the feature of sub-test library and the mapping relations of described Hash table of current point in time by hash function; If map to the feature that stores a sub-pattern base in the Hash address of described Hash table, the affiliated storehouse of the sub-test library that described subpattern storehouse is described current point in time; If map to the feature that stores at least two sub-pattern bases in the Hash address of described Hash table, the feature of the feature of the sub-test library of described current point in time and described at least two sub-pattern bases is compared one by one to the affiliated storehouse of the sub-test library that the subpattern storehouse identical with the feature of the sub-test library of described current point in time is described current point in time.
Below in conjunction with specific embodiment, realization of the present invention is described in detail:
Embodiment mono-
Fig. 1 shows the realization flow of the method for the characteristic matching that the embodiment of the present invention one provides, and details are as follows:
In step S101, the feature that current point in time is obtained deposits in subpattern storehouse.
In the present embodiment, all can describe with certain character string, numeral or symbol for the feature in feature and test library in pattern base.
In the present embodiment, with Lib_ti (i=1,2,3 ... N) represent the feature that the ti moment obtains.Wherein, ti represents the time, and Lib_t1 is illustrated in the feature that the time t1 moment obtains, and Lib_t2 is illustrated in the feature that the time t2 moment obtains, and in ti, i is larger, and expression time experience is longer, and wherein each Lib_ti can represent with a string character, numeral or symbol.
Test_ti (i=1,2,3 ... the feature of inscribing the test library of acquisition while M) being illustrated in time ti, in ti, i is larger, and expression time experience is longer, and wherein each Test_ti can represent with a string character, numeral or symbol.
Wherein, the characteristic storage that the device of characteristic matching obtains each time point in a sub-pattern base, such as, the feature Lib_ti that the ti moment obtains is stored in the Lib_ti of subpattern storehouse.
In step S102, described subpattern storehouse is added in pattern base.
In the present embodiment, the device of characteristic matching adds the subpattern storehouse getting in pattern base.Pattern base is used for storing subpattern storehouse, as shown in Figure 2, in pattern base, store the current point in time subpattern storehouse that the device of interior characteristic matching of a period of time obtains before, such as, in pattern base, store subpattern storehouse Lib_t1, Lib_t2, Lib_t3, Lib_ti-2, Lib_ti-1, Lib_ti, Lib_ti+1, Lib_ti+2, Lib_ti+3 that t1, t2, t3, ti-2, ti-1, ti, ti+1, ti+2, ti+3 moment obtain.
Preferably, the finite capacity in the subpattern storehouse that can store in pattern base, so will delete some subpattern storehouses corresponding to moment earlier, the feature in the subpattern storehouse that the up-to-date moment is obtained is added in pattern base.Such as, in Fig. 3, delete the subpattern storehouse in t1 and t2 moment, and subpattern storehouse Lib_ti+4 and the Lib_ti+5 in ti+4 moment and ti+5 moment have been added in pattern base.
In step S103, by hash function, described subpattern storehouse is mapped in the corresponding Hash address of Hash table.
In the present embodiment, in pattern base, often add a new subpattern storehouse, all will set up the mapping relations of this subpattern storehouse and Hash table, by the Feature Mapping in this subpattern storehouse to the corresponding Hash address of Hash table.
Concrete, can build hash function, will newly add the Feature Mapping in the subpattern storehouse in pattern base to Hash table by this hash function.As shown in Figure 2, the feature in the subpattern storehouse in pattern base, all along with the variation of time has added corresponding timestamp, is conducive in subsequent applications like this for the image recognition on special time period.In Fig. 2, by the Feature Mapping in the subpattern storehouse corresponding each moment to the corresponding Hash address of Hash table, such as, the 4th the Hash address by the Feature Mapping of subpattern storehouse Lib_ti+3 to Hash table, second Hash address by the Feature Mapping of subpattern storehouse Lib_t2 and Lib_ti to Hash table.
While mapping due to employing hash function, there will be the same address to Hash table by the Feature Mapping in two or more subpatterns storehouse, problem bumps, at this moment need to adopt chain address method, the structure of utilizing chained list links two or more the subpattern storehouse that maps to same Hash address, as shown in Figure 3, in the time that time point arrives ti+3, because the subpattern storehouse of storing in pattern base has arrived maximum constraints quantity, so delete some subpattern storehouses that time point obtains earlier, concrete, first delete the subpattern storehouse that earliest time point obtains, the feature in the subpattern storehouse that the up-to-date moment is obtained is added in pattern base, and by the up-to-date Feature Mapping that is added to the subpattern storehouse in pattern base to the corresponding Hash address of Hash table and be linked to the chained list stored this Hash address backmost.
Concrete Link Rule is as follows:
1), for the feature in the subpattern storehouse that will delete, first find the Hash address corresponding with the feature in this subpattern storehouse by hash function, then judge feature residing position in this Hash address in this subpattern storehouse, if only have this subpattern storehouse link on this Hash address, directly delete this subpattern storehouse, if also have other subpattern storehouse link after this subpattern storehouse, at this moment first linking between this subpattern storehouse and this Hash address broken, then linking between this subpattern storehouse and the rear sub-pattern base linking thereafter broken, finally, the address pointer that this Hash address is stored points to the head of a rear sub-pattern base,
2), for the feature that enters the subpattern storehouse that newly adds pattern base, if there is no other subpattern storehouse link on the Hash address that the feature in subpattern storehouse is shone upon, directly with chain table method, the feature in this subpattern storehouse and the Hash address of shining upon linked;
3), for the feature that enters the subpattern storehouse that newly adds pattern base, if there is other subpattern storehouse link on the Hash address that the feature in subpattern storehouse is shone upon, the character chain in this subpattern storehouse is connected to this Hash address backmost.
Rule above can illustrate with example below, end product as shown in Figure 3:
In the time that time point arrives ti+3, the subpattern storehouse of storing in pattern base has arrived maximum constraints, be mapped to structure in Hash table as shown in Figure 2 above, when to time ti+4 time, first the feature in Lib_t1 storehouse is mapped to the chain list deletion in Hash table, as can see from Figure 2, at this time cut off linking between Hash (Lib_t1) and Hash (Lib_ti-2), then the address pointer of the Hash address of current storage Hash (Lib_t1) being stored points to Hash (lib_ti-2), a new subpattern planting modes on sink characteristic of coming in the ti+4 moment, be labeled as Lib_ti+4, through the mapping of hash function, the Hash address of finding Lib_ti+4 and Lib_ti+3 is identical, at this moment directly Hash (Lib_ti+4) with chained list be linked to Hash (Lib_ti+3) after.
When to time point ti+5 time, first the feature in Lib_t2 storehouse is mapped to the chain list deletion in Hash table, shine upon through hash function, on the Hash address that discovery Lib_ti+5 shines upon, there is no other chained list link, be empty, Hash (Lib_ti+5) be linked to after this Hash address.
Analogize the feature in stored subpattern storehouse is constantly deleted and inserted according to above-mentioned said mode, and the Hash table corresponding with it also deleted and update accordingly.Such as, in pattern base, need to increase the feature that moment ti+4 and moment ti+5 moment obtain, need in the pattern base shown in Fig. 2, delete feature Lib_t1 and Lib_t2 that t1 and t2 moment obtain, and delete linking between Lib_t1 and Lib_t2 and corresponding Hash address.
In step S104, receive identical entry matching request.
In the present embodiment, at test phase, within the time period of setting, the request in same characteristic features storehouse is searched in user's input, the device of request characteristic matching finds out the subpattern storehouse identical with the feature of the test library of current point in time, the affiliated storehouse using described subpattern storehouse as described test library from pattern base.Wherein, test library comprises the sub-test library that multiple time points obtain, in every sub-test library, store the feature that a time point obtains, as shown in Figure 4, test library comprise time t1, t2, t3 ... the sub-test library Test_t1, the Test_t2 that obtain of ti+3, ti+4, ti+5 moment ... Test_ti+3, Test_ti+4, Test_ti+5.
In step S105, according to described identical entry matching request, set up the feature of sub-test library and the mapping relations of described Hash table of current point in time by hash function, if map to the feature that stores a sub-pattern base in the Hash address of described Hash table, the affiliated storehouse of the sub-test library that described subpattern storehouse is described current point in time; If map to the feature that stores at least two sub-pattern bases in the Hash address of described Hash table, the feature of the feature of the sub-test library of described current point in time and described at least two sub-pattern bases is compared one by one to the affiliated storehouse of the sub-test library that the subpattern storehouse identical with the feature of the sub-test library of described current point in time is described current point in time.
In the present embodiment, the device of characteristic matching receives after identical entry matching request, sets up the feature of sub-test library of current point in time and the mapping relations of described Hash table obtain the subpattern storehouse identical with the feature of the sub-test library of described current point in time by hash function.
Such as, in the present embodiment, to in pattern base, search the subpattern storehouse identical with the feature of the sub-test library Test_ti+5 in time point ti+5 moment, first sub-test library Test_ti+5 is mapped in the corresponding Hash address of Hash table by hash function, in the present embodiment, Test_ti+5 maps to the 4th Hash address of Hash table, as shown in Figure 4, in this address, store Hash (Lib_ti+3) and Hash (Lib_ti+4), need the feature of the feature of Test_ti+5 and Lib_ti+3 and Lib_ti+4 to compare one by one, affiliated storehouse using the subpattern storehouse identical with the feature of Test_ti+5 as Test_ti+5.
The present embodiment, in a sub-pattern base, store the feature that a time point obtains, in pattern base, increase behind subpattern storehouse, only the subpattern storehouse at every turn increasing need to be mapped in the corresponding Hash address of Hash table, compared to existing technology, while coupling, do not need whole pattern base to map in the corresponding Hash address of Hash table at every turn, cost in time seldom, is conducive to improve matching efficiency.And, adopt hash function to mate, the mistake identification problem occurring can avoid adopting cloth dragon wave filter time, matching precision is very high.Find through experiment test, the lower time of comparison based on 15000 pattern bases of per minute, efficiency was very high only at Millisecond.The method of this characteristic matching can be applied in image recognition, Large Scale Graphs line coupling field.
One of ordinary skill in the art will appreciate that all or part of step realizing in the various embodiments described above method is can carry out the hardware that instruction is relevant by program to complete, corresponding program can be stored in a computer read/write memory medium, described storage medium, as ROM/RAM, disk or CD etc.
Embodiment bis-
Fig. 5 shows the realization flow of the method for the characteristic matching that the embodiment of the present invention two provides, and details are as follows:
In step S501, the feature that current point in time is obtained deposits in subpattern storehouse.
In step S502, described subpattern storehouse is added in pattern base.
In step S503, the feature in described subpattern storehouse is divided into p feature segmentation.
In step S504, by p hash function by p feature segmentation correspondence mappings of the feature in described subpattern storehouse to the corresponding Hash address of p Hash table.
In the present embodiment, the feature in subpattern storehouse is divided into p feature segmentation, as shown in Figure 6.As can see from Figure 6, the feature in subpattern storehouse is character, numeral or symbol, and actual needs carries out segmentation to these characters, numeral or symbol, is divided into P section (P is greater than 2 natural number) here.
Each feature segmentation of the feature in subpattern storehouse is mapped in different Hash tables, such as, as shown in Figure 7, the 1st feature segmentation Lib_1_t1 of the feature of subpattern storehouse Lib_t1 mapped to the 4th Hash address of Hash table 1; P feature segmentation Lib_p_t1 of the feature of subpattern storehouse Lib_t1 mapped to the 5th Hash address of Hash table p, as shown in Figure 8.
In step S505, receive similar matching request.
In the present embodiment, at test phase, within the time period of setting, the request in similar features storehouse is searched in user's input, the device of request characteristic matching finds out the subpattern storehouse with the feature similarity of the test library of current point in time, the affiliated storehouse using described subpattern storehouse as described test library from pattern base.
In step S506, according to described similar matching request, by the p of the feature of the sub-test library of current point in time feature segmentation, set up p the feature segmentation of sub-test library feature of current point in time and the mapping relations of p Hash table by p hash function, if k feature segmentation maps to the feature segmentation that stores subpattern storehouse in the Hash address of k Hash table, obtain one by one the feature in each subpattern storehouse, and the eigenwert of the eigenwert of each subpattern planting modes on sink characteristic segmentation and the segmentation of sub-test library feature is compared; If the number of same characteristic features segmentation is more than or equal to the threshold value of setting, the feature similarity in the feature of described test library and the subpattern storehouse of comparing; If the number of same characteristic features segmentation is less than the threshold value of setting, k+1 feature segmentation of continuation searching maps to the Hash address of k+1 Hash table, search out p feature segmentation always, if also do not find the subpattern storehouse of the threshold value that meets setting, think that the feature of described sub-test library is not in described pattern base.
In the present embodiment, if the feature of the test library of current point is very large with the characteristic similarity of the sub-pattern base finding, the number of same characteristic features segmentation is more to each other for two features, in the time that the number of same characteristic features segmentation is P, illustrate that the feature of test library is identical with the feature in subpattern storehouse.Therefore, when practical application, set a threshold value, in the time that the number of same characteristic features segmentation is more than or equal to this threshold value, represent that the test library of current point is similar to the subpattern storehouse finding.Wherein, this threshold value is less than p, can determine according to actual conditions.
In the present embodiment, the feature of the sub-test library test_ti of current point in time to be tested is also divided into p feature segmentation, then, this p feature segmentation is mapped to respectively to Hash table 1 to the corresponding Hash address in Hash table p, as shown in Figure 9.
If k feature segmentation maps to the feature segmentation that stores subpattern storehouse in the Hash address of k Hash table, obtain one by one the feature in each subpattern storehouse, and the feature segmentation of the sub-test library of the feature segmentation in each this feature subpattern storehouse and current point in time is compared; If the number of same characteristic features segmentation is more than or equal to the threshold value of setting, the feature similarity in the feature of described test library and the subpattern storehouse compared.If the number of same characteristic features segmentation is less than the threshold value of setting, k+1 feature segmentation of continuation searching maps to the Hash address of k+1 Hash table, search out p feature segmentation always, if also do not find the subpattern storehouse of the threshold value that meets setting, represent that the feature of described test library is not in described pattern base.Wherein, k is more than or equal to 1 natural number that is less than or equal to p.
Preferably, after step S502, also can carry out the step S103 to S105 in embodiment mono-, the request receiving according to the device of characteristic matching, can select to perform step S103 to S105 or execution step S503 to S506.
The present embodiment, the feature that newly adds the subpattern storehouse in pattern base is divided into p feature segmentation to be mapped in p Hash table by hash function respectively, then set up the mapping relations of the p of the feature of sub-test library to be tested feature segmentation, establish after mapping relations, each feature segmentation in each feature segmentation of sub-test library and subpattern storehouse is compared, if the number of same characteristic features segmentation is more than or equal to the threshold value of setting, think, the feature similarity in the feature of sub-test library and the subpattern storehouse of comparing.
One of ordinary skill in the art will appreciate that all or part of step realizing in the various embodiments described above method is can carry out the hardware that instruction is relevant by program to complete, corresponding program can be stored in a computer read/write memory medium, described storage medium, as ROM/RAM, disk or CD etc.
Embodiment tri-
Figure 10 shows the concrete structure block diagram of the device of the characteristic matching that the embodiment of the present invention three provides, and for convenience of explanation, only shows the part relevant to the embodiment of the present invention.This device 10 can be to be built in computer, also can be built in the identification that completes image in a special image recognition apparatus, such as, the identification of fingerprint, this device 10 comprises: subpattern storehouse creating unit 101, warehouse-in unit, subpattern storehouse 102, subpattern storehouse map unit 103, the first request reception unit 104, sub-test library map unit 105, the first matching unit 106 and the second matching unit 107.
Wherein, subpattern storehouse creating unit 101, deposits subpattern storehouse in for the feature that current point in time is obtained;
Warehouse-in unit, subpattern storehouse 102, for adding pattern base by described subpattern storehouse;
Subpattern storehouse map unit 103, for mapping to described subpattern storehouse by hash function the corresponding Hash address of Hash table;
The first request reception unit 104, for receiving identical entry matching request;
Sub-test library map unit 105, for according to described identical entry matching request, sets up the feature of sub-test library and the mapping relations of described Hash table of current point in time by hash function;
The first matching unit 106, if store the feature of a sub-pattern base for mapping to the Hash address of described Hash table, the affiliated storehouse of the sub-test library that described subpattern storehouse is described current point in time;
The second matching unit 107, if store the feature of at least two sub-pattern bases for mapping to the Hash address of described Hash table, the feature of the feature of the sub-test library of described current point in time and described at least two sub-pattern bases is compared one by one to the affiliated storehouse of the sub-test library that the subpattern storehouse identical with the feature of the sub-test library of described current point in time is described current point in time.
Concrete, described subpattern storehouse map unit 103 comprises:
The first mapping block, if there is no other subpattern storehouse link on the Hash address of shining upon for the feature in described subpattern storehouse, directly links the feature in described subpattern storehouse and the Hash address of shining upon with chained list;
The second mapping block, if there is other subpattern storehouse link on the Hash address of shining upon for the feature in subpattern storehouse, is connected to shone upon Hash address backmost the character chain in described subpattern storehouse.
Preferably, described device 10 also comprises:
Subpattern storehouse delete cells, if the subpattern storehouse of storing for pattern base has arrived maximum quantity, deletes the subpattern storehouse that the earliest time point stored in described pattern base obtains;
Hash address search unit, for finding Hash address corresponding to subpattern storehouse obtaining with earliest time point by hash function;
Position judgment unit, for the feature that judges the subpattern storehouse that earliest time point obtains in residing position, described Hash address;
The first mapping delete cells, if for only having the subpattern storehouse link that earliest time point obtains on described Hash address, directly deletes linking of subpattern storehouse that earliest time point obtains and described Hash address;
The second mapping delete cells, if the subpattern storehouse link that also has other below in the subpattern storehouse obtaining for earliest time point, linking between the subpattern storehouse first earliest time point being obtained and described Hash address broken, linking between the subpattern storehouse again earliest time point being obtained and the rear sub-pattern base linking thereafter broken, finally, the address pointer of described Hash address being stored points to the head of a rear sub-pattern base.
The device of the characteristic matching that the embodiment of the present invention provides can be applied in the embodiment of the method one of aforementioned correspondence, and details, referring to the description of above-described embodiment one, do not repeat them here.
Embodiment tetra-
Figure 11 shows the concrete structure block diagram of the device of the characteristic matching that the embodiment of the present invention four provides, and for convenience of explanation, only shows the part relevant to the embodiment of the present invention.This device 11 can be to be built in computer, also can be built in the identification that completes image in a special image recognition apparatus, such as, the identification of fingerprint, this device 11 comprises: subpattern storehouse creating unit 111, warehouse-in unit, subpattern storehouse 112, feature segmenting unit 113, First Characteristic segmentation map unit 114, the second request reception unit 115, Second Characteristic segmentation map unit 116 and similar matching unit 117.
Wherein, subpattern storehouse creating unit 111, deposits subpattern storehouse in for the feature that current point in time is obtained;
Warehouse-in unit, subpattern storehouse 112, for adding pattern base by described subpattern storehouse;
Feature segmenting unit 113, for the feature in described subpattern storehouse is divided into p feature segmentation, p is more than or equal to 2 natural number;
First Characteristic segmentation map unit 114, for mapping to p feature segmentation of the feature in described subpattern storehouse respectively the corresponding Hash address of p Hash table by hash function;
The second request reception unit 115, for receiving similar matching request;
Second Characteristic segmentation map unit 116, for according to described similar matching request, sets up p feature segmentation of sub-test library feature and the mapping relations of a described p Hash table of current point in time by hash function;
Similar matching unit 117, if the Hash address that maps to k Hash table for k feature segmentation stores the feature segmentation in subpattern storehouse, obtain one by one the feature in each subpattern storehouse, and the eigenwert of the eigenwert of each subpattern planting modes on sink characteristic segmentation and the segmentation of sub-test library feature is compared, if the number of same characteristic features segmentation is more than or equal to the threshold value of setting, the feature similarity in the feature of described test library and described subpattern storehouse, wherein, k is more than or equal to 1 natural number that is less than or equal to p.
Preferably, in this device 11, can also comprise subpattern storehouse map unit 103, the first request reception unit 104, sub-test library map unit 105, the first matching unit 106 and the second matching unit 107, with the coupling of realization character identical entry.Concrete execution identical entry coupling or similar the coupling selected, determines according to the content of the request instruction of user's transmission.
The device of the characteristic matching that the embodiment of the present invention provides can be applied in the embodiment of the method two of aforementioned correspondence, and details, referring to the description of above-described embodiment two, do not repeat them here.
It should be noted that in said apparatus embodiment, included unit is just divided according to function logic, but is not limited to above-mentioned division, as long as can realize corresponding function; In addition, the concrete title of each functional unit also, just for the ease of mutual differentiation, is not limited to protection scope of the present invention.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any amendments of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in protection scope of the present invention.

Claims (9)

1. a method for characteristic matching, is characterized in that, described method comprises:
The feature that current point in time is obtained deposits in subpattern storehouse;
Described subpattern storehouse is added in pattern base;
Described subpattern storehouse is mapped in the corresponding Hash address of Hash table by hash function;
Receive identical entry matching request;
According to described identical entry matching request, set up the feature of sub-test library and the mapping relations of described Hash table of current point in time by hash function;
If map to the feature that stores a sub-pattern base in the Hash address of described Hash table, the affiliated storehouse of the sub-test library that described subpattern storehouse is described current point in time;
If map to the feature that stores at least two sub-pattern bases in the Hash address of described Hash table, the feature of the feature of the sub-test library of described current point in time and described at least two sub-pattern bases is compared one by one to the affiliated storehouse of the sub-test library that the subpattern storehouse identical with the feature of the sub-test library of described current point in time is described current point in time.
2. the method for claim 1, is characterized in that, described described subpattern storehouse is added to pattern base in after, also comprise:
The feature in described subpattern storehouse is divided into p feature segmentation, and p is more than or equal to 2 natural number;
By hash function by p feature segmentation correspondence mappings of the feature in described subpattern storehouse to the corresponding Hash address of p Hash table;
Receive similar matching request;
According to described similar matching request, set up p feature segmentation of sub-test library feature and the mapping relations of a described p Hash table of current point in time by hash function;
If k feature segmentation maps to the feature segmentation that stores subpattern storehouse in the Hash address of k Hash table, obtain one by one the feature in each subpattern storehouse, and the eigenwert of the feature segmentation of the eigenwert of each subpattern planting modes on sink characteristic segmentation and sub-test library is compared, if the number of same characteristic features segmentation is more than or equal to the threshold value of setting, the feature similarity in the feature of described test library and described subpattern storehouse, wherein, k is more than or equal to 1 natural number that is less than or equal to p.
3. the method for claim 1, is characterized in that, the described corresponding Hash address that described subpattern storehouse is mapped to Hash table by hash function comprises:
If there is no other subpattern storehouse link on the Hash address that the feature in described subpattern storehouse is shone upon, directly with chained list, the feature in described subpattern storehouse and the Hash address of shining upon linked;
If have other subpattern storehouse link on the Hash address that the feature in subpattern storehouse is shone upon, the character chain in described subpattern storehouse be connected to shone upon Hash address backmost.
4. the method for claim 1, is characterized in that, described described subpattern storehouse is added to pattern base in before, also comprise:
If the subpattern storehouse of storing in pattern base has arrived maximum quantity, delete the subpattern storehouse that the earliest time point stored in described pattern base obtains;
Find Hash address corresponding to subpattern storehouse obtaining with earliest time point by hash function;
Judge feature residing position in described Hash address in the subpattern storehouse that earliest time point obtains;
The subpattern storehouse link that earliest time point obtains if only have on described Hash address, directly deletes linking of subpattern storehouse that earliest time point obtains and described Hash address;
If the subpattern storehouse link that also has other below in the subpattern storehouse that earliest time point obtains, linking between the subpattern storehouse first earliest time point being obtained and described Hash address broken, linking between the subpattern storehouse again earliest time point being obtained and the rear sub-pattern base linking thereafter broken, finally, the address pointer of described Hash address being stored points to the head of a rear sub-pattern base.
5. a device for characteristic matching, is characterized in that, described device comprises:
Subpattern storehouse creating unit, deposits subpattern storehouse in for the feature that current point in time is obtained;
Warehouse-in unit, subpattern storehouse, for adding pattern base by described subpattern storehouse;
Subpattern storehouse map unit, for mapping to described subpattern storehouse by hash function the corresponding Hash address of Hash table;
The first request reception unit, for receiving identical entry matching request;
Sub-test library map unit, for according to described identical entry matching request, sets up the feature of sub-test library and the mapping relations of described Hash table of current point in time by hash function;
The first matching unit, if store the feature of a sub-pattern base for mapping to the Hash address of described Hash table, the affiliated storehouse of the sub-test library that described subpattern storehouse is described current point in time;
The second matching unit, if store the feature of at least two sub-pattern bases for mapping to the Hash address of described Hash table, the feature of the feature of the sub-test library of described current point in time and described at least two sub-pattern bases is compared one by one to the affiliated storehouse of the sub-test library that the subpattern storehouse identical with the feature of the sub-test library of described current point in time is described current point in time.
6. device as claimed in claim 5, is characterized in that, described device also comprises:
Feature segmenting unit, for the feature in described subpattern storehouse is divided into p feature segmentation, p is more than or equal to 2 natural number;
First Characteristic segmentation map unit, for mapping to p feature segmentation of the feature in described subpattern storehouse respectively the corresponding Hash address of p Hash table by hash function;
The second request reception unit, for receiving similar matching request;
Second Characteristic segmentation map unit, for according to described similar matching request, sets up p feature segmentation of sub-test library feature and the mapping relations of a described p Hash table of current point in time by hash function;
Similar matching unit, if the Hash address that maps to k Hash table for k feature segmentation stores the feature segmentation in subpattern storehouse, obtain one by one the feature in each subpattern storehouse, and the eigenwert of the eigenwert of each subpattern planting modes on sink characteristic segmentation and the segmentation of sub-test library feature is compared, if the number of same characteristic features segmentation is more than or equal to the threshold value of setting, the feature similarity in the feature of described test library and described subpattern storehouse, wherein, k is more than or equal to 1 natural number that is less than or equal to p.
7. device as claimed in claim 5, is characterized in that, described subpattern storehouse map unit comprises:
The first mapping block, if there is no other subpattern storehouse link on the Hash address of shining upon for the feature in described subpattern storehouse, directly links the feature in described subpattern storehouse and the Hash address of shining upon with chained list;
The second mapping block, if there is other subpattern storehouse link on the Hash address of shining upon for the feature in subpattern storehouse, is connected to shone upon Hash address backmost the character chain in described subpattern storehouse.
8. device as claimed in claim 5, is characterized in that, described device also comprises:
Subpattern storehouse delete cells, if the subpattern storehouse of storing for pattern base has arrived maximum quantity, deletes the subpattern storehouse that the earliest time point stored in described pattern base obtains;
Hash address search unit, for finding Hash address corresponding to subpattern storehouse obtaining with earliest time point by hash function;
Position judgment unit, for the feature that judges the subpattern storehouse that earliest time point obtains in residing position, described Hash address;
The first mapping delete cells, if for only having the subpattern storehouse link that earliest time point obtains on described Hash address, directly deletes linking of subpattern storehouse that earliest time point obtains and described Hash address;
The second mapping delete cells, if the subpattern storehouse link that also has other below in the subpattern storehouse obtaining for earliest time point, linking between the subpattern storehouse first earliest time point being obtained and described Hash address broken, linking between the subpattern storehouse again earliest time point being obtained and the rear sub-pattern base linking thereafter broken, finally, the address pointer of described Hash address being stored points to the head of a rear sub-pattern base.
9. an image recognition apparatus, is characterized in that, described image recognition apparatus comprises the device of the characteristic matching as described in claim 5 to 8 any one.
CN201410298545.5A 2014-06-27 2014-06-27 The method, apparatus and image recognition apparatus of a kind of characteristic matching Active CN104050279B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410298545.5A CN104050279B (en) 2014-06-27 2014-06-27 The method, apparatus and image recognition apparatus of a kind of characteristic matching

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410298545.5A CN104050279B (en) 2014-06-27 2014-06-27 The method, apparatus and image recognition apparatus of a kind of characteristic matching

Publications (2)

Publication Number Publication Date
CN104050279A true CN104050279A (en) 2014-09-17
CN104050279B CN104050279B (en) 2018-03-06

Family

ID=51503111

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410298545.5A Active CN104050279B (en) 2014-06-27 2014-06-27 The method, apparatus and image recognition apparatus of a kind of characteristic matching

Country Status (1)

Country Link
CN (1) CN104050279B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572080A (en) * 2014-12-16 2015-04-29 广东欧珀移动通信有限公司 Method and device for managing photo taking mode
CN110084590A (en) * 2019-03-27 2019-08-02 努比亚技术有限公司 Method for controlling mobile terminal, mobile terminal and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020106127A1 (en) * 2000-10-10 2002-08-08 Mei Kodama Method of and apparatus for retrieving movie image
CN101840578A (en) * 2009-03-17 2010-09-22 鸿富锦精密工业(深圳)有限公司 Camera device and dynamic detection method thereof
US20100310182A1 (en) * 2009-06-04 2010-12-09 Microsoft Corporation Geocoding by image matching
CN102314485A (en) * 2011-07-27 2012-01-11 中国科学院计算机网络信息中心 Method and device for adding, searching and deleting hash table
CN102364463A (en) * 2011-09-19 2012-02-29 浪潮电子信息产业股份有限公司 Hash-based method for searching CAM (central address memory)
CN103514293A (en) * 2013-10-09 2014-01-15 北京中科模识科技有限公司 Method for video matching in video template library

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020106127A1 (en) * 2000-10-10 2002-08-08 Mei Kodama Method of and apparatus for retrieving movie image
CN101840578A (en) * 2009-03-17 2010-09-22 鸿富锦精密工业(深圳)有限公司 Camera device and dynamic detection method thereof
US20100310182A1 (en) * 2009-06-04 2010-12-09 Microsoft Corporation Geocoding by image matching
CN102314485A (en) * 2011-07-27 2012-01-11 中国科学院计算机网络信息中心 Method and device for adding, searching and deleting hash table
CN102364463A (en) * 2011-09-19 2012-02-29 浪潮电子信息产业股份有限公司 Hash-based method for searching CAM (central address memory)
CN103514293A (en) * 2013-10-09 2014-01-15 北京中科模识科技有限公司 Method for video matching in video template library

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572080A (en) * 2014-12-16 2015-04-29 广东欧珀移动通信有限公司 Method and device for managing photo taking mode
CN104572080B (en) * 2014-12-16 2018-01-19 广东欧珀移动通信有限公司 A kind of photographic method and device
CN110084590A (en) * 2019-03-27 2019-08-02 努比亚技术有限公司 Method for controlling mobile terminal, mobile terminal and computer readable storage medium

Also Published As

Publication number Publication date
CN104050279B (en) 2018-03-06

Similar Documents

Publication Publication Date Title
US8190591B2 (en) Bit string searching apparatus, searching method, and program
CN102915347B (en) A kind of distributed traffic clustering method and system
CN106156082B (en) A kind of ontology alignment schemes and device
CN104166651B (en) Method and apparatus based on the data search integrated to homogeneous data object
CN105069048A (en) Small file storage method, query method and device
WO2022062610A1 (en) Information presentation method and apparatus, electronic device, and storage medium
CN104321802A (en) Image analysis device, image analysis system, and image analysis method
CN103678705A (en) Vector data concurrent conversion method from VCT file to shapefile file
CN103186617B (en) A kind of method and apparatus storing data
CN106970958B (en) A kind of inquiry of stream file and storage method and device
CN104050279A (en) Method and device for feature matching and image identification device
EP2660729A1 (en) Device and method for storing mass data based on tree structure
CN102193988A (en) Method and system for retrieving node data in graphic database
CN112000628B (en) Multichannel laser radar data storage method and device and electronic equipment
CN108121501A (en) Hierarchical stor, storage control and hierarchical control method
CN102650972A (en) Data storage method, device and system
CN102902701B (en) Information query system and method
CN103279420A (en) Optimized automation testing method and system for application program of mobile terminal
US20190325110A1 (en) Circuit design verification apparatus and program
CN112328630B (en) Data query method, device, equipment and storage medium
CN105518790B (en) The method and device of data write-in
CN104537023A (en) Storage method and device for reverse index records
KR20220099745A (en) A spatial decomposition-based tree indexing and query processing methods and apparatus for geospatial blockchain data retrieval
CN104021142B (en) The storage of tamper resistant systems web page files fingerprint and querying method
US8195667B2 (en) Bit string search apparatus, search method, and program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant