CN103164433B - A kind of image search method, device and server - Google Patents

A kind of image search method, device and server Download PDF

Info

Publication number
CN103164433B
CN103164433B CN201110415259.9A CN201110415259A CN103164433B CN 103164433 B CN103164433 B CN 103164433B CN 201110415259 A CN201110415259 A CN 201110415259A CN 103164433 B CN103164433 B CN 103164433B
Authority
CN
China
Prior art keywords
searched
image
color
visual word
color characteristic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201110415259.9A
Other languages
Chinese (zh)
Other versions
CN103164433A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201110415259.9A priority Critical patent/CN103164433B/en
Publication of CN103164433A publication Critical patent/CN103164433A/en
Priority to HK13109683.8A priority patent/HK1182470A1/en
Application granted granted Critical
Publication of CN103164433B publication Critical patent/CN103164433B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

This application provides a kind of image search method, device and server, the method comprises determining that the color characteristic to be searched of visual word to be searched that the key area of image to be searched is corresponding and described key area, obtain the inverted list corresponding with described visual word to be searched, according to described visual word to be searched and color characteristic to be searched, described inverted list is searched the initial target image matched with described image to be searched, and determines the priority of described initial target image according to matching degree; Return the final goal image determined according to described picture priority. The final goal image that image search method disclosed by the invention obtains and image to be searched on low-level image feature and color characteristic all and image to be searched there is higher matching degree, improve the accuracy of image search result.

Description

