Image retrieval method and device based on computer

文档序号:7759 发布日期:2021-09-17 浏览:27次 中文

1. A computer-based image retrieval method is characterized by comprising a graph-based retrieval process, wherein:

the retrieval flow according to the diagram comprises the following steps:

s100: the user inputs the image to be retrieved, and the image characteristics in the image to be retrieved are extracted and identified, wherein the image characteristics comprise image elements and the size proportion of the image elements,

the image elements comprise persons and articles, and the size ratios of the image elements comprise the size ratio of the persons and the article; the image element is determined by extracting the outline of the image element, and the number of pixel points contained in the outline of the image element is calculated; the size proportion of the image elements is the proportion of the number of the pixel points in the outline of the image elements to the total number of the pixel points in the outlines of all the image elements of the image to be retrieved;

s110: identifying the position relation of each image element in the image to be retrieved and identifying the relative position relation of each image element;

s120: according to the extracted and recognized image features and the position relation and the relative position relation of the image elements, approximate pictures meeting the image features are searched in a gallery;

s130: and outputting and displaying the retrieved approximate pictures meeting the image characteristics.

2. A computer-based image retrieval method according to claim 1, wherein: the image retrieval method also comprises a graph retrieval process,

the non-graph retrieval process comprises the following steps:

s200: inputting the retrieved information by the user, wherein at least an image element is required to be included;

s210: the method comprises the steps of intelligently analyzing image elements in information input and searched by a user, searching pictures containing the image elements in a gallery, directly outputting the pictures containing the image elements if the searched information does not contain the relative position relation of the image elements, and outputting the pictures meeting the requirements of containing the image elements and the relative position relation if the searched information contains the relative position relation.

3. A computer-based image retrieval method according to claim 1, wherein: the relative positional relationship includes the following determinations:

a: if the outline of the image element and the outline of the other image element do not have a common frame, identifying that the two image elements are in a non-connection relation, and identifying non-connection positions through upper, lower, left and right and corresponding combinations;

b: if the outline of the image element and the outline of the other image element have a part of common frame, judging that the two image elements are in a connection relation, and identifying the connection position through the upper, lower, left and right combinations;

c: if all frames of the outline of the image element are overlapped with frames of the outline of the other image element and the outlines of the two image elements are all surrounded, the two image elements are judged to be in an all-surrounding relation, and the all-surrounding position is identified through the upper, lower, left, right and corresponding combinations.

4. A computer-based image retrieval method according to claim 1, wherein: in step S120, the search is performed in the following order of priority:

the character > the article > the relative position relation > the image element size ratio.

5. A computer-based image retrieval method according to claim 1, wherein: the step S100 further includes identifying color features, identifying color features of each image element, and representing the color features by RGB values, wherein in the retrieving process of the step S120, the person color feature priority is higher than the item color feature priority, that is:

character color characteristic > article color characteristic.

6. An apparatus for applying the image retrieval method based on a computer according to any one of claims 1 to 5, comprising:

the input module is used for inputting the image to be detected by a user during image retrieval and also used for inputting the retrieved information by the user during image-free retrieval;

the image feature identification module is used for extracting and identifying image features in the image to be retrieved when the image is retrieved according to the image;

the color characteristic identification module is used for identifying the color characteristic of each image element when searching according to the image and expressing the color characteristic through an RGB value;

the retrieval module is used for retrieving approximate pictures meeting the image characteristics in the image library according to the image characteristics extracted and identified by the image characteristic identification module during image retrieval, and is also used for intelligently analyzing and retrieving the approximate pictures according to information input by a user during image-free retrieval;

the frame extraction module is used for extracting the outline of each image element and calculating the number of pixel points contained in the outline of the image element;

the position identification module is used for identifying the position relation of each image element in the image to be retrieved and identifying the relative position relation of each image element;

the output module is used for outputting the approximate picture searched by the searching module;

and the display module is used for displaying the approximate picture output by the output module.

7. The apparatus of claim 7, wherein: the input module comprises a USB interface, a high-definition scanning camera and an input keyboard.

8. The apparatus of claim 7, wherein: the system also comprises a memory, the memory is used for respectively storing retrieval history data, the retrieval history data are classified according to retrieval types, and the system at least comprises:

firstly, when searching according to a graph, a user inputs a historical image to be detected by an input module and outputs a historical approximate picture by an output module;

and when no image is searched, the history information input by the input module and the history approximate image output by the output module are input by the user.

Background

With the rapid development of computer networks and the popularization of portable devices such as smart phones and digital cameras, a large amount of image data is generated at every moment, and people want to search for a specific image needed by themselves from a huge image database, and need to use an image retrieval tool for retrieval, wherein the image retrieval tool can intelligently recognize image information and retrieve character information through deep learning and training of a computer.

