Image search method, device, storage medium and electronic device

By pre-saving local original image features on the intelligent server and comparing them with compressed image features, the problem of missing features caused by compression in image search is solved and the accuracy and efficiency of image search are improved.

CN113806577BActive Publication Date: 2024-09-24ZHEJIANG DAHUA TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202110974274.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-24
Publication Date
2024-09-24
Estimated Expiration
2041-08-24

AI Technical Summary

Technical Problem

Existing image search technology results in the loss of image features during compressed image processing, affecting the accuracy of search results.

Method used

By pre-saving the partial original image and corresponding original image features on the intelligent server, and based on the marquee information sent by the client, the compressed image of the target object is intercepted from the panoramic compressed image, and its compressed image features are extracted, which are compared with the pre-stored original image features. Compare and select the target original image features that meet the matching conditions for image search.

Benefits of technology

It improves the accuracy and efficiency of image search, avoids data loss caused by image compression, and enhances the detail and completeness of search results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113806577B
    Figure CN113806577B
Patent Text Reader

Abstract

The present application relates to the field of image processing technology, and in particular to an image search method, device, storage medium and electronic device. The image search method provided in the embodiment of the present application can receive an image search request sent by a client based on a panoramic compressed image, wherein the image search request carries selection box information and based on the selection box information, a corresponding target object compressed image is intercepted in the panoramic compressed image, and compressed image features of the target object compressed image are extracted, and the matching degree between the compressed image features and the original image features of each pre-stored local original image is obtained, and based on each matching degree obtained, the target original image features whose matching degree meets the preset matching condition are selected, and then an image search is performed based on the target original image features to obtain the corresponding search results, thereby improving the accuracy of the image search results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image search method, device, storage medium and electronic device. Background Art

[0002] With the development of artificial intelligence (AI) technology, fast image-based search has gradually become an important demand. Accordingly, various image search technologies have also been widely used.

[0003] Specifically, when using image search technology, the intelligent server sends a panoramic compressed image containing multiple target objects (such as faces) and a selection box to the client. The client selects at least one target object in the panoramic compressed image to obtain at least one target object compressed image, and then sends the selected at least one target object compressed image to one or more intelligent servers. The intelligent server extracts the image features of the obtained target object compressed image, and searches in the image database based on the obtained image features to obtain matching target object associated images.

[0004] However, although the above solution can quickly obtain the matching target object association image, it has the following defects:

[0005] In the related art, the sources of panoramic compressed images include two parts: first, the intelligent server compresses the original panoramic images stored locally on the intelligent server or obtained from other servers connected to the intelligent server to obtain corresponding panoramic compressed images; second, the intelligent server or other servers connected to the intelligent server encode the brightness and chrominance (YUV) of the locally preset video frames, and then generates corresponding panoramic compressed images through compression encoding.

[0006] Generally speaking, generating a panoramic compressed image by compression will cause loss of image pixels during the compression process. Therefore, the image features of the compressed image of the target object extracted based on the panoramic compressed image will have some missing features, thereby affecting the accuracy of the search results during the image search process.

[0007] In view of this, it is necessary to provide a new image search method to overcome the above defects. Summary of the invention

[0008] The embodiments of the present application provide an image search method, device, storage medium and electronic device, which can obtain accurate image search results.

[0009] To achieve the above purpose, the technical solution of the embodiment of the present application is implemented as follows:

[0010] In a first aspect, an embodiment of the present application provides an image search method, the method comprising:

[0011] Receiving an image search request sent by a client based on a panoramic compressed image, wherein the image search request carries selection box information; wherein the panoramic compressed image is sent to the client in advance by the intelligent server;

[0012] Based on the selection frame information, intercepting a corresponding target object compressed image in the panoramic compressed image, and extracting compressed image features of the target object compressed image;

