Specific embodiment
Below in conjunction with attached drawing, detailed description of the preferred embodiments.It should be understood that this place is retouched
The specific embodiment stated is merely to illustrate and explain the present invention, and is not intended to restrict the invention.
The present invention provides a kind of trademark image retrieval methods, as shown in Figure 1, method includes the following steps: obtaining sample
This trademark image;After carrying out gray processing, normalization and filtering processing to sample trademark image, color feature extracted and part are carried out
Feature extraction;Calculate sample trademark image in gray scale frequency, and according to calculated gray scale frequency to sample trademark image into
Row classification;Segmentation threshold is determined according to the result of classification, to be split to the foreground and background in sample trademark image;Meter
The pixel grey scale statistical value of the foreground and background of sample trademark image is calculated, and edge criteria is determined according to the gray-scale statistical value;
The edge feature of sample trademark image is extracted according to determining edge criteria;According to the color characteristic of sample trademark image, edge
Feature and local feature establish trade mark property data base, wherein judging the sample trade mark according to the edge feature of sample trademark image
The complexity of image, and according to the complexity of sample trademark image by the sample trademark image in the trade mark property data base established
As being divided into more than one group;Obtain trademark image to be measured;Trademark image to be measured is carried out at gray processing, normalization and filtering
After reason, according to extraction step identical with sample trademark image, color characteristic, the edge feature drawn game of trademark image to be measured are extracted
Portion's feature;Judge the complexity of the trademark image to be measured, according to the edge feature of trademark image to be measured to determine the trade mark to be measured
Group belonging to image;The color characteristic and edge feature of comprehensive trademark image to be measured, the group belonging to the trademark image to be measured
Similarity retrieval is carried out in group;Determining each sample quotient in group belonging to trademark image to be measured and the trademark image to be measured
In the case where logo image dissmilarity, according to the color characteristic and edge feature of the trademark image to be measured, in the trademark image to be measured
As carrying out similarity retrieval in the group except affiliated group, similarity retrieval result is obtained;According to user to described similar
The feedback for spending search result, judges whether to retrieve again;And in the case where determining that progress is retrieved again, according to described
The local feature of trademark image to be measured carries out similarity retrieval in trade mark property data base.
According to the technique and scheme of the present invention, in order to facilitate image characteristics extraction, it is necessary first to be image quotient to sample trade mark
Mark or character image associated mark are judged.As a result, trademark image retrieval method provided by the invention the following steps are included:
Whether judgement sample trade mark and trade mark to be measured are character image associated mark, and are determining that sample trade mark is that character image combines quotient
When mark, the segmentation of writings and image is carried out, to sample trade mark to obtain sample trademark image.
Wherein, the segmentation of the writings and image can according to the needs of actual conditions using based on connected domain sciagraphy,
It is realized based on one of connected domain area-method and structure-based Extracting of wordNet subgraph method, the present invention is not limited thereof.
Based on connected domain sciagraphy: for character image associated mark, although word segment in trade mark may be by
It is Chinese character, phonetic and English composition and font, size, in irregular shape, but text usually occurs in rows, in a line
Text number is more than one and the height of text is not much different, and the visuals in trade mark be usually individually located at a line and with
In the ranks there is interval in text.This is the most common situation in character image associated mark.Text based on connected domain projection is eliminated
Method is that connected domain is decomposed to obtained subgraph to project in the horizontal direction, is then layered as text layers according to the result of projection
And graph layer, it determines the layer where figure and retains the layer.
Based on connected domain area-method: figure is the key component of trade mark, in most of character image associated mark, figure
It occupies an leading position on area.No matter text in trade mark appears in figure either internally or externally, shared compared with figure
Area is all smaller, and defining an area threshold can achieve the purpose for removing the lesser text of noise area, and larger to area
Spirte for, need to do some judgements before eliminating text noise, prevent from accidentally eliminating some useful spirtes.Based on even
Logical domain area-method mainly punctures feature using the peripheral characteristic of figure and stroke and text and graphical demarcation is come, because text is logical
The not closed figure being often made of many strokes, and the outer profile of figure is smoother, can eliminate figure by this method
Internal text, can also eliminate the equitant text of projection with figure.
Structure-based Extracting of wordNet subgraph method: in segment word image associated mark, compared with word segment, visuals
And apparent advantage is prevented take up, and visuals is usual and word segment is completely overlapped.Usually in the high difference of the width of pictorial trademark
When larger, it may appear that figure situation not dominant on area, in addition, compared with other images, the structure of these images
Comparison rule has determining structure.Structure-based Extracting of wordNet subgraph method is as follows to the treatment process of image: for lateral quotient
Logo image, the ratio of width to height of calculating image first simultaneously judges whether to be greater than given threshold value, to the biggish image of the ratio of width to height (greater than threshold
Value), it determines the structure of the image, if meeting structure given in advance, retains corresponding image section.For longitudinal trade mark
Trademark image can be rotated by 90 ° counterclockwise by image, then be handled according to the method for lateral trademark image.
According to the technique and scheme of the present invention, after obtaining sample trademark image, compare in order to facilitate feature, guarantee image
The uniformity and clarity of size and format need before carrying out feature extraction to sample trademark image to sample trademark image
As carrying out gray processing, normalization and filtering processing.
The process that color image is converted to gray level image is known as to the gray processing processing of image.Each pixel in color image
Color determine that and each component has 255 intermediate values desirable by tri- components of R, G, B, such a pixel can have more than 1600
The variation range of the color of ten thousand (255*255*255).And gray level image is the special colour of the identical one kind of tri- components of R, G, B
Image, the variation range of one pixel is 255 kinds, in Digital Image Processing, is usually first turned the image of various formats
Become gray level image, so that the calculation amount of subsequent image becomes less.The description of gray level image is as color image, still
Reflect the distribution and feature of the entirety of entire image and the coloration of part and brightness degree.The common side of image gray processing processing
The important method of method, maximum value process and weighted mean method etc., principle and calculating process are known to those skilled in the art.
The normalization of image is that (finding one group of parameter using the not bending moment of image can disappear by a series of transformation
The influence that image is converted except other transforming function transformation functions), original image to be processed is converted into corresponding sole criterion form (should
Canonical form image has invariant feature to translation, rotation, scaling equiaffine transformation).Since sample trademark image usually has
Different formats and size, compares in order to facilitate feature, needs that sample trademark image therein is normalized.Sample
The format conversion of trademark image can be handled in advance using formatted software, and be normalized by size by sample trademark image
As being scaled same size.According to the technique and scheme of the present invention, the height of sample trademark image and width can be set as 256
Pixel.
In order to guarantee the clarity of image, it is also necessary to be filtered to sample trademark image.Skill according to the present invention
Art scheme can use a kind of median filtering (nonlinear smoothing technology, the basic principle is that by digital picture or Serial No.
The intermediate value of each point value replaces in one neighborhood of the value of some point, allows the pixel value of surrounding close to true value, to eliminate
Isolated noise spot) image is filtered.
According to the technique and scheme of the present invention, first after carrying out gray processing, normalization and filtering processing to sample trademark image
First to treated, sample trademark image carries out color feature extracted and local shape factor.
Carrying out color feature extracted to sample trademark image may include: A) Color Characteristic is carried out to sample trademark image
Change;And B) extract color histogram.
Common color characteristic quantization method has non-gap quantification method and stratum's clustering procedure.The method that the present invention uses for pair
HSV (H is tone, and S is saturation degree, and V is brightness) color space carries out 48 dimension non-gap quantizations, the specific steps are as follows:
Tone H is divided into 8 parts, saturation degree S is divided into 3 parts, and brightness V is divided into 2 parts;Tone H, saturation degree S, brightness V are carried out
Quantization:
;
After the completion of quantization, hsv color space is divided into LH × LS × LV section, wherein LH, LS, LV be respectively H, S,
The quantization series of V;Three color component synthesizing one-dimensional color feature vector G after quantization:
G=HLH+SLS+VLV;
According to the number of quantization, LH=8, LS=3, LV=2 is obtained:
G=8H+3S+2V;
Tri- components of H, S, V are distributed on a n dimensional vector n to be come, and the value range of G is [0, Isosorbide-5-Nitrae 7].Calculating G can obtain
To the one dimensional histograms of 48 different grey levels.
The statistic histogram of color of image feature, abbreviation color histogram, is defined as follows:
H (k)=nk/ N, k=0,1, L-1;
The wherein color feature value of k representative image, the quantity that L is characterized, nkThe pixel for being k for color characteristic in image
Number, N are the sum of all pixels of image, and H (k) is the color histogram extracted.It, can be to three of them point for color image
Statistics obtains histogram to amount respectively.
According to the technique and scheme of the present invention, the local feature is that scale invariant feature converts (SIFT) feature or accelerates Shandong
Stick (SURF) feature.
SIFT (Scale Invariant Feature Transform, scale invariant feature conversion) is characterized in using
A kind of local feature that SIFT algorithm extracts has invariance to rotation, brightness change, size scaling.
SURF (Speeded Up Robust Features accelerates robustness) is characterized in extract using SURF algorithm one
Kind local feature, SURF algorithm is the acceleration version of SIFT algorithm, it is grasped using Haar small echo come the gradient in approximate SIFT method
Make, while quickly being calculated using integral diagram technology.
The extraction algorithm of SIFT feature and SURF feature is known to those skilled in the art, no longer does herein further
Illustrate and introduces.
During the Edge Gradient Feature of sample trademark image, technical solution of the present invention is directed to different types of sample
Trademark image dynamically changes the segmentation that segmentation sample image is foreground and background according to the intensity profile of sample trademark image
Threshold value to dynamically determine edge criteria, and then can more accurately extract the edge feature of sample trademark image.
Method of the invention calculates the gray scale frequency in sample trademark image first, and according to calculated gray scale frequency pair
Sample trademark image is classified, and sample trademark image is classified are as follows: the unclear image type of normal picture type O, prospect
And the unclear image type II of background I,.
Various sample trademark images are converted to gray level image first, and (being completely converted into original sample trademark image has
From the gray level image of 256 gray values of 0-255), and the gray scale occurrence frequency of each image pixel is counted as grey level histogram.
The initial segmentation threshold value of the foreground and background for segmented image grey level histogram is determined according to identified grey level histogram.
For normal picture type O, image can reasonably be drawn by the initial segmentation threshold value of image grey level histogram
It is divided into foreground and background.Wherein, the prospect of image is a sub-picture various information to be shown, such as text, picture frame, lines
Deng, and the background of image is for setting off adoring for prospect, such as the primary colours of image etc. by contrast.
The unclear image type I of prospect refers to the foreground and background initial segmentation threshold value by image grey level histogram,
Obtained display foreground inaccuracy, determines the prospect of parts of images at background parts.
The unclear image type II of background refers to the foreground and background initial segmentation threshold value by image grey level histogram,
Obtained image background inaccuracy, determines the background of parts of images at foreground part.
Specifically, the gray value of each picture element of the sample trademark image of image border to be extracted is read first, so
The gray value of read each picture element is counted afterwards, and determines picture element quantity corresponding to each gray value.Root
According to the quantity of identified each gray value picture element, the pixel gray level histogram of the sample trademark image is generated.Determine the ash
The characteristics of image such as the width of degree histogram, initial segmentation threshold value, the gray-scale statistical mean value for dividing display foreground and background, and according to
These features classify to read sample trademark image, i.e., the sample trademark image are divided into above-mentioned normogram
As unclear one of the image type II of type O, prospect unclear image type I and background.
Wherein, according to the initial segmentation threshold value of the display foreground of grey level histogram computation partition sample trademark image and background
Thi can use binarization method in the prior art, such as Otsu method, NiBlack method, minimum error method or maximum
Entropy method etc. calculates initial segmentation threshold value Thi.
Next, calculating the gray-scale statistical mean value Av of each pixel in grey level histogram.According to the technique and scheme of the present invention,
Intensity histogram source of graph gray value ST and terminal gray value END can be determined, to remove the front face in grey level histogram
Divide and aft section calculates global parameter the part ash that influence is little but adversely affects to calculating edge criteria threshold value
Degree.Intensity histogram source of graph ST and terminal END can be determined using following formula:
K=T1/2/a;
Wherein, K is number of picture elements corresponding to intensity histogram source of graph gray value ST or terminal gray value END, and T is original
The pixel sum of sample trademark image, a are previously given values, for example are 50.Parameter a is between 20 to 150.
According to the direction of gray value from small to large, number of picture elements corresponding to more each gray value is determined with by above-mentioned formula
Parameter K size, may thereby determine that first number of picture elements be more than or equal to K gray value, i.e. starting point gray value ST.Class
As, according to the direction of gray value from big to small, it can determine terminal gray value END.
According to the number of picture elements of original sample trademark image and its corresponding grey level histogram, calculates first and judge ratio
R0, second judge that ratio R 1 and third judge ratio R 2.
First judges that ratio R 0 is given by the following formula:
R0=T1/T0;
Wherein, R0 indicates that first judges ratio;T0 indicates total pixel points of original sample trademark image, that is, is located at
Picture element sum between gray value 0-255;T1 is indicated from gray value 0 to the picture element for being included gray-scale statistical mean value Av
Number.
Second judges that ratio R 1 is given by the following formula:
R1=T3/T2;
Wherein, R1 indicates that second judges ratio;T2 is indicated from gray value 0 to institute histogram initial segmentation threshold value Thi
The pixel points for including;T3 is indicated from the pixel for being included histogram initial segmentation threshold value Thi to gray-scale statistical mean value Av
Point sum.
Third judges that ratio R 2 is given by the following formula:
R2=T2/T0;
Wherein, R2 indicates that third judges ratio;T2 is indicated from gray value 0 to institute histogram initial segmentation threshold value Thi
The pixel points for including;T0 indicates total pixel points of original sample trademark image, that is, between gray value 0-255
Picture element sum.
From the above, it is seen that first judges that ratio R 0, second judge that ratio R 1 and third judge the meter of ratio R 2
Calculation is to start counting picture element from gray value 0.It according to a kind of embodiment, can also be from identified starting point gray value
ST starts counting picture element.Similarly, all with 255 is to count can also replacing with terminal gray value END for end point.
Later, it is determined whether meet following relationship (1):
R1 > L0
Av > Thi
R0 < L1 or R0 > L2; (1)
Wherein, R0 is the first judgement ratio, and R1 is the second judgement ratio, and Av indicates that the gray-scale statistical of all picture elements is equal
Value, Thi indicate initial segmentation threshold value, and L0 indicates the first setting value, and L1 indicates the second setting value, and L2 indicates third setting value.
If meeting above-mentioned relation (1), the image that the sample trademark image at edge to be extracted is not known for prospect is judged
Type I.If being unsatisfactory for above-mentioned relation (1), it is determined whether meet following relationship (2):
R1 < L3
R2 > L4
Ls/256 < L5; (2)
Wherein, R1 is the second judgement ratio, and R2 is that third judges ratio, and Ls indicates Gray Histogram terminal END and gray scale
The distance between starting point ST, L3, L4 and L5 respectively indicate the 4th setting value, the 5th setting value and the 6th setting value.
If meeting above-mentioned relation (2), the image that the sample trademark image at edge to be extracted is not known for background is judged
Type II.If being unsatisfactory for above-mentioned relation (2), it is determined that the sample trademark image at edge to be extracted is normal image type O,
The normal picture type O of foreground part and background parts exactly can be clearly divided an image into initial segmentation threshold value.
According to the technique and scheme of the present invention, it after determining the image type of sample trademark image at edge to be extracted, needs
Determine that segmentation sample trademark image is the segmentation threshold of foreground part and background parts.The image type that do not known due to prospect
Reasonably divide an image into foreground and background part by the unclear image type II of I and background, it is therefore desirable to point
Threshold value is cut to adjust.That is, described determine that segmentation threshold includes: that initial segmentation threshold value is true according to the result of classification
It is set to the segmentation threshold of the normal picture type O, the segmentation threshold through overregulating is determined as the unclear figure of the prospect
As the segmentation threshold for the image type II that type I and background are not known.
For normal picture type O, sample trademark image is reasonably divided into prospect by initial segmentation threshold value Thi
Part and background parts, so not needing to be adjusted initial segmentation threshold value again.According to the technique and scheme of the present invention, according to institute
Determining segmentation threshold is split the foreground and background in sample trademark image, calculates the prospect and back of sample trademark image
The pixel grey scale statistical value of scape, and edge criteria is determined according to the gray-scale statistical value, and carry out according to determining edge criteria
The Edge Gradient Feature of sample trademark image.
According to the technique and scheme of the present invention, described to determine that edge criteria includes: according to pixel grey scale according to gray-scale statistical value
Statistical value is greater than the ash of the pixel of segmentation threshold less than the gray-scale statistical mean value and pixel grey scale statistical value of the pixel of segmentation threshold
The difference of average statistical is spent to determine edge criteria.
Specifically, normal picture type O, segmentation threshold Thf=Thi can be determined in sample trademark image
Gray value is less than the gray-scale statistical mean value Av1 of all picture elements of segmentation threshold.It is equally possible that determining sample trademark image
Middle gray value is more than or equal to the gray-scale statistical mean value Av2 of all picture elements of segmentation threshold.
Then, it is determined that the edge criteria of sample trademark image.The edge criteria of sample trademark image can be taken as segmentation sample
This trademark image is the difference (Av2-Av1) of the gray-scale statistical mean value on the both sides of the segmentation threshold of foreground and background part.
Then, determine whether a picture element in sample trademark image is side according to obtained image border criterion
Edge point according to the technique and scheme of the present invention can be using operators such as Sobel operator, Prewitt operator and Roberts Cross
Determine image border, the present invention is not limited thereof.
After having determined all image border points, it can extract to obtain the edge image of sample trademark image.
It should be noted that embodiments of the present invention have directlyed adopt the difference of the gray-scale statistical mean value on segmentation threshold both sides
Value (Av2-Av1) is come as image border criterion, but the present invention is not limited to this.The case where not departing from the scope of the present invention
Under, image border criterion value can also be zoomed in or out, such as by (Av2-Av1) multiplied by a coefficient as edge criteria.
According to the technique and scheme of the present invention, the image type that the unclear image type I of the prospect and background are not known
The segmentation threshold of II is determined also according to from initial segmentation threshold value to the number of picture elements of gray-scale statistical mean value.
Specifically, the image type I not known for prospect needs to reset new segmentation threshold model referring to fig. 2
It encloses, new starting point gray value is initial segmentation threshold value Thi, and terminal gray value is constant.In new starting point gray value to terminal gray scale
Between value, binarization method in the prior art, such as NiBlack method, minimum error method or most can be used
Big entropy method etc. calculates new segmentation threshold Thm.
After calculating new segmentation threshold Thm, parameter T2, T3, R1 and R2 are recalculated, it is determined whether meet following pass
It is (3):
R1 > L0 or R1 < L3; (3)
Wherein, R1 is the second judgement ratio, and L0 indicates the first setting value, and L3 indicates the 4th setting value.
It, can be by new segmentation threshold if meeting relationship (3), that is, the new segmentation threshold Thm calculated meets the requirements
Value Thm is the segmentation threshold Thf of foreground and background part as segmentation sample trademark image.
If being unsatisfactory for relationship (3), need to redefine new segmentation threshold range, i.e. holding starting point gray value ST is not
Become, and terminal gray value END value uses new segmentation threshold Thm.
Whether the number for first determining whether to determine new segmentation threshold Thm is more than pre-determined number (such as 5 times).If it is determined that new
The cycle-index of segmentation threshold Thm be not above pre-determined number, then back to the step of calculating new segmentation threshold Thm, weight
New calculating parameter T2, T3, R1 and R2, while cycle-index is added 1.
It can be prospect and back using new segmentation threshold Thm as segmentation sample trademark image after the relationship that meets (3)
The segmentation threshold Thf of scape part.Edge criteria is determined according to the segmentation threshold Thf obtained to carry out sample trademark image
Edge Gradient Feature is identical as the above-mentioned method for normal picture type O description, is not described in detail here.
The image type II not known for background needs to reset new segmentation threshold range referring to Fig. 3, new
Terminal gray value is initial segmentation threshold value Thi, and starting point gray value is constant.In starting point gray value between new terminal gray value
In range, binarization method in the prior art, such as NiBlack method, minimum error method or maximum entropy method can be used
Etc. calculating new segmentation threshold Thm.
After calculating new segmentation threshold Thm, parameter T2, T3, R1 and R2 are recalculated, it is determined whether meet following pass
It is (4):
R1 > L0 or R1 < L3
R2 < L4; (4)
Wherein, R0 is the first judgement ratio, and R1 is the second judgement ratio, and R2 is that third judges ratio, and L0 indicates that first sets
Definite value, L3 indicate the 4th setting value, and L4 indicates the 5th setting value.
It, can be by new segmentation threshold if meeting relationship (4), that is, the new segmentation threshold Thm calculated meets the requirements
Value Thm is the segmentation threshold Thf of foreground and background part as segmentation sample trademark image.
If being unsatisfactory for relationship (4), need to redefine new segmentation threshold range, i.e. holding terminal gray value END
It is constant, and starting point gray value ST value uses new segmentation threshold Thm.
Whether the number for first determining whether to determine new segmentation threshold Thm is more than pre-determined number (such as 5 times).If it is determined that new
The cycle-index of segmentation threshold Thm be not above pre-determined number, then back to the step of calculating new segmentation threshold Thm, weight
New calculating parameter T2, T3, R1 and R2, while cycle-index is added 1.
It can be prospect and back using new segmentation threshold Thm as segmentation sample trademark image after the relationship that meets (4)
The segmentation threshold Thf of scape part.Edge criteria is determined according to the segmentation threshold Thf obtained to carry out sample trademark image
Edge Gradient Feature is identical as the above-mentioned method for normal picture type O description, is not described in detail here.
According to the technique and scheme of the present invention, after the Edge Gradient Feature for completing sample trademark image, according to sample quotient
Color characteristic, edge feature and the local feature of logo image establish trade mark property data base, so as to subsequent similarity retrieval.
In order to improve trade mark recall precision, method provided by the invention is in the establishment process of trade mark property data base, also
The complexity of the sample trademark image is judged according to the edge feature of sample trademark image, and according to the complexity of sample trademark image
Sample trademark image in the trade mark property data base established is divided into more than one group by degree.Technology according to the present invention
Scheme, the complexity by constituted in the edge feature of extracted sample trademark image image border pixel quantity Lai
It determines.
For example, the sample trademark image relatively simple for composition is e.g. simple round, rectangular or several
The trademark image that a simple stroke is sketched the contours of, the pixel quantity for constituting image border is less, and more multiple for composition
Miscellaneous sample trademark image, such as using portrait or landscape etc. as trademark image, correspondingly, constitute the pixel of image border
Point quantity is more.In practice, threshold interval can be preset for the grouping of sample trademark image in trade mark property data base,
Threshold interval is arranged with the quantity for constituting the pixel of image border, in the complexity of judgement sample trademark image, root
Threshold interval locating for quantity according to the pixel for constituting the sample trademark image edge judges its complexity, to be classified to
Into corresponding group.For example, a complexity threshold can only be set, it can using the complexity threshold by quotient
Sample trademark image in mark property data base is divided into Liang Ge group, for sample trademark image, is calculated by Edge Gradient Feature
Method can calculate the quantity of the pixel of the stroke of composition image border in total.If the quantity is preset described multiple
Under miscellaneous degree threshold value, it is determined that the complexity of the sample trademark image is lower, and it is below can be divided into complexity threshold
Group.If the quantity is on the preset complexity threshold, it is determined that the complexity of the sample trademark image compared with
Height can be divided into the group of complexity threshold or more.It should be noted that can be passed through according to the needs of practical operation
It presets multiple threshold intervals and the sample trademark image in trade mark property data base is divided into more than two groups, this
Invention does not carry out any restriction to this.
It, can be by all sample quotient as a result, according to the complexity of sample trademark image each in trade mark property data base
Logo image is included into corresponding group, and by the extraction of feature, and in these groups, each sample trademark image all has it
Corresponding color characteristic, edge feature and local feature.
As a result, during trademark image retrieval, trademark image to be measured is obtained first.In order to facilitate image characteristics extraction,
Similarly, it is necessary first to be that image trade mark or character image associated mark judge to trade mark to be measured.It is according to the present invention
Technical solution judges whether trade mark to be measured is character image associated mark, and is determining that trade mark to be measured is that character image combines quotient
When mark, the segmentation of writings and image is carried out, to trade mark to be measured to obtain trademark image to be measured.
In order to guarantee that picture size is consistent with format and guarantee the clarity of image, carried out to trademark image to be measured
Before feature extraction, need to carry out trademark image to be measured gray processing, normalization and filtering processing (with above-mentioned to sample trademark image
The processing mode of picture is identical, and details are not described herein), according to extraction step identical with sample trademark image, extract trade mark to be measured
Color characteristic, edge feature and the local feature of image.
Also, for the accuracy for guaranteeing image comparison, the sample trademark image and the trademark image to be measured need
Pixel value having the same.Later, the complexity of the trademark image to be measured is judged according to the edge feature of trademark image to be measured, with
Determine group belonging to the trademark image to be measured.
According to the technique and scheme of the present invention, the color characteristic for being retrieved as integrating trademark image to be measured of trademark image to be measured and
Edge feature carries out similarity retrieval in the group belonging to the trademark image to be measured, i.e., according to the face of the trademark image to be measured
Each sample trademark image in the trademark image to be measured and the group is carried out characteristic matching by color characteristic and edge feature,
According to matching degree obtained as similarity retrieval as a result, thus user can according to similarity retrieval result obtained come
Judge whether the sample trademark image in the trademark image to be measured and its affiliated group is same or similar seemingly.
According to the technique and scheme of the present invention, the color characteristic of synthesis trademark image to be measured and edge feature are in trade mark spy
It includes: to assign weighted value to the color characteristic and shape feature of trademark image to be measured that retrieval is carried out in sign database, according to color
The weighted value of feature and shape feature is retrieved.
Specifically, the similarity for enabling shape feature is S1, the similarity of color characteristic is S2, S=α S1+βS2.Wherein, α is
The weighted value of shape feature, β are the weighted value of color characteristic, alpha+beta=1.Then overall situation similarity S is defined as follows:
S=α S1+(1-α)S2;
The similarity of trademark image to be measured and sample trademark image is compared, is dynamically adjusted in this two images similarity
The weight coefficient of color characteristic and shape feature, specific algorithm are as follows:
1. the initial value of the weight value α of preset shape feature is 0.5, i.e., color characteristic and shape feature are to global similarity
Contribution it is identical, carry out primary retrieval.User selects satisfactory n sample trademark image in search result, calculates separately
Shape similarity S between trademark image to be measured and each search result1With color similarity S2, and it is normalized place
Reason.
2. calculating all shape similarity S1, color similarity S2Mean valueCompare the size of two mean values.
IfLarger, illustrating shape feature more can reflect that user search is intended to.
3. assign weight again to characteristic similarity, then:
It is retrieved, is confirmed by user as a result, being returned if being still not up to its requirement again according to the weight value α of new shape feature
1. to step, otherwise terminate retrieving.
Since similar but image border is distinct there may be composition for trademark image, or due to image clarity and
Caused by soft edge with addressed pixel calculate inaccuracy problem, in order to guarantee the accuracy of similarity retrieval, according to this
The technical solution of invention, it is preferable that can determine trademark image to be measured with it is every in group belonging to the trademark image to be measured
In the case that one sample trademark image is dissimilar, according to the color characteristic and edge feature of the trademark image to be measured, wait at this
Similarity retrieval is carried out in the group surveyed except group belonging to trademark image, obtains similarity retrieval result.
According to the technique and scheme of the present invention, user judges trademark image to be measured according to similarity retrieval result obtained
It is whether same or similar seemingly with the sample trademark image in its affiliated group.If user is fed back to similarity retrieval result
Sample trademark image identical or similar with trademark image to be measured is not retrieved in the affiliated group of trademark image to be measured, then really
It is retrieved again calmly, and according to the color characteristic and edge feature of trademark image to be measured, belonging to the trademark image to be measured
Group except group in carry out similarity retrieval, thus, it is possible to better ensure that the accuracy of similarity retrieval.
Since the similarity retrieval to trademark image to be measured is global characteristics (the i.e. color characteristic and edge spy according to image
Sign) Lai Jinhang, it is possible to there is clarity as image and caused by soft edge so that search result is inaccurate
The problem of, in order to better ensure that the accuracy of similarity retrieval, it is preferable that method provided by the invention further includes following step
It is rapid: according to user to the feedback of the similarity retrieval result, to judge whether to retrieve again;And it is carried out again determining
In the case where retrieval, according to the local feature of the trademark image to be measured, similarity retrieval is carried out in trade mark property data base.
According to the technique and scheme of the present invention, the local feature is that scale invariant feature converts (SIFT) feature or accelerates Shandong
Stick (SURF) feature, in the case where retrieving again, according to the local feature of trademark image to be measured in trade mark property data base
Middle carry out similarity retrieval, can preferably avoid the problem that missing inspection, guarantee the accuracy of similarity retrieval.
Trademark image retrieval method provided by the invention can accurately extract image border for different types of image, protect
Edge detection effect is demonstrate,proved, while can be improved image retrieval efficiency and trademark image recognition accuracy, guarantees similarity retrieval
Accuracy.
It is described the prefered embodiments of the present invention in detail above in conjunction with attached drawing, still, the present invention is not limited to above-mentioned realities
The detail in mode is applied, within the scope of the technical concept of the present invention, a variety of letters can be carried out to technical solution of the present invention
Monotropic type, these simple variants all belong to the scope of protection of the present invention.
It is further to note that specific technical features described in the above specific embodiments, in not lance
In the case where shield, it can be combined in any appropriate way.
In addition, various embodiments of the present invention can be combined randomly, as long as it is without prejudice to originally
The thought of invention, it should also be regarded as the disclosure of the present invention.