The content of the invention
The technical problem to be solved in the present invention is can not to obtain merchandise news or acquisition in the prior art to overcome
Merchandise news it is incomplete in the case of be difficult carry out again the defect of goods matching there is provided one kind can by extract characteristic point,
Build triangle and calculate image matching system and the utilization for carry out the similarity of commodity image quantitative analysis calculating
The image matching method that the image matching system is realized.
The present invention is to solve above-mentioned technical problem by following technical proposals:
The invention provides a kind of image matching method, its feature is that it comprises the following steps:
S1, N number of characteristic point is extracted using feature point extraction algorithm from one first image and one second image respectively and will
N number of Feature Points Matching in N number of characteristic point and second image in first image is one-to-one N to same place,
Wherein N is positive integer;
S2, respectively in first image and second image build at least one triangle, first image with this
Every a pair of triangles in two images are built by corresponding same place, wherein each same place is at least one triangle
Same place is not included without public domain between summit, and triangle, and each in the region of triangle covering;
S3, for first image and every a pair of triangles for being built respectively by corresponding same place in second image,
Keep the sample rate of the larger triangle of area and by the larger triangle resampling of the area to area less three
After angular area is identical, the grey level histogram of area two triangles of identical is counted;
S4, to step S2In every a pair of triangles for constructing run formulaIts
Middle S is step S2In the similarity of a pair of triangles that is built by corresponding same place, M is by the gray scale in grey level histogram
The hop count that the interval of value is marked off, LiFor by i-th section of value after the larger triangle resampling of the area in gray value
The number of pixel, R in intervaliFor of the less triangle of area pixel in i-th section of interval of gray value
Number;
S5, to step S4In the similarity of every a pair of triangles that calculates average with calculate first image with
The similarity of second image.
Wherein, in step S1Middle utilization feature point extraction algorithm is extracted after characteristic point, respectively will be every in first image
One characteristic point is compared with all characteristic points in second image, and is found out in second image with maximum
The point of measuring similarity value as same place, by this method just can will first image with it is all in second image
Characteristic point all match into one-to-one same place, and its concrete implementation principle already belongs to techniques known,
Just repeat no more herein.And the characteristic point in image is typically all the point acquired a special sense on image, characteristic point is usually
Larger point of bright spot, the curvature of marginal point, dark areas on image etc., and the spy that different feature point extraction algorithms is extracted
It is a little different for levying.
And in step S2In can be specifically respectively in first image with choosing in correspondence with each other of the same name in second image
Point, and triangle in correspondence with each other is built using same place in correspondence with each other, and there is no public area between each two triangle
Domain ensures that the region covered between triangle is not repeated so that the calculating of follow-up similarity is more accurate.
Step S3In keep resolution ratio on the premise of by the larger triangle resampling of area to area less three
Angular area is identical, and this falls within techniques known, just repeats no more herein.
Step S4In counted grey level histogram and image pixel is normalized to [0,255] it is interval in after, can be with
Merge gray value according to actual conditions, gray value is divided into M sections, therefore M value can be determined voluntarily as needed, and it is public
I in formula is then positive integer and 1≤i≤M.
Pass through the image matching method, it becomes possible to incomplete in the merchandise news that can not obtain the details of commodity or acquisition
, still can be only by the comparison of the similarity of the images of commodity, to analyze whether two commodity belong to same in the case of face
Type or with a.And result of the comparison can accurately be showed with numerical value so that analysis, result of the comparison are more
It is directly perceived credible.
It is preferred that each triangle is respectively provided with a minimum outsourcing rectangle.
It is preferred that step S1In feature point extraction algorithm for SIFT algorithms, Harris algorithms, Moravec algorithms or
Robert algorithms(The SIFT algorithms, the Harris algorithms, the Moravec algorithms and the Robert algorithms are that characteristic point is carried
Take the specific species of algorithm).
Present invention also offers a kind of image matching system, its feature is that it includes:
One feature point extraction module, for utilizing feature point extraction algorithm respectively from one first image and one second image
Extract N number of characteristic point and by N number of Feature Points Matching in N number of characteristic point in first image and second image for one by one
Corresponding N is to same place, and wherein N is positive integer;
One triangular models block, for building at least one triangle in first image and second image respectively
Shape, first image is built with every a pair of triangles in second image by corresponding same place, wherein each same place
It is not have public domain between at least one vertex of a triangle, and triangle, and the region of each triangle covering
In do not include same place;
One computing module, for firstly for first image with being built respectively by corresponding same place in second image
Every a pair of triangles, keeping the sample rate of the larger triangle of area and arriving the larger triangle resampling of the area
After identical with the area of the less triangle of area, the grey level histogram of area two triangles of identical is counted;
Formula is run to every a pair of triangles that triangular modeling block is constructed
Wherein S is the similarity of a pair of the triangles built by corresponding same place, and M is taking the gray value in grey level histogram
The hop count that value interval division goes out, LiFor by after the larger triangle resampling of the area in i-th section of interval of gray value
The number of pixel, RiFor the number of the less triangle of area pixel in i-th section of interval of gray value;
Finally the similarity of every a pair of triangles to calculating average with calculate first image with this second
The similarity of image.
It is preferred that each triangle is respectively provided with a minimum outsourcing rectangle.
It is preferred that this feature point extraction algorithm is SIFT algorithms, Harris algorithms, Moravec algorithms or Robert algorithms.
It is an object of the invention to additionally provide a kind of image matching method, its feature is that it comprises the following steps:
S1, N number of characteristic point is extracted using feature point extraction algorithm from one first image and one second image respectively and will
N number of Feature Points Matching in N number of characteristic point and second image in first image is one-to-one N to same place,
Wherein N is positive integer;
S2, a starting triangle, this pair starting triangle are built in first image and second image respectively
Summit is respectively the first image not triangle same place corresponding with second image and this pair starting triangle
Same place is not included in the region of shape covering;
S3, judge in first image and second image to whether there is in not triangle same place respectively with
The distance of at least two triangle same places is less than the target same place of a first threshold;
If so, then judging all compositions respectively in first image and second image for each target same place
With the presence or absence of at least two basic same places in the same place of triangle so that at least two basic same place and the target are same
The distance of famous cake is respectively less than the first threshold and in first image and second image at least two basic same place
Two bases of ratio and this of line segment in correspondence with each other for being constituted respectively with the target same place of two basic same places it is of the same name
The difference of ratio for the line segment in correspondence with each other that point is constituted is respectively less than a Second Threshold, if so, then first image and this
Target same place is utilized respectively in two images and builds target triangles with this two basic same places, first image and this
This two basic same places are corresponding in two images, without public area between the target triangle and remaining triangle
Same place is not included in domain, and the region of target triangle covering, if it is not, then rejecting target same place;
If it is not, then return to step S2;
S4, for first image and every a pair of triangles for being built respectively by corresponding same place in second image,
Keep the sample rate of the larger triangle of area and by the larger triangle resampling of the area to area less three
After angular area is identical, the grey level histogram of area two triangles of identical is counted;
S5, formula is run to every a pair of the triangles constructed by corresponding same place
Wherein S is step S3In the similarity of a pair of triangles that is built by corresponding same place, M is by the ash in grey level histogram
The hop count that the interval of angle value is marked off, LiWill to be taken after the larger triangle resampling of the area at i-th section of gray value
The number of pixel, R in value is intervaliFor the less triangle of the area in i-th section of interval of gray value pixel
Number;
S6, to step S5In the similarity of every a pair of triangles that calculates average with calculate first image with
The similarity of second image.
It can be filtered out in above-mentioned method using the principle of triangle of the same name come the same place to error hiding, of the same name three
Angular is that the same place of three matchings corresponding with second image using first image is constituted as summit.Work as triangle
After fixation, the relative coordinate and orientation on three summits therein be all to determine it is constant, and if two triangles are same
Name triangle, then it is corresponding and match to illustrate two vertexs of a triangle, that is, one of triangle can be with
By another triangle is obtained by the deformation of the non-qualitative changes such as rotation, scaling or movement, therefore three tops of a triangle
Relative coordinate, relative bearing etc. of point and relative coordinate, the relative bearing on three corresponding summits of another triangle etc.
It is proportion relation.It therefore, it can show that two triangles of the same name are similar triangles.
During actual images match, when being same place by Feature Points Matching, always in the presence of some error hidings
Point, these points can carry out error to follow-up calculating analytic band, cause the result for calculating analysis deviation occur.Therefore, it is only maximum
The point of the error hiding filtered out in same place of limit, just can ensure that the accuracy and reliability of the calculating of the similarity of image.
And due in first image and second image, if there is summit to be the same of error hiding in corresponding triangle
Famous cake, may result in two corresponding triangles dissmilarities, then the ratio difference on the corresponding side of triangle also can be very big, also
The ratio on the side being made up of the same places of two matchings in triangle with by a same place matched and an error hiding
The ratio difference on the side that same place is constituted can be very big.Therefore, according to the relative theory of triangle of the same name, it becomes possible to reject error hiding
Same place.
Wherein, with above-mentioned step S2Based on the starting triangle of middle structure, above-mentioned step S is recycled3It can just pick
Except the same place of error hiding, pass through step S3In first time judge, it becomes possible to ensure first all target same places with extremely
The distance of few two triangle same places is less than the first threshold, so, and new three are being built using target same place
When angular, the region for allowing for triangle covering will not be very big, so as to be to ensure that the accurate of the calculating of the similarity of image
Property and reliability.
And if being unsatisfactory for the requirement judged for the first time, just illustrate not triangle same place with it is triangle
The distance between same place is far, if now recycling not triangle same place and triangle same place structure
Build new triangle, will because of covering region it is excessive and have influence on the accuracy of the calculating of the similarity of follow-up image and
Reliability.Therefore, now will return to step S2, new starting triangle is built using not triangle same place,
Certainly, it also must assure that no public domain between new starting triangle and original starting triangle.
Then, for each target same place, step S can all be passed through3In second judgement, if target same place energy
Enough distances with least two basic same places are less than the first threshold, and target same place and two basic same places are distinguished
The ratio of the line segment in correspondence with each other constituted in first image and second image and two basic same places are respectively at this
The ratio difference of line segment in correspondence with each other of first image with being constituted in second image is less than the Second Threshold, then illustrates the mesh
Mark same place meets the requirements, and just builds new triangle with this two basic same places using the target same place.Certainly, this two
Individual basic same place can be chosen by user from least two basic same place according to actual needs.
And for the target same place for the requirement for being unsatisfactory for above-mentioned second of judgement, then explanation is the same place of error hiding,
Therefore it must be rejected, to ensure the accuracy of the Similarity Measure to the first image and the second image.So, will by mistake
The same place matched somebody with somebody carries out step S again after rejecting4-S6Calculating, it becomes possible to be more precisely calculated first image and this second
The similarity of image.
It is preferred that step S2The step of middle this pair of structure starting triangle, also includes:
S21, respectively in first image and second image build multiple triangles, first image and second figure
Every a pair of triangles as in are built by corresponding same place, do not have public domain between each two triangle wherein and each
Same place is not included in the region of triangle covering;
S22, calculate first image and every a pair are built by corresponding same place in second image triangle respectively
The average deviation of the ratio on corresponding side, chooses a pair of minimum triangles of average deviation as starting triangle.
In step S2In, multiple triangles are built first, then therefrom choose a pair of minimum triangles of deviation by calculating
It is used as starting triangle, it becomes possible to further ensure the accuracy of result of calculation.
It is preferred that each triangle is respectively provided with a minimum outsourcing rectangle.
It is preferred that step S1In feature point extraction algorithm for SIFT algorithms, Harris algorithms, Moravec algorithms or
Robert algorithms.
Present invention also offers a kind of image matching system, its feature is that it includes:
One feature point extraction module, for utilizing feature point extraction algorithm respectively from one first image and one second image
Extract N number of characteristic point and by N number of Feature Points Matching in N number of characteristic point in first image and second image for one by one
Corresponding N is to same place, and wherein N is positive integer;
One triangular models block, for building a starting triangle in first image and second image respectively
Shape, this pair starting vertex of a triangle is respectively not triangle same corresponding with second image of first image
Same place is not included in the region of famous cake and this pair starting triangle covering;
One judge module, for judging not triangle same place respectively in first image and second image
In whether there is the target same place for being less than a first threshold with the distances of at least two triangle same places;
If so, then judging all compositions respectively in first image and second image for each target same place
With the presence or absence of at least two basic same places in the same place of triangle so that at least two basic same place and the target are same
The distance of famous cake is respectively less than the first threshold and in first image and second image at least two basic same place
Two bases of ratio and this of line segment in correspondence with each other for being constituted respectively with the target same place of two basic same places it is of the same name
The difference of the ratio for the line segment in correspondence with each other that point is constituted is respectively less than a Second Threshold, if so, then calling the triangular to model
Block is utilized respectively target same place in first image and second image and builds target triangle with this two basic same places
Shape, first image and in second image this two basic same places be it is corresponding, the target triangle and remaining
Without same place is not included in public domain, and the region of target triangle covering between triangle, if it is not, then rejecting
Target same place;
If it is not, then call the triangular to model block builds a starting in first image and second image respectively
Triangle, this pair starting vertex of a triangle is respectively not triangle corresponding with second image of first image
Same place and this pair starting triangle covering region in do not include same place;
One computing module, for firstly for first image with being built respectively by corresponding same place in second image
Every a pair of triangles, keeping the sample rate of the larger triangle of area and arriving the larger triangle resampling of the area
After identical with the area of the less triangle of area, the grey level histogram of area two triangles of identical is counted;
Formula is run to every a pair of triangles that triangular modeling block is constructed
Wherein S is the similarity of a pair of the triangles built by corresponding same place, and M is taking the gray value in grey level histogram
The hop count that value interval division goes out, LiFor by after the larger triangle resampling of the area in i-th section of interval of gray value
The number of pixel, RiFor the number of the less triangle of area pixel in i-th section of interval of gray value;
Finally the similarity of every a pair of triangles to calculating average with calculate first image with this second
The similarity of image.
It is preferred that characterized in that, triangular modeling block is used for first respectively in first image and second figure
Multiple triangles are built as in, first image is with every a pair of triangles in second image by corresponding same place structure
Build, do not include same place in the region for not having public domain and the covering of each triangle between each two triangle wherein;
Then first image is calculated respectively and every a pair are built by corresponding same place in second image triangle
Corresponding side ratio average deviation, choose a pair of minimum triangles of average deviation and be used as starting triangle.
It is preferred that each triangle is respectively provided with a minimum outsourcing rectangle.
It is preferred that this feature point extraction algorithm is SIFT algorithms, Harris algorithms, Moravec algorithms or Robert algorithms.
The positive effect of the present invention is:The present invention can be in the details that can not obtain commodity or the business of acquisition
In the case of product information is incomplete, by the comparison of the similarity of the image of commodity, to analyze whether two commodity belong to same
Type or with a.And result of the comparison can accurately be showed with numerical value, with two commodity images of numerical quantization
Similarity degree so that analysis, result of the comparison are more directly perceived credible.
Embodiment 1:
Modeled as shown in figure 1, the goods matching system of the present embodiment includes a feature point extraction module 1, a triangular
The computing module 3 of block 2 and one.
The goods matching system only can just be calculated by the image of two commodity and judge the similarity of image, and then just
It may determine that whether two commodity belong to same type or with a.This feature point extraction module 1 is then first with characteristic point
Extraction algorithm extracts N number of characteristic point and by N number of feature in first image from one first image and one second image respectively
N number of Feature Points Matching in point and second image is one-to-one N to same place, and wherein N is positive integer.
And feature point extraction algorithm therein can be calculated for SIFT algorithms, Harris algorithms, Moravec algorithms or Robert
Method, these belong to algorithm well known in the art, just repeated no more herein.
Using feature point extraction algorithm extract characteristic point after, respectively by each characteristic point in first image with
All characteristic points in second image are compared, and are found out in second image with maximum similarity metric
Point by this method just can all match first image with all characteristic points in second image as same place
Into one-to-one same place, and its concrete implementation principle already belongs to techniques known, just repeats no more herein.
And the characteristic point in image is typically all the point acquired a special sense on image, characteristic point be usually marginal point on image,
Larger point of bright spot, the curvature of dark areas etc., and the characteristic point that different feature point extraction algorithms is extracted is different.
Then triangular modeling block 2 just builds at least one triangle in first image and second image respectively
Shape, first image is built with every a pair of triangles in second image by corresponding same place, wherein each same place
It is not have public domain between at least one vertex of a triangle, and triangle, and the region of each triangle covering
In do not include same place.
Same place in correspondence with each other can be specifically chosen in first image and second image respectively, and using mutually
Corresponding same place builds triangle in correspondence with each other, and when the quantity of triangle is more than two, it is follow-up in order to ensure
The accuracy of calculating, must be requested that all without public domain between any two triangle.In order that the result that must be calculated is more
Optimization, the outsourcing rectangular area of the triangle that can be constructed with optimal selection minimum same place builds triangle.
And the computing module 3 then can firstly for first image with second image respectively by corresponding same place structure
Every a pair of the triangles built, are keeping the sample rate of the larger triangle of area and by the larger triangle resampling of the area
To after identical with the area of the less triangle of area, the grey level histogram of area two triangles of identical is counted;
Formula is run to every a pair of triangles that triangular modeling block is constructed
Wherein S is the similarity of a pair of the triangles built by corresponding same place, and M is taking the gray value in grey level histogram
The hop count that value interval division goes out, LiFor by after the larger triangle resampling of the area in i-th section of interval of gray value
The number of pixel, RiFor the number of the less triangle of area pixel in i-th section of interval of gray value;
Finally the similarity of every a pair of triangles to calculating average with calculate first image with this second
The similarity of image.
Wherein keep resolution ratio on the premise of by the larger triangle resampling of area to the less triangle of area
Area it is identical, this falls within techniques known, just repeats no more herein.
, can be according to reality after having counted grey level histogram and having normalized to image pixel in [0,255] interval
Situation merges gray value, and gray value is divided into M sections, therefore M value can be determined voluntarily as needed, and the i in formula
It is then positive integer and 1≤i≤M.
For example, following form gives three pairs by the life in the first image and the second image respectively of same place in correspondence with each other
Into triangle pair A and a, B and b and C and c grey level histogram distribution situation, taken wherein having marked off five gray values
Value is interval, therefore the M values of above-mentioned formula are 5, and can just calculate every a pair of triangles respectively using above-mentioned formula
Similarity, result of calculation is as follows:
S (a, A)=1/5 × ((1- | 10-15 |/15)+(1- | 30-26 |/30)+(1
-|25-20|/25)+(1-|8-4|/8)+(1-|0-5|/5))
=1/5 × (0.667+0.867+0.8+0.5+0)=0.5668
S (b, B)=1/5 × ((1- | 10-15 |/15)+(1- | 5-4 |/5)+(1- | 20
-18|/20)+(1-|30-25|/30)+(1-|8-10|/10))
=1/5 × (0.667+0.8+0.9+0.834+0.8)=0.802
S (c, C)=1/5 × ((1- | 30-25 |/30)+(1- | 20-28 |/28)+(1
-|8-10|/10)+(1-|0-5|/5)+(1-|10-6|/10))
=1/5 × (0.834+0.714+0.8+0+0.6)=0.5896
And then to S(A, A)、S(B, B)And S(C, C)First image and second image can just be calculated by averaging
Similarity, i.e.,
Utilize above-mentioned calculation procedure, it becomes possible to calculate the similarity of two images.
As shown in Fig. 2 the goods matching method that the present invention is realized using the goods matching system of the present embodiment is including following
Step:
Step 100, using feature point extraction algorithm extract N number of characteristic point from one first image and one second image respectively
And by N number of Feature Points Matching in N number of characteristic point in first image and second image be one-to-one N to of the same name
Point.
Step 101, in first image and second image build at least one triangle respectively, first image with
Every a pair of triangles in second image are built by corresponding same place, wherein each same place is at least one triangle
The summit of shape, and do not include same place without public domain between triangle, and each in the region of triangle covering.
Step 102, for first image and built respectively by corresponding same place in second image every a pair three
It is angular, keeping the sample rate of the larger triangle of area and by the larger triangle resampling of the area to smaller with area
Triangle area it is identical after, count area two triangles of identical grey level histogram.
Step 103, formula is run to every a pair of the triangles constructed in step 101
Step 104, the similarity of every a pair of triangles to being calculated in step 103 average with calculate this first
The similarity of image and second image, then terminates flow.
Embodiment 2:
As shown in figure 3, the image matching system of the present embodiment is except including a feature point extraction module 1, a triangular
Model outside the computing module 3 of block 2 and one, in addition to a judge module 4.
The present embodiment and the difference of embodiment 1 are:In the present embodiment, triangular modeling block 2 can be respectively at this
First image is with building a starting triangle in second image, this pair starting vertex of a triangle is respectively first image
Do not wrapped in the region of the not triangle same place corresponding with second image and this pair starting triangle covering
Containing same place.
In specific build, triangular modeling block 2 is built in first image and second image respectively first
Multiple triangles, first image is built with every a pair of triangles in second image by corresponding same place, wherein often
Same place is not included in the region for not having public domain and the covering of each triangle between two triangles.
Then first image is calculated respectively and every a pair are built by corresponding same place in second image triangle
Corresponding side ratio average deviation, choose a pair of minimum triangles of average deviation and be used as starting triangle.
Also, the judge module 4 is in first image with judging not triangle of the same name in second image respectively
The distance that whether there is in point with least two triangle same places is less than the target same place of a first threshold;
If so, then judging all compositions respectively in first image and second image for each target same place
With the presence or absence of at least two basic same places in the same place of triangle so that at least two basic same place and the target are same
The distance of famous cake is respectively less than the first threshold and in first image and second image at least two basic same place
Two bases of ratio and this of line segment in correspondence with each other for being constituted respectively with the target same place of two basic same places it is of the same name
The difference of the ratio for the line segment in correspondence with each other that point is constituted is respectively less than a Second Threshold, if so, then calling the triangular to model
Block 2 is utilized respectively target same place in first image and second image and builds target triangle with this two basic same places
Shape, first image and in second image this two basic same places be it is corresponding, the target triangle and remaining
Without same place is not included in public domain, and the region of target triangle covering between triangle, if it is not, then rejecting
Target same place;
If it is not, then call the triangular to model block 2 builds one in first image and second image respectively
Beginning triangle, this pair starting vertex of a triangle be respectively first image it is corresponding with second image do not constitute triangle
Same place is not included in the region of the same place of shape and this pair starting triangle covering.
During actual images match, when being same place by Feature Points Matching, always in the presence of some error hidings
Point, these points can carry out error to follow-up calculating analytic band, cause the result for calculating analysis deviation occur.Therefore, it is only maximum
The point of the error hiding filtered out in same place of limit, just can ensure that the accuracy and reliability of the calculating of the similarity of image.
Wherein, based on the triangular models the starting triangle that block 2 is built, the judge module 4 is recycled with regard to energy
The same place of error hiding is enough rejected, is judged by the first time of the judge module 4, it becomes possible to ensure that all targets are of the same name first
The distance of point and at least two triangle same places is less than the first threshold, so, is built using target same place
During new triangle, the region for allowing for triangle covering will not be very big, so as to be to ensure that the calculating of the similarity of image
Accuracy and reliability.
And if being unsatisfactory for the requirement judged for the first time, just illustrate not triangle same place with it is triangle
The distance between same place is far, if now recycling not triangle same place and triangle same place structure
Build new triangle, will because of covering region it is excessive and have influence on the accuracy of the calculating of the similarity of follow-up image and
Reliability.Therefore, now just call the triangular to model block 2 and rebuild starting triangle, using not triangle
Same place builds new starting triangle, certainly, must also be protected between new starting triangle and original starting triangle
Demonstrate,prove no public domain.
Then, for each target same place, it can all be judged by second of the judge module 4, if target is of the same name
Point can be less than the first threshold, and target same place and two basic same places with the distance of at least two basic same places
The ratio of the line segment in correspondence with each other constituted respectively in first image and second image and two basic same places are distinguished
The ratio difference of the line segment in correspondence with each other constituted in first image and second image is less than the Second Threshold, then illustrates
The target same place meets the requirements, and just builds new triangle with this two basic same places using the target same place.Certainly,
This two basic same places can be chosen by user from least two basic same place according to actual needs.
And for the target same place for the requirement for being unsatisfactory for above-mentioned second of judgement, then explanation is the same place of error hiding,
Therefore it must be rejected, to ensure the accuracy of the Similarity Measure to the first image and the second image.So, will by mistake
The same place matched somebody with somebody is calculated by the computing module 3 again after rejecting, it becomes possible to be more precisely calculated first image with
The similarity of second image.
As shown in figure 4, the image matching method that the present invention is realized using the image matching system of the present embodiment is including following
Step:
Step 200, using feature point extraction algorithm extract N number of characteristic point from one first image and one second image respectively
And by N number of Feature Points Matching in N number of characteristic point in first image and second image be one-to-one N to of the same name
Point, wherein N are positive integer.
Step 201, respectively one starting triangle of structure in first image and second image, this pair starting triangle
The summit of shape is respectively the first image not triangle same place corresponding with second image and this pair is originated
Same place is not included in the region of triangle covering.
Step 202, judge respectively in first image and second image in not triangle same place whether
In the presence of the target same place for being less than a first threshold with the distance of at least two triangle same places, if so, then performing
Step 203, if it is not, then return to step 201.
Step 203, for each target same place, judge all compositions respectively in first image and second image
With the presence or absence of at least two basic same places in the same place of triangle so that at least two basic same place and the target are same
The distance of famous cake is respectively less than the first threshold and in first image and second image at least two basic same place
Two bases of ratio and this of line segment in correspondence with each other for being constituted respectively with the target same place of two basic same places it is of the same name
The difference of ratio for the line segment in correspondence with each other that point is constituted is respectively less than a Second Threshold, if so, then first image and this
Target same place is utilized respectively in two images and builds target triangles with this two basic same places, first image and this
This two basic same places are corresponding in two images, without public area between the target triangle and remaining triangle
Same place is not included in domain, and the region of target triangle covering, if it is not, then rejecting target same place.
Step 204, for first image and built respectively by corresponding same place in second image every a pair three
It is angular, keeping the sample rate of the larger triangle of area and by the larger triangle resampling of the area to smaller with area
Triangle area it is identical after, count area two triangles of identical grey level histogram.
Step 205, formula is run to every a pair of the triangles constructed by corresponding same place
Step 206, the similarity of every a pair of triangles to being calculated in step 205 average with calculate this first
The similarity of image and second image, then terminates flow.
Although the foregoing describing the embodiment of the present invention, it will be appreciated by those of skill in the art that these
It is merely illustrative of, protection scope of the present invention is defined by the appended claims.Those skilled in the art is not carrying on the back
On the premise of principle and essence from the present invention, various changes or modifications can be made to these embodiments, but these are changed
Protection scope of the present invention is each fallen within modification.