However, it is difficult for the existing image retrieval tools to retrieve images meeting the requirements of people, and therefore, a computer-based image retrieval method and device are provided, so that people can accurately obtain the retrieved images.

Disclosure of Invention

The purpose of the invention is: the image retrieval method and the image retrieval device based on the computer are used for solving the problem that the existing image retrieval tool is difficult to retrieve the images meeting the requirements of people, so that people can accurately obtain the retrieved images.

In order to achieve the technical purpose, the technical scheme adopted by the invention is as follows:

a computer-based image retrieval method is characterized by comprising a graph-based retrieval process, wherein:

the retrieval flow according to the diagram comprises the following steps:

s100: the user inputs the image to be retrieved, and the image characteristics in the image to be retrieved are extracted and identified, wherein the image characteristics comprise image elements and the size proportion of the image elements,

the image elements comprise persons and articles, and the size ratios of the image elements comprise the size ratio of the persons and the article; the image element is determined by extracting the outline of the image element, and the number of pixel points contained in the outline of the image element is calculated; the size proportion of the image elements is the proportion of the number of the pixel points in the outline of the image elements to the total number of the pixel points in the outlines of all the image elements of the image to be retrieved;

s110: identifying the position relation of each image element in the image to be retrieved and identifying the relative position relation of each image element;

s120: according to the extracted and recognized image features and the position relation and the relative position relation of the image elements, approximate pictures meeting the image features are searched in a gallery;

s130: and outputting and displaying the retrieved approximate pictures meeting the image characteristics.

Dividing the image elements into people and articles, so as to divide the image to be retrieved into a plurality of different image elements, extracting the outlines of the image elements, and obtaining the size proportion of each image element; and the searched image can be more approximate to the image to be searched by identifying the position relation of each image element in the image to be searched and the relative position relation of each image element.

The image retrieval method also comprises a graph retrieval process,

the non-graph retrieval process comprises the following steps:

s200: inputting the retrieved information by the user, wherein at least an image element is required to be included;

s210: the method comprises the steps of intelligently analyzing image elements in information input and searched by a user, searching pictures containing the image elements in a gallery, directly outputting the pictures containing the image elements if the searched information does not contain the relative position relation of the image elements, and outputting the pictures meeting the requirements of containing the image elements and the relative position relation if the searched information contains the relative position relation.

When the user does not have the images for retrieval, the retrieved information is intelligently analyzed, and the images meeting the retrieved information can be clearly and accurately output, so that the user can accurately obtain the corresponding images meeting the requirements when the user does not have the images for retrieval.

The relative positional relationship includes the following determinations:

a: if the outline of the image element and the outline of the other image element have no common frame, identifying that the two image elements are in a non-connection relation, and identifying non-connection positions through upper, lower, left and right and corresponding combinations (such as lower left, lower right and the like);

b: if the outline of the image element and the outline of the other image element have a part of common frame, judging that the two image elements are in a connection relation, and identifying the connection position through the upper part, the lower part, the left part, the right part and corresponding combinations (such as the lower left part, the lower right part and the like);

c: if all the frames of the outline of the image element are overlapped with the frames of the outline of the other image element and the outlines of the two image elements are all surrounded, the two image elements are judged to be in the all-surrounding relation, and the all-surrounding position is identified through the upper part, the lower part, the left part, the right part and corresponding combinations (such as the lower left part, the lower right part and the like).

In step S120, the search is performed in the following order of priority:

the character > the article > the relative position relation > the image element size ratio.

The priority determination can preferentially search and screen the pictures of all the image elements approximate to the image to be searched in the process of searching the image, and then search the pictures approximate to the relative positions of all the image elements in the image to be searched according to the relative position relationship among all the elements, so that the searched image can preferentially meet the relative position arrangement of the image elements and the image elements of the image to be searched, the output picture can be more approximate to the image to be searched, and meanwhile, the searched image can be more approximate to the aspect ratio of the image to be searched through the position relationship and the image element size ratio of the search and the screening.

The step S100 further includes identifying color features, identifying color features of each image element, and representing the color features by RGB values, and in the retrieving process of the step S120, the person color feature priority is higher than the item color feature priority, that is:

character color characteristic > article color characteristic.

An apparatus applying a computer-based image retrieval method, comprising:

the input module is used for inputting the image to be detected by a user during image retrieval and also used for inputting the retrieved information by the user during image-free retrieval;

the image feature identification module is used for extracting and identifying image features in the image to be retrieved when the image is retrieved according to the image;

a color feature identification module for identifying the color feature of each image element during searching according to the image and expressing the color feature by RGB value,

the retrieval module is used for retrieving approximate pictures meeting the image characteristics in the image library according to the image characteristics extracted and identified by the image characteristic identification module during image retrieval, and is also used for intelligently analyzing and retrieving the approximate pictures according to information input by a user during image-free retrieval;