[0013] Obtaining the matching degrees between the compressed image features and the original image features of each pre-stored local original image respectively, and selecting the target original image features whose matching degrees meet the preset matching conditions based on the obtained matching degrees, wherein the local original image is intercepted from the specified sample panoramic original image;

[0014] An image search is performed based on the target original image features to obtain corresponding search results.

[0015] In a second aspect, the embodiment of the present application further provides an image search device, including:

[0016] A communication module, configured to receive an image search request sent by a client based on a panoramic compressed image, wherein the image search request carries selection box information; wherein the panoramic compressed image is sent to the client in advance by an intelligent server;

[0017] An extraction module, configured to intercept a corresponding target object compressed image in the panoramic compressed image based on the selection frame information, and extract compressed image features of the target object compressed image;

[0018] A matching module, used to obtain the matching degree between the compressed image features and the original image features of each pre-stored local original image, and select the target original image features whose matching degree meets the preset matching condition based on the obtained matching degrees, wherein the local original image is intercepted from the specified sample panoramic original image;

[0019] The search module is used to perform image search based on the target original image features to obtain corresponding search results.

[0020] In an optional embodiment, before receiving an image search request sent by a client based on a panoramic compressed image, the extraction module is specifically configured to perform at least one of the following operations:

[0021] Acquire a specified static image, use the static image as a sample panoramic original image, intercept a local original image from the sample panoramic original image, extract original image features of the local original image, and store them in a storage area associated with the panoramic compressed image;

[0022] Obtain a specified video data stream, decode the video data stream, and use the obtained video frame image as a sample panoramic original image, intercept a local original image from the sample panoramic original image, and extract the original image features of the local original image, and save them in a storage area associated with the panoramic compressed image.

[0023] In an optional embodiment, when extracting a local original image from the sample panoramic original image, the extraction module is specifically used to:

[0024] Using the sliding window method SWA, the position information of the designated target in the sample panoramic original image is extracted;

[0025] According to the position information, a local original image of a preset size is captured from the sample panoramic original image.

[0026] In an optional embodiment, when respectively obtaining the matching degree between the compressed image features and the original image features of each pre-stored local original image, the matching module is specifically used to:

[0027] For each of the original image features of the local original images, the following operations are performed:

[0028] The cosine similarity method is used to calculate the cosine value of the angle between the original image feature of a local original image and the compressed image feature of the target object compressed image;

[0029] Using the cosine value as the degree of matching between the original image feature of the one local original image and the compressed image feature of the compressed image of the target object;

[0030] Read each matching degree obtained in turn, and perform the following operations each time a matching degree is read until all matching degrees are read, and then output the target original image features:

[0031] Compare the matching degree of the current read with the matching degree of the last read;

[0032] If it is determined that the matching degree currently read is greater than the matching degree last read, the original image feature associated with the matching degree currently read is used as the new target original image feature;

[0033] If it is determined that the matching degree currently read is less than the matching degree last read, the original image feature associated with the matching degree last read is maintained as the target original image feature.

[0034] In an optional embodiment, when selecting target original image features whose matching degrees meet preset matching conditions based on the obtained matching degrees, the search module is specifically used to:

[0035] The scale invariant feature transform matching method SIFT or the fast nearest neighbor search bag method FLANN is used to search for an image in an image database based on the target original image features, and the obtained target image is used as the search result.

[0036] In an optional embodiment, after obtaining the corresponding search results, the communication module is specifically used to perform any one of the following operations:

[0037] If the number of the target image is 1, the obtained target image is directly sent to the client.

[0038] If the number of the target images is greater than 1, the target images are sorted in alphabetical order according to the first letter of the name of each target image, and each target image is sent to the client according to the sorting result. In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any one of the image search methods described in the first aspect is implemented.

[0039] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the image search method of the first aspect is implemented.

[0040] In a fourth aspect, an embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the computer program is executed by the processor, the processor implements any one of the image search methods in the first aspect above.

