CN103164433A - Image search method, device and server - Google Patents

Image search method, device and server Download PDF

Info

Publication number
CN103164433A
CN103164433A CN2011104152599A CN201110415259A CN103164433A CN 103164433 A CN103164433 A CN 103164433A CN 2011104152599 A CN2011104152599 A CN 2011104152599A CN 201110415259 A CN201110415259 A CN 201110415259A CN 103164433 A CN103164433 A CN 103164433A
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.)
Granted
Application number
CN2011104152599A
Other languages
Chinese (zh)
Other versions
CN103164433B (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

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides an image search method, a device and a server. The method includes the following steps: determining sight words to be searched which correspond to critical areas of images to be searched, and color features to be searched of the critical areas, obtaining an inverted list which corresponds to the sight words to be searched, searching initial target images which are matched with the images to be searched in the inverted list according to the sight words to be searched and the color features to be searched, determining priority level of the initial target images according to matching degree, and returning to final target images according to the priority level of the initial target images. The obtained final target images through the method are high in the matching degree with the images to be searched on underlying features and color features, and accuracy of image search results is improved.

Description

A kind of image search method, device and server
Technical field
The application relates to the view data process field, particularly a kind of image search method, device and server.
Background technology
Day by day huge along with internet epigraph data message, also in continuous growth, various image search engines based on webpage (Web) arise at the historic moment the user to the requirement of picture on network search.On e-commerce website, the user is to picture search, and particularly content-based picture search has demand more widely.Here, " content-based picture search " refers to based on search condition itself is exactly an image and the picture search carried out, or based on the picture search that the language description of picture material is carried out.
In prior art, when carrying out content-based picture search, at first, by yardstick invariant features conversion (Scale-invariant feature transform, SIFT) technical point is got the bottom characteristic of the critical area of each width image in image data base indescribably, this bottom characteristic can response diagram as information such as the texture in critical area, gradients, and describe gradient and distribute; Then the bottom characteristic that obtains is quantized, obtain visual word, and the foundation inverted list corresponding with each visual word, the visual word that image to be checked is comprised forms the visual word set, obtain inverted list corresponding to each visual word in this visual word set, then add up the number of times that each image in inverted list occurs, determine that at last the maximum image of occurrence number is target image.
Visual word in said process refers to, and with bottom characteristic vector cluster in feature space of critical area in image, each class is called as a visual word.Inverted list namely with each visual word as keyword, the image that will include this visual word is set up index and the concordance list that obtains, Fig. 1 is the schematic diagram of inverted list corresponding to visual word A, comprise successively in order: visual word A, include visual word A image 1, include the image 2 of visual word A, by this inverted list, can embody intuitively visual word A and appear in which image, realize the index to image in image data base.
Can find out from the above analysis, image search method of the prior art has utilized the image bottom characteristic, and determine target image by the mode that visual word corresponding to bottom characteristic compares, but, because the image information that bottom characteristic is reacted is limited, be merely able to contain the Partial Feature of image, so, may there be larger difference in the image that the target image that obtains according to this bottom characteristic search and user need, makes the accuracy of Search Results lower.And the reduction of accuracy also can make the user repeatedly or repetition is searched for target image to server request, this will make server repeat or repeatedly respond the searching request of same width target image, increased the burden of server, also can be because of repeatedly sending the image that does not satisfy the demands to the user, and waste a large amount of network transmission resource.
Summary of the invention
The application's purpose is, a kind of image search method, device and server are provided, and is lower in order to the accuracy of the Search Results that solves image search method of the prior art, the heavy and problem of wasting a large amount of network transmission resource of server burden.
A kind of image search method is characterized in that, the method comprises:
Determine visual word to be searched that the critical area of image to be searched is corresponding and the color characteristic to be searched of described critical area, described color characteristic to be searched represents the colouring information of the critical area of described image to be searched;
Obtain the inverted list corresponding with described visual word to be searched, include in advance the inverted list color characteristic that extracts in described inverted list, described inverted list color characteristic represents to be arranged in the colouring information of described inverted list image and the critical area corresponding with described visual word to be searched;
According to described visual word to be searched and color characteristic to be searched, search the initial target image that is complementary with described image to be searched in described inverted list, and determine the priority of described initial target image according to matching degree;
Return to the final goal image of determining according to described image priority.
Preferably, described inverted list color characteristic comprises at least: represent in described inverted list in image main colouring information and time colouring information of the critical area that the visual word that comprises with described inverted list is corresponding;
Accordingly, described color characteristic to be searched comprises at least: the main colouring information of the critical area of the described image to be searched of expression and time colouring information.
Preferably, extract described inverted list color characteristic according to following steps:
Determine respectively the critical area of each width image in image data base;
Add up number of pixels corresponding to every kind of color on described critical area;
According to the number of pixels of described statistics, determine the color characteristic of the critical area of described each width image;
Add respectively described definite color characteristic in the inverted list of the visual word of correspondence;
Determine that the color characteristic in described inverted list is described inverted list color characteristic.
Preferably, the process of number of pixels corresponding to every kind of color on the described critical area of described statistics comprises:
The RGB color space is quantized to obtain 256 kinds of colors;
The front two of setting each byte represents redness, and middle three bit representations are blue, and last three bit representations are green, and the principle according to setting represents every kind of color respectively with a byte;
The corresponding number of pixels of byte of each color of difference statistical representation.
Preferably, according to the number of pixels of described statistics, determine that the process of the color characteristic of described critical area comprises:
The corresponding number of pixels of byte of every kind of color on the expression critical area is sorted according to from more to less order;
Determine that the represented color of the maximum byte of number of pixels is main color;
Determine that next byte is current byte to be analyzed;
When the represented color of described current byte to be analyzed meets inferior color requirement, determine that the represented color of described current byte to be analyzed is time color;
When the represented color of described current byte to be analyzed does not meet inferior color requirement, judge whether to exist not analyzed byte, if exist, returning and carrying out described definite next byte is the step of current byte to be analyzed, if do not exist, be the inferior color of 0 the described critical area of byte representation with value.
Preferably, judge according to following steps whether the represented color of described current byte to be analyzed meets time color and require:
Obtain the corresponding decimal number of described current byte to be analyzed;
Whether the corresponding decimal number of byte of the described main color of judgement expression and the corresponding decimal numeral difference of described current byte to be analyzed be greater than preset value, if, determine that the represented color of described current byte to be analyzed meets time color requirement, if not, determine that the represented color of described current byte to be analyzed does not meet time color requirement.
Preferably, describedly add respectively described definite color characteristic and comprise to the process in inverted list corresponding to the visual word of correspondence:
Main color and time corresponding sign of color with the critical area of described each width image, add to respectively in the corresponding inverted list of the visual word corresponding with it, described main color and time color is corresponding is designated: represent the binary number of described main color or inferior color, or the decimal number corresponding with the binary number that represents described main color or inferior color.
Preferably, the described visual word to be searched of described foundation and color characteristic to be searched are searched the initial target image that is complementary with described image to be searched in described inverted list, and determine that according to matching degree the process of the priority of described initial target image comprises:
Obtain the number of times that each image in inverted list corresponding to described visual word to be searched occurs;
Determine respectively the visual word to be searched that comprises in described each image, and obtain respectively the distance of the inverted list color characteristic of critical area corresponding to visual word to be searched that each image comprises and color characteristic to be searched corresponding to visual word to be searched that each image comprises;
Set the first score value of each image according to the number of times of each image appearance, described first minute value representation matching degree, the setting rule is: number of times is more, and described the first score value is larger; The distance of the color characteristic to be searched that the visual word to be searched that the inverted list color characteristic of the critical area that the visual word to be searched that comprises according to each image is corresponding and each image comprise is corresponding, according to predefined rule, set the second score value of each image, described second minute value representation matching degree;
Obtain respectively the first score value and the second score value sum of each image;
According to the first score value and the second descending order of score value sum, the priority of each image of setting from high to low.
Preferably, the described visual word to be searched of described foundation and color characteristic to be searched are searched the initial target image that is complementary with described image to be searched in described inverted list, and determine that according to matching degree the process of the priority of described initial target image comprises:
Obtain the number of times that each image in inverted list corresponding to described visual word to be searched occurs;
Set the first score value of each image according to the number of times of image appearance, described first minute value representation matching degree, the setting rule is: number of times is more, and described the first score value is larger;
According to the first score value order from high to low, each image is sorted;
Select the top n image as pending image, described N is predefined integer;
Determine respectively the visual word to be searched that comprises in described each pending image, and obtain respectively the distance of the inverted list color characteristic of critical area corresponding to visual word to be searched that each pending image comprises and color characteristic to be searched corresponding to 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 critical area that the visual word to be searched that described each the pending image of foundation comprises is corresponding and the visual word to be searched that each image comprises are corresponding, according to predefined rule, set the second score value of described each pending image, described second minute value representation matching degree;
Obtain respectively the first score value and the second score value sum of described each pending image;
According to the first score value and the descending order of the second score value sum, the priority of described each the pending image of setting from high to low.
Preferably, the process that obtains the distance of color characteristic to be searched corresponding to the inverted list color characteristic of critical area corresponding to visual word to be searched that each image comprises and visual word to be searched that each image comprises comprises:
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 critical area corresponding to described current visual word to be calculated and the difference of described color characteristic to be searched, comprise: the first difference of calculating the main color of the main color of inverted list color characteristic of critical area corresponding to described current visual word to be calculated and described color characteristic to be searched, the second difference of the main color of the inverted list color characteristic of the critical area that described current visual word to be calculated is corresponding and the inferior color of described color characteristic to be searched, the 3rd difference of the inferior color of the inverted list color characteristic of the critical area that described current visual word to be calculated is corresponding and the main color of described color characteristic to be searched, and, the 4th difference of the inferior color of the inverted list color characteristic of the critical area that described current visual word to be calculated is corresponding and the inferior color of described color characteristic to be searched,
Obtain respectively described the first difference and the second difference, the 3rd difference and the 4th difference sum;
Determine that smaller value in described the first difference and the second difference, the 3rd difference and the 4th difference sum is the inverted list color characteristic of critical area corresponding to described current visual word to be calculated and the distance between the to be searched color characteristic corresponding with described visual word to be searched, and record;
When existing not by the computation vision word in the visual word to be searched that described current image to be calculated comprises, determine that next is not current visual word to be calculated by the computation vision word, and return to the step of the difference of the inverted list color characteristic that carry out to calculate critical area corresponding to described current visual word to be calculated and described color characteristic to be searched;
Do not exist not by the computation vision word in the visual word to be searched that described current image to be calculated comprises, and when existing not by computed image, determine that next is not current image to be calculated by computed image, and return and carry out the step of determining current visual word to be calculated from the visual word to be searched that described current image to be calculated comprises;
Do not exist not by the computation vision word in the visual word to be searched that described current image to be calculated comprises, and when not existing not by computed image, finish.
Preferably, described according to critical area corresponding with described visual word to be searched in each image the inverted list color characteristic and with color characteristic to be searched corresponding to described visual word to be searched between distance, according to predefined rule, the process of setting the second score value of each image comprises:
Determine current image to be analyzed, and obtain the inverted list color characteristic of critical area corresponding to each visual word to be searched that described current image to be analyzed comprises and the distance between the to be searched color characteristic corresponding with this visual word to be searched;
Distance between the inverted list color characteristic of the critical area that described each visual word to be searched is corresponding and the to be searched color characteristic corresponding with this visual word to be searched compares with preset value respectively, and record is less than the number of preset value;
When having not analyzed image, determine that next not analyzed image is current image to be analyzed, return to the distance of carrying out between the inverted list color characteristic obtain critical 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;
When not having not analyzed image, distance between the inverted list color characteristic of the critical area corresponding according to each visual word to be searched that comprises 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, the setting rule is: number is more, and described the second score value is larger.
The application also provides a kind of image search apparatus and server, in order to guarantee said method implementation and application in practice.
A kind of image search apparatus comprises:
Determination module be used for to be determined visual word to be searched that the critical area of image to be searched is corresponding and the color characteristic to be searched of described critical area, and described color characteristic to be searched represents the colouring information of the critical area of described image to be searched;
The inverted list acquisition module, be used for obtaining the inverted list corresponding with described visual word to be searched, include in advance the inverted list color characteristic that extracts in described inverted list, described inverted list color characteristic represents to be arranged in the colouring information of described inverted list image and the critical area corresponding with described visual word to be searched;
The priority determination module is used for searching the initial target image that is complementary with described image to be searched in described inverted list, and determining the priority of described initial target image according to matching degree according to described visual word to be searched and color characteristic to be searched;
Sending module is used for returning the final goal image of determining according to described image priority.
A kind of image search server, described server comprises image search apparatus as above.
Compared with prior art, the application comprises following advantage:
final goal image and image to be searched all have higher matching degree with image to be searched on low-level image feature and color characteristic, improved the accuracy of picture search result, avoid occurring due to the low user of causing of Search Results accuracy repeatedly or repeat to server request search target image, cause server to repeat or repeatedly respond the searching request of same width target image, and increased the burden of server, and repeatedly send the image that does not satisfy the demands to the user, and waste the phenomenon of a large amount of network transmission resource, thereby alleviated the burden of server, saved network transmission resource.
Certainly, arbitrary product of enforcement the application might not need to reach simultaneously above-described all advantages.
Description of drawings
In order to be illustrated more clearly in the technical scheme in the embodiment of the present application, during the below will describe embodiment, the accompanying drawing of required use is done to introduce simply, apparently, accompanying drawing in the following describes is only some embodiment of the application, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the inverted list schematic diagram of prior art;
Fig. 2 is the disclosed image search method process flow diagram of the embodiment of the present invention 1;
Fig. 3 is the disclosed image search method process flow diagram of the embodiment of the present invention 2;
Fig. 4 is the disclosed inverted list schematic diagram of the embodiment of the present invention 2;
Fig. 5 is the process flow diagram of number of pixels method corresponding to every kind of color on the described critical area of the disclosed statistics of the embodiment of the present invention 2;
Fig. 6 is the number of pixels of the described statistics of the disclosed foundation of the embodiment of the present invention 2, determines the process flow diagram of color characteristic method of the critical area of described each width image;
Fig. 7 is the disclosed image search method process flow diagram of the embodiment of the present invention 3;
Fig. 8 is the method flow diagram of the distance of color characteristic to be searched corresponding to the inverted list color characteristic of critical area corresponding to the visual word to be searched that comprises of each image of the disclosed acquisition of the embodiment of the present invention 3 and visual word to be searched that each image comprises;
Fig. 9 is that the embodiment of the present invention 3 is disclosed according to predefined rule, sets the method flow diagram of the second score value of each image;
Figure 10 is the disclosed image search method process flow diagram of the embodiment of the present invention 4;
Figure 11 is the structural representation of the disclosed a kind of image search apparatus of the embodiment of the present invention;
Figure 12 is the structural representation of the disclosed another image search apparatus of the embodiment of the present invention;
Figure 13 is the structural representation of the disclosed color characteristic distance acquiring unit of the embodiment of the present invention;
Figure 14 is the structural representation of disclosed the second score value setup unit of the embodiment of the present invention;
Figure 15 is the structural representation of the disclosed another image search apparatus of the embodiment of the present invention.
Embodiment
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, obviously, described embodiment is only the application's part embodiment, rather than whole embodiment.Based on the embodiment in the application, those of ordinary skills are not making the every other embodiment that obtains under the creative work prerequisite, all belong to the scope of the application's protection.
The application can be used in numerous general or special purpose computingasystem environment or configuration.For example: personal computer, server computer, handheld device or portable set, plate equipment, multicomputer system, comprise distributed computing environment of above any system or equipment etc.
The application can describe in the general context of the computer executable instructions of being carried out by computing machine, for example program module.Usually, program module comprises the routine carrying out particular task or realize particular abstract data type, program, object, assembly, data structure etc.Also can put into practice the application in distributed computing environment, in these distributed computing environment, be executed the task by the teleprocessing equipment that is connected by communication network.In distributed computing environment, program module can be arranged in the local and remote computer-readable storage medium that comprises memory device.
One of main thought of the application can comprise, determines visual word to be searched that the critical area of image to be searched is corresponding and the color characteristic to be searched of described critical area; Obtain the inverted list corresponding with described visual word to be searched, include the inverted list color characteristic that extracts in advance in described inverted list; According to described visual word to be searched and color characteristic to be searched, search the initial target image that is complementary with described image to be searched in described inverted list, and determine the priority of described initial target image according to matching degree; To be sent to client according to the final goal image that described image priority is determined.in the application, final goal image and image to be searched all have higher matching degree with image to be searched on low-level image feature and color characteristic, this has improved the accuracy of picture search result, avoid occurring due to the low user of causing of Search Results accuracy repeatedly or repeat to server request search target image, cause server to repeat or repeatedly respond the searching request of same width target image, and increased the burden of server, and repeatedly send the image that does not satisfy the demands to the user, and waste the phenomenon of a large amount of network transmission resource, thereby alleviated the burden of server, saved network transmission resource.
With reference to figure 2, it shows the process flow diagram of a kind of image search method embodiment 1 of the application, can comprise the following steps:
Step 201: determine visual word to be searched that the critical area of image to be searched is corresponding and the color characteristic to be searched of described critical area, described color characteristic to be searched represents the colouring information of the critical area of described image to be searched;
Utilize the methods such as Corner Detection or maximum stable extremal region detection, determine the critical area of image to be searched, then extract low-level image feature from critical area, obtain visual word to be searched corresponding to critical area.And, the color characteristic to be searched of the colouring information of the critical area of definite expression image to be searched, this color characteristic to be searched comprises: the main colouring information of the critical area of image to be searched and time colouring information, for example, in a certain critical area, red indication range is maximum, and yellow indication range is taken second place, redness is the main colouring information of the critical area of image to be searched, and yellow is the inferior colouring information of main colouring information of the critical area of image to be searched.Do not limit color characteristic to be searched in the present embodiment and include only main colouring information and time colouring information, it still can comprise the 3rd colouring information, and namely indication range is inferior to the colouring information of inferior color, for example black.The present embodiment does not limit main colouring information and time colouring information of the critical area of determining in the manner described above image to be searched, can also set different rules according to the situation of reality.
Accordingly, described color characteristic to be searched comprises at least: the main colouring information of the critical area of the described image to be searched of expression and time colouring information.
Step 202: obtain the inverted list corresponding with described visual word to be searched, include in advance the inverted list color characteristic that extracts in described inverted list, described inverted list color characteristic represents to be arranged in the colouring information of described inverted list image and the critical area corresponding with described visual word to be searched;
In the present embodiment, be stored in server in image data base the sign of each image except comprising in inverted list, also comprise in each image of expression, the inverted list color characteristic of the colouring information of the critical area corresponding with visual word to be searched, this inverted list color characteristic are each image in database to be analyzed to extract rear the acquisition in advance.
Step 203: according to described visual word to be searched and color characteristic to be searched, search the initial target image that is complementary with described image to be searched in described inverted list, and determine the priority of described initial target image according to matching degree;
Search the initial target image that is complementary with visual word to be searched and color characteristic to be searched in inverted list, can first find the initial matching image that includes identical visual word, and then utilize color characteristic to be searched to filter out the initial target image of mating with color characteristic to be searched from the initial matching image, then determine the priority of initial target image according to the height of matching degree, the priority of the image that matching degree is high is high, and matching degree is low that the priority of image is low.Can utilize simultaneously equally visual word to be searched and color characteristic to be searched to search initial target image in the present embodiment, perhaps first utilize color characteristic to be searched to determine the initial matching image, and then utilize visual word to be searched to determine the mode of initial target image, do not limit both sequencings.
Step 204: return to the final goal image of determining according to described image priority.
According to the priority of above-mentioned definite initial target image, server can be determined the target image of default number according to priority order from high to low, as the final goal image, returns to the 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 terminal local.Can be also client send target image searching request to server end, by 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 of utilization expression critical area combines with visual word is searched the initial purpose image that is complementary with image to be searched, then determine the priority of initial target image according to matching degree, thereby realize the purpose of the accuracy of raising Search Results, and, avoid occurring due to the low user of causing of Search Results accuracy repeatedly or repeat to server request search target image, cause server to repeat or repeatedly respond the searching request of same width target image, and increased the burden of server, and repeatedly send the image that does not satisfy the demands to the user, and waste the phenomenon of a large amount of network transmission resource, reduced the burden of server, reduced the waste to network transmission resource, thereby alleviated the burden of server, saved network transmission resource.
With reference to figure 3, it shows the process flow diagram of a kind of image search method embodiment 2 of the application, and this process flow diagram has mainly been described the process of extracting color characteristic from image, can comprise the following steps:
Step S301: the critical area of determining respectively each width image in image data base;
Respectively each the width image in image data base is analyzed, determined the critical area of image.
Step S302: add up number of pixels corresponding to every kind of color on described critical area;
Step S303: according to the number of pixels of described statistics, determine the color characteristic of the critical area of described each width image;
Step S304: add respectively described definite color characteristic in the inverted list of the visual word of correspondence;
Adding respectively described definite color characteristic comprises to the process in inverted list corresponding to the visual word of correspondence:
Main color and time corresponding sign of color with the critical area of described each width image, add to respectively in the corresponding inverted list of the visual word corresponding with it, described main color and time color is corresponding is designated: represent the binary number of described main color rate or inferior color rate, or the decimal number corresponding with the binary number that represents described main color rate or inferior color rate.Take visual word A as example, decimal number corresponding to main color rate of supposing image 1 is 25, and decimal number corresponding to inferior color rate is 39, and the decimal number corresponding to main color rate of image 2 is 28, decimal number corresponding to inferior color rate is 40, add after color characteristic inverted list as shown in Figure 4.
Step S305: determine that the color characteristic in described inverted list is described inverted list color characteristic.
Before the step of the disclosed extraction inverted list of the present embodiment color characteristic occurs in and carries out picture search, increased the color characteristic of the image critical area corresponding with visual word in existing inverted list, for follow-up picture search is prepared.
Wherein, the idiographic flow of step S302 comprises with reference to figure 5:
Step S501: the RGB color space is quantized to obtain 256 kinds of colors;
Step S502: the front two of setting each byte represents redness, and middle three bit representations are blue, and last three bit representations are green, and the principle according to setting represents every kind of color respectively with a byte;
After being quantized, color space obtains 256 kinds of colors, every kind of color is represented with a byte, and according to sheet charge coupling element (the Charge-coupled Device of camera lens, be called for short CCD) or complementary metal oxide semiconductor (CMOS) (Complementary Metal Oxide Semiconductor, abbreviation CMOS) image-forming principle, for redness is distributed less figure place, be the more figure place of blue and green distribution.
Step S503: the corresponding number of pixels of byte of each color of difference statistical representation.
By above-mentioned steps, set up related with the corresponding pixel of this color the byte of each color of expression.
Wherein, step S303 idiographic flow comprises with reference to figure 6:
Step S601: will represent that the corresponding number of pixels of the byte of every kind of color on critical area sorts according to from more to less order;
Step S602: determine that the represented color of the maximum byte of number of pixels is main color;
Step S603: determine that next byte is current byte to be analyzed;
Step S604: judge whether the represented color of current byte to be analyzed meets time color requirement, if, execution in step S607, if not, execution in step S605;
Step S605: judge whether to exist not analyzed byte, if, return to execution in step S603, if not, execution in step S606;
Step S606: the inferior color that with value is 0 the described critical area of byte representation;
Step S607: determine that the represented color of described current byte to be analyzed is time color.
In the present embodiment, judge whether the represented color of current byte to be analyzed meets time process of color requirement and comprise: obtain the corresponding decimal number of described current byte to be analyzed; Whether the corresponding decimal number of byte of the described main color of judgement expression and the corresponding decimal numeral difference of described current byte to be analyzed be greater than preset value, if, determine that the represented color of described current byte to be analyzed meets time color requirement, if not, determine that the represented color of 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, and can set according to actual conditions, is worth greatlyr, and the difference between main color and inferior color is just more obvious.
With reference to figure 7, it shows the process flow diagram of a kind of image search method embodiment 3 of the application, can comprise the following steps:
Step 701: determine visual word to be searched that the critical area of image to be searched is corresponding and the color characteristic to be searched of described critical area, described color characteristic to be searched represents the colouring information of the critical area of described image to be searched;
Step 702: obtain the inverted list corresponding with described visual word to be searched, include in advance the inverted list color characteristic that extracts in described inverted list, described inverted list color characteristic represents to be arranged in the colouring information of described inverted list image and the critical area corresponding with described visual word to be searched;
Step 703: obtain the number of times that each image in inverted list corresponding to described visual word to be searched occurs;
Suppose that image to be searched comprises three visual word A to be searched, B, C, obtain respectively three inverted lists that visual word to be searched is corresponding, the number of times that during statistics falls to arrange, each image occurs, comprise image 1 and image 2 in inverted list corresponding to visual word A, comprise image 1 and image 2 in inverted list corresponding to visual word B, comprise image 2 in inverted list corresponding to visual word C, the number of times that occurs of image 1 is 2, and the number of times that image 2 occurs is 3.
Step S704: determine respectively the visual word to be searched that comprises in described each image, and obtain respectively the distance of the inverted list color characteristic of critical area corresponding to visual word to be searched that each image comprises and color characteristic to be searched corresponding to visual word to be searched that each image comprises;
Take image 1 as example, comprise visual word A to be searched and B in image 1, so need to obtain respectively the distance of the inverted list color characteristic of critical area in the visual word A corresponding image 1 to be searched color characteristic corresponding with visual word A, the distance of the color characteristic to be searched that in image 1 corresponding to visual word B, the inverted list color characteristic of critical area is corresponding with visual word B.Other images are processed in a similar way.
Step S705: set the first score value of each image according to the number of times of each image appearance, described first minute value representation matching degree, the setting rule is: number of times is more, and described the first score value is larger; The distance of the color characteristic to be searched that the visual word to be searched that the inverted list color characteristic of the critical area that the visual word to be searched that comprises according to each image is corresponding and each image comprise is corresponding, according to predefined rule, set the second score value of each image, described second minute value representation matching degree;
In the present embodiment, the rule of setting the first score value is: number of times is more, and described the first score value is larger, concrete setting means can for, set a basic value, be assumed to be 10, number of times and this basic value that each image is occurred multiply each other, and result is as the first score value of this image.The present embodiment does not limit this kind setting means, can also select other establishing methods, as long as can guarantee that number of times is more, score value gets final product more greatly.Equally, also not limit basic value be 10 also can be 100 or 1000 or other values of setting according to actual conditions to the present embodiment.
Step S706: obtain respectively the first score value and second score value of each image, and calculate the first score value and the second score value sum;
Step S707: according to the first score value and the second descending order of score value sum, the priority of each image of setting from high to low;
Step S708: will be sent to client according to the final goal image that described image priority is determined.
Further, in the present embodiment, obtain color characteristic to be searched corresponding to the inverted list color characteristic of critical area corresponding to visual word to be searched that each image comprises and visual word to be searched that each image comprises distance process 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;
Suppose to determine that image 1 is current image to be calculated, and determine one in the visual word A that comprises and B as current visual word to be calculated from image 1.For example, determine that visual word A is current visual word to be calculated.
Step S803: calculate the inverted list color characteristic of critical area corresponding to described current visual word to be calculated and the difference of described color characteristic to be searched, specifically comprise:
calculate the first difference of the main color of the main color of inverted list color characteristic of critical area corresponding to described current visual word to be calculated and described color characteristic to be searched, the second difference of the main color of the inverted list color characteristic of the critical area that described current visual word to be calculated is corresponding and the inferior color of described color characteristic to be searched, the 3rd difference of the inferior color of the inverted list color characteristic of the critical area that described current visual word to be calculated is corresponding and the main color of described color characteristic to be searched, and, the 4th difference of the inferior color of the inverted list color characteristic of the critical area that described current visual word to be calculated is corresponding and the inferior color of described color characteristic to be searched,
The inverted list color characteristic of supposing the critical area that visual word A is corresponding is expressed as clr 1=[clr 1,0, clr 1,1], clr wherein 1,0Be clr 1Main color, clr 1,1Clr 1Inferior color, the color characteristic to be searched that visual word A is corresponding is expressed as clr2=[clr 2,0, clr 2,1], wherein, clr 2,0Be the main color of clr2, clr 2,1It is the inferior color of clr2.
If the decimal number that is designated of main color and time color needs to be converted into binary number, then be reduced to respectively the rgb value of 0-255, suppose clr 1,1=139 (0010001011), high 2 is R 1,1, middle four is G 1,1, low four is B 1,1, the R that restores 1,1=0 (00000000), G 1,1=128 (10000000), B 1,1=176 (10110000).If the binary number that is designated of main color and time color directly reduces.In the manner described above, respectively with clr 1,0, clr 2,0And clr 2,1Reduce, obtain R 1,0, G 1,0, B 1,0, R 2,0, G 2,0, B 2,0, R 2,1, G 2,1And B 2,1
The distance of calculating between two color rates is carried out according to following steps usually:
ΔR=R 11-R 21
ΔG=G 11-G 21
ΔB=B 11-B 21
Dis tan ce = ( 2 + R ‾ 256 ) * Δ R 2 + 4 * Δ G 2 + ( 2 + 255 - R ‾ 256 ) * Δ B 2
According to above-mentioned formula, calculate respectively the first difference Distance (clr 1,0, clr 2,0), the second difference Distance (clr 1,1, clr 2,1), the 3rd difference Distance (clr 1,0, clr 2,1) and the 4th difference Distance (clr 1,1, clr 2,0).
Step S804: obtain respectively described the first difference and the second difference sum, and the 3rd difference and the 4th difference sum;
Namely calculate respectively Distance (clr 1,0, clr 2,0)+Distance (clr 1,1, clr 2,1), Distance (clr 1,0, clr 2,1)+Distance (clr 1,1, clr 2,0).
Step S805: determine that smaller value in described the first difference and the second difference sum, described the 3rd difference and the 4th difference sum is the inverted list color characteristic of critical area corresponding to described current visual word to be calculated and the distance between the to be searched color characteristic corresponding with described visual word to be searched, and record;
Get smaller value in above-mentioned addition result and be the inverted list color characteristic of critical area corresponding to current visual word to be calculated and the distance between the to be searched color characteristic corresponding with described visual word to be searched.
Step S806: judge in described current image to be calculated whether comprise not by the computation vision word, if, execution in step S807, if not, execution in step S808;
Step S807: determine that next is not current visual word to be calculated by the computation vision word, returns to execution in step S803;
Step S808: judge whether to exist not by computed image, if, execution in step S809; If not, finish;
Step S809: determine that next is not current image to be calculated by computed image, returns to execution in step S802.
In order to make statement simpler and clearer, the present embodiment adopts the mode that each visual word of each image is calculated successively, but, the present embodiment does not limit can only aforesaid way, it can adopt the mode of simultaneously a plurality of visual word of a plurality of images being calculated equally, thereby improves the efficient of picture search.
in the present embodiment, the inverted list color characteristic that calculates critical area corresponding to described current visual word to be calculated and the detailed process of the difference of described color characteristic to be searched also can adopt the difference between the main color rate of the inverted list color characteristic of critical area corresponding to computation vision word and described color characteristic to be searched to realize, but, because the primary and secondary color may exchange because of statistical error and positioning error etc. in different images, the inferior color rate that is to say the main color rate of a-quadrant and B zone is close, and the main color rate in the inferior color rate of a-quadrant and B zone is close, in this case, if only adopting between main color between distance or inferior color distance calculates, will there be serious deviation in the result of calculating, reduced the accuracy of Search Results, therefore, in the present embodiment in calculating each image the inverted list color characteristic of the critical area corresponding with described visual word to be searched and with color characteristic to be searched corresponding to described visual word to be searched between apart from the time, the mode of distance between inverted list color characteristic master's color of the critical area that employing calculated crosswise visual word is corresponding and the inferior color of color characteristic to be searched, thereby avoid occurring above-mentioned situation, further improved the accuracy of picture search result.
In the present embodiment, after the process above-mentioned steps, obtained critical area corresponding with described visual word to be searched in each image the inverted list color characteristic and with color characteristic to be searched corresponding to described visual word to be searched between distance, according to this distance, according to predefined rule, set each image the second score value process as shown in Figure 9, comprising:
Step S901: determine current image to be analyzed;
Determine that image 1 is current image to be analyzed.
Step S902: obtain the inverted list color characteristic of critical area corresponding to each visual word to be searched that described current image to be analyzed comprises and the distance between the to be searched color characteristic corresponding with this visual word to be searched;
Obtain the distance that records in flow process shown in Figure 8.If current image to be analyzed is to comprise 10 visual word to be searched in image 1, obtain 10 distance values this moment.
Step S903: the distance between the inverted list color characteristic of the critical area that described each visual word to be searched is corresponding and the to be searched color characteristic corresponding with this visual word to be searched compares with preset value respectively, and record is less than the number of preset value;
Suppose that the preset value in the present embodiment is 5, distance between the inverted list color characteristic of the critical area that 10 visual word to be searched that current image to be analyzed is comprised are corresponding and the to be searched color characteristic corresponding with this visual word to be searched compares with 5 respectively, record is less than the number of 5 distance, in the present embodiment, suppose to have in image 1 the inverted list color characteristic of critical area corresponding to 6 visual word to be searched and the distance between the to be searched color characteristic corresponding with this visual word to be searched less than 5, record 6.
Step S904: judge whether to exist not analyzed image, if, execution in step S905; If not, execution in step S906;
Step S905: determine that next not analyzed image is current image to be analyzed, return to execution in step S902;
If there is not analyzed image 2, image 2 is defined as current image to be analyzed, repeat said process, obtain the inverted list color characteristic of critical area corresponding to each visual word to be searched that image 2 comprises and the distance between the to be searched color characteristic corresponding with this visual word to be searched less than the number of preset value, be assumed to be 5.
Step S906: the distance between the inverted list color characteristic of the critical area corresponding according to each visual word to be searched that comprises 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, the setting rule is: number is more, and described the second score value is larger.
when whole images to be analyzed all analyzed complete after, obtaining the inverted list color characteristic of critical area corresponding to each visual word to be searched in image 1 and the distance between the to be searched color characteristic corresponding with this visual word to be searched is 6 less than the number of preset value, and in image 2, the distance between the inverted list color characteristic of critical area corresponding to each visual word to be searched 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 in image 1, the inverted list color characteristic of critical area corresponding to each visual word to be searched is corresponding with this visual word to be searched is less, i.e. expression, image 1 is more similar to image to be searched.Set second a higher score value for image 1.Thereby when guaranteeing to sort according to from high to low score value, image 1 can come more forward position.
In the present embodiment, for the process of image setting the second score value can have multiple implementation, for example, set a basic value 10, distance between the inverted list color characteristic of the critical area that each visual word to be searched of each image of record is corresponding and the to be searched color characteristic corresponding with this visual word to be searched multiplies each other less than number and this basic value of preset value, result is as the second score value, and this basic value can be the value of setting according to actual conditions, such as 100 or 1000 etc.According to step shown in Figure 7 in the present embodiment, with the second score value and the first score value addition, the result of addition is as the basis of determining image priority.
In order to make statement simpler and clearer, the present embodiment adopts the mode that each image is analyzed successively, and still, the present embodiment does not limit can only aforesaid way, it can adopt the mode of simultaneously a plurality of images being analyzed equally, thereby improves the efficient of picture search.
In the disclosed image search method of the present embodiment, each image is carried out the calculating of the first score value and the second score value, then according to the first score value and the second score value and unify the sequence, determine the priority of each image, and obtain the final goal image.In the method, by calculating second score value corresponding with color characteristic, the low-level image feature that utilizes in color characteristic and conventional images searching method is combined, improved the accuracy of picture search result.
With reference to Figure 10, it shows the process flow diagram of a kind of image search method embodiment 4 of the application, in the present embodiment, can comprise the following steps:
Step S1001: determine visual word to be searched that the critical area of image to be searched is corresponding and the color characteristic to be searched of described critical area, described color characteristic to be searched represents the colouring information of the critical area of described image to be searched;
Step 1002: obtain the inverted list corresponding with described visual word to be searched, include in advance the inverted list color characteristic that extracts in described inverted list, described inverted list color characteristic represents to be arranged in the colouring information of described inverted list image and the critical area corresponding with described visual word to be searched;
Step S1003: obtain the number of times that each image in inverted list corresponding to described visual word to be searched occurs;
Step S1004: set the first score value of each image according to the number of times of image appearance, described first minute value representation matching degree, the setting rule is: number of times is more, and described the first score value is larger;
The mode of setting the first score value in the present embodiment can be with reference to a upper embodiment.
Step S1005: each image is sorted according to the first score value order from high to low;
Step S1006: select the top n image as pending image, described N is predefined integer;
Suppose that the N in the present embodiment is 3.
Step S1007: determine respectively the visual word to be searched that comprises in described each pending image, and obtain respectively the distance of the inverted list color characteristic of critical area corresponding to visual word to be searched that each pending image comprises and color characteristic to be searched corresponding to visual word to be searched that each image comprises;
This step specific implementation process can with reference to flow process shown in Figure 8, not repeat them here.
Step S1008: the distance of the color characteristic to be searched that the inverted list color characteristic of the critical area that the visual word to be searched that described each the pending image of foundation comprises is corresponding and the visual word to be searched that each image comprises are corresponding, according to predefined rule, set the second score value of described each pending image, described second minute value representation matching degree;
This step specific implementation process can with reference to flow process shown in Figure 9, not repeat them here.
Step S1009: the first score value and the second score value sum that obtain respectively described each pending image;
Step S1010: according to the first score value and the descending order of the second score value sum, the priority of described each the pending image of setting from high to low;
Step S1011: will be sent to client according to the final goal image that described image priority is determined.
in the disclosed image search method of the present embodiment, at first set the first score value of image according to the low-level image feature of image, and utilize the first score value order from high to low to the image screening of sorting, only keep sequence at the image of top N, as pending image, then only calculate the distance of color characteristic to be searched corresponding to the inverted list color characteristic of critical area corresponding to the visual word to be searched that comprises in pending image and visual word to be searched that each image comprises, and set the second score value of pending image, then utilize the first score value and the second score value sum, pending image is carried out the setting of priority.Compare with embodiment illustrated in fig. 7, the distance of the color characteristic to be searched that the inverted list color characteristic of the critical area that the visual word to be searched that comprises in the pending image that obtains after only needing calculating to screen according to the first score value in the present embodiment is corresponding and the visual word to be searched that each image comprises are corresponding, and be not that all images is all done this processing, therefore, greatly reduced the operation time in the picture search process, reduced computational complexity, guaranteed under the prerequisite of picture search result precision, further improved the efficient of search.
For aforesaid each embodiment of the method, for simple description, therefore it all is expressed as a series of combination of actions, but those skilled in the art should know, the application is not subjected to 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, the embodiment described in instructions all belongs to preferred embodiment, and related action and module might not be that the application is necessary.
Corresponding with the method that a kind of image search method embodiment 1 of above-mentioned the application provides, referring to Figure 11, the application also provides a kind of image search apparatus embodiment 1, and in the present embodiment, this system can comprise:
Determination module 1101 be used for to be determined visual word to be searched that the critical area of image to be searched is corresponding and the color characteristic to be searched of described critical area, and described color characteristic to be searched represents the colouring information of the critical area of described image to be searched;
Inverted list acquisition module 1102, be used for obtaining the inverted list corresponding with described visual word to be searched, include in advance the inverted list color characteristic that extracts in described inverted list, described inverted list color characteristic represents to be arranged in the colouring information of described inverted list image and the critical area corresponding with described visual word to be searched;
Priority determination module 1103 is used for searching the initial target image that is complementary with described image to be searched in described inverted list, and determining the priority of described initial target image according to matching degree according to described visual word to be searched and color characteristic to be searched;
Sending module 1104 is used for returning the final goal image of determining according to described image priority.
the disclosed image search apparatus of the present embodiment, when carrying out picture search, the mode that the color characteristic of the colouring information of utilization expression critical area combines with visual word is searched the initial purpose image that is complementary with image to be searched, then determine the priority of initial target image according to matching degree, thereby realize the purpose of the accuracy of raising Search Results, and, avoid occurring causing because the Search Results accuracy is low, the user repeatedly or repeat to server request search target image, server repeats or repeatedly responds the searching request of same width target image, and increased the burden of server, and repeatedly send the image that does not satisfy the demands to the user, and waste the phenomenon of a large amount of network transmission resource, reduced the burden of server, reduced the waste to network transmission resource.
Corresponding with the method that a kind of image search method embodiment 3 of above-mentioned the application provides, referring to Figure 12, the application also provides a kind of image search apparatus embodiment 2, in the present embodiment, this device can comprise: determination module 1201, inverted list acquisition module 1202, priority determination module 1203 and sending module 1204, wherein, described priority determination module 1203 comprises:
Image occurrence number acquiring unit 12031 is for the number of times of each image appearance that obtains inverted list corresponding to described visual word to be searched;
Color characteristic distance acquiring unit 12032, be used for determining respectively the visual word to be searched that described each image comprises, and obtain respectively the distance of the inverted list color characteristic of critical area corresponding to visual word to be searched that each image comprises and color characteristic to be searched corresponding to visual word to be searched that each image comprises;
Score value setup unit 12033, the score value setup unit comprises: the first score value setup unit, be used for setting according to the number of times that each image occurs the first score value of each image, described first minute value representation matching degree, the setting rule is: number of times is more, and described the first score value is larger; The second score value setup unit, the distance that is used for color characteristic to be searched corresponding to the inverted list color characteristic of critical area corresponding to the visual word to be searched that comprises according to each image and visual word to be searched that each image comprises, according to predefined rule, set the second score value of each image, described second minute value representation matching degree;
Sum unit 12034 is used for obtaining respectively the first score value and the second score value sum of each image;
Setup unit 12035 is used for according to the first score value and the second descending order of score value sum, the priority of each image of setting from high to low.
Wherein, the structure of color characteristic distance acquiring unit 12032 comprises as shown in figure 13:
Image is determined subelement 1301, is used for determining current image to be calculated;
Visual word is determined subelement 1302, is used 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, be used for calculating the inverted list color characteristic of critical area corresponding to described current visual word to be calculated and the difference of described color characteristic to be searched, the first difference that comprises the main color of the main color of the inverted list color characteristic that calculates critical area corresponding to described current visual word to be calculated and described color characteristic to be searched, the second difference of the main color of the inverted list color characteristic of the critical area that described current visual word to be calculated is corresponding and the inferior color of described color characteristic to be searched, the 3rd difference of the inferior color of the inverted list color characteristic of the critical area that described current visual word to be calculated is corresponding and the main color of described color characteristic to be searched, and, the 4th difference of the inferior color of the inverted list color characteristic of the critical area that described current visual word to be calculated is corresponding and the inferior color of described color characteristic to be searched,
Summation subelement 1304 is used for obtaining respectively described the first difference and the second difference, the 3rd difference and the 4th difference sum;
Distance is obtained subelement 1305, smaller value that be used for to determine described the first difference and the second difference, the 3rd difference and the 4th difference sum is the inverted list color characteristic of critical area corresponding to described current visual word to be calculated and the distance between the to be searched color characteristic corresponding with described visual word to be searched, and record;
First determines subelement 1306, when existing not by the computation vision word for the visual word to be searched that comprises when described current image to be calculated, determine that next is not current visual word to be calculated by the computation vision word, and order is carried out; Do not exist not by the computation vision word in the visual word to be searched that described current image to be calculated comprises, and when existing not by computed image, determine that next is not current image to be calculated by computed image, and return to the process of determining current visual word to be calculated from the visual word to be searched that described current image to be calculated comprises of carrying out; Do not exist not by the computation vision word in the visual word to be searched that described current image to be calculated comprises, and when not existing not by computed image, finish.
The structure of described the second score value setup unit comprises as shown in figure 14:
Obtain subelement 1401, be used for to determine current image to be analyzed, and obtain the inverted list color characteristic of critical area corresponding to each visual word to be searched that described current image to be analyzed comprises and the distance between the to be searched color characteristic corresponding with this visual word to be searched;
Relatively record subelement 1402, be used for the inverted list color characteristic of the critical area that described each visual word to be searched is corresponding respectively and the distance between the to be searched color characteristic corresponding with this visual word to be searched and compare with preset value, record the number less than preset value;
Second determines subelement 1403, be used for when existence not during analyzed image, determine that next not analyzed image is current image to be analyzed, return to the distance of carrying out between the inverted list color characteristic obtain critical 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;
Set subelement 1404, be used for when not having not analyzed image, distance between the inverted list color characteristic of the critical area corresponding according to each visual word to be searched that comprises 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, the setting rule is: number is more, and described the second score value is larger.
The reference mutually of other functional module does not repeat them here.
Corresponding with the method that a kind of image search method embodiment 4 of above-mentioned the application provides, referring to Figure 15, the application also provides a kind of image search apparatus embodiment 3, in the present embodiment, this device can comprise: determination module 1501, inverted list acquisition module 1502, priority determination module 1503 and sending module 1504, wherein, priority determination module 1503 comprises:
Image occurrence number acquiring unit 15031 is for the number of times of each image appearance that obtains inverted list corresponding to described visual word to be searched;
The first score value setup unit 15032 is used to the number of times that each image occurs to set the first corresponding score value, described first minute value representation matching degree, and the setting rule is: number of times is more, and described the first score value is larger;
Sequencing unit 15033 is used for according to the first score value order from high to low, each image being sorted;
Selected cell 15034 is used for selecting the top n image as pending image, and described N is predefined integer;
Color characteristic distance acquiring unit 15035, be used for determining respectively the visual word to be searched that described each pending image comprises, and obtain respectively the distance of the inverted list color characteristic of critical area corresponding to visual word to be searched that each pending image comprises and color characteristic to be searched corresponding to visual word to be searched that each image comprises;
The second score value setup unit 15036, the distance that is used for color characteristic to be searched corresponding to the inverted list color characteristic of critical area corresponding to the visual word to be searched that comprises according to described each pending image and visual word to be searched that each image comprises, according to predefined rule, set the second score value of described each pending image, described second minute value representation matching degree;
Sum unit 15037 is used for obtaining respectively described top n image, the first score value of each image and the second score value sum;
Setup unit 15038 is used for according to the first score value and the descending order of the second score value sum, the priority of the described top n image of setting from high to low.
The structure of the color characteristic distance acquiring unit 15035 in the present embodiment can be with reference to structural representation shown in Figure 13, and the structure of the second score value setup unit 15036 can be with reference to structural representation shown in Figure 14.The reference mutually of other functional module does not repeat them here.
The described device of the present embodiment can be integrated on the server of third party transaction platform, also can be connected with the server of third party transaction platform as an entity separately, in addition, need to prove, when the described method of the application adopts software to realize, can be used as a newly-increased function of server of third party transaction platform, can write separately corresponding program yet, the application does not limit the implementation of described method or system.
The application also provides a kind of server, and described server has comprised image search apparatus mentioned above, it is worth mentioning that, it will be understood by those skilled in the art that described server does not include only above-mentioned image search apparatus.
Need to prove, each embodiment in this instructions all adopts the mode of going forward one by one to describe, and what each embodiment stressed is and the difference of other embodiment that between each embodiment, identical similar part is mutually referring to getting final product.For system class embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, relevant part gets final product referring to the part explanation of embodiment of the method.
At last, also need to prove, in this article, relational terms such as the first and second grades only is used for an entity or operation are separated with another entity or operational zone, and not necessarily requires or hint and have the relation of any this reality or sequentially between these entities or operation.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thereby make the process, method, article or the equipment that comprise a series of key elements not only comprise those key elements, but also comprise other key elements of clearly not listing, or also be included as the intrinsic key element of this process, method, article or equipment.In the situation that not more restrictions, the key element that is limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment that comprises described key element and also have other identical element.
Above a kind of image search method, device and the server that the application is provided is described in detail, used specific case herein the application's principle and embodiment are set forth, the explanation of above embodiment just is used for helping to understand the application's method and core concept thereof; Simultaneously, for one of ordinary skill in the art, the thought according to the application all will change in specific embodiments and applications, and in sum, this description should not be construed as the restriction to the application.

Claims (13)

1. an image search method, is characterized in that, the method comprises:
Determine visual word to be searched that the critical area of image to be searched is corresponding and the color characteristic to be searched of described critical area, described color characteristic to be searched represents the colouring information of the critical area of described image to be searched;
Obtain the inverted list corresponding with described visual word to be searched, include in advance the inverted list color characteristic that extracts in described inverted list, described inverted list color characteristic represents to be arranged in the colouring information of described inverted list image and the critical area corresponding with described visual word to be searched;
According to described visual word to be searched and color characteristic to be searched, search the initial target image that is complementary with described image to be searched in described inverted list, and determine the priority of described initial target image according to matching degree;
Return to the final goal image of determining according to described image priority.
2. method according to claim 1, is characterized in that, described inverted list color characteristic comprises at least: represent in described inverted list in image main colouring information and time colouring information of the critical area that the visual word that comprises with described inverted list is corresponding;
Accordingly, described color characteristic to be searched comprises at least: the main colouring information of the critical area of the described image to be searched of expression and time colouring information.
3. method according to claim 1, is characterized in that, extracts described inverted list color characteristic according to following steps:
Determine respectively the critical area of each width image in image data base;
Add up number of pixels corresponding to every kind of color on described critical area;
According to the number of pixels of described statistics, determine the color characteristic of the critical area of described each width image;
Add respectively described definite color characteristic in the inverted list of the visual word of correspondence;
Determine that the color characteristic in described inverted list is described inverted list color characteristic.
4. method according to claim 3, is characterized in that, the process of the number of pixels that every kind of color on the described critical area of described statistics is corresponding comprises:
The RGB color space is quantized to obtain 256 kinds of colors;
The front two of setting each byte represents redness, and middle three bit representations are blue, and last three bit representations are green, and the principle according to setting represents every kind of color respectively with a byte;
The corresponding number of pixels of byte of each color of difference statistical representation.
5. method according to claim 4, is characterized in that, according to the number of pixels of described statistics, determines that the process of the color characteristic of described critical area comprises:
The corresponding number of pixels of byte of every kind of color on the expression critical area is sorted according to from more to less order;
Determine that the represented color of the maximum byte of number of pixels is main color;
Determine that next byte is current byte to be analyzed;
When the represented color of described current byte to be analyzed meets inferior color requirement, determine that the represented color of described current byte to be analyzed is time color;
When the represented color of described current byte to be analyzed does not meet inferior color requirement, judge whether to exist not analyzed byte, if exist, returning and carrying out described definite next byte is the step of current byte to be analyzed, if do not exist, be the inferior color of 0 the described critical area of byte representation with value.
6. method according to claim 5, is characterized in that, judges according to following steps whether the represented color of described current byte to be analyzed meets time color and require:
Obtain the corresponding decimal number of described current byte to be analyzed;
Whether the corresponding decimal number of byte of the described main color of judgement expression and the corresponding decimal numeral difference of described current byte to be analyzed be greater than preset value, if, determine that the represented color of described current byte to be analyzed meets time color requirement, if not, determine that the represented color of described current byte to be analyzed does not meet time color requirement.
7. method according to claim 6, is characterized in that, describedly adds respectively described definite color characteristic and comprise to the process in inverted list corresponding to the visual word of correspondence:
Main color and time corresponding sign of color with the critical area of described each width image, add to respectively in the corresponding inverted list of the visual word corresponding with it, described main color and time color is corresponding is designated: represent the binary number of described main color or inferior color, or the decimal number corresponding with the binary number that represents described main color or inferior color.
8. method according to claim 2, it is characterized in that, the described visual word to be searched of described foundation and color characteristic to be searched, search the initial target image that is complementary with described image to be searched in described inverted list, and determine that according to matching degree the process of the priority of described initial target image comprises:
Obtain the number of times that each image in inverted list corresponding to described visual word to be searched occurs;
Determine respectively the visual word to be searched that comprises in described each image, and obtain respectively the distance of the inverted list color characteristic of critical area corresponding to visual word to be searched that each image comprises and color characteristic to be searched corresponding to visual word to be searched that each image comprises;
Set the first score value of each image according to the number of times of each image appearance, described first minute value representation matching degree, the setting rule is: number of times is more, and described the first score value is larger; The distance of the color characteristic to be searched that the visual word to be searched that the inverted list color characteristic of the critical area that the visual word to be searched that comprises according to each image is corresponding and each image comprise is corresponding, according to predefined rule, set the second score value of each image, described second minute value representation matching degree;
Obtain respectively the first score value and the second score value sum of each image;
According to the first score value and the second descending order of score value sum, the priority of each image of setting from high to low.
9. method according to claim 2, it is characterized in that, the described visual word to be searched of described foundation and color characteristic to be searched, search the initial target image that is complementary with described image to be searched in described inverted list, and determine that according to matching degree the process of the priority of described initial target image comprises:
Obtain the number of times that each image in inverted list corresponding to described visual word to be searched occurs;
Set the first score value of each image according to the number of times of image appearance, described first minute value representation matching degree, the setting rule is: number of times is more, and described the first score value is larger;
According to the first score value order from high to low, each image is sorted;
Select the top n image as pending image, described N is predefined integer;
Determine respectively the visual word to be searched that comprises in described each pending image, and obtain respectively the distance of the inverted list color characteristic of critical area corresponding to visual word to be searched that each pending image comprises and color characteristic to be searched corresponding to 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 critical area that the visual word to be searched that described each the pending image of foundation comprises is corresponding and the visual word to be searched that each image comprises are corresponding, according to predefined rule, set the second score value of described each pending image, described second minute value representation matching degree;
Obtain respectively the first score value and the second score value sum of described each pending image;
According to the first score value and the descending order of the second score value sum, the priority of described each the pending image of setting from high to low.
10. according to claim 8 or 9 described methods, it is characterized in that, the process that obtains the distance of color characteristic to be searched corresponding to the inverted list color characteristic of critical area corresponding to visual word to be searched that each image comprises and visual word to be searched that each image comprises comprises:
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 critical area corresponding to described current visual word to be calculated and the difference of described color characteristic to be searched, comprise: the first difference of calculating the main color of the main color of inverted list color characteristic of critical area corresponding to described current visual word to be calculated and described color characteristic to be searched, the second difference of the main color of the inverted list color characteristic of the critical area that described current visual word to be calculated is corresponding and the inferior color of described color characteristic to be searched, the 3rd difference of the inferior color of the inverted list color characteristic of the critical area that described current visual word to be calculated is corresponding and the main color of described color characteristic to be searched, and, the 4th difference of the inferior color of the inverted list color characteristic of the critical area that described current visual word to be calculated is corresponding and the inferior color of described color characteristic to be searched,
Obtain respectively described the first difference and the second difference, the 3rd difference and the 4th difference sum;
Determine that smaller value in described the first difference and the second difference, the 3rd difference and the 4th difference sum is the inverted list color characteristic of critical area corresponding to described current visual word to be calculated and the distance between the to be searched color characteristic corresponding with described visual word to be searched, and record;
When existing not by the computation vision word in the visual word to be searched that described current image to be calculated comprises, determine that next is not current visual word to be calculated by the computation vision word, and return to the step of the difference of the inverted list color characteristic that carry out to calculate critical area corresponding to described current visual word to be calculated and described color characteristic to be searched;
Do not exist not by the computation vision word in the visual word to be searched that described current image to be calculated comprises, and when existing not by computed image, determine that next is not current image to be calculated by computed image, and return and carry out the step of determining current visual word to be calculated from the visual word to be searched that described current image to be calculated comprises;
Do not exist not by the computation vision word in the visual word to be searched that described current image to be calculated comprises, and when not existing not by computed image, finish.
11. method according to claim 10, it is characterized in that, described according to critical area corresponding with described visual word to be searched in each image the inverted list color characteristic and with color characteristic to be searched corresponding to described visual word to be searched between distance, according to predefined rule, the process of setting the second score value of each image comprises:
Determine current image to be analyzed, and obtain the inverted list color characteristic of critical area corresponding to each visual word to be searched that described current image to be analyzed comprises and the distance between the to be searched color characteristic corresponding with this visual word to be searched;
Distance between the inverted list color characteristic of the critical area that described each visual word to be searched is corresponding and the to be searched color characteristic corresponding with this visual word to be searched compares with preset value respectively, and record is less than the number of preset value;
When having not analyzed image, determine that next not analyzed image is current image to be analyzed, return to the distance of carrying out between the inverted list color characteristic obtain critical 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;
When not having not analyzed image, distance between the inverted list color characteristic of the critical area corresponding according to each visual word to be searched that comprises 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, the setting rule is: number is more, and described the second score value is larger.
12. an image search apparatus is characterized in that, comprising:
Determination module be used for to be determined visual word to be searched that the critical area of image to be searched is corresponding and the color characteristic to be searched of described critical area, and described color characteristic to be searched represents the colouring information of the critical area of described image to be searched;
The inverted list acquisition module, be used for obtaining the inverted list corresponding with described visual word to be searched, include in advance the inverted list color characteristic that extracts in described inverted list, described inverted list color characteristic represents to be arranged in the colouring information of described inverted list image and the critical area corresponding with described visual word to be searched;
The priority determination module is used for searching the initial target image that is complementary with described image to be searched in described inverted list, and determining the priority of described initial target image according to matching degree according to described visual word to be searched and color characteristic to be searched;
Sending module is used for returning the final goal image of determining according to described image priority.
13. an image search server is characterized in that described server comprises image search apparatus as claimed in claim 12.
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 true CN103164433A (en) 2013-06-19
CN103164433B 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)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103839270A (en) * 2014-03-24 2014-06-04 东方网力科技股份有限公司 Image matching method and device
CN104714962A (en) * 2013-12-13 2015-06-17 阿里巴巴集团控股有限公司 Image search engine generation method and system
CN105468596A (en) * 2014-08-12 2016-04-06 腾讯科技(深圳)有限公司 Image retrieval method and device
CN106874285A (en) * 2015-12-10 2017-06-20 中国移动通信集团公司 A kind of photo files processing method and terminal device
CN114969578A (en) * 2022-05-07 2022-08-30 中移互联网有限公司 Information display method and device and electronic equipment

