CN110633387A - Image retrieval method based on local information - Google Patents

Image retrieval method based on local information Download PDF

Info

Publication number
CN110633387A
CN110633387A CN201910937048.8A CN201910937048A CN110633387A CN 110633387 A CN110633387 A CN 110633387A CN 201910937048 A CN201910937048 A CN 201910937048A CN 110633387 A CN110633387 A CN 110633387A
Authority
CN
China
Prior art keywords
image
local
similarity
original
query
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.)
Pending
Application number
CN201910937048.8A
Other languages
Chinese (zh)
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.)
Sichuan Loy Technology Co Ltd
Original Assignee
Sichuan Loy Technology Co 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 Sichuan Loy Technology Co Ltd filed Critical Sichuan Loy Technology Co Ltd
Priority to CN201910937048.8A priority Critical patent/CN110633387A/en
Publication of CN110633387A publication Critical patent/CN110633387A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content

Landscapes

  • Engineering & Computer Science (AREA)
  • Library & Information 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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses an image retrieval method based on local information, which comprises the following steps: acquiring a plurality of original images; dividing each original image into a plurality of image areas respectively, and extracting local characteristic vectors of each image area; respectively generating an image ID for each original image; respectively associating the image ID of each original image with the local feature vector; constructing an image index by using the image ID and the local feature vector of the original image; acquiring a query image; and calculating the full-image similarity between the query image and each original image in the image index, and generating a retrieval result list according to the full-image similarity. According to the method, the image is divided into a plurality of image areas, the local similarity of each image area is calculated respectively, and then the full image similarity is calculated according to the local similarity, so that the accuracy of the retrieval result is improved.

Description