[0041] In an embodiment of the present application, the intelligent server captures the corresponding compressed image of the target object from the panoramic compressed image and extracts the compressed image features based on the selection box information carried in the image search request sent by the client, and performs image search based on the target original features whose matching degree with the compressed image features in the original image features corresponding to the preset local original images meets the preset matching conditions to obtain the target image; in this way, since the target original image features do not have data missing due to image compression, they have richer details and a more complete amount of data. Therefore, a more accurate target image can be obtained by using the target original image features that are most similar to the compressed image features instead of the compressed image features for image search, thereby effectively improving the image search accuracy without increasing the system computing load, while also ensuring the search efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0043] Figure 1 A service system architecture diagram for image search provided in an embodiment of the present application;

[0044] Figure 2a , Figure 2b An example diagram of a local original feature extraction situation provided in an embodiment of the present application;

[0045] Figure 3a , Figure 3b , Figure 3c An example diagram of setting a sample panoramic original image based on a video data stream provided in an embodiment of the present application;

[0046] Figure 4 An example diagram of a storage form and transmission method of an original image feature in a system provided in an embodiment of the present application;

[0047] Figure 5 A flowchart of an image search method provided in an embodiment of the present application;

[0048] Figure 6a , Figure 6b , Figure 6c An example flowchart of an image search method provided in an embodiment of the present application;

[0049] Figure 7 A flow chart of a method for selecting target original image features whose matching degree meets preset matching conditions provided in an embodiment of the present application;

[0050] Figure 8a , Figure 8b A partial flow chart of an image search method provided in an embodiment of the present application;

[0051] Fig. 9 A schematic diagram of the structure of an image search device provided in an embodiment of the present application;

[0052] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0054] In order to improve the search accuracy of image search technology, in an embodiment of the present application, various types of local original images and corresponding original image features are pre-saved in the system. When the intelligent server captures the corresponding target object compressed image from the panoramic compressed image based on the image search request sent by the client, and extracts the compressed image features of the target object compressed image, the intelligent server compares the compressed image features with the pre-stored original image features, and selects the target original image features that meet the preset matching conditions, and then performs image search based on the target original image features; in this way, the accuracy of image search is effectively improved by replacing the compressed image features with the original image features.

[0055] See also Figure 1 As shown, in the embodiment of the present application, the service system includes a client 100, an intelligent server 110 and an optional image database 120, wherein there can be multiple intelligent servers 110, and network connections are established between the client 100 and multiple intelligent servers 110, and multiple intelligent servers 110 can provide image search services to the client 100.

[0056] In the embodiment of the present application, each intelligent server 110 can share the sample panoramic original image, such as, Figure 1 As shown, static images and video frame images in the same image database 120 can be shared, or each sample panoramic original image can be stored in each intelligent server 110 in a distributed manner, and data sharing can be achieved through local area network transmission and other methods.

[0057] Specifically, when setting the sample panoramic original image, the intelligent server may adopt but is not limited to at least one of the following methods:

[0058] Method 1: Obtain a specified static image, use the obtained static image as a sample panoramic original image, capture a local original image from the sample panoramic original image, and extract the original image features of the local original image, and save them in a storage area associated with the panoramic compressed image.

[0059] For example, see Figure 2a , taking any static image (hereinafter referred to as static image i) as an example, assuming that the intelligent server sets the sample panoramic original image based on the static image i, the method used is:

[0060] The intelligent server obtains a specified static image i containing a street scene at a certain moment from the image database, such as Figure 2b As shown, the obtained static image i is used as the corresponding sample panoramic original image, and the "car" is cut out from the static image i as the local original image according to the instructions, and the original image features of the "car" are extracted and recorded as the original features i; thereafter, the intelligent server compresses the static image i to obtain the corresponding compressed image i, and then the original features i and the compressed image i are associated and saved in a designated storage area, which can be a user-defined area on the intelligent server or a user-specified area in an image database.