Citations (2)

* 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
US20110235902A1 (en) * 2010-03-29 2011-09-29 Ebay Inc. Pre-computing digests for image similarity searching of image-based listings in a network-based publication system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110235902A1 (en) * 2010-03-29 2011-09-29 Ebay Inc. Pre-computing digests for image similarity searching of image-based listings in a network-based publication system
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
LANGYUEWU: ""颜色特征提取"", 《HTTP://BLOG.CSDN.NET/LANGYUEWU/ARTICLE/DETAILS/4144139》, 2 May 2009 (2009-05-02), pages 1 - 7 *
贾增朝: ""用于图像检索的视觉词汇树研究"", 《中国优秀硕士学位论文全文数据库信息科技辑》, 15 August 2011 (2011-08-15) *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104714962A (en) * 2013-12-13 2015-06-17 阿里巴巴集团控股有限公司 Image search engine generation method and system
CN104714962B (en) * 2013-12-13 2018-11-06 阿里巴巴集团控股有限公司 A kind of generation method and system of image search engine
CN103839270A (en) * 2014-03-24 2014-06-04 东方网力科技股份有限公司 Image matching method and device
CN103839270B (en) * 2014-03-24 2017-03-08 东方网力科技股份有限公司 A kind of image matching method and device
CN105468596A (en) * 2014-08-12 2016-04-06 腾讯科技(深圳)有限公司 Image retrieval method and device
CN106874285A (en) * 2015-12-10 2017-06-20 中国移动通信集团公司 A kind of photo files processing method and terminal 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