A kind of image search method, device and server
Technical field
The application relates to image real time transfer field, particularly to a kind of image search method, device and server.
Background technology
Day by day huge along with the Internet epigraph data message, the requirement that picture on network is searched for by user is also in continuous growth, and the various image search engines based on webpage (Web) arise at the historic moment. On e-commerce website, user is to picture search, and the picture search being based particularly on content has demand more widely. Here, " content-based picture search " refers to the picture search carried out based on a search condition inherently image, or describes, based on to the language of picture material, the picture search carried out.
In prior art, when carrying out content-based picture search, first, (Scale-invariantfeaturetransform is changed by scale invariant feature, SIFT) technical point be you can well imagine and taken the bottom characteristic of the key area of every piece image in image data base, this bottom characteristic can response diagram as information such as the texture in key area, gradients, and describe Gradient distribution; Then the bottom characteristic obtained is quantified, obtain visual word, and set up the inverted list corresponding with each visual word, the visual word composition visual word set that image to be checked is comprised, obtain the inverted list that in this visual word set, each visual word is corresponding, then the number of times that each image in statistics inverted list occurs, finally determines that the image that occurrence number is maximum is target image.
Visual word in said process refers to and is clustered in feature space by the bottom characteristic vector of key area in image, and each class is referred to as a visual word. Inverted list is namely using each visual word as key word, the concordance list image including this visual word indexed and obtain, Fig. 1 is the schematic diagram of inverted list corresponding for visual word A, include successively in order: visual word A, include the image 1 of visual word A, include the image 2 of visual word A, by this inverted list, it is possible to embody visual word A intuitively and occur in which image, it is achieved to the index of image in image data base.
Can be seen that from the above analysis, image search method of the prior art make use of image base feature, and the mode compared by the visual word that bottom characteristic is corresponding determines target image, but, the image information reacted due to bottom characteristic is limited, is merely able to contain the Partial Feature of image, so, may there is bigger difference in the image scanning for target image and the user's needs obtained according to this bottom characteristic so that the accuracy of Search Results is relatively low. And the reduction of accuracy also can make user repeatedly or repeats to search for target image to server request, this will make server repeat or repeatedly respond the searching request of same width target image, add the burden of server, as repeatedly send the image of the demand of being unsatisfactory for user, and waste substantial amounts of network transmission resource.
Summary of the invention
The purpose of the application is in that, it is provided that a kind of image search method, device and server, and the accuracy in order to solve the Search Results of image search method of the prior art is relatively low, and server bears weight and the problem wasting substantial amounts of network transmission resource.
A kind of image search method, it is characterised in that the method includes:
Determining the color characteristic to be searched of visual word to be searched that the key area of image to be searched is corresponding and described key area, described color characteristic to be searched represents the colouring information of the key area of described image to be searched;
Obtain the inverted list corresponding with described visual word to be searched, including the inverted list color characteristic extracted in advance in described inverted list, described inverted list color characteristic represents the colouring information being arranged in described inverted list image and the key area corresponding with described visual word to be searched;
According to described visual word to be searched and color characteristic to be searched, described inverted list is searched the initial target image matched with described image to be searched, and determines the priority of described initial target image according to matching degree;
Return the final goal image determined according to described picture priority.
Preferably, described inverted list color characteristic at least includes: represent in described inverted list in image, the domain color information of the key area corresponding with the visual word that described inverted list comprises and time colouring information;
Accordingly, described color characteristic to be searched at least includes: represent domain color information and time colouring information of the key area of described image to be searched.
Preferably, described inverted list color characteristic is extracted according to following steps:
Determine the key area of every piece image in image data base respectively;
Add up the number of pixels that each color on described key area is corresponding;
Number of pixels according to described statistics, it is determined that the color characteristic of the key area of described every piece image;
Add the described color characteristic determined respectively in the inverted list of corresponding visual word;
Determine that the color characteristic in described inverted list is described inverted list color characteristic.
Preferably, the process of the number of pixels that each color on the described key area of described statistics is corresponding includes:
Quantify to obtain 256 kinds of colors by RGB color;
The front two setting each byte represents red, and middle three represent blueness, and last three represent green, according to the principle set, each color are indicated by a byte respectively;
The number of pixels corresponding to byte of each color of statistical representation respectively.
Preferably, according to the number of pixels of described statistics, it is determined that the process of the color characteristic of described key area includes:
Would indicate that on key area that the number of pixels corresponding to the byte of each color is ranked up according to order from more to less;
Determine that the color represented by the byte that number of pixels is maximum is domain color;
Determine that next byte is current byte to be analyzed;
When the color represented by described current byte to be analyzed meets secondary color requirement, it is determined that the color represented by described current byte to be analyzed is time color;
When the color represented by described current byte to be analyzed does not meet secondary color requirement, then judge whether not analyzed byte, if existing, then return and perform the described step determining that next byte is current byte to be analyzed, if being absent from, then by the secondary color of key area described in the byte representation that value is 0.
Preferably, judge whether the color represented by described current byte to be analyzed meets time color and require according to following steps:
Obtain the decimal number corresponding to described current byte to be analyzed;
Judge that whether the decimal number corresponding to byte representing described domain color and the decimal numeral difference corresponding to described current byte to be analyzed are more than preset value, if, then determine that the color represented by described current byte to be analyzed meets time color requirement, if not, it is determined that the color represented by described current byte to be analyzed does not meet time color requirement.
Preferably, described add the described color characteristic determined respectively and include to the process in inverted list corresponding to corresponding visual word:
By the mark corresponding to the domain color of the key area of described every piece image and time color, it is respectively added in the inverted list corresponding to corresponding visual word, being designated corresponding to described domain color and time color: represent described domain color or the binary number of secondary color or the decimal number corresponding with the binary number representing described domain color or secondary color.
Preferably, described according to described visual word to be searched and color characteristic to be searched, described inverted list is searched the initial target image matched with described image to be searched, and determines that according to matching degree the process of the priority of described initial target image includes:
Obtain the number of times that each image in the inverted list that described visual word to be searched is corresponding occurs;
Determine the visual word to be searched comprised in each image described respectively, and the distance of the inverted list color characteristic that obtains key area corresponding to visual word to be searched that each image comprises the respectively to be searched color characteristic corresponding with the visual word to be searched that each image comprises;
The number of times occurred according to each image sets the first score value of each image, and described first score value represents matching degree, set rule as: number of times is more many, and described first score value is more big; The distance of the color characteristic to be searched that the inverted list color characteristic of the key area that the visual word to be searched that comprises according to each image is corresponding is corresponding with the visual word to be searched that each image comprises, according to rule set in advance, setting the second score value of each image, described second score value represents matching degree;
Obtain the first score value and the second score value sum of each image respectively;
According to the order that the first score value and the second score value sum are descending, the priority setting each image from high to low.
Preferably, described according to described visual word to be searched and color characteristic to be searched, described inverted list is searched the initial target image matched with described image to be searched, and determines that according to matching degree the process of the priority of described initial target image includes:
Obtain the number of times that each image in the inverted list that described visual word to be searched is corresponding occurs;
The number of times occurred according to image sets the first score value of each image, and described first score value represents matching degree, set rule as: number of times is more many, and described first score value is more big;
According to the first score value order from high to low, each image is ranked up;
Selecting top n image as pending image, described N is integer set in advance;
Determine the visual word to be searched comprised in each pending image described respectively, and the distance of the inverted list color characteristic that obtains key area corresponding to visual word to be searched that each pending image comprises the respectively to be searched color characteristic corresponding with the visual word to be searched that each image comprises;
The distance of the color characteristic to be searched that the inverted list color characteristic of the key area that the visual word to be searched that comprises according to each pending image described is corresponding is corresponding with the visual word to be searched that each image comprises, according to rule set in advance, setting the second score value of each pending image described, described second score value represents matching degree;
Obtain the first score value and the second score value sum of each pending image described respectively;
According to the order that the first score value and the second score value sum are descending, the priority setting each pending image described from high to low.
Preferably, it is thus achieved that the process of the distance of the color characteristic to be searched that the inverted list color characteristic of the key area that visual word to be searched that each image comprises is corresponding is corresponding with the visual word to be searched that each image comprises includes:
Determine current image to be calculated, and determine current visual word to be calculated from the visual word to be searched that described current image to be calculated comprises;
Calculate the inverted list color characteristic of key area corresponding to described current visual word to be calculated and the difference of described color characteristic to be searched, including: calculate the domain color of the inverted list color characteristic of key area corresponding to described current visual word to be calculated and the first difference of the domain color of described color characteristic to be searched, second difference of the domain color of the inverted list color characteristic of the key area that described current visual word to be calculated is corresponding and the secondary color of described color characteristic to be searched, 3rd difference of the secondary color of the inverted list color characteristic of the key area that described current visual word to be calculated is corresponding and the domain color of described color characteristic to be searched, and, 4th difference of the secondary color of the inverted list color characteristic of the key area that described current visual word to be calculated is corresponding and the secondary color of described color characteristic to be searched,
Obtain described first difference and the second difference, the 3rd difference and the 4th difference sum respectively;
Determine the distance between the inverted list color characteristic and the to be searched color characteristic corresponding with described visual word to be searched that described first difference and the second difference, the 3rd difference and the smaller value in the 4th difference sum are key area corresponding to described current visual word to be calculated record;
When the visual word to be searched that described current image to be calculated comprises exists not by computation vision word, determine that next is not current visual word to be calculated by computation vision word, and return the step performing inverted list color characteristic and the difference of described color characteristic to be searched calculating key area corresponding to described current visual word to be calculated;
When the visual word to be searched that described current image to be calculated comprises is absent from not by computation vision word, and when existing not by calculating image, determining that next is not calculated image is current image to be calculated, and returns the step performing to determine current visual word to be calculated from the visual word to be searched that described current image to be calculated comprises;
When the visual word to be searched that described current image to be calculated comprises is absent from not by computation vision word, and when being absent from not calculated image, terminate.
Preferably, distance between the described inverted list color characteristic according to key area corresponding with described visual word to be searched in each image and the to be searched color characteristic corresponding with described visual word to be searched, according to rule set in advance, the process of the second score value setting each image includes:
Determine current image to be analyzed, and obtain the distance between the inverted list color characteristic of key area corresponding to each visual word to be searched that described current image to be analyzed comprises and the to be searched color characteristic corresponding with this visual word to be searched;
Respectively the distance between the inverted list color characteristic of key area corresponding for each visual word to be searched described and the to be searched color characteristic corresponding with this visual word to be searched and preset value are compared, record the number less than preset value;
When there is not analyzed image, determine that next not analyzed image is current image to be analyzed, return the distance between the inverted list color characteristic and the to be searched color characteristic corresponding with this visual word to be searched performing to obtain key area corresponding to each visual word to be searched of comprising of described current image to be analyzed;
When being absent from not analyzed image, distance between inverted list color characteristic according to key area corresponding to each visual word to be searched comprised in each image and the to be searched color characteristic corresponding with this visual word to be searched is less than the number of preset value, set the second score value of each image, set rule as: number is more many, and described second score value is more big.
Present invention also provides a kind of image search apparatus and server, in order to ensure said method realization in practice and application.
A kind of image search apparatus, including:
Determining module, for determining the color characteristic to be searched of visual word to be searched that the key area of image to be searched is corresponding and described key area, described color characteristic to be searched represents the colouring information of the key area of described image to be searched;
Inverted list acquisition module, for obtaining the inverted list corresponding with described visual word to be searched, including the inverted list color characteristic extracted in advance in described inverted list, described inverted list color characteristic represents the colouring information being arranged in described inverted list image and the key area corresponding with described visual word to be searched;
Priority Determination module, for according to described visual word to be searched and color characteristic to be searched, searching the initial target image matched with described image to be searched, and determine the priority of described initial target image according to matching degree in described inverted list;
Sending module, for returning the final goal image determined according to described picture priority.
A kind of image search server, described server includes image search apparatus as above.
Compared with prior art, the application includes advantages below:
Final goal image and image to be searched on low-level image feature and color characteristic all and image to be searched there is higher matching degree, improve the accuracy of image search result, avoid the occurrence of and cause user repeatedly owing to Search Results accuracy is low or repeat to search for target image to server request, cause server to repeat or repeatedly respond the searching request of same width target image, and add the burden of server, and the image of the demand of being unsatisfactory for repeatedly is sent to user, and waste the phenomenon of substantial amounts of network transmission resource, thus alleviating the burden of server, save network transmission resource.
Certainly, the arbitrary product implementing the application it is not absolutely required to reach all the above advantage simultaneously.
Accompanying drawing explanation
In order to be illustrated more clearly that the technical scheme in the embodiment of the present application, below the accompanying drawing used required during embodiment is described is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the application, for those of ordinary skill in the art, under the premise not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the inverted list schematic diagram of prior art;
Fig. 2 is image search method flow chart disclosed in the embodiment of the present invention 1;
Fig. 3 is image search method flow chart disclosed in the embodiment of the present invention 2;
Fig. 4 is inverted list schematic diagram disclosed in the embodiment of the present invention 2;
Fig. 5 is the flow chart of number of pixels method corresponding to the disclosed each color added up on described key area of the embodiment of the present invention 2;
Fig. 6 is the disclosed number of pixels according to described statistics of the embodiment of the present invention 2, it is determined that the flow chart of the color characteristic method of the key area of described every piece image;
Fig. 7 is image search method flow chart disclosed in the embodiment of the present invention 3;
Fig. 8 is the method flow diagram of the distance of the color characteristic to be searched that the disclosed inverted list color characteristic obtaining key area corresponding to visual word to be searched that each image comprises of the embodiment of the present invention 3 is corresponding with the visual word to be searched that each image comprises;
Fig. 9 is that the embodiment of the present invention 3 is disclosed according to rule set in advance, sets the method flow diagram of the second score value of each image;
Figure 10 is image search method flow chart disclosed in the embodiment of the present invention 4;
Figure 11 is the structural representation of a kind of image search apparatus disclosed in the embodiment of the present invention;
Figure 12 is the structural representation of another image search apparatus disclosed in the embodiment of the present invention;
Figure 13 is the structural representation of color characteristic distance acquiring unit disclosed in the embodiment of the present invention;
Figure 14 is the structural representation of the second score value setup unit disclosed in the embodiment of the present invention;
Figure 15 is the structural representation of another image search apparatus disclosed in the embodiment of the present invention.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present application, the technical scheme in the embodiment of the present application is clearly and completely described, it is clear that described embodiment is only some embodiments of the present application, rather than whole embodiments. Based on the embodiment in the application, the every other embodiment that those of ordinary skill in the art obtain under not making creative work premise, broadly fall into the scope of the application protection.
The application can be used in numerous general or special purpose computing system environment or configuration. Such as: personal computer, server computer, handheld device or portable set, laptop device, multicomputer system, the distributed computing environment including any of the above system or equipment etc.
The application can described in the general context of computer executable instructions, for instance program module. Usually, program module includes performing particular task or realizing the routine of particular abstract data type, program, object, assembly, data structure etc. The application can also be put into practice in a distributed computing environment, in these distributed computing environment, the remote processing devices connected by communication network perform task. In a distributed computing environment, program module may be located in the local and remote computer-readable storage medium including storage device.
One of main thought of the application can include, it is determined that visual word to be searched that the key area of image to be searched is corresponding and the color characteristic to be searched of described key area, obtain the inverted list corresponding with described visual word to be searched, described inverted list includes the inverted list color characteristic extracted in advance, according to described visual word to be searched and color characteristic to be searched, described inverted list is searched the initial target image matched with described image to be searched, and determines the priority of described initial target image according to matching degree, the final goal image determined according to described picture priority is sent to client. in the application, final goal image and image to be searched on low-level image feature and color characteristic all and image to be searched there is higher matching degree, this improves the accuracy of image search result, avoid the occurrence of and cause user repeatedly owing to Search Results accuracy is low or repeat to search for target image to server request, cause server to repeat or repeatedly respond the searching request of same width target image, and add the burden of server, and the image of the demand of being unsatisfactory for repeatedly is sent to user, and waste the phenomenon of substantial amounts of network transmission resource, thus alleviating the burden of server, save network transmission resource.
With reference to Fig. 2, it illustrates the flow chart of a kind of image search method embodiment 1 of the application, it is possible to comprise the following steps:
Step 201: determining the color characteristic to be searched of visual word to be searched that the key area of image to be searched is corresponding and described key area, described color characteristic to be searched represents the colouring information of the key area of described image to be searched;
Utilize the method such as Corner Detection or maximum stable extremal region detection, it is determined that the key area of image to be searched, from key area, then extract low-level image feature, obtain the visual word to be searched that key area is corresponding. And, determine the color characteristic to be searched of the colouring information of the key area representing image to be searched, this color characteristic to be searched includes: the domain color information of the key area of image to be searched and time colouring information, such as, in a certain key area, red indication range is maximum, and yellow indication range is taken second place, then redness is the domain color information of the key area of image to be searched, and yellow is the secondary colouring information of the domain color information of the key area of image to be searched. Not limiting color characteristic to be searched in the present embodiment and only include domain color information and time colouring information, it still can include the 3rd colouring information, and namely indication range is inferior to the colouring information of secondary color, for instance black. The present embodiment does not limit domain color information and time colouring information of the key area determining image to be searched in the manner described above, it is also possible to set different rules according to actual situation.
Accordingly, described color characteristic to be searched at least includes: represent domain color information and time colouring information of the key area of described image to be searched.
Step 202: obtain the inverted list corresponding with described visual word to be searched, including the inverted list color characteristic extracted in advance in described inverted list, described inverted list color characteristic represents the colouring information being arranged in described inverted list image and the key area corresponding with described visual word to be searched;
In the present embodiment, inverted list is stored in server in image data base except the mark of each image except comprising, also include representing in each image, the inverted list color characteristic of the colouring information of the key area corresponding with visual word to be searched, this inverted list color characteristic is obtain after each image in data base is analyzed extraction in advance.
Step 203: according to described visual word to be searched and color characteristic to be searched, search the initial target image matched with described image to be searched in described inverted list, and determine the priority of described initial target image according to matching degree;
Inverted list is searched the initial target image matched with visual word to be searched and color characteristic to be searched, can first find the initial matching image including identical visual word, then recycle color characteristic to be searched from initial matching image, filter out the initial target image mated with color characteristic to be searched, then according to the height of matching degree determines the priority of initial target image, the priority of the image that matching degree is high is high, and matching degree is low that the priority of image is low. Equally possible in the present embodiment utilize visual word to be searched and color characteristic to be searched to search initial target image simultaneously, or determine initial matching image first with color characteristic to be searched, then recycle visual word to be searched and determine the mode of initial target image, do not limit both sequencings.
Step 204: return the final goal image determined according to described picture priority.
Priority according to the above-mentioned initial target image determined, server can according to priority order from high to low, it is determined that go out the target image of predetermined number, as final goal image, returns final goal image. Wherein namely can carry out in this locality for the search of target image, namely carry out picture search at server or client this locality. Can also be that client sends the searching request of target image to server end, server end target image is back to client, select for client.
The present embodiment is by when carrying out picture search, the mode that the color characteristic of the colouring information representing key area combines with visual word is utilized to search the initial purpose image matched with image to be searched, then according to matching degree determines the priority of initial target image, thus realizing improving the purpose of the accuracy of Search Results, and, avoid the occurrence of and cause user repeatedly owing to Search Results accuracy is low or repeat to search for target image to server request, cause server to repeat or repeatedly respond the searching request of same width target image, and add the burden of server, and the image of the demand of being unsatisfactory for repeatedly is sent to user, and waste the phenomenon of substantial amounts of network transmission resource, reduce the burden of server, reduce the waste to network transmission resource, thus alleviating the burden of server, save network transmission resource.
With reference to Fig. 3, it illustrates the flow chart of a kind of image search method embodiment 2 of the application, this flow chart essentially describes the process extracting color characteristic from image, it is possible to comprise the following steps:
Step S301: determine the key area of every piece image in image data base respectively;
Respectively the every piece image in image data base is analyzed, it is determined that the key area of picture of publishing picture.
Step S302: add up the number of pixels that each color on described key area is corresponding;
Step S303: according to the number of pixels of described statistics, it is determined that the color characteristic of the key area of described every piece image;
Step S304: add the described color characteristic determined respectively in the inverted list of corresponding visual word;
Add the described color characteristic determined respectively to include to the process in inverted list corresponding to corresponding visual word:
By the mark corresponding to the domain color of the key area of described every piece image and time color, it is respectively added in the inverted list corresponding to corresponding visual word, being designated corresponding to described domain color and time color: represent described domain color rate or the binary number of secondary color rate or the decimal number corresponding with the binary number representing described domain color rate or secondary color rate. For visual word A, assuming that decimal number corresponding to the domain color rate of image 1 is 25, decimal number corresponding to secondary color rate is 39, and the decimal number that the domain color rate of image 2 is corresponding is 28, decimal number corresponding to secondary color rate is 40, then add the inverted list after color characteristic as shown in Figure 4.
Step S305: determine that the color characteristic in described inverted list is described inverted list color characteristic.
The step extracting inverted list color characteristic disclosed in the present embodiment occurs before carrying out picture search, adds the color characteristic of the image key area corresponding with visual word, prepare for follow-up picture search in existing inverted list.
Wherein, idiographic flow reference Fig. 5 of step S302, including:
Step S501: quantify to obtain 256 kinds of colors by RGB color;
Step S502: the front two setting each byte represents red, middle three represent blueness, and last three represent green, according to the principle set, each color are indicated by a byte respectively;
256 kinds of colors are obtained after being quantified by color space, each color is represented by a byte, and the sheet charge coupling element (Charge-coupledDevice according to camera lens, it is called for short CCD) or complementary metal oxide semiconductors (CMOS) (ComplementaryMetalOxideSemiconductor, be called for short CMOS) image-forming principle, less figure place is distributed, for the figure place that blue and green distribution is more for redness.
Step S503: the number of pixels corresponding to byte of each color of statistical representation respectively.
By above-mentioned steps, would indicate that the byte of each color is set up with the pixel corresponding to this color and associate.
Wherein, step S303 idiographic flow reference Fig. 6, including:
Step S601: would indicate that on key area that the number of pixels corresponding to the byte of each color is ranked up according to order from more to less;
Step S602: determine that the color represented by the byte that number of pixels is maximum is domain color;
Step S603: determine that next byte is current byte to be analyzed;
Step S604: judge whether the color represented by current byte to be analyzed meets time color requirement, if so, then performs step S607, if it is not, then perform step S605;
Step S605: judge whether not analyzed byte, if so, then returns and performs step S603, if it is not, then perform step S606;
Step S606: by the secondary color of key area described in the byte representation that value is 0;
Step S607: determine that the color represented by described current byte to be analyzed is time color.
In the present embodiment, it is judged that whether the color represented by current byte to be analyzed meets time process of color requirement includes: obtain the decimal number corresponding to described current byte to be analyzed; Judge that whether the decimal number corresponding to byte representing described domain color and the decimal numeral difference corresponding to described current byte to be analyzed are more than preset value, if, then determine that the color represented by described current byte to be analyzed meets time color requirement, if it is not, determine that the color represented by described current byte to be analyzed does not meet time color requirement.
The present embodiment does not limit the occurrence of preset value, and it can be 5 or 10 equivalences, it is possible to being set according to practical situation, be worth more big, the difference between domain color and secondary color is more obvious.
With reference to Fig. 7, it illustrates the flow chart of a kind of image search method embodiment 3 of the application, it is possible to comprise the following steps:
Step 701: determining the color characteristic to be searched of visual word to be searched that the key area of image to be searched is corresponding and described key area, described color characteristic to be searched represents the colouring information of the key area of described image to be searched;
Step 702: obtain the inverted list corresponding with described visual word to be searched, including the inverted list color characteristic extracted in advance in described inverted list, described inverted list color characteristic represents the colouring information being arranged in described inverted list image and the key area corresponding with described visual word to be searched;
Step 703: obtain the number of times that each image in the inverted list that described visual word to be searched is corresponding occurs;
Assume that image to be searched comprises three visual word A to be searched, B, C, then obtain the inverted list that three visual word to be searched are corresponding respectively, the number of times that in statistics row, each image occurs, the inverted list that visual word A is corresponding comprises image 1 and image 2, the inverted list that visual word B is corresponding comprises image 1 and image 2, comprise image 2 in the inverted list that visual word C is corresponding, then the number of times that image 1 occurs is 2, and the number of times that image 2 occurs is 3.
Step S704: determine the visual word to be searched comprised in each image described respectively, and the distance of the inverted list color characteristic that obtains key area corresponding to visual word to be searched that each image comprises the respectively to be searched color characteristic corresponding with the visual word to be searched that each image comprises;
For image 1, image 1 comprises visual word A and B to be searched, so needing to obtain respectively the distance of the color characteristic to be searched that the inverted list color characteristic of key area is corresponding with visual word A, the distance of the color characteristic to be searched that the inverted list color characteristic of key area is corresponding with visual word B in image 1 corresponding for visual word B in image 1 corresponding to visual word A. Other images process in a similar way.
Step S705: the number of times occurred according to each image sets the first score value of each image, and described first score value represents matching degree, set rule as: number of times is more many, and described first score value is more big; The distance of the color characteristic to be searched that the inverted list color characteristic of the key area that the visual word to be searched that comprises according to each image is corresponding is corresponding with the visual word to be searched that each image comprises, according to rule set in advance, setting the second score value of each image, described second score value represents matching degree;
In the present embodiment, set the rule of the first score value as: number of times is more many, and described first score value is more big, concrete setting means can be, sets a basic value, it is assumed that be 10, the number of times occurred by each image is multiplied with this basic value, and result is as the first score value of this image. The present embodiment does not limit this kind of setting means, it is also possible to select other establishing methods, as long as ensure that number of times is more many, score value is more greatly. Equally, the present embodiment does not limit basic value as 10 yet can also be the value that 100 or 1000 or other set according to practical situation.
Step S706: obtain the first score value and second score value of each image respectively, and calculate the first score value and the second score value sum;
Step S707: according to the order that the first score value and the second score value sum are descending, the priority setting each image from high to low;
Step S708: the final goal image determined according to described picture priority is sent to client.
Further, in the present embodiment, obtain the process of distance of the inverted list color characteristic of key area corresponding to visual word to be searched that each image the comprises to be searched color characteristic corresponding with the visual word to be searched that each image comprises as shown in Figure 8, comprise the following steps:
Step S801: determine current image to be calculated;
Step S802: determine current visual word to be calculated from the visual word to be searched that described current image to be calculated comprises;
Assume to determine that image 1 is for current image to be calculated, and visual word A and the B comprised from image 1 determining, one as current visual word to be calculated. Such as, it is determined that visual word A is current visual word to be calculated.
Step S803: calculate the inverted list color characteristic of key area corresponding to described current visual word to be calculated and the difference of described color characteristic to be searched, specifically include:
Calculate the domain color of the inverted list color characteristic of key area corresponding to described current visual word to be calculated and the first difference of the domain color of described color characteristic to be searched, second difference of the domain color of the inverted list color characteristic of the key area that described current visual word to be calculated is corresponding and the secondary color of described color characteristic to be searched, 3rd difference of the secondary color of the inverted list color characteristic of the key area that described current visual word to be calculated is corresponding and the domain color of described color characteristic to be searched, and, 4th difference of the secondary color of the inverted list color characteristic of the key area that described current visual word to be calculated is corresponding and the secondary color of described color characteristic to be searched,
Assume that the inverted list color characteristic of key area corresponding for visual word A is expressed as clr1=[clr1,0, clr1,1], wherein clr1,0For clr1Domain color, clr1,1It is clr1Secondary color, color characteristic to be searched corresponding for visual word A is expressed as clr2=[clr2,0, clr2,1], wherein, clr2,0For the domain color of clr2, clr2,1It it is the secondary color of clr2.
If domain color is designated decimal number with time color, then needs to be converted into binary number, be then reduced to the rgb value of 0-255 respectively, it is assumed that clr1,1=139 (0010001011), high 2 is R1,1, middle four is G1,1, low four is B1,1, then the R that restores1,1=0 (00000000), G1,1=128 (10000000), B1,1=176 (10110000). If domain color is designated binary number with time color, then it is made directly reduction. In the manner described above, respectively by clr1,0、clr2,0And clr2,1Reduce, obtain R1,0, G1,0、B1,0、R2,0、G2,0、B2,0、R2,1、G2,1And B2,1
The distance calculated between two color rates generally carries out according to following steps:
Δ R=R11-R21
Δ G=G11-G21
Δ B=B11-B21
Dis tan ce = ( 2 + R ‾ 256 ) * Δ R 2 + 4 * Δ G 2 + ( 2 + 255 - R ‾ 256 ) * Δ B 2
According to above-mentioned formula, calculate the first difference Distance (clr respectively1,0, clr2,0), the second difference Distance (clr1,1, clr2,1), the 3rd difference Distance (clr1,0, clr2,1) and the 4th difference Distance (clr1,1, clr2,0)。
Step S804: obtain described first difference and the second difference sum respectively, and the 3rd difference and the 4th difference sum;
Namely Distance (clr is calculated respectively1,0, clr2,0)+Distance(clr1,1, clr2,1), Distance (clr1,0, clr2,1)+Distance(clr1,1, clr2,0)。
Step S805: determine the distance between the inverted list color characteristic and the to be searched color characteristic corresponding with described visual word to be searched that described first difference and the second difference sum, described 3rd difference and the smaller value in the 4th difference sum are key area corresponding to described current visual word to be calculated record;
Take the distance between the inverted list color characteristic and the to be searched color characteristic corresponding with described visual word to be searched that the smaller value in above-mentioned addition result is key area corresponding to current visual word to be calculated.
Step S806: judge whether comprise not by computation vision word in described current image to be calculated, if so, then performs step S807, if it is not, then perform step S808;
Step S807: determine that next is not current visual word to be calculated by computation vision word, return and perform step S803;
Step S808: judge whether not calculated image, if so, then performs step S809; If it is not, then terminate;
Step S809: determining that next is not calculated image is current image to be calculated, returns and performs step S802.
In order to make statement simpler and clearer, the present embodiment adopts each visual word to each image to be sequentially carried out the mode of calculating, but, the present embodiment does not limit can only aforesaid way, the mode that multiple visual word of multiple images are calculated by its equally possible employing simultaneously, thus improving the efficiency of picture search.
In the present embodiment, calculating the inverted list color characteristic of key area corresponding to described current visual word to be calculated can also adopt the difference between inverted list color characteristic and the domain color rate of described color characteristic to be searched of key area that computation vision word is corresponding to realize with the detailed process of the difference of described color characteristic to be searched, but, owing to primary and secondary color may exchange because of statistical error and position error etc. in different images, that is the domain color rate of a-quadrant is close with the secondary color rate in B region, and the secondary color rate of a-quadrant is close with the domain color rate in B region, in this case, if be calculated only with the spacing of domain color or the spacing of secondary color, will there is severe deviations in the result then calculated, reduce the accuracy of Search Results, therefore, in the present embodiment during distance between the inverted list color characteristic calculating key area corresponding with described visual word to be searched in each image and the to be searched color characteristic corresponding with described visual word to be searched, the mode of the spacing of the inverted list color characteristic domain color of the key area that employing calculated crosswise visual word is corresponding and the secondary color of color characteristic to be searched, thus avoiding the occurrence of above-mentioned situation, further increase the accuracy of image search result.
In the present embodiment, after undergoing the above-described steps, obtain the distance between the inverted list color characteristic of key area corresponding with described visual word to be searched in each image and the to be searched color characteristic corresponding with described visual word to be searched, according to this distance, according to rule set in advance, set the process of the second score value of each image as it is shown in figure 9, include:
Step S901: determine current image to be analyzed;
Determine that image 1 is for current image to be analyzed.
Step S902: obtain the distance between the inverted list color characteristic of key area corresponding to each visual word to be searched that described current image to be analyzed comprises and the to be searched color characteristic corresponding with this visual word to be searched;
Obtain the distance of record in flow process shown in Fig. 8. If current image to be analyzed and image 1 comprise 10 visual word to be searched, then now obtain 10 distance values.
Step S903: the distance between the inverted list color characteristic of key area corresponding for each visual word to be searched described and the to be searched color characteristic corresponding with this visual word to be searched and preset value are compared respectively, records the number less than preset value;
Assume that the preset value in the present embodiment is 5, distance between the inverted list color characteristic of the key area that 10 visual word to be searched being comprised by current image to be analyzed are corresponding and the to be searched color characteristic corresponding with this visual word to be searched compares with 5 respectively, the number of the record distance less than 5, in the present embodiment, assume image 1 has the distance between the inverted list color characteristic of key area corresponding to 6 visual word to be searched and the to be searched color characteristic corresponding with this visual word to be searched less than 5, then record 6.
Step S904: judge whether not analyzed image, if so, then performs step S905; If it is not, then perform step S906;
Step S905: determine that next not analyzed image is current image to be analyzed, returns and performs step S902;
If there is not analyzed image 2, then image 2 is defined as current image to be analyzed, repeat said process, obtain the number less than preset value of the distance between the inverted list color characteristic of key area corresponding to each visual word to be searched that image 2 comprises and the to be searched color characteristic corresponding with this visual word to be searched, it is assumed that be 5.
Step S906: according to the number less than preset value of the distance between the inverted list color characteristic of key area corresponding to each visual word to be searched comprised in each image and the to be searched color characteristic corresponding with this visual word to be searched, set the second score value of each image, set rule as: number is more many, and described second score value is more big.
When whole images to be analyzed all analyzed complete after, obtaining the distance between the inverted list color characteristic of the key area that in image 1, each visual word to be searched is corresponding and the to be searched color characteristic corresponding with this visual word to be searched is 6 less than the number of preset value, and the distance between the inverted list color characteristic of the key area that in image 2, each visual word to be searched is corresponding and the to be searched color characteristic corresponding with this visual word to be searched is 5 less than the number of preset value, obviously, distance between the color characteristic to be searched that the inverted list color characteristic of the key area that in image 1, each visual word to be searched is corresponding is corresponding with this visual word to be searched is less, namely represent, image 1 is increasingly similar with image to be searched. set a second higher score value then to image 1. thus when ensureing to be ranked up according to score value from high to low, image 1 can come more forward position.
In the present embodiment, process for image setting the second score value can have multiple implementation, such as, set a basic value 10, distance between the inverted list color characteristic of key area corresponding for each visual word to be searched of each image of record and the to be searched color characteristic corresponding with this visual word to be searched is multiplied with this basic value less than the number of preset value, result is as the second score value, and this basic value can value for setting according to practical situation, for instance 100 or 1000 etc. According to step shown in Fig. 7 in the present embodiment, the second score value and the first score value being added, the result of addition is as the basis determining picture priority.
In order to make statement simpler and clearer, the present embodiment adopts the mode that each image is sequentially carried out analysis, but, the present embodiment does not limit can only aforesaid way, the mode that multiple images are analyzed by its equally possible employing simultaneously, thus improving the efficiency of picture search.
In image search method disclosed in the present embodiment, each image is carried out the first score value and the calculating of the second score value, then according to the first score value and the second score value and carry out unifying sequence, it is determined that the priority of each image, and obtain final goal image. In the method, by calculating second score value corresponding with color characteristic, the low-level image feature utilized is combined, improve the accuracy of image search result in color characteristic and conventional images searching method.
With reference to Figure 10, it illustrates the flow chart of a kind of image search method embodiment 4 of the application, in the present embodiment, it is possible to comprise the following steps:
Step S1001: determining the color characteristic to be searched of visual word to be searched that the key area of image to be searched is corresponding and described key area, described color characteristic to be searched represents the colouring information of the key area of described image to be searched;
Step 1002: obtain the inverted list corresponding with described visual word to be searched, including the inverted list color characteristic extracted in advance in described inverted list, described inverted list color characteristic represents the colouring information being arranged in described inverted list image and the key area corresponding with described visual word to be searched;
Step S1003: obtain the number of times that each image in the inverted list that described visual word to be searched is corresponding occurs;
Step S1004: the number of times occurred according to image sets the first score value of each image, and described first score value represents matching degree, set rule as: number of times is more many, and described first score value is more big;
The mode setting the first score value in the present embodiment is referred to an embodiment.
Step S1005: each image is ranked up according to the first score value order from high to low;
Step S1006: selecting top n image as pending image, described N is integer set in advance;
Assume that the N in the present embodiment is 3.
Step S1007: determine the visual word to be searched comprised in each pending image described respectively, and the distance of the inverted list color characteristic that obtains key area corresponding to visual word to be searched that each pending image comprises the respectively to be searched color characteristic corresponding with the visual word to be searched that each image comprises;
This step implements process and is referred to flow process shown in Fig. 8, does not repeat them here.
Step S1008: the distance of the color characteristic to be searched that the inverted list color characteristic of the key area that the visual word to be searched that comprises according to each pending image described is corresponding is corresponding with the visual word to be searched that each image comprises, according to rule set in advance, setting the second score value of each pending image described, described second score value represents matching degree;
This step implements process and is referred to flow process shown in Fig. 9, does not repeat them here.
Step S1009: obtain the first score value and the second score value sum of each pending image described respectively;
Step S1010: according to the order that the first score value and the second score value sum are descending, the priority setting each pending image described from high to low;
Step S1011: the final goal image determined according to described picture priority is sent to client.
In image search method disclosed in the present embodiment, first the first score value of image is set according to the low-level image feature of image, and utilize the first score value order from high to low that image is ranked up screening, only retain the sequence image in top N, as pending image, then the distance of the inverted list color characteristic of key area corresponding to the visual word to be searched the comprised color characteristic to be searched corresponding with the visual word to be searched that each image comprises only is calculated in pending image, and set the second score value of pending image, then the first score value and the second score value sum are utilized, pending image is carried out the setting of priority. compared with embodiment illustrated in fig. 7, the present embodiment only need to calculate the distance of the inverted list color characteristic of key area corresponding to the visual word to be searched comprised in the pending image obtained after screening according to the first score value to be searched color characteristic corresponding with the visual word to be searched that each image comprises, and not all images is all made this and processes, therefore, operation time in image search procedure is greatly reduced, reduce computational complexity, ensure that under the premise of image search result accuracy, further increase the efficiency of search.
For aforesaid each embodiment of the method, in order to be briefly described, therefore it is all expressed as a series of combination of actions, but those skilled in the art should know, the application is not by the restriction of described sequence of movement, because according to the application, some step can adopt other orders or carry out simultaneously. Secondly, those skilled in the art also should know, embodiment described in this description belongs to preferred embodiment, necessary to involved action and module not necessarily the application.
Corresponding with the method that above-mentioned the application a kind of image search method embodiment 1 provides, referring to Figure 11, present invention also provides a kind of image search apparatus embodiment 1, in the present embodiment, this system may include that
Determining module 1101, for determining the color characteristic to be searched of visual word to be searched that the key area of image to be searched is corresponding and described key area, described color characteristic to be searched represents the colouring information of the key area of described image to be searched;
Inverted list acquisition module 1102, for obtaining the inverted list corresponding with described visual word to be searched, including the inverted list color characteristic extracted in advance in described inverted list, described inverted list color characteristic represents the colouring information being arranged in described inverted list image and the key area corresponding with described visual word to be searched;
Priority Determination module 1103, for according to described visual word to be searched and color characteristic to be searched, searching the initial target image matched with described image to be searched, and determine the priority of described initial target image according to matching degree in described inverted list;
Sending module 1104, for returning the final goal image determined according to described picture priority.
Image search apparatus disclosed in the present embodiment, when carrying out picture search, the mode that the color characteristic of the colouring information representing key area combines with visual word is utilized to search the initial purpose image matched with image to be searched, then according to matching degree determines the priority of initial target image, thus realizing improving the purpose of the accuracy of Search Results, and, avoid the occurrence of and cause owing to Search Results accuracy is low, user repeatedly or repeats to search for target image to server request, server repeats or repeatedly responds the searching request of same width target image, and add the burden of server, and the image of the demand of being unsatisfactory for repeatedly is sent to user, and waste the phenomenon of substantial amounts of network transmission resource, reduce the burden of server, reduce the waste to network transmission resource.
Corresponding with the method that above-mentioned the application a kind of image search method embodiment 3 provides, referring to Figure 12, present invention also provides a kind of image search apparatus embodiment 2, in the present embodiment, this device may include that determines module 1201, inverted list acquisition module 1202, Priority Determination module 1203 and sending module 1204, wherein, described Priority Determination module 1203 includes:
Image occurrence number acquiring unit 12031, for obtaining the number of times that each image in the inverted list that described visual word to be searched is corresponding occurs;
Color characteristic distance acquiring unit 12032, for determining the visual word to be searched comprised in each image described respectively, and the distance of the inverted list color characteristic that obtains key area corresponding to visual word to be searched that each image comprises the respectively to be searched color characteristic corresponding with the visual word to be searched that each image comprises;
Score value setup unit 12033, score value setup unit, including: the first score value setup unit, number of times for occurring according to each image sets the first score value of each image, described first score value represents matching degree, set rule as: number of times is more many, and described first score value is more big; Second score value setup unit, distance for the inverted list color characteristic of key area corresponding to the visual word to be searched comprised according to each image to be searched color characteristic corresponding with the visual word to be searched that each image comprises, according to rule set in advance, setting the second score value of each image, described second score value represents matching degree;
Sum unit 12034, for obtaining the first score value and the second score value sum of each image respectively;
Setup unit 12035, for the order descending according to the first score value and the second score value sum, the priority setting each image from high to low.
Wherein, the structure of color characteristic distance acquiring unit 12032 as shown in figure 13, including:
Image determines subelement 1301, is used for determining current image to be calculated;
Visual word determines subelement 1302, for determining current visual word to be calculated from the visual word to be searched that described current image to be calculated comprises;
Computation subunit 1303, the difference of inverted list color characteristic Yu described color characteristic to be searched for calculating key area corresponding to described current visual word to be calculated, the first difference including domain color and the domain color of described color characteristic to be searched of the inverted list color characteristic calculating key area corresponding to described current visual word to be calculated, second difference of the domain color of the inverted list color characteristic of the key area that described current visual word to be calculated is corresponding and the secondary color of described color characteristic to be searched, 3rd difference of the secondary color of the inverted list color characteristic of the key area that described current visual word to be calculated is corresponding and the domain color of described color characteristic to be searched, and, 4th difference of the secondary color of the inverted list color characteristic of the key area that described current visual word to be calculated is corresponding and the secondary color of described color characteristic to be searched,
Summation subelement 1304, for obtaining described first difference and the second difference, the 3rd difference and the 4th difference sum respectively;
Distance obtains subelement 1305, for determining the distance between the inverted list color characteristic and the to be searched color characteristic corresponding with described visual word to be searched that described first difference and the second difference, the 3rd difference and the smaller value in the 4th difference sum are key area corresponding to described current visual word to be calculated, and record;
First determines subelement 1306, for when existing not by computation vision word in the visual word to be searched that described current image to be calculated comprises, it is determined that next is not current visual word to be calculated by computation vision word, and order performs; When the visual word to be searched that described current image to be calculated comprises is absent from not by computation vision word, and when existing not by calculating image, determining that next is not calculated image is current image to be calculated, and returns the process performing to determine current visual word to be calculated from the visual word to be searched that described current image to be calculated comprises; When the visual word to be searched that described current image to be calculated comprises is absent from not by computation vision word, and when being absent from not calculated image, terminate.
The structure of described second score value setup unit as shown in figure 14, including:
Obtain subelement 1401, for determining current image to be analyzed, and obtain the distance between the inverted list color characteristic of key area corresponding to each visual word to be searched that described current image to be analyzed comprises and the to be searched color characteristic corresponding with this visual word to be searched;
Relatively record subelement 1402, for the distance between the inverted list color characteristic of key area corresponding for each visual word to be searched described and the to be searched color characteristic corresponding with this visual word to be searched and preset value being compared respectively, record the number less than preset value;
Second determines subelement 1403, for when there is not analyzed image, determine that next not analyzed image is current image to be analyzed, return the distance between the inverted list color characteristic and the to be searched color characteristic corresponding with this visual word to be searched performing to obtain key area corresponding to each visual word to be searched of comprising of described current image to be analyzed;
Set subelement 1404, for when being absent from not analyzed image, distance between inverted list color characteristic according to key area corresponding to each visual word to be searched comprised in each image and the to be searched color characteristic corresponding with this visual word to be searched is less than the number of preset value, set the second score value of each image, set rule as: number is more many, and described second score value is more big.
Other functional module can reference mutually, do not repeat them here.
Corresponding with the method that above-mentioned the application a kind of image search method embodiment 4 provides, referring to Figure 15, present invention also provides a kind of image search apparatus embodiment 3, in the present embodiment, this device may include that determines module 1501, inverted list acquisition module 1502, Priority Determination module 1503 and sending module 1504, wherein, Priority Determination module 1503 includes:
Image occurrence number acquiring unit 15031, for obtaining the number of times that each image in the inverted list that described visual word to be searched is corresponding occurs;
First score value setup unit 15032, sets the first corresponding score value for the number of times occurred for each image, and described first score value represents matching degree, set rule as: number of times is more many, and described first score value is more big;
Sequencing unit 15033, for being ranked up each image according to the first score value order from high to low;
Selecting unit 15034, be used for selecting top n image as pending image, described N is integer set in advance;
Color characteristic distance acquiring unit 15035, for determining the visual word to be searched comprised in each pending image described respectively, and the distance of the inverted list color characteristic that obtains key area corresponding to visual word to be searched that each pending image comprises the respectively to be searched color characteristic corresponding with the visual word to be searched that each image comprises;
Second score value setup unit 15036, distance for the inverted list color characteristic of key area corresponding to the visual word to be searched comprised according to each the pending image described to be searched color characteristic corresponding with the visual word to be searched that each image comprises, according to rule set in advance, setting the second score value of each pending image described, described second score value represents matching degree;
Sum unit 15037, for obtaining in described top n image respectively, the first score value of each image and the second score value sum;
Setup unit 15038, for the order descending according to the first score value and the second score value sum, the priority setting described top n image from high to low.
The structure of the color characteristic distance acquiring unit 15035 in the present embodiment is referred to structural representation shown in Figure 13, and the structure of the second score value setup unit 15036 is referred to structural representation shown in Figure 14. Other functional module can reference mutually, do not repeat them here.
Device described in the present embodiment is desirably integrated on the server of third party transaction platform, can also be connected with the server of third party transaction platform separately as an entity, additionally, it should be noted that, when method described herein adopts software to realize, the function that can increase newly as the server of third party transaction platform, it is also possible to individually writing corresponding program, the application does not limit the implementation of described method or system.
Present invention also provides a kind of server, described server includes image search apparatus mentioned above, it is worth mentioning at this point that, it will be understood by those skilled in the art that described server does not only include above-mentioned image search apparatus.
It should be noted that each embodiment in this specification all adopts the mode gone forward one by one to describe, what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar part mutually referring to. For system class embodiment, due to itself and embodiment of the method basic simlarity, so what describe is fairly simple, relevant part illustrates referring to the part of embodiment of the method.
Finally, it can further be stated that, in this article, the relational terms of such as first and second or the like is used merely to separate an entity or operation with another entity or operating space, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially. And, term " includes ", " comprising " or its any other variant are intended to comprising of nonexcludability, so that include the process of a series of key element, method, article or equipment not only include those key elements, but also include other key elements being not expressly set out, or also include the key element intrinsic for this process, method, article or equipment. When there is no more restriction, statement " including ... " key element limited, it is not excluded that there is also other identical element in including the process of described key element, method, article or equipment.
Above a kind of image search method provided herein, device and server are described in detail, principle and the embodiment of the application are set forth by specific case used herein, and the explanation of above example is only intended to help and understands the present processes and core concept thereof; Simultaneously for one of ordinary skill in the art, according to the thought of the application, all will change in specific embodiments and applications, in sum, this specification content should not be construed as the restriction to the application.