[0061] Furthermore, the attribute information i of the local original image may be saved together with the compressed image i and the original feature i. The so-called attribute information of the local original image may include but is not limited to at least one of the following: image address, image resolution, image size, and image depth.

[0062] By adopting the method 1, the original image features of the local original images of each pre-selected static image can be extracted, and the original image features of each local original image and the corresponding panoramic compressed image are respectively associated and stored in the storage area.

[0063] Method 2: Obtain a specified video data stream, perform YUV encoding on the video data stream, use a certain video frame image obtained after encoding as a sample panoramic original image, capture a local original image from the sample panoramic original image, and extract the original image features of the local original image, and save them in a storage area associated with the panoramic compressed image.

[0064] For example, see Figure 3a As shown, taking any video data stream as an example (hereinafter referred to as video data stream m), it is assumed that the intelligent server sets a sample panoramic original image based on the video data stream m in the following manner:

[0065] The intelligent server obtains a specified video data stream m containing a park scene within a certain time period from the image database, such as Figure 3b , Figure 3c As shown, the video data stream m is YUV-encoded, and a certain video frame image m obtained after encoding is used as the corresponding sample panoramic original image, and a "person" is intercepted from the video frame image m as a local original image according to the instruction, and the original image features of the "person" are extracted and recorded as the original feature m; thereafter, the intelligent server compresses the video frame encoded image m to obtain the corresponding compressed image m, and then saves the original feature m in a designated storage area, and then associates the original feature m with the compressed image m and saves them in a designated storage area, which can be a user-defined area on the intelligent server or a user-specified area in an image database.

[0066] By adopting the method 2, the original image features of the local original images of the pre-selected video data stream can be extracted, and the original image features of each local original image and the corresponding panoramic compressed image are respectively associated and stored in the storage area.

[0067] Regardless of whether method 1 or method 2 is used, the following optional methods can be used to extract the original image features of the local original image: for the sample panoramic original image in method 1 and method 2, a sliding window algorithm (Sliding Window Algorithm, SWA) is used to extract the position information of the specified target in the sample panoramic original image, and then based on the position information, a local original image of a preset size is cut out from the sample panoramic original image.

[0068] Furthermore, no matter whether the original image features of the local original images are obtained by using method 1 or method 2, the original image features of each local original image finally obtained can be stored in each intelligent server in a distributed manner, or can be stored in a shared database in a centralized manner; taking the former as an example, the storage form and transmission method of the original image features of each local original image in the intelligent server are as follows: Figure 4 shown.

[0069] Based on the above preprocessing process, see Figure 5 As shown, in the embodiment of the present application, the detailed process of the intelligent server performing image search is as follows:

[0070] Step 500: The intelligent server sends a panoramic compressed image to the client.

[0071] In a specific implementation, after the client logs in to the intelligent server, it can obtain a panoramic compressed image that can be used for image search from various multimedia data provided by the intelligent server.

[0072] For example, see Figure 6aAs shown, assuming that the intelligent service end is a video website server, after the client logs in to the video website server, it can obtain a specified video data stream from the video website server and extract a panoramic compressed image from the obtained video data stream.

[0073] Step 510: The client marks a selection box in the obtained panoramic compressed image, and carries the panoramic compressed image marked with the selection box in an image search request, and sends it to the intelligent server.

[0074] In a specific implementation, after the client presents the panoramic compressed image to the user, based on the click and drag operations triggered by the user in the operation interface, the relevant information of the selection box set by the user, including the position information and the size information, can be determined.

[0075] For example, see Figure 6b As shown, the user can click and drag in the operation interface through an external device (mouse, touchpad, etc.). In this example, the user drags the selection box to person a and adjusts the size of the selection box to include person a. After the user clicks to confirm, the client fixes the state of the selection box at this time, and it is considered that the selection of the search object (person a) is completed. Then, the client carries the panoramic compressed image marked with the selection box in the image search request and sends it to one or more intelligent servers.