Image retrieval method based on local information
Technical Field
The invention belongs to the field of image processing, and particularly relates to an image retrieval method based on local information.
Background
With the rapid development of the internet and the rapid increase of the number of net citizens, the current network public opinion has the characteristics of high attention, high propagation speed and the like. In monitoring internet public opinions, many scenes involve analyzing the content of images, for example, retrieving images based on the content of the images. In an image content based retrieval application, the scene under consideration is a given image sample, and all the images similar to the content in the given image sample are found in the database. Since public opinion monitoring has higher requirements on accuracy and speed, how to improve the accuracy of the retrieval result and the retrieval speed is an important research direction.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provide an image retrieval method based on local information.
The purpose of the invention is realized by the following technical scheme: the image retrieval method based on the local information comprises the following steps:
acquiring a plurality of original images;
dividing each original image into a plurality of image areas respectively, and extracting local characteristic vectors of each image area;
respectively generating an image ID for each original image;
respectively associating the image ID of each original image with the local feature vector;
constructing an image index by using the image ID and the local feature vector of the original image;
acquiring a query image;
and calculating the full-image similarity between the query image and each original image in the image index, and generating a retrieval result list according to the full-image similarity.
Preferably, the method for extracting the local feature vector includes:
dividing an image area into a plurality of sub-areas, and acquiring gray value gradient information of each sub-area;
generating a feature descriptor of the image region according to the gray value gradient information;
and inputting the feature descriptors into a word bag model to obtain local feature vectors of the image area.
Preferably, the method for calculating the similarity of the whole graph includes:
dividing the query image into a plurality of image areas in the same way as the original image, and extracting local characteristic vectors of the image areas;
respectively calculating the similarity between each image area in the query image and the corresponding image area in the original image to obtain the local similarity;
and calculating the full-image similarity between the query image and the original image according to all the local similarities.
Preferably, the method for dividing the image area includes: the original image is divided into a corner image area and a center image area.
Preferably, when the overall similarity between the query image and the original image is calculated according to all the local similarities, the weight of the local similarity corresponding to the central image region is greater than the weight of the local similarity corresponding to the corner image region.
Preferably, the method for calculating the similarity of the whole graph further includes: and setting the weight of the local similarity corresponding to each image area of the query image.
Preferably, the original images are arranged in the retrieval result list according to the size sequence of the similarity of the whole image with the query image.
Preferably, the retrieval result list includes original images with a global similarity greater than a threshold value with the query image.
The invention has the beneficial effects that: according to the method, the image is divided into a plurality of image areas, the local similarity of each image area is calculated respectively, and then the full image similarity is calculated according to the local similarity, so that the accuracy of the retrieval result is improved.
Drawings
Fig. 1 is a flowchart of an image retrieval method based on local information.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the following embodiments, and it should be understood that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without inventive effort based on the embodiments of the present invention, are within the scope of the present invention.
Referring to fig. 1, the present invention provides an image retrieval method based on local information:
the image retrieval method based on the local information comprises the following steps:
s1, acquiring a plurality of original images.
The original image is used to construct a database for image retrieval.
And S2, dividing each original image into a plurality of image areas respectively, and extracting local feature vectors of each image area.
In this embodiment, the original image is divided into a corner image area and a central image area, where the corner image area includes an upper left corner image area, a lower left corner image area, an upper right corner image area, and a lower right corner image area.
The division rule may be to divide the image areas by a fixed size or in proportion to the original image.
The method for extracting the local feature vector comprises the following steps:
and S21, dividing the image area into a plurality of sub-areas, and acquiring the gray value gradient information of each sub-area.
S22, generating a feature descriptor of the image area according to the gray value gradient information; namely, the gray value gradient information of each sub-area is sequentially combined according to a preset sequence to form the feature descriptor of the image area.
And S23, inputting the feature descriptors into a word packet model to obtain local feature vectors of the image area.
In this embodiment, the method for constructing the word package model includes: the method comprises the steps of constructing a training set by using a plurality of feature descriptors, extracting the feature descriptors in the training set by adopting an SIFT algorithm to obtain the feature descriptors in the training set, clustering the feature descriptors in the training set by adopting a hard clustering algorithm to obtain a visual dictionary, and storing the visual dictionary to obtain a word bag model.
And S3, respectively generating an image ID for each original image.
And S4, respectively associating the image ID of each original image with the local feature vector.
That is, the image ID of each original image is associated with the local feature vector of the original image.
And S5, constructing an image index by using the image ID and the local feature vector of the original image.
The image index is established by utilizing the image ID and the local characteristic vector of the original image, and the corresponding original image can be quickly added into the retrieval result list after the whole image similarity calculation is subsequently completed, namely, the generation speed of the retrieval result list is improved.
S6, acquiring the query image.
And S7, calculating the full-image similarity of the query image and each original image in the image index, and generating a retrieval result list according to the full-image similarity.
The method for calculating the similarity of the whole image comprises the following steps:
and S71, dividing the query image into a plurality of image areas in the same way as the original image, and extracting local feature vectors of the image areas.
Namely, the query image is divided into a corner image area and a central image area according to the same dividing mode as the original image, and the local feature vectors of the corner image area and the central image area of the query image are extracted according to the same method.
And S72, respectively calculating the similarity between each image area in the query image and the corresponding image area in the original image to obtain the local similarity.
That is, the similarity between the central image region of the query image and the central image region of the original image is calculated, the similarity between the upper left corner image region of the query image and the upper left corner image region of the original image is calculated, the similarity between the lower left corner image region of the query image and the lower left corner image region of the original image is calculated, the similarity between the upper right corner image region of the query image and the upper right corner image region of the original image is calculated, and the similarity between the lower right corner image region of the query image and the lower right corner image region of the original image is calculated, so that a plurality of local similarities are obtained.
And S73, calculating the similarity of the whole image between the query image and the original image according to all the local similarities.
In some embodiments, the global similarity is an average of all local similarities corresponding to the query image, or a sum of all local similarities corresponding to the query image.
In some embodiments, the global image similarity is calculated such that the local similarity corresponding to the center image region is weighted more heavily than the local similarity corresponding to the corner image regions. Because the corner image regions of an image generally contain less interesting content, and the central image region contains more interesting content, the content of the central image region can embody the content of the whole image. By increasing the weight of the local similarity corresponding to the central image area, the retrieval result is more accurate.
In some embodiments, the method for calculating the full graph similarity further includes: and setting the weight of the local similarity corresponding to each image area in the query image. That is, the user can adjust the weight of the local similarity of each image region by himself or herself as required. For example, if the content of an image region in the query image is very important for the user, the weight of the local similarity corresponding to the image region can be greatly increased; for example, if only one image region in the query image is searched, the local similarity corresponding to the other image regions may be weighted to zero, thereby realizing the local search of the image. By adjusting the weight of the local similarity corresponding to each image area in the query image, the image retrieval requirements under various conditions can be met.
In some embodiments, the retrieval result list includes original images with a similarity greater than a threshold value with the full image of the query image, so that the number of the original images in the retrieval result list is reduced, and a user can select the required original image from the retrieval result list.
In some embodiments, the original images in the search result list are arranged according to the size order of the similarity between the original images and the full image of the query image, for example, according to the order of the similarity from small to large or according to the order of the similarity from large to small, which is beneficial for a user to quickly find a required original image.
It should be noted that the number of each step in the embodiment is not a limitation on the execution order of the corresponding step.
The foregoing is illustrative of the preferred embodiments of this invention, and it is to be understood that the invention is not limited to the precise form disclosed herein and that various other combinations, modifications, and environments may be resorted to, falling within the scope of the concept as disclosed herein, either as described above or as apparent to those skilled in the relevant art. And that modifications and variations may be effected by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (8)