Claims (12)

1. an image search method, it is characterised in that the method includes:
Determining the color characteristic to be searched of visual word to be searched that the key area of image to be searched is corresponding and described key area, described color characteristic to be searched represents the colouring information of the key area of described image to be searched; Described color characteristic to be searched at least includes: represent domain color information and time colouring information of the key area of described image to be searched;
Obtain the inverted list corresponding with described visual word to be searched, including the inverted list color characteristic extracted in advance in described inverted list, described inverted list color characteristic represents the colouring information being arranged in described inverted list image and the key area corresponding with described visual word to be searched; Described inverted list color characteristic at least includes: represent in described inverted list in image, the domain color information of the key area corresponding with the visual word that described inverted list comprises and time colouring information;
According to described visual word to be searched and color characteristic to be searched, described inverted list is searched the initial target image matched with described image to be searched, and determines the priority of described initial target image according to matching degree;
Return the final goal image determined according to described picture priority.
2. method according to claim 1, it is characterised in that extract described inverted list color characteristic according to following steps:
Determine the key area of every piece image in image data base respectively;
Add up the number of pixels that each color on described key area is corresponding;
Number of pixels according to described statistics, it is determined that the color characteristic of the key area of described every piece image;
Add the described color characteristic determined respectively in the inverted list of corresponding visual word;
Determine that the color characteristic in described inverted list is described inverted list color characteristic.
3. method according to claim 2, it is characterised in that the process of the number of pixels that each color on the described key area of described statistics is corresponding includes:
Quantify to obtain 256 kinds of colors by RGB color;
The front two setting each byte represents red, and middle three represent blueness, and last three represent green, according to the principle set, each color are indicated by a byte respectively;
The number of pixels corresponding to byte of each color of statistical representation respectively.
4. method according to claim 3, it is characterised in that according to the number of pixels of described statistics, it is determined that the process of the color characteristic of described key area includes:
Would indicate that on key area that the number of pixels corresponding to the byte of each color is ranked up according to order from more to less;
Determine that the color represented by the byte that number of pixels is maximum is domain color;
Determine that next byte is current byte to be analyzed;
When the color represented by described current byte to be analyzed meets secondary color requirement, it is determined that the color represented by described current byte to be analyzed is time color;
When the color represented by described current byte to be analyzed does not meet secondary color requirement, then judge whether not analyzed byte, if existing, then return and perform the described step determining that next byte is current byte to be analyzed, if being absent from, then by the secondary color of key area described in the byte representation that value is 0.
5. method according to claim 4, it is characterised in that judge whether the color represented by described current byte to be analyzed meets time color and require according to following steps:
Obtain the decimal number corresponding to described current byte to be analyzed;
Judge that whether the decimal number corresponding to byte representing described domain color and the decimal numeral difference corresponding to described current byte to be analyzed are more than preset value, if, then determine that the color represented by described current byte to be analyzed meets time color requirement, if not, it is determined that the color represented by described current byte to be analyzed does not meet time color requirement.
6. method according to claim 5, it is characterised in that described add the described color characteristic determined respectively and include to the process in inverted list corresponding to corresponding visual word:
By the mark corresponding to the domain color of the key area of described every piece image and time color, it is respectively added in the inverted list corresponding to corresponding visual word, being designated corresponding to described domain color and time color: represent described domain color or the binary number of secondary color or the decimal number corresponding with the binary number representing described domain color or secondary color.
7. method according to claim 1, it is characterized in that, described according to described visual word to be searched and color characteristic to be searched, described inverted list is searched the initial target image matched with described image to be searched, and determines that according to matching degree the process of the priority of described initial target image includes:
Obtain the number of times that each image in the inverted list that described visual word to be searched is corresponding occurs;
Determine the visual word to be searched comprised in each image described respectively, and the distance of the inverted list color characteristic that obtains key area corresponding to visual word to be searched that each image comprises the respectively to be searched color characteristic corresponding with the visual word to be searched that each image comprises;
The number of times occurred according to each image sets the first score value of each image, and described first score value represents matching degree, set rule as: number of times is more many, and described first score value is more big; The distance of the color characteristic to be searched that the inverted list color characteristic of the key area that the visual word to be searched that comprises according to each image is corresponding is corresponding with the visual word to be searched that each image comprises, according to rule set in advance, setting the second score value of each image, described second score value represents matching degree;
Obtain the first score value and the second score value sum of each image respectively;
According to the order that the first score value and the second score value sum are descending, the priority setting each image from high to low.
8. method according to claim 1, it is characterized in that, described according to described visual word to be searched and color characteristic to be searched, described inverted list is searched the initial target image matched with described image to be searched, and determines that according to matching degree the process of the priority of described initial target image includes:
Obtain the number of times that each image in the inverted list that described visual word to be searched is corresponding occurs;
The number of times occurred according to image sets the first score value of each image, and described first score value represents matching degree, set rule as: number of times is more many, and described first score value is more big;
According to the first score value order from high to low, each image is ranked up;
Selecting top n image as pending image, described N is integer set in advance;
Determine the visual word to be searched comprised in each pending image described respectively, and the distance of the inverted list color characteristic that obtains key area corresponding to visual word to be searched that each pending image comprises the respectively to be searched color characteristic corresponding with the visual word to be searched that each image comprises;
The distance of the color characteristic to be searched that the inverted list color characteristic of the key area that the visual word to be searched that comprises according to each pending image described is corresponding is corresponding with the visual word to be searched that each image comprises, according to rule set in advance, setting the second score value of each pending image described, described second score value represents matching degree;
Obtain the first score value and the second score value sum of each pending image described respectively;
According to the order that the first score value and the second score value sum are descending, the priority setting each pending image described from high to low.
9. the method according to claim 7 or 8, it is characterized in that, it is thus achieved that the process of the distance of the color characteristic to be searched that the inverted list color characteristic of the key area that visual word to be searched that each image comprises is corresponding is corresponding with the visual word to be searched that each image comprises includes:
Determine current image to be calculated, and determine current visual word to be calculated from the visual word to be searched that described current image to be calculated comprises;
Calculate the inverted list color characteristic of key area corresponding to described current visual word to be calculated and the difference of described color characteristic to be searched, including: calculate the domain color of the inverted list color characteristic of key area corresponding to described current visual word to be calculated and the first difference of the domain color of described color characteristic to be searched, second difference of the domain color of the inverted list color characteristic of the key area that described current visual word to be calculated is corresponding and the secondary color of described color characteristic to be searched, 3rd difference of the secondary color of the inverted list color characteristic of the key area that described current visual word to be calculated is corresponding and the domain color of described color characteristic to be searched, and, 4th difference of the secondary color of the inverted list color characteristic of the key area that described current visual word to be calculated is corresponding and the secondary color of described color characteristic to be searched,
Obtain described first difference and the second difference, the 3rd difference and the 4th difference sum respectively;
Determine the distance between the inverted list color characteristic and the to be searched color characteristic corresponding with described visual word to be searched that described first difference and the second difference, the 3rd difference and the smaller value in the 4th difference sum are key area corresponding to described current visual word to be calculated record;
When the visual word to be searched that described current image to be calculated comprises exists not by computation vision word, determine that next is not current visual word to be calculated by computation vision word, and return the step performing inverted list color characteristic and the difference of described color characteristic to be searched calculating key area corresponding to described current visual word to be calculated;
When the visual word to be searched that described current image to be calculated comprises is absent from not by computation vision word, and when existing not by calculating image, determining that next is not calculated image is current image to be calculated, and returns the step performing to determine current visual word to be calculated from the visual word to be searched that described current image to be calculated comprises;
When the visual word to be searched that described current image to be calculated comprises is absent from not by computation vision word, and when being absent from not calculated image, terminate.
10. method according to claim 9, it is characterized in that, distance between the described inverted list color characteristic according to key area corresponding with described visual word to be searched in each image and the to be searched color characteristic corresponding with described visual word to be searched, according to rule set in advance, the process of the second score value setting each image includes:
Determine current image to be analyzed, and obtain the distance between the inverted list color characteristic of key area corresponding to each visual word to be searched that described current image to be analyzed comprises and the to be searched color characteristic corresponding with this visual word to be searched;
Respectively the distance between the inverted list color characteristic of key area corresponding for each visual word to be searched described and the to be searched color characteristic corresponding with this visual word to be searched and preset value are compared, record the number less than preset value;
When there is not analyzed image, determine that next not analyzed image is current image to be analyzed, return the distance between the inverted list color characteristic and the to be searched color characteristic corresponding with this visual word to be searched performing to obtain key area corresponding to each visual word to be searched of comprising of described current image to be analyzed;
When being absent from not analyzed image, distance between inverted list color characteristic according to key area corresponding to each visual word to be searched comprised in each image and the to be searched color characteristic corresponding with this visual word to be searched is less than the number of preset value, set the second score value of each image, set rule as: number is more many, and described second score value is more big.
11. an image search apparatus, it is characterised in that including:
Determining module, for determining the color characteristic to be searched of visual word to be searched that the key area of image to be searched is corresponding and described key area, described color characteristic to be searched represents the colouring information of the key area of described image to be searched; Described color characteristic to be searched at least includes: represent domain color information and time colouring information of the key area of described image to be searched;
Inverted list acquisition module, for obtaining the inverted list corresponding with described visual word to be searched, including the inverted list color characteristic extracted in advance in described inverted list, described inverted list color characteristic represents the colouring information being arranged in described inverted list image and the key area corresponding with described visual word to be searched; Described inverted list color characteristic at least includes: represent in described inverted list in image, the domain color information of the key area corresponding with the visual word that described inverted list comprises and time colouring information; Priority Determination module, for according to described visual word to be searched and color characteristic to be searched, searching the initial target image matched with described image to be searched, and determine the priority of described initial target image according to matching degree in described inverted list;
Sending module, for returning the final goal image determined according to described picture priority.
12. an image search server, it is characterised in that described server includes image search apparatus as claimed in claim 11.
CN201110415259.9A 2011-12-13 2011-12-13 A kind of image search method, device and server Active CN103164433B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201110415259.9A CN103164433B (en) 2011-12-13 2011-12-13 A kind of image search method, device and server
HK13109683.8A HK1182470A1 (en) 2011-12-13 2013-08-20 Method, device and server for image searching

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110415259.9A CN103164433B (en) 2011-12-13 2011-12-13 A kind of image search method, device and server

