WO2015196964A1 - 搜索匹配图片的方法、图片搜索方法及装置 - Google Patents
搜索匹配图片的方法、图片搜索方法及装置 Download PDFInfo
- Publication number
- WO2015196964A1 WO2015196964A1 PCT/CN2015/082070 CN2015082070W WO2015196964A1 WO 2015196964 A1 WO2015196964 A1 WO 2015196964A1 CN 2015082070 W CN2015082070 W CN 2015082070W WO 2015196964 A1 WO2015196964 A1 WO 2015196964A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- picture
- matching
- local feature
- ratio
- threshold
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/50—Information retrieval; Database structures therefor; File system structures therefor of still image data
- G06F16/53—Querying
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/50—Information retrieval; Database structures therefor; File system structures therefor of still image data
- G06F16/58—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
- G06F16/583—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
- G06F16/5838—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content using colour
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/50—Information retrieval; Database structures therefor; File system structures therefor of still image data
- G06F16/51—Indexing; Data structures therefor; Storage structures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/50—Information retrieval; Database structures therefor; File system structures therefor of still image data
- G06F16/58—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
- G06F16/5866—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using information manually generated, e.g. tags, keywords, comments, manually generated location and time information
Definitions
- the present invention relates to the field of Internet technologies, and in particular, to a method for searching for matching pictures, a method and device for searching pictures, and a method for matching pictures, a search method and a device thereof.
- Each website may process the images (zoom, crop, watermark, rotate, and various PS) during the reprint process. Identifying pictures with similar picture content but different operations can be used in many fields, such as search, deduplication, filtering and other related products.
- search engine Take the search engine as an example.
- searching just give enough keywords to find what you want.
- image search if the user wants to find all the pictures that are similar to the content of one picture, but there is no keyword at hand, only the "key map", for example, the user already has a picture on hand, want to find a size more Large, or no watermark, or original image before PS processing; in this case and premise, the user needs to input the image (for convenience of explanation, hereinafter referred to as the image to be queried), search and the picture A similarly similar image (or a picture that matches the image) is provided to the user as a search result.
- a method based on local features of pictures is used, that is, a large number of local features are extracted from the picture to be recognized, and the picture to be recognized is represented as a set of local features.
- the coincidence ratio of the local feature sets is used as a comparison criterion.
- the coincidence ratio of the local feature sets of the two pictures is higher than a certain fixed threshold, the two pictures are considered to be the same;
- the picture has a large difference in the threshold value of the local feature set coincidence ratio due to the difference in the number of local features extracted in the picture and the number of repeated local features caused by the repeated texture.
- the threshold is not properly selected, for example, if the threshold is set too high, there will be many images that are actually matched cannot be searched (that is, the number of images that match exactly is relatively small); and if the threshold is set too low, many mismatches will be found. The picture, the wrong picture and the original picture often have no similarities in overall vision.
- the present invention has been made in order to provide a method, a picture search method and apparatus for searching for matching pictures that overcome the above problems or at least partially solve the above problems, and a matching method, a search method and a device thereof.
- a method for searching for a matching picture including: extracting a local feature from a picture to be queried input by a user; and selecting a local feature of each picture in the picture database and a local feature of the picture to be queried Performing matching, determining a matching ratio of each picture in the database and a local feature of the picture to be queried; and placing a picture in the database with a matching ratio greater than or equal to a first ratio threshold into a picture matching result;
- the matching ratio in the database is smaller than the first ratio threshold is greater than the second ratio threshold a picture, calculating a Hamming distance between the perceptual hash value of the picture and the perceptual hash value of the picture to be queried, and placing a picture in which the Hamming distance is less than the set first distance threshold value into the picture In the matching result, the first ratio threshold is greater than the second ratio threshold.
- a picture search method including:
- Receiving a picture to be queried by the user extracting a local feature of the image to be queried; searching for a picture matching the picture to be queried by the user based on the local feature of the picture to be queried; using the searched picture as a search result Return to the user.
- an apparatus for searching for a matching picture including:
- a matching ratio determining module configured to match a local feature of each picture in the picture database with a local feature of the picture to be queried, and determine a match between each picture in the database and a local feature of the picture to be queried proportion;
- a calculation module configured to calculate, between each of the pictures in the database that the matching ratio is smaller than the first ratio threshold and greater than the second ratio threshold, between the perceptual hash value of the picture and the perceptual hash value of the picture to be queried Bright distance
- a matching result determining module configured to determine, according to the determination result of the matching ratio, a picture in the database that has a matching ratio greater than or equal to a first ratio threshold, and a matching ratio in the database that is smaller than a first ratio threshold and greater than a second ratio threshold A picture whose Hamming distance is less than the set first distance threshold is placed in the picture matching result; the first ratio threshold is greater than the second ratio threshold.
- a search device for a picture including:
- An input interface configured to receive a picture to be queried by a user
- a picture finder initiating a search for a request for matching a picture with the image to be queried and acquiring a picture matching the picture to be queried by the user based on the local feature of the picture to be queried;
- An output interface for returning the searched image to the user as a search result is provided.
- the method for searching for a matching picture, the image searching method and the device provided by the embodiment of the present invention by setting two matching thresholds - a first proportional threshold and a second proportional threshold, wherein the first proportional threshold is greater than the second proportional threshold
- the first proportional threshold is greater than the second proportional threshold
- Use the larger matching threshold to perform local feature matching that is, put the matching ratio of the database with the matching ratio greater than or equal to the first proportional threshold into the image matching result
- the matching ratio is smaller than the first
- Each picture whose ratio threshold is greater than the second ratio threshold is filtered by using a matching manner of the perceptual hash, and the perceptual hash value of each picture whose matching ratio is smaller than the first ratio threshold is greater than the second ratio threshold is calculated, and the picture input by the user is calculated.
- the Hamming distance between the perceived hash values is also placed in the image matching result in which the Hamming distance is less than the set first distance threshold.
- the matching accuracy is ensured by using a larger matching threshold.
- the local feature matching coincidence ratio between the larger matching threshold and the smaller matching threshold further Screened with perceptual hashing way, under the premise to ensure the accuracy of screening images, increasing the number of search results in the picture.
- a method for matching a picture including:
- the specific local feature is filtered or reduced, the specific local feature is a local feature that appears in a single picture with an average number of times greater than a set threshold; and each of the to-be-matched after the specific local feature filtering or weight reduction processing is calculated
- the coincidence ratio of the local features of the picture determines the similarity between the pictures to be matched.
- a matching device for a picture including:
- An extractor configured to respectively extract a plurality of local features in at least two to-be-matched pictures
- a filtering/degrading processing module configured to filter or de-weight a specific local feature included in the plurality of local features, wherein the specific local feature is a local feature that appears in a single image and has an average number of times greater than a set threshold ;
- a calculation module configured to calculate a coincidence ratio of local features of each to-be-matched picture after the specific local feature filtering or weight reduction processing
- the similarity determining module is configured to determine the similarity between the to-be-matched pictures according to the coincidence ratio.
- the matching method, the searching method and the device for the picture provided by the embodiment of the present invention respectively extract a plurality of local features in at least two pictures to be matched, and filter or decrement the specific local features included in the plurality of local features,
- the specific local feature is a local feature that appears in a single picture with an average number of times greater than a set threshold. Such features are features that are easily repeated in the picture, and are calculated after the specific local feature filtering or weight reduction processing. Matching the coincidence ratio of the local features of the picture, determining the similarity between the pictures to be matched.
- the embodiment of the present invention performs filtering or weight reduction processing on the local features that are easily repeated in the picture, and can achieve a high matching accuracy rate, compared with the geometric verification method in the prior art.
- the processing is simple, the memory consumption is low, and the efficiency is high.
- a computer program comprising computer readable code that, when executed on a computing device, causes the computing device to perform a search match according to the above Image method, image matching method, and/or image search method.
- a computer readable medium storing the above computer program is provided.
- FIG. 1 is a flowchart of a method for searching for a matching picture according to an embodiment of the present invention
- FIG. 3 is a flowchart of a picture search method according to an embodiment of the present disclosure
- FIG. 4 is a schematic structural diagram of an apparatus for searching for a matching picture according to an embodiment of the present invention. intention;
- FIG. 5 is a schematic structural diagram of a picture search apparatus according to an embodiment of the present invention.
- FIG. 6 is a flowchart of a method for matching a picture according to an embodiment of the present invention.
- FIG. 7 is a flowchart of generating a list of specific local features according to an embodiment of the present invention.
- FIG. 8 is a flowchart of a picture search method according to an embodiment of the present invention.
- FIG. 9 is a schematic structural diagram of a picture matching apparatus according to an embodiment of the present invention.
- FIG. 10 is a schematic structural diagram of a picture search apparatus according to an embodiment of the present invention.
- FIG. 11 is a block diagram schematically showing a computing device for performing a method of searching for a matching picture, a matching method of a picture, and/or a picture searching method according to the present invention
- Fig. 12 schematically shows a storage unit for holding or carrying program code for implementing a method of searching for a matching picture, a matching method of a picture, and/or a picture searching method according to the present invention.
- the method for searching for matching pictures improves the existing method for performing image matching based on local feature matching, and integrates the method for image matching based on perceptual hash into the method for image matching based on local feature matching. In the comprehensive use of local features and perceptual hashes, the accuracy of the search results is guaranteed on the basis of satisfying the number of image search results.
- the method of image matching based on perceptual hashing is simply to extract a perceptual feature for a picture to describe the whole picture.
- Each picture is represented as a fixed length (64-bit) 01 binary string. If the Hamming distance (the number of different bits) of the two binary strings is below a certain threshold, then the two pictures are considered to be matching pictures.
- the method for matching a picture provided by the embodiment of the present invention includes the following steps:
- the number of extracted local features may be preset
- S102 Match local features of each picture in the picture database with local features of the picture input by the user (ie, the picture to be queried), and determine a matching ratio of each picture in the database to a local feature of the picture input by the user;
- the embodiment of the present invention presets two matching thresholds, a first proportional threshold and a second proportional threshold, wherein the first proportional threshold is greater than the second proportional threshold.
- offline feature extraction is performed on each picture in the picture database in advance, including extracting a perceptual hash value and/or a set number of local features;
- the extracted perceptual hash value and the set number of local features may also be saved.
- the number of extractions can be, for example, several hundred.
- a storage mode in which a perceptual hash value list and a local feature list are stored in a database may be used, and in each list, the identifier of the image and the corresponding plurality of perceptual hash values (multiple local features) are saved. Correspondence relationship.
- the subsequent S102 and S104 can directly use the saved local features and perceptual hash values extracted for each picture, and perform local feature matching and Hamming distance calculation to improve the operation efficiency.
- the first proportional threshold is greater than the second proportional threshold
- the larger matching threshold is used for local feature matching (ie: The image in which the local feature matching ratio in the database is greater than or equal to the first proportional threshold is placed in the image matching result, and on the basis of this, for each picture whose matching ratio is smaller than the first proportional threshold and greater than the second proportional threshold,
- the method for matching the perceptual hash is filtered, and the Hamming distance between the perceptual hash value of each picture whose matching ratio is smaller than the first ratio threshold and the second ratio threshold is compared with the perceptual hash value of the picture input by the user is calculated.
- the picture with the Hamming distance less than the set first distance threshold is also placed in the picture matching result.
- the larger matching threshold is used to ensure the matching accuracy of the picture.
- the local feature matching ratio is larger. Match the image between the threshold and the smaller matching threshold, and further use the method of perceptual hashing to filter the image in the guaranteed screening. Under the premise of accuracy, increasing the number of search results in the picture.
- the method for matching the picture provided by the embodiment of the present invention further sets another second distance threshold for measuring the Hamming distance, the second distance.
- the threshold is smaller than the first distance threshold, and correspondingly, based on the foregoing steps S101 to S105, the following steps are further performed:
- each local feature of the picture is used to match each local feature of the picture input by the user, and the matching ratio of the picture to the local feature of the picture input by the user is calculated;
- the above reference set is a picture in which the matching ratio of the local feature matching is smaller than the first ratio threshold is greater than the second ratio threshold, and the Hamming distance using the perceptual hash matching is smaller than the second distance threshold (the second ratio threshold is smaller than the first distance threshold) a picture
- the reference set is a subset of the picture whose Hamming distance determined in the above S105 is smaller than the set first distance threshold.
- the reference set is that the matching ratio of the local feature matching is smaller than the first ratio threshold is greater than the second
- those pictures closer to the picture input by the user are used as the reference value by using the minimum value of the matching ratio value of the local feature matching of the pictures.
- the matching ratio of the local feature matching may be smaller than the first ratio threshold is greater than the second ratio threshold, and the Hamming distance is greater than or equal to the set first distance threshold. Further filtering out the map matching the image input by the user Slices, increasing the range of choices for image matching.
- the determining method of the image matching may further include:
- each local feature of the picture is used to match each local feature of the picture input by the user, and the matching ratio of the picture to the local feature of the picture input by the user is calculated;
- the image in the candidate result set whose matching ratio is greater than the minimum value is placed in the image matching result.
- the picture in the candidate set with the matching ratio greater than the minimum value is placed in the picture matching result, that is, the picture that is very close to the picture input by the user is used as a reference, and the picture in the candidate set is partially localized.
- the picture whose feature matching ratio value is larger than the local feature matching ratio value of the picture of the reference image is used as the picture in the search result again, and the number of pictures in the search result is further increased under the premise of ensuring the image matching accuracy.
- thresholds are preset, namely: A1, A2 (for local features, A1 > A2); B1, B2 (for perceived hashes, B1 > B2).
- offline feature extraction is performed on each picture in the picture database, including 64-bit perceptual hash and local feature set (the number of set elements is not limited, about several hundred).
- the perceptual hash and local features are also extracted for the picture to be queried input by the user.
- the picture with the local feature matching ratio greater than or equal to A1 is placed in the result picture set R, and the picture smaller than A1 but larger than A2 is placed in the candidate picture set M.
- the picture in which the Hamming distance of the perceived hash in the picture set M is less than B1 is placed in the result picture set R, and the remaining pictures (the perceived hash distance is greater than or equal to B1) are placed in the candidate set S, and all are smaller than The picture of B2 is placed in the adjustment reference set N at the same time. (Adjusting the picture in the reference set N is because the perceptual hash is very close to the query picture, so it is used to guide the adjustment of the local feature matching threshold).
- the picture set S is traversed, and the picture with the local feature matching ratio exceeding K is placed in the result picture set R.
- the pictures in all the result picture sets R are the search results.
- the method provided in FIG. 2 above uses the perceptual hash to adaptively adjust the local feature matching threshold (subtracting the matching threshold from A1 to K), and on the other hand, perceptually hashing and localizing.
- Feature fusion also helps increase the number of search results (local hash matching ratio between A2 and K while simultaneously sensing a hash distance less than B1 will be added to the result set).
- the method provided in FIG. 2 is quite effective in solving the problem that the picture cannot be judged to be the same by using local features to overcome the operations such as image cropping and rotation. It overcomes the problem that the image matching (especially cropping) performance caused by the image matching by relying on the sensing hash is not robust enough, and the image after the cropping, watermarking and the like cannot be accurately matched.
- the image search method provided by the embodiment of the present invention, as shown in FIG. 3, includes the following steps:
- S301 Receive a picture to be queried input by a user, and extract a local feature of the picture to be queried.
- the method for searching for a matching picture in the S302 may be performed by using the method for searching for a matching picture provided by the present invention.
- the specific implementation process refer to the foregoing method for searching for a matching picture.
- step S302 may include
- Extracting local features for the image to be queried input by the user Extracting local features for the image to be queried input by the user
- an embodiment of the present invention further provides a device for searching for a matching picture and a search device for a picture.
- the principle of the problem solved by the device is similar to the method for searching for a matching picture and the search method for the picture.
- the device for searching for matching pictures provided by the embodiment of the present invention, as shown in FIG. 4, includes:
- the to-be-queried picture extractor 401 is configured to extract local features from the image to be queried input by the user;
- the matching ratio determining module 402 is configured to match local features of each picture in the picture database with local features of the picture to be queried, and determine each picture in the database and local features of the picture to be queried. Matching ratio
- the calculating module 403 is configured to calculate a Hamming distance between the perceptual hash value of the picture and the perceptual hash value of the picture input by the user for each picture in the database whose matching ratio is smaller than the first ratio threshold and greater than the second ratio threshold. ;
- the matching result determining module 404 is configured to: according to the determination result of the matching ratio determining module 402, the matching ratio in the database is greater than or equal to the first proportional threshold, and the matching ratio in the database is smaller than the first proportional threshold is greater than the second proportional threshold and Hamming A picture whose distance is less than the set first distance threshold is placed in the picture matching result; wherein the first ratio threshold is greater than the second ratio threshold.
- the apparatus for searching for a matching picture further includes: a storage module 405;
- the to-be-queried picture extractor 401 is further configured to perform offline feature extraction on each picture in the picture database, where the offline feature includes a perceptual hash value and a set number of local features;
- the storage module 405 is configured to save a perceptual hash value and a set number of local features of each picture in the pre-extracted database.
- the foregoing storage module 405 can be in the form of a database when implemented.
- the apparatus for matching pictures according to the embodiment of the present invention further includes:
- the reference set determining module 406 is configured to determine that the matching ratio in the database is less than the first ratio threshold is greater than the first a second ratio threshold and a Hamming distance less than a set second distance threshold and placed in the reference set; the second distance threshold is less than the first distance threshold;
- the calculating module 403 is further configured to: use each local feature of the image for each picture in the reference set to match each local feature of the picture input by the user, and calculate the part of the picture and the picture input by the user.
- the matching ratio of the features and determining the minimum of the matching ratios corresponding to each picture in the reference set.
- the apparatus for matching pictures according to the embodiment of the present invention further includes:
- the candidate result set determining module 407 is configured to put all the pictures in the database whose matching ratio is smaller than the first proportional threshold greater than the second proportional threshold and the Hamming distance is greater than or equal to the set second distance threshold into the candidate result set;
- the calculating module 403 is further configured to use, for each picture in the candidate result set, each local feature of the picture to be matched with each local feature of the picture input by the user, and calculate the picture and the picture input by the user.
- the matching ratio of local features is further configured to use, for each picture in the candidate result set, each local feature of the picture to be matched with each local feature of the picture input by the user, and calculate the picture and the picture input by the user.
- the matching result determining module 404 is further configured to put a picture in the candidate result set with a matching ratio greater than a minimum value into the picture matching result.
- the search device for the picture provided by the embodiment of the present invention, as shown in FIG. 5, includes:
- the input interface 501 is configured to receive a picture to be queried input by the user;
- the image finder 502 is configured to initiate a search for a request for matching a picture with the to-be-queried picture and obtain a picture that matches a local feature of the picture to be queried according to the user inputting the picture to be queried;
- the output interface 503 is configured to return the searched image as a search result to the user.
- the manner in which the search device of the above picture obtains a picture that matches the picture to be queried may be implemented based on the technical solution described in the present invention. such as,
- Extracting local features for the image to be queried input by the user Extracting local features for the image to be queried input by the user
- the search device of the above picture provided by the embodiment of the present invention may be integrated into a product such as a search client during specific implementation.
- a method for matching a picture provided by an embodiment of the present invention, as shown in FIG. 6, includes the following steps:
- the coincidence ratio of the at least two local features of the image to be matched may be directly calculated, thereby determining two Whether the picture is the same picture, the specific implementation process of this step belongs to the prior art, and details are not described herein again.
- whether a plurality of local features include a specific local feature may be specifically implemented by:
- a query is made in the particular set of local features using a plurality of local features, and if included in the set, the local features are determined to be specific local features.
- a specific local feature is that those local features having a large average number of times appear in a single picture, and these local features are easily repeated in a single picture.
- the inventors observed that most of these local features correspond to plaid shirts in the picture, exterior windows of buildings, repeated dots, text areas, etc. If such areas participate in the calculation of local feature coincidence ratios, it will obviously reduce the image matching. The accuracy rate.
- a specific local feature set in the embodiment of the present invention can be generated in advance by:
- the method of extracting local features is the same as the prior art, and the number of extracted local features may be, for example, 100 to 200.
- step S703 determining whether the average number of times counted exceeds the set second threshold, and if so, performing the following step S704, and if not, performing the following step S706;
- the determined specific local feature is saved in a specific local feature set.
- a plurality of specific local features are stored in a specific local feature set for query.
- the average number of occurrences of the local feature in a single picture may be counted according to the following formula:
- the total number of occurrences of the local features in the 150 pictures is 3000
- the coincidence ratios of the two local features of the image to be matched are calculated by using the local features of the overlapped or filtered, and can be implemented in the following manner:
- ⁇ when filtering a specific local feature, ⁇ is zero; when derating a specific local feature, ⁇ is greater than zero and less than 1; filtering is a special case of weight reduction.
- the total number of coincident local features after filtering or de-weighting processing the number of specific local features among the coincident local features * ⁇ + the number of local features other than the specific local features among the coincident local features;
- the total number of local features extracted from two to-be-matched pictures after filtering or de-weighting processing the number of non-coincident local features + the total number of coincident local features after filtering or de-weighting processing.
- the total number of coincident local features after filtering processing the total number of coincident local features in the two to-be-matched pictures - the total number of specific local features;
- the total number of local features extracted from the two images to be matched the total number of local features extracted from the two images to be matched - the total number of specific local features;
- the total number of coincident local features after the weight reduction processing the number of specific local features among the coincident local features * ⁇ + the specific local features among the coincident local features The number of local features;
- the total number of local features extracted from the two images to be matched after the weight reduction processing the number of non-coincident local features + the number of specific local features among the coincident local features * ⁇ + the overlapping local features except the specific The number of local features outside the local features.
- the extracted local features are 100
- the coincident local features are 3, and the specific local features are 1.
- the image search method provided by the embodiment of the present invention, as shown in FIG. 8, includes the following steps:
- the step of searching for a picture similar to the picture input by the user in the above S802 is provided by using the embodiment of the present invention.
- the matching method of the above picture is implemented.
- the acquisition of similar pictures is implemented based on the method steps of the present invention. For example, respectively extracting a plurality of local features corresponding to the image to be matched input by the user and one or more pictures in the search engine database; filtering or decrementing the specific local features included in the plurality of local features Processing, the specific local feature is a local feature that appears in a single picture and whose average number of times is greater than a set threshold; and calculates a coincidence ratio of local features of each to-be-matched picture after the specific local feature filtering or weight reduction processing, and determines Whether the picture to be matched is similar to one or more pictures in the database.
- an embodiment of the present invention further provides a picture matching device and a picture search device. Since the principle of solving the problem is similar to the matching method of the foregoing picture and the picture search method, the implementation of the device is implemented. See the implementation of the foregoing method, and the repeated description will not be repeated.
- the matching device for the picture provided by the embodiment of the present invention, as shown in FIG. 9, includes:
- the extractor 901 is configured to respectively extract a plurality of local features in at least two to-be-matched pictures;
- a filtering/degrading processing module 902 configured to filter or de-weight a specific local feature included in the plurality of local features, where the average number of occurrences in a single image is greater than a set threshold feature;
- the calculating module 903 is configured to calculate a coincidence ratio of local features of each to-be-matched picture after the specific local feature filtering or weight reduction processing;
- the similarity determining module 904 is configured to determine the similarity between the to-be-matched pictures according to the coincidence ratio.
- the similarity determining module 904 in the matching device of the foregoing picture is specifically configured to: when the coincidence ratio of the local features of each to-be-matched picture after the specific local feature filtering or the weight reduction processing is greater than the set first threshold And determining that each of the to-be-matched pictures is similar.
- the matching device of the above picture further includes: a specific local feature determining module 905, configured to perform statistics on local features in all the pictures in the database in advance, and obtain the representative local features in a single picture. The statistical value of the average number of occurrences; when the average number of times counted exceeds the set threshold, the local feature is determined to be a specific local feature.
- a specific local feature determining module 905 configured to perform statistics on local features in all the pictures in the database in advance, and obtain the representative local features in a single picture. The statistical value of the average number of occurrences; when the average number of times counted exceeds the set threshold, the local feature is determined to be a specific local feature.
- the matching device of the above picture further includes: a specific local feature library 906; wherein:
- the specific local feature determining module 905 is further configured to generate a specific local feature set corresponding to the determined specific local feature
- a specific local feature library 906 for storing a specific local feature set
- the filtering/degrading processing module 902 is further configured to determine a specific local feature included in the plurality of local features by querying the specific local feature set.
- the specific local feature determining module 905 is specifically configured to calculate an average number of times the local feature appears in a single picture according to the following formula:
- the calculating module 903 is specifically configured to determine a specific local feature filtering or weighted weight value ⁇ , and calculate a coincidence ratio of the two local features of the image to be matched according to the following formula:
- the value of ⁇ when filtering a specific local feature, the value of ⁇ is zero; when the specific local feature is degraded, the value of ⁇ is greater than zero and less than 1;
- the total number of coincident local features after filtering or de-weighting processing the number of the specific local features in the coincident local features * ⁇ + the number of local features other than the specific local features among the coincident local features ;
- the total number of local features extracted from the two to-be-matched pictures after filtering or de-weighting processing the number of non-coincident local features + the total number of coincident local features after filtering or de-weighting processing.
- a device for searching for a picture includes:
- the receiving interface 1001 is configured to receive a picture to be matched input by the user;
- the searching module 1002 is configured to search for a similar picture related to the picture to be matched input by the user, and search for a picture similar to the picture input by the user;
- the sending interface 1003 is configured to return the searched image to the user as a search result.
- the search device of the above picture the acquisition of the similar picture is implemented based on the technical solution of the present invention.
- the search engine respectively extracts a plurality of local features in the one or more pictures in the image to be matched input by the user and the image database; and filters or decrements the specific local features included in the plurality of local features.
- the specific local feature is a local feature that appears in a single picture and whose average number of times is greater than a set threshold; and calculates a coincidence ratio of local features of each to-be-matched picture after the specific local feature filtering or weight reduction processing, and determines Whether the picture to be matched is similar to one or more pictures in the database.
- the matching device of the above-mentioned picture provided by the embodiment of the present invention may be integrated into a search engine, and the image and search device provided by the embodiment of the present invention may be integrated into the search client.
- the matching method, the searching method and the device for the picture provided by the embodiment of the present invention determine whether there is a local feature in the single picture that has an average number of times greater than a set threshold among the overlapping local features of the two pictures to be matched.
- Class features are features that are easily recurring in the image. If such reproducible features exist, such features are filtered or reduced, and then the local features of the coincidence after filtering or decrementing are used to calculate two The ratio of the coincidence of the local features between the pictures to be matched is determined according to the calculated coincidence ratio to determine whether the two pictures are the same picture.
- the embodiment of the present invention filters or degrades the local features that are easily repeated in the picture, and can achieve a high matching accuracy rate, compared with the prior art geometric verification method.
- the processing is simple, the memory consumption is low, and the efficiency is high.
- modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment.
- the modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components.
- any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed, or All processes or units of the device are combined.
- Each feature disclosed in this specification (including the accompanying claims, the abstract and the drawings) may be replaced by alternative features that provide the same, equivalent or similar purpose.
- the various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or a digital signal processor (DSP) can be used in practice to implement a device for searching for matching pictures, a picture search device, and a matching device for a picture, a search device, according to an embodiment of the present invention. Some or all of the features of some or all of the components.
- the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein. Such a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
- Figure 11 illustrates a computing device that can implement a method of transferring data between smart terminals.
- the computing device conventionally includes a processor 1110 and a computer program product or computer readable medium in the form of a memory 1120.
- the memory 1120 may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read Only Memory), an EPROM, a hard disk, or a ROM.
- Memory 1120 has a memory space 1130 for program code 1131 for performing any of the method steps described above.
- the storage space 1130 for program code may include respective program codes 1131 for implementing various steps in the above methods, respectively.
- the program code can be read from or written to one or more computer program products.
- the fixed storage unit may have a storage segment, a storage space, and the like that are similarly arranged to the storage 1120 in the computing device of FIG.
- the program code can be compressed, for example, in an appropriate form.
- the storage unit includes computer readable code 1131 ', ie, code readable by a processor, such as, for example, 1110, which when executed by a computing device causes the computing device to perform each of the methods described above step.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Library & Information Science (AREA)
- Software Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Processing Or Creating Images (AREA)
Abstract
本发明提供了一种搜索匹配图片的方法、图片搜索方法及装置,以及一种图片的匹配方法、搜索方法及其装置。其中,搜索匹配图片的方法,包括:对用户输入的待查询图片提取局部特征;将图片数据库中每个图片的局部特征,与所述待查询图片的局部特征进行匹配,确定所述数据库中的每个图片与所述待查询图片的局部特征的匹配比例;将所述数据库中匹配比例大于等于第一比例阈值的图片,放入图片匹配结果中;对于所述数据库中匹配比例小于第一比例阈值大于第二比例阈值的每个图片,计算该图片的感知哈希值与所述待查询图片的感知哈希值之间的汉明距离,将其中汉明距离小于设定的第一距离阈值的图片,放入所述图片匹配结果中;所述第一比例阈值大于第二比例阈值。
Description
本发明涉及互联网技术领域,特别是一种搜索匹配图片的方法、图片搜索方法及装置,以及一种图片的匹配方法、搜索方法及其装置。
在互联网上,有很多图片会被不同的网站转载,在转载过程中每个网站可能都会对图片进行处理(缩放、裁剪、加水印、旋转及各种PS等)。将这些图片内容相似但经过不同操作得到的图片识别出来,在许多领域都可能用到,例如应用在搜索、去重、过滤等相关产品中。
以搜索引擎为例,以前搜索引擎在进行搜索时,只要给出足够的关键词就可以搜到想要的东西。但是对于图片搜索来说,如果用户想要找到和一张图片内容相似的所有图片,但是手头没有关键词,只有“关键图”,例如用户手上已经有一张图片,想要找一张尺寸更大的,或是没有水印的,或是PS处理之前的原图;在这种情况和前提下,需要对用户输入的图片(为了方便说明,以下称为待查询的图片),搜索与该图片内容相似的图片(或者说是与该图片相匹配的图片)作为搜索结果提供给用户。
目前匹配图片的搜索技术中,使用比较多的是基于图片局部特征的方法,即,从待识别的图片中提取大量局部特征,将待识别的图片表示为局部特征的集合。比较两幅图片的相似度时,以局部特征集合的重合比例作为比较标准,当两个图片的局部特征集合的重合比例高于某个固定阈值时则认为两幅图片是相同的;对于不同类型的图片,由于图片中提取的局部特征数目不同、重复纹理导致的重复局部特征数目不同等原因,局部特征集合重合比例的阈值差异较大。如果阈值选择不恰当,例如当阈值设的过高,会有很多实际匹配的图片无法被搜索出来(即准确匹配的图片数量相对少);而阈值设的过低,则会搜出来很多错误匹配的图片,错误图片与原图在整体视觉上往往没有任何相似性。
发明内容
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的搜索匹配图片的方法、图片搜索方法及装置,以及图片的匹配方法、搜索方法及其装置。
根据本发明的一方面,提供了一种搜索匹配图片的方法,包括:对用户输入的待查询图片提取局部特征;将图片数据库中每个图片的局部特征,与所述待查询图片的局部特征进行匹配,确定所述数据库中的每个图片与所述待查询图片的局部特征的匹配比例;将所述数据库中匹配比例大于等于第一比例阈值的图片,放入图片匹配结果中;对于所述数据库中匹配比例小于第一比例阈值大于第二比例阈值的每
个图片,计算该图片的感知哈希值与所述待查询图片的感知哈希值之间的汉明距离,将其中汉明距离小于设定的第一距离阈值的图片,放入所述图片匹配结果中;所述第一比例阈值大于第二比例阈值。
根据本发明的另一方面,提供了一种图片搜索方法,包括:
接收用户输入的待查询图片,提取所述待查询图片的局部特征;基于所述待查询图片的局部特征搜索与用户输入所述待查询的图片相匹配的图片;将搜索到的图片作为搜索结果返回给用户。
根据本发明的又一方面,还提供了一种搜索匹配图片的装置,包括:
待查询图片提取器,用于对所述待查询图片提取局部特征;
匹配比例确定模块,用于将图片数据库中每个图片的局部特征,与所述待查询图片的局部特征进行匹配,确定所述数据库中的每个图片与所述待查询图片的局部特征的匹配比例;
计算模块,用于对于所述数据库中匹配比例小于第一比例阈值大于第二比例阈值的每个图片,计算该图片的感知哈希值与所述待查询图片的感知哈希值之间的汉明距离;
匹配结果确定模块,用于根据匹配比例确定模块的确定结果,将所述数据库中匹配比例大于等于第一比例阈值的图片,以及所述数据库中匹配比例小于第一比例阈值大于第二比例阈值且汉明距离小于设定的第一距离阈值的图片放入图片匹配结果中;所述第一比例阈值大于第二比例阈值。
根据本发明的又一方面,还提供了一种图片的搜索装置,包括:
输入接口,用于接收用户输入的待查询图片;
图片查询器,发起搜索与所述待查询图片相匹配图片的请求并获取基于所述待查询图片的局部特征的与用户输入所述待查询的图片相匹配的图片;
输出接口,用于将搜索到的图片作为搜索结果返回给用户。
本发明实施例的有益效果包括:
本发明实施例提供的一种搜索匹配图片的方法、图片搜索方法及装置,通过设定两个匹配阈值-第一比例阈值和第二比例阈值,其中,第一比例阈值大于第二比例阈值,在使用较大的那个匹配阈值来进行局部特征匹配(即:将数据库中匹配比例大于等于第一比例阈值的图片,放入图片匹配结果中),并在此基础上,对于匹配比例小于第一比例阈值大于第二比例阈值的每个图片,再使用感知哈希的匹配方式进行筛选,计算匹配比例小于第一比例阈值大于第二比例阈值的每个图片的感知哈希值与用户输入的图片的感知哈希值之间的汉明距离,将其中汉明距离小于设定的第一距离阈值的图片也放入图片匹配结果中,一方面使用较大的匹配阈值保证了图片的匹配准确性,另一方面,对于局部特征匹配重合比例在较大匹配阈值和较小匹配阈值之间的图片,进一步利用感知哈希的方式进行筛选,在保证筛选的图片的准确性的前提下,增加了搜索结果中图片数量。
根据本发明的又一方面,还提供了一种图片的匹配方法,包括:
分别提取至少两张待匹配图片中的多个局部特征;将所述多个局部特征中包含
的特定局部特征进行过滤或降权处理,所述特定局部特征为在单个图片中出现的平均次数大于设定阈值的局部特征;计算经过所述特定局部特征过滤或降权处理后的各待匹配图片的局部特征的重合比例,确定所述待匹配图片之间的相似性。
根据本发明的又一方面,还提供了一种图片的匹配装置,包括:
提取器,用于分别提取至少两张待匹配图片中的多个局部特征;
过滤/降权处理模块,用于将所述多个局部特征中包含的特定局部特征进行过滤或降权处理,所述特定局部特征为在单个图片中出现的平均次数大于设定阈值的局部特征;
计算模块,用于计算经过所述特定局部特征过滤或降权处理后的各待匹配图片的局部特征的重合比例;
相似判定模块,用于根据重合比例,确定所述待匹配图片之间的相似性。
本发明实施例的有益效果包括:
本发明实施例提供的图片的匹配方法、搜索方法及其装置,分别提取至少两张待匹配图片中的多个局部特征,将多个局部特征中包含的特定局部特征进行过滤或降权处理,特定的局部特征为在单个图片中出现的平均次数大于设定阈值的局部特征,这类特征即在图片中容易重复出现的特征,计算经过所述特定局部特征过滤或降权处理后的各待匹配图片的局部特征的重合比例,确定所述待匹配图片之间的相似性。本发明实施例在局部特征匹配方法的基础上,对图片中容易重复出现的局部特征进行过滤或降权处理,能够达到较高的匹配准确率,相对于现有技术中几何校验的方法,处理过程简单,内存消耗少且效率较高。
根据本发明的又一方面,提供了一种计算机程序,其包括计算机可读代码,当所述计算机可读代码在计算设备上运行时,导致所述计算设备执行根据上文所述的搜索匹配图片的方法、图片的匹配方法和/或图片搜索方法。
根据本发明的再一方面,提供了一种计算机可读介质,其中存储了上述的计算机程序。
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:
图1为本发明实施例提供的搜索匹配图片的方法的流程图;
图2为本发明实施例提供的实例的流程图;
图3为本发明实施例提供的本发明实施例提供的图片搜索方法的流程图;
图4为本发明实施例提供的本发明实施例提供的搜索匹配图片的装置的结构示
意图;
图5为本发明实施例提供的图片的搜索装置的结构示意图;
图6为本发明实施例提供的图片的匹配方法的流程图;
图7为本发明实施例提供的生成特定的局部特征的列表的流程图;
图8为本发明实施例提供的图片搜索方法的流程图;
图9为本发明实施例提供的图片的匹配装置的结构示意图;
图10为本发明实施例提供的图片的搜索装置的结构示意图;
图11示意性地示出了用于执行根据本发明的搜索匹配图片的方法、图片的匹配方法和/或图片搜索方法的计算设备的框图;以及
图12示意性地示出了用于保持或者携带实现根据本发明的搜索匹配图片的方法、图片的匹配方法和/或图片搜索方法的程序代码的存储单元。
下面结合附图和具体的实施方式对本发明作进一步的描述。
下面结合说明书附图,对本发明实施例提供的一种搜索匹配图片的方法、图片搜索方法及装置的具体实施方式进行说明。
本发明实施例提供的搜索匹配图片的方法,对现有基于局部特征匹配进行图片匹配的方法进行了改进,将基于感知哈希进行图片匹配的方法融入到基于局部特征匹配进行图片匹配的方法之中,综合利用局部特征和感知哈希,在满足图片搜索结果的数量的基础上,保证搜索结果的准确性。
基于感知哈希进行图片匹配的方法,简单来说,就是对一幅图片提取出感知特征用于描述图片整体。每个图片会表示成一个固定长度(64位)的01二进制串,如果两个二进制串的汉明距离(不同的位的数目)低于一定阈值,则认为两幅图片是相匹配的图片。
具体来说,本发明实施例提供的图片匹配的方法,如图1所示,包括以下步骤:
S101、对用户输入的待查询图片提取局部特征;
在本步骤中,提取的局部特征的数量可以预先设定;
S102、将图片数据库中每个图片的局部特征,与用户输入的图片(即待查询的图片)的局部特征进行匹配,确定数据库中的每个图片与用户输入的图片的局部特征的匹配比例;
S103、将数据库中匹配比例大于等于第一比例阈值的图片,放入图片匹配结果中;
S104、对于数据库中匹配比例小于第一比例阈值大于第二比例阈值的每个图片,计算该图片的感知哈希值与用户输入的图片的感知哈希值之间的汉明距离;
S105、将其中汉明距离小于设定的第一距离阈值的图片,放入图片匹配结果中。
下面分别对上述S101~S105进行详细的说明。
本发明实施例预先设置两个匹配阈值,第一比例阈值和第二比例阈值,其中,第一比例阈值大于第二比例阈值。
上述方法中,还需要执行下述步骤:
在离线状态下,预先对图片数据库中的每个图片进行离线特征提取,包括提取感知哈希值和/或设定数量的局部特征;
提取之后,为了后续搜索匹配的图片的方便,还可以将提取的感知哈希值和设定数量的局部特征进行保存。提取的数量例如可以为几百个。
在保存时,可采用感知哈希值列表和局部特征列表存储于数据库中的存储方式,每个列表中,都保存了图片的标识和对应的多个感知哈希值(多个局部特征)的对应关系。
这样,后续S102和S104就能够直接使用所保存的每个图片提取的局部特征和感知哈希值,进行局部特征匹配和汉明距离的计算,提高运算效率。
上述S101中提取局部特征的步骤,可以采用现有技术的做法,在此不再赘述。
上述S101~S105中,通过设定两个匹配阈值-第一比例阈值和第二比例阈值,第一比例阈值大于第二比例阈值,在使用较大的那个匹配阈值来进行局部特征匹配(即:将数据库中局部特征匹配比例大于等于第一比例阈值的图片,放入图片匹配结果中),并在此基础上,对于匹配比例小于第一比例阈值大于第二比例阈值的每个图片,再使用感知哈希的匹配方式进行筛选,计算匹配比例小于第一比例阈值大于第二比例阈值的每个图片的感知哈希值与用户输入的图片的感知哈希值之间的汉明距离,将其中汉明距离小于设定的第一距离阈值的图片也放入图片匹配结果中,一方面使用较大的匹配阈值保证了图片的匹配准确性,另一方面,对于局部特征匹配重合比例在较大匹配阈值和较小匹配阈值之间的图片,进一步利用感知哈希的方式进行筛选,在保证筛选的图片的准确性的前提下,增加了搜索结果中图片数量。
为了在保证图片搜索准确性的基础上进一步地提高图片的搜索数量,本发明实施例提供的上述图片匹配的方法,还设定了另外一个衡量汉明距离的第二距离阈值,该第二距离阈值小于所述第一距离阈值,相应地,在上述步骤S101~S105的基础上,还执行下述步骤:
确定数据库中匹配比例小于第一比例阈值大于第二比例阈值且汉明距离小于设定的第二距离阈值的所有图片并放入参照集合中;
针对参照集合中的每个图片,使用该图片的各局部特征,与用户输入的图片的各局部特征进行匹配,计算该图片与用户输入的图片的局部特征的匹配比例;
确定参照集合中每个图片对应的匹配比例中的最小值。
上述参照集合是使用局部特征匹配的匹配比例小于第一比例阈值大于第二比例阈值的图片中,使用感知哈希匹配的汉明距离小于第二距离阈值(第二比例阈值小于第一距离阈值)的图片,该参照集合是上述S105中确定出来的汉明距离小于设定的第一距离阈值的图片的子集,换言之,该参照集合是局部特征匹配的匹配比例小于第一比例阈值大于第二比例阈值、且汉明距离小于设定的第一距离阈值的所有图片中,更为接近用户输入的图片的那些图片,使用这些图片的局部特征匹配的匹配比例值的最小值作为参考值(可视为一个与用户输入的图片非常接近的图片),可以从局部特征匹配的匹配比例小于第一比例阈值大于第二比例阈值、且汉明距离大于等于设定的第一距离阈值的所有图片中进一步筛选出与用户输入的图片匹配的图
片,增加图片匹配的选择范围。
因此,在确定参照集合中每个图片对应的匹配比例中的最小值的同时,本发明实施例提供的上述图片匹配的方法,还可以包括:
确定数据库中匹配比例小于第一比例阈值大于第二比例阈值且汉明距离大于等于设定的第二距离阈值的所有图片并放入候选结果集合中;
针对候选结果集合中的每个图片,使用该图片的各局部特征,与用户输入的图片的各局部特征进行匹配,计算该图片与用户输入的图片的局部特征的匹配比例;
将候选结果集合中匹配比例大于最小值的图片放入图片匹配结果中。
基于上述步骤,将候选集合中的匹配比例大于上述最小值的图片放入图片匹配结果中,也就是说,将前述与用户输入的图片非常接近的图片作为参考,将候选集合中的图片中局部特征匹配比例值大于该参考的图片的局部特征匹配比例值的图片,再次作为搜索结果中的图片,在保证图片匹配准确性的前提下,进一步提高了增加了搜索结果中图片数量。
为了更好地说明上述方法,以下以一个实际的例子来说明,如图2所示,该方法的流程说明如下:
预先设置四个阈值,即:A1、A2(用于局部特征,A1>A2);B1、B2(用于感知哈希,B1>B2)。
首先对图片数据库中的每幅图片进行离线特征提取,包括64位的感知哈希和局部特征集合(集合元素数目不限定,约几百个)。
并且,对用户输入的待查询图片同样提取感知哈希和局部特征。
然后,将局部特征匹配比例大于等于A1的图片放入结果图片集合R,小于A1但大于A2的图片放入候选图片集M。
进一步地,将图片集M中的所有图片中感知哈希的汉明距离小于B1的图片放入结果图片集合R,其余图片(感知哈希距离大于等于B1)放入候选集合S,而所有小于B2的图片同时放入调整参照集N。(调整参照集N中的图片是由于感知哈希跟查询图片非常接近,所以用来指导调整局部特征匹配阈值)。
对图片集N中的所有图片,取其中跟查询图片局部特征匹配比例的最小值K。
然后遍历图片集S,将局部特征匹配比例超过K的图片放入结果图片集合R。
从而所有结果图片集合R中的图片即为搜索结果。
相对于完全使用局部特征匹配的方法,上述图2提供的方法,一方面使用感知哈希来自适应的调整局部特征匹配阈值(将匹配阈值由A1降到K),另一方面感知哈希和局部特征融合也协助增加了搜索结果的数量(局部哈希匹配比例在A2和K之间同时感知哈希距离小于B1的图片会加入到结果集)。
另外,相对于现有技术中完全使用感知哈希进行图片匹配的方法,上述图2提供的方法通过局部特征来克服图片裁剪、旋转等操作导致的图片不能判断为相同的问题是相当有效的,克服了仅依靠感知哈希进行图片匹配带来的对图片操作(尤其是裁剪)表现的不够鲁棒,无法对经过裁剪、加水印等操作后的图片进行准确匹配的问题。
本发明实施例提供的图片搜索方法,如图3所示,包括下述步骤:
S301、接收用户输入的待查询图片,提取所述待查询图片的局部特征;
S302、基于所述待查询图片的局部特征搜索与用户输入所述待查询的图片相匹配的图片;
S303、将搜索到的图片作为搜索结果返回给用户。
其中,上述S302中搜索与用户输入的图片相同的图片的步骤可以采用本发明提供的上述搜索匹配图片的方法,具体实施过程参见前述搜索匹配图片的方法。比如,
比如,进一步地,上述步骤S302可包括
对用户输入的待查询图片提取局部特征;
提取图片数据库中每个图片的局部特征,与所述待查询图片的局部特征进行匹配,确定所述数据库中的每个图片与所述待查询图片的局部特征的匹配比例;
将所述数据库中匹配比例大于等于第一比例阈值的图片,放入图片匹配结果集合中;
对于所述数据库中匹配比例小于第一比例阈值大于第二比例阈值的每个图片,计算该图片的感知哈希值与所述待查询图片的感知哈希值之间的汉明距离,将其中汉明距离小于设定的第一距离阈值的图片,放入图片匹配结果中;所述第一比例阈值大于第二比例阈值;所述图片匹配结果中的图片作为与待查询图片相匹配的图片。
基于同一发明构思,本发明实施例还提供了一种搜索匹配图片的装置和图片的搜索装置,由于这些装置所解决问题的原理与前述搜索匹配图片的方法和图片的搜索方法相似,因此该装置的实施可以参见前述方法的实施,重复之处不再赘述。
本发明实施例提供的搜索匹配图片的装置,如图4所示,包括:
待查询图片提取器401,用于对用户输入的待查询图片提取局部特征;
匹配比例确定模块402,用于将图片数据库中每个图片的局部特征,与所述待查询图片的局部特征进行匹配,确定所述数据库中的每个图片与所述待查询图片的局部特征的匹配比例;
计算模块403,用于对于数据库中匹配比例小于第一比例阈值大于第二比例阈值的每个图片,计算该图片的感知哈希值与用户输入的图片的感知哈希值之间的汉明距离;
匹配结果确定模块404,用于根据匹配比例确定模块402的确定结果,将数据库中匹配比例大于等于第一比例阈值的图片,以及数据库中匹配比例小于第一比例阈值大于第二比例阈值且汉明距离小于设定的第一距离阈值的图片放入图片匹配结果中;其中,第一比例阈值大于第二比例阈值。
进一步地,上述搜索匹配图片的装置,如图4所示,还包括:存储模块405;
相应地,上述待查询图片提取器401,还用于预先对图片数据库中的每个图片进行离线特征提取,所述离线特征包括感知哈希值和设定数量的局部特征;
存储模块405,用于保存预先提取的数据库中的每个图片的感知哈希值和设定数量的局部特征。
上述存储模块405,在具体实施时,可采用数据库的形式。
本发明实施例提供的图片匹配的装置,如图4所示,还包括:
参照集合确定模块406,用于确定数据库中匹配比例小于第一比例阈值大于第
二比例阈值且汉明距离小于设定的第二距离阈值的所有图片并放入参照集合中;第二距离阈值小于所述第一距离阈值;
相应地,上述计算模块403,还用于针对参照集合中的每个图片,使用该图片的各局部特征,与用户输入的图片的各局部特征进行匹配,计算该图片与用户输入的图片的局部特征的匹配比例;并确定参照集合中每个图片对应的匹配比例中的最小值。
本发明实施例提供的图片匹配的装置,如图4所示,还包括:
候选结果集合确定模块407,用于将数据库中匹配比例小于第一比例阈值大于第二比例阈值且汉明距离大于等于设定的第二距离阈值的所有图片放入候选结果集合中;
相应地,上述计算模块403,还用于针对候选结果集合中的每个图片,使用该图片的各局部特征,与用户输入的图片的各局部特征进行匹配,计算该图片与用户输入的图片的局部特征的匹配比例;
匹配结果确定模块404,还用于将候选结果集合中匹配比例大于最小值的图片放入图片匹配结果中。
本发明实施例提供的图片的搜索装置,如图5所示,包括:
输入接口501,用于接收用户输入的待查询图片;
图片查询器502,用于发起搜索与所述待查询图片相匹配图片的请求并获取基于所述待查询图片的局部特征的与用户输入所述待查询的图片相匹配的图片;
输出接口503,用于将搜索到的图片作为搜索结果返回给用户。
进一步地,上述图片的搜索装置,其获取与待查询图片相匹配的图片的方式,可以基于本发明所述的技术方案实现。比如,
对用户输入的待查询图片提取局部特征;
提取图片数据库中每个图片的局部特征,与所述待查询图片的局部特征进行匹配,确定所述数据库中的每个图片与所述待查询图片的局部特征的匹配比例;
将所述数据库中匹配比例大于等于第一比例阈值的图片,放入图片匹配结果集合中;
对于所述数据库中匹配比例小于第一比例阈值大于第二比例阈值的每个图片,计算该图片的感知哈希值与所述待查询图片的感知哈希值之间的汉明距离,将其中汉明距离小于设定的第一距离阈值的图片,放入图片匹配结果中;所述第一比例阈值大于第二比例阈值;获取所述图片匹配结果中的图片作为与待查询图片相匹配的图片。
本发明实施例提供的上述图片的搜索装置,在具体实施时,可以集成于搜索客户端等产品中。
本发明实施例提供的一种图片的匹配方法,如图6所示,包括以下步骤:
S601、分别提取至少两张待匹配图片中的多个局部特征;
S602、将所述多个局部特征中包含的特定局部特征进行过滤或降权处理,所述特定局部特征为在单个图片中出现的平均次数大于设定阈值的局部特征;
S603、计算经过特定局部特征过滤或降权处理后的各待匹配图片的局部特征的重合比例,确定所述待匹配图片之间的相似性。
下面分别对上述各步骤进行详细的说明。
上述流程中,如果多个局部特征中未包含特定的局部特征,本发明实施例提供的图片的匹配方法中,可直接计算该至少两张待匹配的图片局部特征的重合比例,进而判断两张图片是否为相同图片,该步骤的具体实施过程属于现有技术,在此不再赘述。
进一步地,S602中,多个局部特征中是否包含特定的局部特征,具体可以通过下述方式实现:
使用多个局部特征,在该特定的局部特征集合中进行查询,如果该集合中包含,则确定该局部特征为特定的局部特征。
在本发明实施例中,特定的局部特征即在单个图片中出现平均次数较大的那些局部特征,这些局部特征容易在单张图片中重复出现。发明人观察发现,这类局部特征大多对应的是图片中的格子衫、大厦外部窗户、重复的圆点、文字区域等等,如果这类区域参与局部特征重合比例的计算,显然会降低图片匹配的准确率。
为此,本发明实施例中特定的局部特征集合,如图7所示,可以预先通过下述方式生成:
S701、在离线状态下,预先对数据库中的所有图片,分别提取设定数量的局部特征;
离线预处理的这种方式,可以提高图片匹配过程的速度和效率。
提取局部特征的方法与现有技术相同,提取局部特征的数量例如可以为100~200个。
S702、对于提取的每个局部特征,统计该局部特征在单个图片中出现的平均次数;
S703、判断统计出的平均次数是否超出设定的第二阈值,若是,执行下述步骤S704,若否,执行下述步骤S706;
S704、确定该局部特征为特定的局部特征;
S705、将确定的该特定的局部特征放入特定的局部特征集合中保存。
S706、结束流程。
经过上述流程后,特定的局部特征集合中保存有多个特定的局部特征以便查询。
进一步地,上述S702中,可按照下述公式统计该局部特征在单个图片中出现的平均次数:
需要说明的是,上述公式并不是实现本发明的唯一公式,仅作为实施例的一种实现方式。技术人员可以根据业务需要对公式做适当变形,依然落在本发明的范围之内,例如增添参数或倍数值等。
举例来说,假设有总数为1000张的图片,其中出现有某个局部特征的图片有
150张,该局部特征在这150张图片中出现的总次数为3000次,则该局部特征在单个图片中出现的平均次数为3000/150=2。
上述S603中,使用经过过滤或降权处理后的各重合的局部特征,计算两张待匹配的图片局部特征的重合比例,在具体实施时,可以通过下述方式实现:
确定特定的局部特征过滤或者降权后的权重值α;
按照下述公式计算两张待匹配的图片局部特征的重合比例:
其中,对特定的局部特征进行过滤时,α取值为零;对特定的局部特征进行降权时,α取值大于零小于1;过滤是降权的一种特殊情形。
经过过滤或降权处理后的重合的局部特征的总数=重合的局部特征中特定的局部特征的数目*α+重合的局部特征中除特定的局部特征之外的局部特征的数目;
经过过滤或降权处理后的从两张待匹配的图片中提取的局部特征的总数=非重合的局部特征的数目+经过过滤或降权处理后的重合的局部特征的总数。
具体地,如果是采用过滤的方式,经过过滤处理后的重合的局部特征的总数=两张待匹配图片中重合的局部特征的总数—特定的局部特征的总数;
经过过滤后的从两张待匹配的图片中提取的局部特征的总数=从两张待匹配的图片中提取的局部特征的总数—特定的局部特征的总数;
需要说明的是,上述公式并不是实现本发明的唯一公式,仅作为实施例的一种实现方式。技术人员可以根据业务需要对公式做适当变形,依然落在本发明的范围之内,例如增添参数或倍数值等。
举例来说,假设提取的局部特征为100个,重合的局部特征为3个,其中特定的局部特征为1个,则采用过滤的方式,计算出两张待匹配的图片局部特征的重合比例=(3-1)/(100-1)=2/99。
具体地,如果是采用降权的方式,则经过降权处理后的重合的局部特征的总数=重合的局部特征中特定的局部特征的数目*α+重合的局部特征中特定的局部特征之外的局部特征的数目;
经过降权处理后的从两张待匹配的图片中提取的局部特征的总数=非重合的局部特征的数目+重合的局部特征中特定的局部特征的数目*α+重合的局部特征中除了特定的局部特征之外的局部特征的数目。
假设α=0.5,提取的局部特征为100个,重合的局部特征为3个,其中特定的局部特征为1个,采用降权的方式,计算出两张待匹配的图片局部特征的重合比例=(0.5+2)/(0.5+2+97)=2.5/99.5。
本发明实施例提供的图片搜索方法,如图8所示,包括下述步骤:
S801、接收用户输入的待匹配图片;
S802、搜索与用户输入的所述待匹配图片相关的相似的图片;
S803、将搜索到的相似图片作为搜索结果返回给用户。
上述S802中搜索与用户输入的图片相似的图片的步骤,采用本发明实施例提供
的上述图片的匹配方法来实现。
进一步地,上述图片搜索方法,其相似图片的获取基于本发明所述的方法步骤实现。比如,分别提取用户输入的待匹配图片与搜索引擎数据库中的一张或多张图片中的相对应的多个局部特征;将所述多个局部特征中包含的特定局部特征进行过滤或降权处理,所述特定局部特征为在单个图片中出现的平均次数大于设定阈值的局部特征;计算经过所述特定局部特征过滤或降权处理后的各待匹配图片的局部特征的重合比例,确定所述待匹配图片是否与数据库中的一张或多张图片相似。
基于同一发明构思,本发明实施例还提供了一种图片的匹配装置、图片的搜索装置,由于这些装置所解决问题的原理与前述图片的匹配方法、图片的搜索方法相似,因此该装置的实施可以参见前述方法的实施,重复之处不再赘述。
本发明实施例提供的图片的匹配装置,如图9所示,包括:
提取器901,用于分别提取至少两张待匹配图片中的多个局部特征;
过滤/降权处理模块902,用于将所述多个局部特征中包含的特定局部特征进行过滤或降权处理,所述特定局部特征为在单个图片中出现的平均次数大于设定阈值的局部特征;
计算模块903,用于计算经过所述特定局部特征过滤或降权处理后的各待匹配图片的局部特征的重合比例;
相似判定模块904,用于根据重合比例,确定所述待匹配图片之间的相似性。
进一步地,上述图片的匹配装置中的相似判定模块904,具体用于当经过所述特定局部特征过滤或降权处理后的各待匹配图片的局部特征的重合比例大于设定的第一阈值时,确定所述各待匹配图片相似。
进一步地,上述图片的匹配装置,如图9所示,还包括:特定局部特征确定模块905,用于预先对数据库中的所有图片中的局部特征进行统计,得到代表该局部特征在单个图片中出现的平均次数的统计值;当统计出的平均次数超出设定的阈值时,确定局部特征为特定局部特征。
进一步地,上述图片的匹配装置,如图9所示,还包括:特定局部特征库906;其中:
特定局部特征确定模块905,还用于将确定出的特定的局部特征生成对应的特定局部特征集合;
特定局部特征库906,用于保存特定局部特征集合;
过滤/降权处理模块902,进一步用于通过查询特定局部特征集合确定多个局部特征中包含的特定局部特征。
进一步地,上述特定局部特征确定模块905,具体用于按照下述公式统计该局部特征在单个图片中出现的平均次数:
需要说明的是,上述公式并不是实现本发明的唯一公式,仅作为实施例的一种实现方式。技术人员可以根据业务需要对公式做适当变形,依然落在本发明的范围
之内,例如增添参数或倍数值等。
进一步地,上述计算模块903,具体用于确定特定的局部特征过滤或者降权后的权重值α,按照下述公式计算所述两张待匹配的图片局部特征的重合比例:
其中,对特定的局部特征进行过滤时,α取值为零;对特定的局部特征进行降权时,α取值大于零小于1;
上述经过过滤或降权处理后的重合的局部特征的总数=重合的局部特征中所述特定的局部特征的数目*α+重合的局部特征中除该特定的局部特征之外的局部特征的数目;
上述经过过滤或降权处理后的从两张待匹配的图片中提取的局部特征的总数=非重合的局部特征的数目+经过过滤或降权处理后的重合的局部特征的总数。
需要说明的是,上述公式并不是实现本发明的唯一公式,仅作为实施例的一种实现方式。技术人员可以根据业务需要对公式做适当变形,依然落在本发明的范围之内,例如增添参数或倍数值等。
本发明实施例提供的一种图片的搜索装置,如图10所示,包括:
接收接口1001,用于接收用户输入的待匹配图片;
搜索模块1002,用于搜索与用户输入的待匹配图片相关的相似图片,搜索与用户输入的图片相似的图片;
发送接口1003,用于将搜索到的图片作为搜索结果返回给用户。
进一步地,上述图片的搜索装置,其相似图片的获取基于本发明技术方案来实现。比如,搜索引擎分别提取用户输入的待匹配图片与图片数据库中的一张或多张图片中的相对应多个局部特征;将所述多个局部特征中包含的特定局部特征进行过滤或降权处理,所述特定局部特征为在单个图片中出现的平均次数大于设定阈值的局部特征;计算经过所述特定局部特征过滤或降权处理后的各待匹配图片的局部特征的重合比例,确定所述待匹配图片是否与数据库中的一张或多张图片相似。
本发明实施例提供的上述图片的匹配装置在具体实施时,可集成于搜索引擎中,本发明实施例提供的上述图片的和搜索装置,可以集成于搜索客户端中。
本发明实施例提供的图片的匹配方法、搜索方法及其装置,在两个待匹配的图片的重合的局部特征之中,确定是否存在单个图片中出现平均次数大于设定阈值的局部特征,这类特征即在图片中容易重复出现的特征,若存在这类容易重复出现的特征,对这类特征进行过滤或降权处理,然后使用过滤或降权处理后的重合的局部特征,计算两张待匹配的图片之间局部特征的重合比例,根据计算出的重合比例来判定两张图片是否为相同的图片。本发明实施例在局部特征匹配的方法的基础上,对图片中容易重复出现的局部特征进行过滤或降权处理,能够达到较高的匹配准确率,相对于现有技术中几何校验的方法,处理过程简单,内存消耗少且效率较高。
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的
实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的搜索匹配图片的装置、图片搜索装置,以及图片的匹配装置、搜索装置中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。
例如,图11示出了可以实现在智能终端之间传输数据的方法的计算设备。该计算设备传统上包括处理器1110和以存储器1120形式的计算机程序产品或者计算机可读介质。存储器1120可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存储器1120具有用于执行上述方法中的任何方法步骤的程序代码1131的存储空间1130。例如,用于程序代码的存储空间1130可以包括分别用于实现上面的方法中的各种步骤的各个程序代码1131。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘,紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为如参考图12所述的便携式或
者固定存储单元。该存储单元可以具有与图11的计算设备中的存储器1120类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括计算机可读代码1131’,即可以由例如诸如1110之类的处理器读取的代码,这些代码当由计算设备运行时,导致该计算设备执行上面所描述的方法中的各个步骤。
本文中所称的“一个实施例”、“实施例”或者“一个或者多个实施例”意味着,结合实施例描述的特定特征、结构或者特性包括在本发明的至少一个实施例中。此外,请注意,这里“在一个实施例中”的词语例子不一定全指同一个实施例。
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。
此外,还应当注意,本说明书中使用的语言主要是为了可读性和教导的目的而选择的,而不是为了解释或者限定本发明的主题而选择的。因此,在不偏离所附权利要求书的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。对于本发明的范围,对本发明所做的公开是说明性的,而非限制性的,本发明的范围由所附权利要求书限定。
Claims (20)
- 一种搜索匹配图片的方法,包括:对用户输入的待查询图片提取局部特征;将图片数据库中每个图片的局部特征,与所述待查询图片的局部特征进行匹配,确定所述数据库中的每个图片与所述待查询图片的局部特征的匹配比例;将所述数据库中匹配比例大于等于第一比例阈值的图片,放入图片匹配结果中;对于所述数据库中匹配比例小于第一比例阈值大于第二比例阈值的每个图片,计算该图片的感知哈希值与所述待查询图片的感知哈希值之间的汉明距离,将其中汉明距离小于设定的第一距离阈值的图片,放入所述图片匹配结果中;所述第一比例阈值大于第二比例阈值。
- 如权利要求1所述的方法,其中,进一步包括:预先对图片数据库中的每个图片进行离线特征提取,所述离线特征包括感知哈希值和/或设定数量的局部特征。
- 如权利要求1或2所述的方法,其中,还包括:确定所述数据库中匹配比例小于第一比例阈值大于第二比例阈值且汉明距离小于设定的第二距离阈值的所有图片并放入参照集合中;所述第二距离阈值小于所述第一距离阈值;针对所述参照集合中的每个图片,使用该图片的各局部特征,与所述待查询图片的各局部特征进行匹配,计算该图片与所述待查询图片的局部特征的匹配比例;确定所述参照集合中每个图片对应的匹配比例中的最小值。
- 如权利要求1-3任一项所述的方法,其中,还包括:将所述数据库中匹配比例小于第一比例阈值大于第二比例阈值且汉明距离大于等于设定的第二距离阈值的所有图片放入候选结果集合中;针对所述候选结果集合中的每个图片,使用该图片的各局部特征,与所述待查询图片的各局部特征进行匹配,计算该图片与所述待查询图片的局部特征的匹配比例;将候选结果集合中匹配比例大于所述最小值的图片放入图片匹配结果中。
- 一种图片搜索方法,包括:接收用户输入的待查询图片,提取所述待查询图片的局部特征;基于所述待查询图片的局部特征搜索与用户输入所述待查询的图片相匹配的图片;将搜索到的图片作为搜索结果返回给用户。
- 一种图片的匹配方法,包括:分别提取至少两张待匹配图片中的多个局部特征;将所述多个局部特征中包含的特定局部特征进行过滤或降权处理,所述特定局部特征为在单个图片中出现的平均次数大于设定阈值的局部特征;计算经过所述特定局部特征过滤或降权处理后的各待匹配图片的局部特征的重合比例,确定所述待匹配图片之间的相似性。
- 如权利要求6所述的方法,其中,计算经过所述特定局部特征过滤或降权处理后的各待匹配图片的局部特征的重合比例,确定所述待匹配图片之间的相似性,包括:当经过所述特定局部特征过滤或降权处理后的各待匹配图片的局部特征的重合比例大于设定的第一阈值时,确定所述各待匹配图片相似。
- 如权利要求6或7所述的方法,其中,进一步包括:预先对数据库中的所有图片中的局部特征进行统计,得到代表该局部特征在单个图片中出现的平均次数的统计值;当统计出的平均次数超出设定的阈值时,确定所述局部特征为所述特定局部特征。
- 如权利要求6-8任一项所述的方法,其中,进一步还包括:将确定出的所述特定的局部特征生成对应的特定局部特征集合并保存;所述多个局部特征中包含的特定局部特征,通过查询所述特定局部特征集合确定。
- 一种搜索匹配图片的装置,包括:待查询图片提取器,用于对用户输入的待查询图片提取局部特征;匹配比例确定模块,用于将图片数据库中每个图片的局部特征,与所述待查询图片的局部特征进行匹配,确定所述数据库中的每个图片与所述待查询图片的局部特征的匹配比例;计算模块,用于对于所述数据库中匹配比例小于第一比例阈值大于第二比例阈值的每个图片,计算该图片的感知哈希值与所述待查询图片的感知哈希值之间的汉明距离;匹配结果确定模块,用于根据匹配比例确定模块的确定结果,将所述数据库中匹配比例大于等于第一比例阈值的图片,以及所述数据库中匹配比例小于第一比例阈值大于第二比例阈值且汉明距离小于设定的第一距离阈值的图片放入图片匹配结果中;所述第一比例阈值大于第二比例阈值。
- 如权利要求10所述的装置,其中,还包括:存储模块;所述待查询图片提取器,还用于预先对图片数据库中的每个图片进行离线特征提取,所述离线特征包括感知哈希值和/或设定数量的局部特征;所述存储模块,用于保存预先提取的数据库中的每个图片的感知哈希值和设定数量的局部特征。
- 如权利要求10或11所述的装置,其中,还包括:参照集合确定模块,用于确定所述数据库中匹配比例小于第一比例阈值大于第二比例阈值且汉明距离小于设定的第二距离阈值的所有图片并放入参照集合中;所述第二距离阈值小于所述第一距离阈值;所述计算模块,还用于针对所述参照集合中的每个图片,使用该图片的各局部特征,与所述待查询图片的各局部特征进行匹配,计算该图片与所述待查询图片的局部特征的匹配比例;并确定所述参照集合中每个图片对应的匹配比例中的最小值。
- 如权利要求10-12任一项所述的装置,其中,还包括:候选结果集合确定模块,用于将所述数据库中匹配比例小于第一比例阈值大于第二比例阈值且汉明距离大于等于设定的第二距离阈值的所有图片放入候选结果集合中;所述计算模块,还用于针对所述候选结果集合中的每个图片,使用该图片的各局部特征,与所述待查询图片的各局部特征进行匹配,计算该图片与所述待查询图片的局部特征的匹配比例;所述匹配结果确定模块,还用于将候选结果集合中匹配比例大于所述最小值的图片放入图片匹配结果中。
- 一种图片的搜索装置,包括:输入接口,用于接收用户输入的待查询图片;图片查询器,发起搜索与所述待查询图片相匹配图片的请求并获取基于所述待查询图片的局部特征的与用户输入所述待查询的图片相匹配的图片;输出接口,用于将搜索到的图片作为搜索结果返回给用户。
- 一种图片的匹配装置,包括:提取器,用于分别提取至少两张待匹配图片中的多个局部特征;过滤/降权处理模块,用于将所述多个局部特征中包含的特定局部特征进行过滤或降权处理,所述特定局部特征为在单个图片中出现的平均次数大于设定阈值的局部特征;计算模块,用于计算经过所述特定局部特征过滤或降权处理后的各待匹配图片的局部特征的重合比例;相似判定模块,用于根据重合比例,确定所述待匹配图片之间的相似性。
- 如权利要求15所述的装置,其中,所述相似判定模块,具体用于当经过所述特定局部特征过滤或降权处理后的各待匹配图片的局部特征的重合比例大于设定的第一阈值时,确定所述各待匹配图片相似。
- 如权利要求15或16所述的装置,其中,还包括:特定局部特征确定模块,用于预先对数据库中的所有图片中的局部特征进行统计,得到代表该局部特征在单个图片中出现的平均次数的统计值;当统计出的平均次数超出设定的阈值时,确定所述局部特征为所述特定局部特征。
- 如权利要求15-17任一项所述的装置,其中,还包括:特定局部特征库;所述特定局部特征确定模块,还用于将确定出的所述特定的局部特征生成对应的特定局部特征集合;所述特定局部特征库,用于保存所述特定局部特征集合;所述过滤/降权处理模块,进一步用于通过查询所述特定局部特征集合确定所述多个局部特征中包含的特定局部特征。
- 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在计算设备上运行时,导致所述计算设备执行根据权利要求1至9任一项所述的方法。
- 一种计算机可读介质,其中存储了如权利要求19所述的计算机程序。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US15/322,074 US20170154056A1 (en) | 2014-06-24 | 2015-06-23 | Matching image searching method, image searching method and devices |
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410287038.1A CN104036281B (zh) | 2014-06-24 | 2014-06-24 | 一种图片的匹配方法、搜索方法及其装置 |
CN201410287038.1 | 2014-06-24 | ||
CN201410286225.8A CN104036009B (zh) | 2014-06-24 | 2014-06-24 | 一种搜索匹配图片的方法、图片搜索方法及装置 |
CN201410286225.8 | 2014-06-24 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2015196964A1 true WO2015196964A1 (zh) | 2015-12-30 |
Family
ID=54936797
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2015/082070 WO2015196964A1 (zh) | 2014-06-24 | 2015-06-23 | 搜索匹配图片的方法、图片搜索方法及装置 |
Country Status (2)
Country | Link |
---|---|
US (1) | US20170154056A1 (zh) |
WO (1) | WO2015196964A1 (zh) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110196833A (zh) * | 2018-03-22 | 2019-09-03 | 腾讯科技(深圳)有限公司 | 应用程序的搜索方法、装置、终端及存储介质 |
TWI686717B (zh) * | 2016-06-07 | 2020-03-01 | 香港商阿里巴巴集團服務有限公司 | 資料的提取方法、裝置及終端設備 |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105096294B (zh) * | 2014-04-30 | 2019-01-18 | 西门子医疗保健诊断公司 | 用于对尿液沉渣图像的待处理区块进行区块检索的方法和装置 |
JP6274067B2 (ja) * | 2014-10-03 | 2018-02-07 | ソニー株式会社 | 情報処理装置および情報処理方法 |
ITUB20153277A1 (it) * | 2015-08-28 | 2017-02-28 | St Microelectronics Srl | Procedimento per ricerche visuali, sistema, apparecchiatura e prodotto informatico corrispondenti |
CN110070110B (zh) * | 2019-03-28 | 2022-10-21 | 陕西理工大学 | 一种自适应阈值图像匹配方法 |
CN110442738A (zh) * | 2019-07-31 | 2019-11-12 | 北京明略软件系统有限公司 | 图片去重方法和装置,存储介质及电子装置 |
CN110633733B (zh) * | 2019-08-14 | 2024-05-03 | 中国平安财产保险股份有限公司 | 图像智能匹配方法、装置及计算机可读存储介质 |
US11205041B2 (en) | 2019-08-15 | 2021-12-21 | Anil Kumar | Web element rediscovery system and method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102508910A (zh) * | 2011-11-11 | 2012-06-20 | 大连理工大学 | 基于多哈希表映射误差最小化的图像检索方法 |
WO2013115202A1 (ja) * | 2012-01-30 | 2013-08-08 | 日本電気株式会社 | 情報処理システム、情報処理方法、情報処理装置およびその制御方法と制御プログラム、通信端末およびその制御方法と制御プログラム |
CN104036009A (zh) * | 2014-06-24 | 2014-09-10 | 北京奇虎科技有限公司 | 一种搜索匹配图片的方法、图片搜索方法及装置 |
CN104036281A (zh) * | 2014-06-24 | 2014-09-10 | 北京奇虎科技有限公司 | 一种图片的匹配方法、搜索方法及其装置 |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080219495A1 (en) * | 2007-03-09 | 2008-09-11 | Microsoft Corporation | Image Comparison |
US8782077B1 (en) * | 2011-06-10 | 2014-07-15 | Google Inc. | Query image search |
WO2013076364A1 (en) * | 2011-11-21 | 2013-05-30 | Nokia Corporation | Method for image processing and an apparatus |
US9009149B2 (en) * | 2011-12-06 | 2015-04-14 | The Trustees Of Columbia University In The City Of New York | Systems and methods for mobile search using Bag of Hash Bits and boundary reranking |
US20150178786A1 (en) * | 2012-12-25 | 2015-06-25 | Catharina A.J. Claessens | Pictollage: Image-Based Contextual Advertising Through Programmatically Composed Collages |
CN104182719B (zh) * | 2013-05-21 | 2017-06-30 | 宁波华易基业信息科技有限公司 | 一种图像识别方法及装置 |
US10068154B2 (en) * | 2013-08-13 | 2018-09-04 | Logograb Limited | Recognition process of an object in a query image |
JP5808371B2 (ja) * | 2013-08-28 | 2015-11-10 | ヤフー株式会社 | 画像認識装置、画像認識方法及び画像認識プログラム |
-
2015
- 2015-06-23 US US15/322,074 patent/US20170154056A1/en not_active Abandoned
- 2015-06-23 WO PCT/CN2015/082070 patent/WO2015196964A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102508910A (zh) * | 2011-11-11 | 2012-06-20 | 大连理工大学 | 基于多哈希表映射误差最小化的图像检索方法 |
WO2013115202A1 (ja) * | 2012-01-30 | 2013-08-08 | 日本電気株式会社 | 情報処理システム、情報処理方法、情報処理装置およびその制御方法と制御プログラム、通信端末およびその制御方法と制御プログラム |
CN104036009A (zh) * | 2014-06-24 | 2014-09-10 | 北京奇虎科技有限公司 | 一种搜索匹配图片的方法、图片搜索方法及装置 |
CN104036281A (zh) * | 2014-06-24 | 2014-09-10 | 北京奇虎科技有限公司 | 一种图片的匹配方法、搜索方法及其装置 |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI686717B (zh) * | 2016-06-07 | 2020-03-01 | 香港商阿里巴巴集團服務有限公司 | 資料的提取方法、裝置及終端設備 |
US11175820B2 (en) | 2016-06-07 | 2021-11-16 | Advanced New Technologies Co., Ltd. | Method, device, and terminal device for extracting data |
CN110196833A (zh) * | 2018-03-22 | 2019-09-03 | 腾讯科技(深圳)有限公司 | 应用程序的搜索方法、装置、终端及存储介质 |
Also Published As
Publication number | Publication date |
---|---|
US20170154056A1 (en) | 2017-06-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2015196964A1 (zh) | 搜索匹配图片的方法、图片搜索方法及装置 | |
US10268703B1 (en) | System and method for associating images with semantic entities | |
WO2017045443A1 (zh) | 一种图像检索方法及系统 | |
US10599709B2 (en) | Object recognition device, object recognition method, and program for recognizing an object in an image based on tag information | |
US8892542B2 (en) | Contextual weighting and efficient re-ranking for vocabulary tree based image retrieval | |
WO2019119505A1 (zh) | 人脸识别的方法和装置、计算机装置及存储介质 | |
US12038977B2 (en) | Visual recognition using user tap locations | |
Chen et al. | Event detection from flickr data through wavelet-based spatial analysis | |
JP5749394B2 (ja) | 視覚探索のための堅牢な特徴マッチング | |
US8868569B2 (en) | Methods for detecting and removing duplicates in video search results | |
US8577882B2 (en) | Method and system for searching multilingual documents | |
WO2019200782A1 (zh) | 样本数据分类方法、模型训练方法、电子设备及存储介质 | |
WO2019085064A1 (zh) | 医疗理赔拒付方法、装置、终端设备及存储介质 | |
US8498455B2 (en) | Scalable face image retrieval | |
EP3028184A1 (en) | Method and system for searching images | |
WO2016015621A1 (zh) | 人脸图片人名识别方法和系统 | |
WO2016101766A1 (zh) | 相似人脸图片获取和人脸图片信息获取方法和装置 | |
CN106096028A (zh) | 基于图像识别的文物索引方法及装置 | |
US10943098B2 (en) | Automated and unsupervised curation of image datasets | |
WO2016058520A1 (zh) | 人脸图片人名识别方法和装置 | |
Sundara Vadivel et al. | An efficient CBIR system based on color histogram, edge, and texture features | |
WO2019109246A1 (zh) | 图片查找方法和装置 | |
Panda et al. | Offline mobile instance retrieval with a small memory footprint | |
EP3269132B1 (en) | Method and system for generating embedding for signal | |
Du et al. | Mvss: Mobile visual search based on saliency |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 15811050 Country of ref document: EP Kind code of ref document: A1 |
|
WWE | Wipo information: entry into national phase |
Ref document number: 15322074 Country of ref document: US |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 15811050 Country of ref document: EP Kind code of ref document: A1 |