the frame extraction module is used for extracting the outline of each image element and calculating the number of pixel points contained in the outline of the image element;

the position identification module is used for identifying the position relation of each image element in the image to be retrieved and identifying the relative position relation of each image element;

the output module is used for outputting the approximate picture searched by the searching module;

and the display module is used for displaying the approximate picture output by the output module.

The input module comprises a USB interface, a high-definition scanning camera and an input keyboard.

The system also comprises a memory, the memory is used for respectively storing retrieval history data, the retrieval history data are classified according to retrieval types, and the system at least comprises:

firstly, when searching according to a graph, a user inputs a historical image to be detected by an input module and outputs a historical approximate picture by an output module;

and when no image is searched, the history information input by the input module and the history approximate image output by the output module are input by the user.

The method comprises the steps that a USB interface is arranged, when the user searches according to a picture, the user is connected with a storage device externally, the user can lead in an image in the storage device, a high-definition scanning camera is arranged, when the user searches according to the picture, the user scans a paper picture, the user can lead in the paper picture, and therefore the method is suitable for leading in the paper picture and an electronic picture; setting an input keyboard for inputting the searched information by people when searching without pictures; by arranging the memory, people can conveniently check the historical data of the image retrieval.

Drawings

The invention is further illustrated by the non-limiting examples given in the accompanying drawings;

FIG. 1 is a schematic diagram of a process of image retrieval according to an embodiment of the present invention;

FIG. 2 is a schematic diagram illustrating a non-image retrieval process according to an embodiment of the image retrieval method;

FIG. 3 is a schematic diagram illustrating the identification and determination of non-contiguous locations according to the present invention;

FIG. 4 is a schematic view of the contact location identification decision of the present invention;

FIG. 5 is a schematic diagram illustrating a fully enclosed location identification decision according to the present invention;

FIG. 6 is a schematic structural diagram of an embodiment of an apparatus for applying a computer-based image retrieval method according to the present invention;

Detailed Description

In order that those skilled in the art can better understand the present invention, the following technical solutions are further described with reference to the accompanying drawings and examples.

As shown in fig. 1-5, the image retrieval method based on computer of the present invention includes a retrieval process according to a diagram, in which:

the retrieval flow according to the diagram comprises the following steps:

s100: the user inputs the image to be retrieved, and the image characteristics in the image to be retrieved are extracted and identified, wherein the image characteristics comprise image elements and the size proportion of the image elements,

the image elements comprise persons and articles, and the size ratios of the image elements comprise the size ratio of the persons and the size ratio of the articles; the image element is determined by extracting the outline of the image element, and the number of pixel points contained in the outline of the image element is calculated; the image element size proportion is the proportion of the number of pixel points in the outline of the image element to the total number of pixel points in the outlines of all the image elements of the image to be retrieved;

s110: identifying the position relation of each image element in the image to be retrieved and identifying the relative position relation of each image element;

s120: according to the extracted and recognized image features and the position relation and the relative position relation of the image elements, approximate pictures meeting the image features are searched in a gallery;

s130: and outputting and displaying the retrieved approximate pictures meeting the image characteristics.

The image retrieval method also comprises a figure searching flow,

the non-graph retrieval process comprises the following steps:

s200: inputting the retrieved information by the user, wherein at least an image element is required to be included;

s210: the method comprises the steps of intelligently analyzing image elements in information input and searched by a user, searching pictures containing the image elements in a gallery, directly outputting the pictures containing the image elements if the searched information does not contain the relative position relation of the image elements, and outputting the pictures meeting the requirements of containing the image elements and the relative position relation if the searched information contains the relative position relation.

When searching according to the image, dividing the image elements into people and articles, so as to divide the image to be searched into a plurality of different image elements, extracting the outlines of the image elements, and obtaining the size proportion of each image element; and the position relation of each image element in the image to be retrieved and the relative position relation of each image element are identified, so that the retrieved image can be more approximate to the image to be retrieved, and when no image is retrieved, the retrieved information is intelligently analyzed, so that the image meeting the retrieved information can be clearly and accurately output, and therefore, a user can accurately obtain the corresponding image no matter the user retrieves according to the image or retrieves without the image.

The relative positional relationship includes the following determinations:

a: if the outline of the image element and the outline of the other image element have no common frame, identifying that the two image elements are in a non-connection relation, and identifying non-connection positions through upper, lower, left and right and corresponding combinations (such as lower left, lower right and the like);

b: if the outline of the image element and the outline of the other image element have a part of common frame, judging that the two image elements are in a connection relation, and identifying the connection position through the upper part, the lower part, the left part, the right part and corresponding combinations (such as the lower left part, the lower right part and the like);