Publications (2)

Publication Number Publication Date
CN103164433A CN103164433A (en) 2013-06-19
CN103164433B true CN103164433B (en) 2016-06-15

Family

ID=48587527

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110415259.9A Active CN103164433B (en) 2011-12-13 2011-12-13 A kind of image search method, device and server

Country Status (2)

Country Link
CN (1) CN103164433B (en)
HK (1) HK1182470A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104714962B (en) * 2013-12-13 2018-11-06 阿里巴巴集团控股有限公司 A kind of generation method and system of image search engine
CN103839270B (en) * 2014-03-24 2017-03-08 东方网力科技股份有限公司 A kind of image matching method and device
CN105468596B (en) * 2014-08-12 2019-06-18 腾讯科技(深圳)有限公司 Picture retrieval method and device
CN106874285B (en) * 2015-12-10 2020-06-30 中国移动通信集团公司 Photo file processing method and terminal equipment
CN114969578A (en) * 2022-05-07 2022-08-30 中移互联网有限公司 Information display method and device and electronic equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101976258A (en) * 2010-11-03 2011-02-16 上海交通大学 Video semantic extraction method by combining object segmentation and feature weighing

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8861844B2 (en) * 2010-03-29 2014-10-14 Ebay Inc. Pre-computing digests for image similarity searching of image-based listings in a network-based publication system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101976258A (en) * 2010-11-03 2011-02-16 上海交通大学 Video semantic extraction method by combining object segmentation and feature weighing

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"用于图像检索的视觉词汇树研究";贾增朝;《中国优秀硕士学位论文全文数据库信息科技辑》;20110815;33页图8,28页倒数第2段-29页第1段,27页的第一段及图4,30页的第一段,19页图3,19页倒数第1段-20页第1段 *
"颜色特征提取";langyuewu;《http://blog.csdn.net/langyuewu/article/details/4144139》;20090502;第1页第7段 *