[0076] Step 520: The intelligent server receives an image search request sent by the client based on the panoramic compressed image, where the image search request carries selection box information.

[0077] In the embodiment of the present application, the image search request sent by the client based on the panoramic compressed image can be confirmed according to whether the intelligent server receives the panoramic compressed image.

[0078] Step 530: The intelligent server captures the corresponding target object compressed image from the obtained panoramic compressed image based on the obtained selection box information, and extracts compressed image features of the target object compressed image.

[0079] Specifically, the intelligent server extracts compressed image features of the target object from the panoramic compressed image based on the panoramic compressed image marked with the selection box and the position information and size information of the selection box.

[0080] For example: Figure 6c As shown, the target object compressed image captured in the embodiment of the present application is the compressed image a of the corresponding person a, and the compressed image feature extracted from the target object compressed image a is the compressed image feature M a .

[0081] Step 540: The intelligent server obtains the matching degrees between the compressed image features and the original image features of each pre-stored local original image, and based on the obtained matching degrees, selects the target original image features whose matching degrees meet the preset matching conditions.

[0082] Among them, before step 500, the original features of each pre-stored local original image are pre-associated with the panoramic compressed image and saved in a designated storage area by the intelligent server. The specific storage area can be a user-defined area on the intelligent server or a user-specified area in the image database.

[0083] Taking the original image feature of any local original image (hereinafter referred to as original image feature i) as an example, the intelligent server can use the cosine similarity method to calculate the cosine value of the angle between the original image feature i and the compressed image feature of the target object compressed image, and use the obtained cosine value as the matching degree between the original image feature i and the compressed image feature of the target object compressed image.

[0084] For example, the original image features of the local original image read by the intelligent server are vector N0: x1, x2, ..., x 5000 , the compressed image features of the target object compressed image are vectors M0: y1, y2, …, y 5000 , then the cosine similarity method is used to calculate the cosine value of the angle between vector N0 and vector M0 At this time, the value of cosθ is used as the matching degree between the original image feature N0 and the compressed image feature M0 of the obtained target object compressed image.

[0085] The above process only takes any original image feature as an example to introduce the calculation process of the matching degree. The matching degrees of other original image features can be obtained in the same way, which will not be repeated here.

[0086] Furthermore, after obtaining the matching degree between the compressed image features of the target compressed image and the original image features of each local original image, the intelligent server selects the target original image features whose matching degree meets the preset matching conditions in the following process. Assume that the compressed image features of the target compressed image are recorded as M, and the original image features of the local original images are recorded as N1~N n , and the original image features N1~N of each local original image obtained by the cosine similarity method n , and the matching degree between the compressed image feature M of the target compressed image is recorded as A1~A n , whose total number is n; then refer to Figure 7 As shown, the specific matching process is as follows:

[0087] Step 5400: The intelligent server reads an Nx , and calculate N x The matching degree between and M is denoted as A x , where the initial value of x is set to 1.

[0088] When step 5401 is executed, if the matching degree A currently read by the intelligent server x is A1, then the other matching degree A read last time is set x-1 to 0;

[0089] Step 5402: The intelligent server associates the current read matching degree A x with the original image feature N x , and takes it as the new target original image feature.

[0090] Step 5403: The intelligent server continues to keep the original image feature N associated with the matching degree A x-1 as the target original image feature. x-1

[0091] Step 5404: The intelligent server reads the current value of x, compares the current value of x with the total number of matching degrees n, and determines whether x is less than n, that is, x < n? If so, execute step 5405; otherwise, execute step 5406.

[0092] Step 5405: The intelligent server increases the value of x by 1, that is, x = x + 1, and then executes step 5400.

[0093] Step 5406: The intelligent server outputs the currently saved target original image feature Nx.