1. An image retrieval method based on local information, comprising:
acquiring a plurality of original images;
dividing each original image into a plurality of image areas respectively, and extracting local characteristic vectors of each image area;
respectively generating an image ID for each original image;
respectively associating the image ID of each original image with the local feature vector;
constructing an image index by using the image ID and the local feature vector of the original image;
acquiring a query image;
and calculating the full-image similarity between the query image and each original image in the image index, and generating a retrieval result list according to the full-image similarity.
2. The local information-based image retrieval method according to claim 1, wherein the local feature vector extraction method includes:
dividing an image area into a plurality of sub-areas, and acquiring gray value gradient information of each sub-area;
generating a feature descriptor of the image region according to the gray value gradient information;
and inputting the feature descriptors into a word bag model to obtain local feature vectors of the image area.
3. The image retrieval method based on local information according to claim 1, wherein the calculation method of the global graph similarity includes:
dividing the query image into a plurality of image areas in the same way as the original image, and extracting local characteristic vectors of the image areas;
respectively calculating the similarity between each image area in the query image and the corresponding image area in the original image to obtain the local similarity;
and calculating the full-image similarity between the query image and the original image according to all the local similarities.
4. The local information-based image retrieval method according to claim 3, wherein the image area is divided by: the original image is divided into a corner image area and a center image area.
5. The local-information-based image retrieval method of claim 4, wherein when the full-image similarity between the query image and the original image is calculated according to all the local similarities, the weight of the local similarity corresponding to the central image region is greater than the weight of the local similarity corresponding to the corner image regions.
6. The image retrieval method based on local information according to claim 3, wherein the method for calculating the global graph similarity further comprises: and setting the weight of the local similarity corresponding to each image area in the query image.
7. The local information-based image retrieval method of claim 1, wherein the retrieval result list includes original images having a global similarity greater than a threshold with the query image.
8. The local-information-based image retrieval method of claim 1, wherein the original images are arranged in the retrieval result list according to the size order of the similarity of the full image with the query image.
CN201910937048.8A 2019-09-29 2019-09-29 Image retrieval method based on local information Pending CN110633387A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910937048.8A CN110633387A (en) 2019-09-29 2019-09-29 Image retrieval method based on local information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910937048.8A CN110633387A (en) 2019-09-29 2019-09-29 Image retrieval method based on local information

Publications (1)

Publication Number Publication Date
CN110633387A true CN110633387A (en) 2019-12-31

Family