Also Published As

Publication number Publication date
HK1182470A1 (en) 2013-11-29
CN103164433A (en) 2013-06-19

Similar Documents

Publication Publication Date Title
CN109508681B (en) Method and device for generating human body key point detection model
CN103164433B (en) A kind of image search method, device and server
WO2022183638A1 (en) Image feature matching method and related apparatus, device, and storage medium
US20220261591A1 (en) Data processing method and apparatus
CN103164436B (en) A kind of image search method and device
CN111860276B (en) Human body key point detection method, device, network equipment and storage medium
CN112380462A (en) Method, device, server and computer readable storage medium for planning participation path
US20230120054A1 (en) Key point detection method, model training method, electronic device and storage medium
WO2014110950A1 (en) Method and device for pushing information
CN109871249B (en) Remote desktop operation method and device, readable storage medium and terminal equipment
CN109885444B (en) Testing method and device based on gesture recognition, storage medium and terminal equipment
US9202130B2 (en) Image processing apparatus and image processing method
CN114782769A (en) Training sample generation method, device and system and target object detection method
US20160309061A1 (en) Computer product, image processing method, display method, image processing apparatus, and information processing apparatus
WO2021051562A1 (en) Facial feature point positioning method and apparatus, computing device, and storage medium
CN111598093A (en) Method, device, equipment and medium for generating structured information of characters in picture
An et al. Research of the three-dimensional tracking and registration method based on multiobjective constraints in an AR system
CN115205845A (en) Target detection method, computer program product and electronic equipment
CN110955369B (en) Focus judgment method, device and equipment based on click position and storage medium
CN114373078A (en) Target detection method and device, terminal equipment and storage medium
CN114882115A (en) Vehicle pose prediction method and device, electronic equipment and storage medium
CN105607886A (en) Education cloud video data display processing system and method based on Internet of things
CN113051406A (en) Character attribute prediction method, device, server and readable storage medium
JP2019125128A (en) Information processing device, control method and program
Wang et al. A fast mosaic method for airborne images: the new Template-Convolution Speed-Up Robust Features (TSURF) algorithm

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1182470

Country of ref document: HK

C14 Grant of patent or utility model
GR01 Patent grant
REG Reference to a national code

Ref country code: HK

Ref legal event code: GR

Ref document number: 1182470

Country of ref document: HK