[0094] Step 550: The intelligent server performs an image search based on the obtained target original image feature to obtain the corresponding search result.

[0095] In the embodiments of the present application, as Figure 8a , Figure 8b shown, when step 540 is executed, the intelligent server can perform an image search in the following ways but is not limited to:

[0096] Method 1: Use the Scale-invariant feature transform (SIFT) method to search in the image database.

[0097] Method 2: Use the Fast Approximate Nearest Neighbor Search Library (FLANN) method to search in the image database based on the target original image feature.

[0098] Step 560: The intelligent server returns the obtained search results to the client.

[0099] In the embodiment of the present application, when executing step 550, the intelligent server performs different operations based on different scenarios, as follows:

[0100] Scenario 1: If the number of obtained target images is 1, the intelligent server directly sends the obtained target image to the client.

[0101] Scenario 2: If the number of target images obtained is greater than 1, the intelligent server sorts the target images in alphabetical order according to the first letter of the name of each target image, and sends each target image to the client according to the sorting result.

[0102] Fig. 9 A schematic diagram of the structure of an image search device provided in an embodiment of the present application is shown. Fig. 9 As shown, the image search device includes a communication module 901, an extraction module 902, a matching module 903, and a search module 904; wherein:

[0103] The communication module 901 is used to receive an image search request sent by a client based on a panoramic compressed image, wherein the image search request carries selection box information; wherein the panoramic compressed image is sent to the client in advance by the intelligent server;

[0104] An extraction module 902 is used to intercept a corresponding target object compressed image in the panoramic compressed image based on the selection frame information, and extract compressed image features of the target object compressed image;

[0105] A matching module 903 is used to obtain the matching degree between the compressed image features and the original image features of each pre-stored local original image, and select the target original image features whose matching degree meets the preset matching condition based on the obtained matching degrees, wherein the local original image is intercepted from the specified sample panoramic original image;

[0106] The search module 904 is used to perform image search based on the target original image features to obtain corresponding search results.

[0107] In an optional embodiment, before receiving an image search request sent by a client based on a panoramic compressed image, the extraction module 902 is specifically configured to perform at least one of the following operations:

[0108] A designated static image is acquired, the static image is used as a sample panoramic original image, a local original image is captured from the sample panoramic original image, and original image features of the local original image are extracted and stored in a storage area associated with the panoramic compressed image.

[0109] Obtain a specified video data stream, decode the video data stream, and use the obtained video frame image as a sample panoramic original image, intercept a local original image from the sample panoramic original image, and extract the original image features of the local original image, and save them in a storage area associated with the panoramic compressed image.

[0110] In an optional embodiment, when extracting a local original image from the sample panoramic original image, the extraction module 902 is specifically used to:

[0111] Using the sliding window method SWA, the position information of the designated target in the sample panoramic original image is extracted;

[0112] According to the position information, a local original image of a preset size is captured from the sample panoramic original image.

[0113] In an optional embodiment, when respectively obtaining the matching degree between the compressed image features and the original image features of each pre-stored local original image, the matching module 903 is specifically used to:

[0114] For each of the original image features of the local original images, the following operations are performed:

[0115] The cosine similarity method is used to calculate the cosine value of the angle between the original image feature of a local original image and the compressed image feature of the target object compressed image;

[0116] The cosine value is used as a matching degree between the original image feature of the one local original image and the compressed image feature of the target object compressed image.

[0117] In an optional embodiment, when selecting target original image features whose matching degrees meet preset matching conditions based on the obtained matching degrees, the matching module 903 is specifically used to:

[0118] Read each matching degree obtained in turn, and perform the following operations each time a matching degree is read until all matching degrees are read, and then output the target original image features:

[0119] Compare the matching degree of the current read with the matching degree of the last read;

[0120] If it is determined that the matching degree currently read is greater than the matching degree last read, the original image feature associated with the matching degree currently read is used as the new target original image feature;