c: if all the borders of the outline of the image element are overlapped with the borders of the outline of the other image element and the outlines of the two image elements are all surrounded, the two image elements are judged to be in a surrounding relation, and the positions of all the surrounding are identified through the upper part, the lower part, the left part, the right part and corresponding combinations (such as the lower left part, the lower right part and the like).

When a person enters the retrieved information through the non-graph retrieval process,

for example, "the sun is irradiated on the earth", and the image elements for extracting the piece of search information are: the intelligent analysis is carried out on the sun and the earth according to the sun irradiating the earth, and the relation of two image elements is obtained as follows: the "sun" is above the "earth" and belongs to the non-contact position relation in the A, so when the approximate picture is searched in the image library, the image which contains the "sun" and the "earth" and satisfies the non-contact position relation in the image library is preferentially output; further, if "the sun is obliquely projected to the ground" is input, then, the relative position relationship is additionally extracted as: the relation of two image elements obtained after intelligent analysis is 'oblique': the sun is obliquely above the ground and belongs to the non-contact position relation in the A, so when approximate pictures are searched in the image library, the images of the sun which is obliquely above the ground are output while the sun and the ground are preferentially contained in the image library and the non-contact position relation is met;

for example, when "person on horse" is input, the image elements for extracting the piece of search information are: the intelligent analysis is carried out on the 'horse' and the 'person', and the relation between two image elements is obtained as follows: the person contacts with the horse, the person is on the horse and belongs to the connection position relation in the B, so when the approximate picture is searched in the picture library, the person and the horse are contained in the picture library preferentially and satisfy the connection position relation, and the image of the person on the horse is output;

for example, when "ball in cup" is input, the image elements for extracting the piece of search information are: the intelligent analysis is carried out according to the cup and the ball, and the relation of two image elements is obtained as follows: since the "ball" is in the "cup" and belongs to the all-around positional relationship in C, when an approximate picture is searched for in the gallery, an image satisfying the all-around positional relationship, including the "cup" and the "ball" in the gallery, is preferentially output.

By the identification and judgment, people can more accurately obtain the image required to be searched when the image is not searched.

In step S120, the search is performed in the following order of priority:

the character > the article > the relative position relation > the image element size ratio.

The priority determination can preferentially search and screen the pictures of all the image elements approximate to the image to be searched in the process of searching the image, and then search the pictures approximate to the relative positions of all the image elements in the image to be searched according to the relative position relationship among all the elements, so that the searched image can preferentially meet the relative position arrangement of the image elements and the image elements of the image to be searched, the output picture can be more approximate to the image to be searched, and meanwhile, the searched image can be more approximate to the aspect ratio of the image to be searched through the position relationship and the image element size ratio of the search and the screening.

Step S100 further includes identifying color features, identifying color features of each image element, and representing the color features by RGB values, wherein in the retrieving process of step S120, the person color feature priority is higher than the item color feature priority, that is:

character color characteristic > article color characteristic.

An apparatus for applying a computer-based image retrieval method, as shown in fig. 6, includes:

the input module is used for inputting the image to be detected by a user during image retrieval and also used for inputting the retrieved information by the user during image-free retrieval;

the image feature identification module is used for extracting and identifying image features in the image to be retrieved when the image is retrieved according to the image;

the color characteristic identification module is used for identifying the color characteristic of each image element when searching according to the image and expressing the color characteristic through an RGB value;

the retrieval module is used for retrieving approximate pictures meeting the image characteristics in the image library according to the image characteristics extracted and identified by the image characteristic identification module during image retrieval, and is also used for intelligently analyzing and retrieving the approximate pictures according to information input by a user during image-free retrieval;

the frame extraction module is used for extracting the outline of each image element and calculating the number of pixel points contained in the outline of the image element;

the position identification module is used for identifying the position relation of each image element in the image to be retrieved and identifying the relative position relation of each image element;

the output module is used for outputting the approximate picture searched by the searching module;

and the display module is used for displaying the approximate picture output by the output module.

The input module comprises a USB interface, a high-definition scanning camera and an input keyboard.

Setting a USB interface for people to externally connect storage equipment when searching according to the image, so that people can import the image in the storage equipment; arranging a high-definition scanning camera for scanning the paper pictures when searching according to the pictures, so that people can import the paper pictures; and an input keyboard is arranged for inputting the searched information by people when no image is searched.

The device also comprises a memory, the memory is used for respectively storing retrieval historical data, the retrieval historical data are classified according to retrieval types, and the device at least comprises:

firstly, when searching according to a graph, a user inputs a historical image to be detected by an input module and outputs a historical approximate picture by an output module;

and when no image is searched, the history information input by the input module and the history approximate image output by the output module are input by the user.

By arranging the memory, people can conveniently check the historical data of the image retrieval.

The foregoing embodiments are merely illustrative of the principles of the present invention and its efficacy, and are not to be construed as limiting the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:数据处理方法、装置、电子设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!