Also Published As

Publication number Publication date
HK1182470A1 (en) 2013-11-29
CN103164433B (en) 2016-06-15

Similar Documents

Publication Publication Date Title
CN101300575B (en) Image processing
CN107688823A (en) A kind of characteristics of image acquisition methods and device, electronic equipment
CN103207881B (en) Querying method and device
CN103164433A (en) Image search method, device and server
US20220261591A1 (en) Data processing method and apparatus
CN1714361B (en) Manufacturing procedure analysis support method and device
CN112241764A (en) Image recognition method and device, electronic equipment and storage medium
CN103164436A (en) Image search method and device
CN113657087B (en) Information matching method and device
CN113537254B (en) Image feature extraction method and device, electronic equipment and readable storage medium
US11341183B2 (en) Apparatus and method for searching for building based on image and method of constructing building search database for image-based building search
CN113536856A (en) Image recognition method and system, and data processing method
CN110634088A (en) Case refereeing method, device and system
CN103399957A (en) Searching method, system and engine as well as client
CN110825902A (en) Method and device for realizing feature similarity search, electronic equipment and storage medium
KR101999455B1 (en) The matching service system with 3d printing company
CN111598093A (en) Method, device, equipment and medium for generating structured information of characters in picture
CN111507788B (en) Data recommendation method, device, storage medium and processor
CN110837563B (en) Case judge method, device and system
CN115860024A (en) Two-dimensional code identification method and identification device
Yang et al. CPSS-FAT: A consistent positive sample selection for object detection with full adaptive threshold
CN113515701A (en) Information recommendation method and device
CN110879863B (en) Cross-domain search method and cross-domain search device
CN113051406A (en) Character attribute prediction method, device, server and readable storage medium
CN113792169B (en) Digital archive management method and system based on big data application

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