[0121] If it is determined that the matching degree currently read is less than the matching degree last read, the original image feature associated with the matching degree is maintained as the target original image feature.

[0122] In an optional embodiment, when performing image search based on the target original image features to obtain corresponding search results, the search module 904 is specifically used to:

[0123] The scale invariant feature transform matching method SIFT or the fast nearest neighbor search bag method FLANN is used to search for an image in an image database based on the target original image features, and the obtained target image is used as the search result.

[0124] In an optional embodiment, after obtaining the corresponding search results, the communication module 901 is specifically configured to perform any one of the following operations:

[0125] If the number of the target image is 1, the obtained target image is directly sent to the client.

[0126] If the number of the target images is greater than 1, the target images are sorted in alphabetical order according to the first letters of the names of the target images, and each target image is sent to the client according to the sorting result.

[0127] According to one aspect of the present application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions so that the computer device performs any of the image search methods in the above-mentioned embodiments. The program product can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0128] Based on the same inventive concept as the above-mentioned application embodiment, the present application embodiment also provides an electronic device, which can be used for image search. In one embodiment, the electronic device can be a server, or a terminal device or other electronic device. In this embodiment, the structure of the electronic device can be as follows: Fig.10 As shown, it includes a memory 1001 , a communication interface 1003 and one or more processors 1002 .

[0129] The memory 1001 is used to store computer programs executed by the processor 1002. The memory 1001 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and programs required for running the instant messaging function, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.

[0130] The memory 1001 may be a volatile memory, such as a random-access memory (RAM); the memory 1001 may also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), or the memory 1001 is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 1001 may be a combination of the above memories.

[0131] The processor 1002 may include one or more central processing units (CPU) or a digital processing unit, etc. The processor 1002 is used to implement the above-mentioned image search method when calling the computer program stored in the memory 1001 .

[0132] The communication interface 1003 is used to communicate with terminal devices and other servers.

[0133] The specific connection medium between the memory 1001, the communication interface 1003 and the processor 1002 is not limited in the embodiment of the present application. Fig.10 In the embodiment, the memory 1001 and the processor 1002 are connected via a bus 1004. The bus 1004 is connected to the processor 1002 via a bus 1004. Fig.10 The connections between other components are shown in bold lines, which are only for illustration and are not intended to be limiting. Bus 1004 can be divided into address bus, data bus, control bus, etc. For ease of illustration, Fig.10 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0134] In an embodiment of the present application, the intelligent server captures the corresponding compressed image of the target object from the panoramic compressed image and extracts the compressed image features based on the selection box information carried in the image search request sent by the client, and performs image search based on the target original features whose matching degree with the compressed image features in the original image features corresponding to the preset local original images meets the preset matching conditions to obtain the target image; in this way, since the target original image features do not have data missing due to image compression, they have richer details and a more complete amount of data. Therefore, a more accurate target image can be obtained by using the target original image features that are most similar to the compressed image features instead of the compressed image features for image search, thereby effectively improving the image search accuracy without increasing the system computing load, while also ensuring the search efficiency.

[0135] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0136] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0137] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0138] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0139] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. An image search method, It is characterized in that include: Receiving an image search request sent by a client based on a panoramic compressed image, wherein the image search request carries selection box information; wherein the panoramic compressed image is sent to the client in advance by an intelligent server, and the selection box information includes position information and size information; Based on the selection frame information, intercepting a corresponding target object compressed image in the panoramic compressed image, and extracting compressed image features of the target object compressed image; Obtaining the matching degrees between the compressed image features and the original image features of each pre-stored local original image respectively, and selecting the target original image features whose matching degrees meet the preset matching conditions based on the obtained matching degrees, wherein the local original image is intercepted from the specified sample panoramic original image, and the original image features of each pre-stored local original image are associated with respective attribute information, and the attribute information includes at least one of an image address, an image resolution, an image size, and an image depth; An image search is performed based on the target original image features to obtain corresponding search results.