ID=68973844

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910937048.8A Pending CN110633387A (en) 2019-09-29 2019-09-29 Image retrieval method based on local information

Country Status (1)

Country Link
CN (1) CN110633387A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115146031A (en) * 2022-07-06 2022-10-04 四川乐为科技有限公司 Short text position detection method based on deep learning and assistant features
CN115146031B (en) * 2022-07-06 2024-05-14 四川乐为科技有限公司 Short text position detection method based on deep learning and auxiliary features

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1926575A (en) * 2004-03-03 2007-03-07 日本电气株式会社 Image similarity calculation system, image search system, image similarity calculation method, and image similarity calculation program
CN105678303A (en) * 2015-06-02 2016-06-15 苏州科技学院 SURF improved method based on adaptive fractional-order differentiation
CN106855883A (en) * 2016-12-21 2017-06-16 中国科学院上海高等研究院 The Research on face image retrieval of view-based access control model bag of words
CN110097058A (en) * 2019-04-15 2019-08-06 河海大学常州校区 Irregular form image object automatic marking method based on sub-region right combination

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1926575A (en) * 2004-03-03 2007-03-07 日本电气株式会社 Image similarity calculation system, image search system, image similarity calculation method, and image similarity calculation program
CN105678303A (en) * 2015-06-02 2016-06-15 苏州科技学院 SURF improved method based on adaptive fractional-order differentiation
CN106855883A (en) * 2016-12-21 2017-06-16 中国科学院上海高等研究院 The Research on face image retrieval of view-based access control model bag of words
CN110097058A (en) * 2019-04-15 2019-08-06 河海大学常州校区 Irregular form image object automatic marking method based on sub-region right combination

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115146031A (en) * 2022-07-06 2022-10-04 四川乐为科技有限公司 Short text position detection method based on deep learning and assistant features
CN115146031B (en) * 2022-07-06 2024-05-14 四川乐为科技有限公司 Short text position detection method based on deep learning and auxiliary features

Similar Documents

Publication Publication Date Title
US20210191509A1 (en) Information recommendation method, device and storage medium
CN103544216B (en) The information recommendation method and system of a kind of combination picture material and keyword
WO2020207074A1 (en) Information pushing method and device
CN104991959B (en) A kind of method and system of the same or similar image of information retrieval based on contents
JP3494368B2 (en) Moving image expression method for searching, browsing, or summarizing moving image, and processing apparatus and processing method thereof
CN110909182B (en) Multimedia resource searching method, device, computer equipment and storage medium
WO2016180270A1 (en) Webpage classification method and apparatus, calculation device and machine readable storage medium
CN112052387B (en) Content recommendation method, device and computer readable storage medium
JP2018522339A (en) Personalized search device and method based on product image features
CN106960001B (en) A kind of entity link method and system of term
CN111159485B (en) Tail entity linking method, device, server and storage medium
CN110674407A (en) Hybrid recommendation method based on graph convolution neural network
CN107291825A (en) With the search method and system of money commodity in a kind of video
CN109902547B (en) Action recognition method and device
CN109460519B (en) Browsing object recommendation method and device, storage medium and server
CN108288208B (en) Display object determination method, device, medium and equipment based on image content
CN107918657A (en) The matching process and device of a kind of data source
Thepade et al. Assessment of similarity measurement criteria in Thepade's Sorted Ternary Block Truncation Coding (TSTBTC) for content based video retrieval
CN110751027B (en) Pedestrian re-identification method based on deep multi-instance learning
CN108492160A (en) Information recommendation method and device
CN112749330B (en) Information pushing method, device, computer equipment and storage medium
Dai et al. Video scene segmentation using tensor-train faster-RCNN for multimedia IoT systems
CN108833933A (en) A kind of method and system for recommending video flow using support vector machines
CN111858972A (en) Movie recommendation method based on family knowledge graph
JP2012079187A (en) Feature vector generating device, feature vector generating method and program therefor

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20191231

RJ01 Rejection of invention patent application after publication