2. The method according to claim 1, It is characterized in that Before receiving an image search request sent by a client based on a panoramic compressed image, at least one of the following operations is performed: Acquire a specified static image, use the static image as a sample panoramic original image, intercept a local original image from the sample panoramic original image, extract original image features of the local original image, and store them in a storage area associated with the panoramic compressed image; Obtain a specified video data stream, decode the video data stream, and use the obtained video frame image as a sample panoramic original image, intercept a local original image from the sample panoramic original image, and extract the original image features of the local original image, and save them in a storage area associated with the panoramic compressed image.

3. The method according to claim 2, It is characterized in that Extracting a local original image from the sample panoramic original image includes: Using the sliding window method SWA, the position information of the designated target in the sample panoramic original image is extracted; According to the position information, a local original image of a preset size is captured from the sample panoramic original image.

4. The method according to claim 1, It is characterized in that Obtaining the matching degree between the compressed image features and the original image features of each pre-stored local original image respectively includes: For each original image feature of the local original image, perform the following operations: The cosine similarity method is used to calculate the cosine value of the angle between the original image feature of a local original image and the compressed image feature of the target object compressed image; The cosine value is used as a matching degree between the original image feature of the one local original image and the compressed image feature of the target object compressed image.

5. The method according to claim 1, 2 or 3, It is characterized in that Based on the obtained matching degrees, target original image features whose matching degrees meet the preset matching conditions are selected, including: Read each matching degree obtained in turn, and perform the following operations each time a matching degree is read until all matching degrees are read, and then output the target original image features: Compare the matching degree of the current read with the matching degree of the last read; If it is determined that the matching degree currently read is greater than the matching degree last read, the original image feature associated with the matching degree currently read is used as the new target original image feature; If it is determined that the matching degree currently read is less than the matching degree last read, the original image feature associated with the matching degree last read is maintained as the target original image feature.

6. The method according to claim 1, 2 or 3, It is characterized in that Performing an image search based on the target original image features to obtain corresponding search results includes: The scale invariant feature transform matching method SIFT or the fast nearest neighbor search bag method FLANN is used to search for an image in an image database based on the target original image features, and the obtained target image is used as the search result.

7. The method according to claim 6, It is characterized in that After obtaining the corresponding search results, any of the following operations are also included: If the number of the target images is 1, the obtained target image is directly sent to the client; If the number of the target images is greater than 1, the target images are sorted in alphabetical order according to the first letters of the names of the target images, and each target image is sent to the client according to the sorting result.

8. An image search device, It is characterized in that include: A communication module, configured to receive an image search request sent by a client based on a panoramic compressed image, wherein the image search request carries selection box information; wherein the panoramic compressed image is sent to the client in advance by an intelligent server, and the selection box information includes position information and size information; An extraction module, configured to intercept a corresponding target object compressed image in the panoramic compressed image based on the selection frame information, and extract compressed image features of the target object compressed image; a matching module, for respectively obtaining the matching degree between the compressed image feature and the original image feature of each pre-stored local original image, and selecting the target original image feature whose matching degree meets the preset matching condition based on each obtained matching degree, wherein the local original image is intercepted from the specified sample panoramic original image, and the original image features of each pre-stored local original image are associated with respective attribute information, and the attribute information includes at least one of image address, image resolution, image size, and image depth; The search module is used to perform image search based on the target original image features to obtain corresponding search results.

9. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the image search method according to any one of claims 1 to 7 is implemented.

10. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the image search method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Thumbnail-based image sharing method and terminal

    CN106294798A

  • Image retrieval, image information acquisition and image identification methods and apparatuses, and image identification system

    CN106445939A

  • Human face identification method, client-side, server and system

    CN106844492A

  • Image searching method and system and electronic device

    CN110110113A

  • Image content identification method and device, computer equipment and storage medium

    CN110766048A