CN109063197B - Image retrieval method, image retrieval device, computer equipment and storage medium - Google Patents

Image retrieval method, image retrieval device, computer equipment and storage medium Download PDF

Info

Publication number
CN109063197B
CN109063197B CN201811038704.2A CN201811038704A CN109063197B CN 109063197 B CN109063197 B CN 109063197B CN 201811038704 A CN201811038704 A CN 201811038704A CN 109063197 B CN109063197 B CN 109063197B
Authority
CN
China
Prior art keywords
image
feature
elements
line
image feature
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.)
Active
Application number
CN201811038704.2A
Other languages
Chinese (zh)
Other versions
CN109063197A (en
Inventor
徐庆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN201811038704.2A priority Critical patent/CN109063197B/en
Publication of CN109063197A publication Critical patent/CN109063197A/en
Application granted granted Critical
Publication of CN109063197B publication Critical patent/CN109063197B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The application relates to an image retrieval method, an image retrieval device, a computer device and a storage medium. The method comprises the following steps: extracting image feature descriptors of the sample images and establishing a sample image database; acquiring an input image, and extracting an image feature descriptor of the input image; the image feature descriptors comprise feature descriptors of coordinate position relations of image feature elements, feature descriptors of linear relations of the image feature elements, feature descriptors of angle relations of the image feature elements and feature descriptors of other types of quantity relations of the image feature elements; and taking the image feature descriptor of the input image as a search word, searching a sample image matched with the image feature descriptor in a sample image database, and taking the matched sample image as an image searching result. Consistent image feature descriptors can be stably obtained; and the types of image retrieval can be enriched, and the matching effect of the images can be effectively enhanced.

Description

Image retrieval method, image retrieval device, computer equipment and storage medium
Technical Field
The present application relates to the field of image recognition and retrieval technologies, and in particular, to an image retrieval method, an image retrieval apparatus, a computer device, and a storage medium.
Background
With the development of image processing technology, how to better describe image features is an object of continuous research in the field of image recognition and retrieval. A good set of image feature descriptors should have distinctiveness, which means that the descriptors can reflect the feature points that distinguish one image from another, making the descriptors unique to that image, and commonality. The commonality means that the image feature descriptors can reflect the same feature point of one image and other same or similar images, so that the descriptors have the common feature point for the same or similar images to realize good matching of the same or similar images.
The traditional Retrieval technology of the same or similar images mainly comprises two technologies, one is a Text-based Image Retrieval Technology (TBIR), which describes the characteristics of the images by using a Text description mode; the other is an Image Retrieval technology for analyzing and retrieving the Content semantics of the Image, such as color, texture, layout, etc., based on a Content-based Image Retrieval (CBIR) technology. The traditional image feature descriptors cannot stably obtain consistent image feature descriptors in images which are considered to be identical or basically identical in human vision, the image feature descriptor operations are too complex, and the extracted image feature information has poor matching effect when used for searching images with more color levels and complex structures.
Disclosure of Invention
In view of the above, it is desirable to provide an image retrieval method, an apparatus, a computer device, and a storage medium capable of better performing image matching in response to the above technical problems.
An image retrieval method, the method comprising: extracting image feature descriptors of the sample images and establishing a sample image database; the image feature descriptors comprise feature descriptors of coordinate position relations of image feature elements, feature descriptors of length relations of the image feature elements, feature descriptors of angle relations of the image feature elements and feature descriptors of other types of quantity relations of the image feature elements; acquiring an input image, and extracting an image feature descriptor of the input image; the image feature descriptors comprise feature descriptors of coordinate position relations of image feature elements, feature descriptors of length relations of the image feature elements, feature descriptors of angle relations of the image feature elements and feature descriptors of other types of quantity relations of the image feature elements; and taking the image feature descriptor of the input image as a search word, searching a sample image matched with the image feature descriptor in a sample image database, and taking the matched sample image as an image searching result.
In one embodiment, the data stored in the sample image database for extracting the image feature descriptors of the sample images includes: sample images and image feature descriptors of each sample image; the image feature descriptor of the sample image includes: the image feature element comprises feature descriptors of coordinate position relations of image feature elements, feature descriptors of length relations of the image feature elements, feature descriptors of angle relations of the image feature elements and feature descriptors of other types of quantity relations of the image feature elements; the extracting of the data of the image feature descriptor of the input image includes: an input image and an image feature descriptor of the input image; the image feature descriptor of the input image includes: feature descriptors of coordinate position relationships of image feature elements, feature descriptors of length relationships of image feature elements, feature descriptors of angular relationships of image feature elements, feature descriptors of other types of quantitative relationships of image feature elements.
In one embodiment, the step of extracting the image feature descriptor comprises the steps of carrying out color block segmentation on an image to be processed, and extracting an image contour line and an image gravity center point of the image to be processed; the image to be processed includes: a sample image and an input image; positioning the image to be processed according to a preset positioning rule to obtain a coordinate system with an image gravity center point as an origin; extracting image characteristic elements and a metric value thereof in a coordinate system of an image to be processed with an image gravity center point as an origin, wherein the image characteristic elements include but are not limited to: the coordinate system comprises color block center of gravity points, color block connected domain center of gravity points, color block effective areas, color block connected domain effective areas, color block pixel number, color block connected domain pixel number, image contour lines, color block connected domain contour lines, color block contour lines, center line radial lines, included angles formed by the center line radial lines and line segments above the y axis of the coordinate system, and included angles formed by the center line radial lines and line segments above the y axis of the coordinate system; the centerline comprises: the image center line radial lines, the color block center line radial lines and the color blocks are communicated with the domain center line radial lines; the image center line radial line is a connecting line of the positioned image center of gravity point and a point which is intersected with the positioned image contour line on a preset angle; the color block center line radial line is a connecting line of the center of gravity point of each positioned color block and the intersection point of the corresponding positioned color block contour line along a preset angle, and the color block communication domain radial line is a connecting line of the center of gravity point of each positioned color block communication domain and the intersection point of the corresponding positioned color block communication domain contour line along the preset angle; the cardiac radial line comprises: the heart and heart radial lines of the image and the color blocks, and the heart and heart radial lines of the communicated domain of the image and the color blocks; the center radial line of the image and color block is a connecting line of the positioned image center of gravity point and the positioned center of gravity point of each color block, and the center radial line of the image and color block communicating domain is a connecting line of the positioned image center of gravity point and the positioned center of gravity point of each color block communicating domain; the metering values of the image characteristic elements comprise coordinate position values, line segment length values, included angle values and other types of quantity values; the other types of the number comprise the number of connected domains, the number of color blocks, the number of pixels of the connected domains and the number of pixels of the color blocks; converting coordinate position values, line segment length values and other types of quantity values in the obtained metering values of the image characteristic elements into percentages, and then obtaining special rounding percentages of the percentages after the conversion of the image characteristic elements according to a preset rounding rule; obtaining a special rounding angle value for the included angle value in the obtained metering values of the image characteristic elements according to a preset rounding rule; combining and describing the image barycentric point and the coordinate position of each image feature element by a specific integer percentage according to a preset coordinate position combination rule, and using the combined and described image barycentric point and the coordinate position of each image feature element as a feature descriptor of the coordinate position relation of the image feature elements; combining and describing the image barycentric point and the line length of each image characteristic element according to a preset line length combination rule by particularly taking the integral percentage, and using the combined and described line length as a characteristic descriptor of the length relation of the image characteristic elements; combining and describing the angle of the image barycentric point and each image feature element according to a preset angle combination rule by particularly taking the integral percentage, and using the angle as a feature descriptor of the angle relation of the image feature elements; combining and describing the image barycentric point and other types of quantity special integer percentages of each image characteristic element according to a preset combination rule of other types of quantity, and using the combination rule as a characteristic descriptor of other types of quantity relations of the image characteristic elements; and taking a set of feature descriptors of coordinate position relations of the image feature elements, feature descriptors of length relations of the image feature elements, feature descriptors of angle relations of the image feature elements and feature descriptors of other types of quantity relations of the image feature elements as the image feature descriptors.
In one embodiment, the search term includes: at least one of a measurement value of the coordinate position relationship combined and described according to a preset coordinate position combination rule, a measurement value of the line length relationship combined and described according to a preset line length combination rule, a measurement value of the angle relationship combined and described according to a preset angle combination rule, and a measurement value of other types of quantity relationships combined and described according to a preset other types of quantity combination rules.
In one embodiment, a coordinate position value, a line segment length value and other types of quantity values in the obtained metering value of the image feature element are converted into percentages, and the percentages obtain a special rounding percentage according to a preset rounding rule; and obtaining a special rounding angle value according to a preset rounding rule by using the included angle value in the obtained metering value of the image characteristic element.
An image retrieval apparatus, the apparatus comprising: the database establishing module is used for extracting the image feature descriptors of the sample images and establishing a sample image database; the image feature descriptors comprise feature descriptors of coordinate position relations of image feature elements, feature descriptors of length relations of the image feature elements, feature descriptors of angle relations of the image feature elements and feature descriptors of other types of quantity relations of the image feature elements; the input image feature descriptor extraction module is used for acquiring an input image and extracting an image feature descriptor of the input image; the image feature descriptors comprise feature descriptors of coordinate position relations of image feature elements, feature descriptors of length relations of the image feature elements, feature descriptors of angle relations of the image feature elements and feature descriptors of other types of quantity relations of the image feature elements; and the retrieval module is used for retrieving a sample image matched with the image feature descriptor in the sample image database by taking the image feature descriptor of the input image as a retrieval word, and taking the matched sample image as an image retrieval result.
A computer device comprising a memory storing a computer program and a processor implementing the steps of any of the methods described above when the computer program is executed.
A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method of any of the above.
The image retrieval method, the image retrieval device, the computer equipment and the storage medium are characterized in that a database of sample images is firstly established, then an input image to be retrieved is obtained, and an image characteristic descriptor of the image to be detected is obtained from the image to be detected. The image feature descriptors comprise feature descriptors of coordinate position relations of image feature elements, feature descriptors of length relations of the image feature elements, feature descriptors of angle relations of the image feature elements and feature descriptors of other types of quantity relations of the image feature elements. And searching in a database according to the image characteristic descriptors to obtain a sample image matched with the image to be detected. Taking the metering value of the coordinate position relation combined and described according to the preset coordinate position combination rule, the metering value of the line length relation combined and described according to the preset line length combination rule, the metering value of the angle relation combined and described according to the preset angle combination rule and the metering value of the other type quantity relation combined and described according to the preset other type quantity combination rule as retrieval keywords, and being capable of stably obtaining consistent image feature descriptors; and the types of image retrieval can be enriched, and the matching effect of the images can be effectively enhanced.
Drawings
FIG. 1 is a flow diagram illustrating an exemplary image retrieval method;
FIG. 2 is a flow diagram illustrating a method for extracting image feature descriptors in one embodiment;
FIG. 3a illustrates an exemplary image to be processed in one embodiment;
FIG. 3b illustrates an exemplary image to be processed in another embodiment;
FIG. 4a is a diagram illustrating an image centroid point in one embodiment;
FIG. 4b is a diagram illustrating the center of gravity of an image patch in one embodiment;
FIG. 4c is a schematic diagram of a connected domain center of gravity point of an image patch in one embodiment;
FIG. 5 is a diagram illustrating an effective area of a located image to be processed and its color block contour in one embodiment;
FIG. 6 is a schematic diagram illustrating an angle distribution with a preset angle of 8 equal parts according to an embodiment;
FIG. 7 is a schematic diagram illustrating radial line characteristics of the center lines of the connected domains of the 1 st color block with a preset angle of 8 equal parts in one embodiment;
FIG. 8 is a schematic diagram illustrating radial line features of the center line of the 1 st color block with a preset angle of 18 equal parts in one embodiment;
FIG. 9 is a schematic illustration of an image cardiac radial line feature in one embodiment;
FIG. 10 is a block diagram showing the configuration of an image search device according to an embodiment;
FIG. 11 is a diagram illustrating an internal structure of a computer device in one embodiment.
Reference numerals: the system comprises a database establishing module 100, an input image feature descriptor extracting module 200 and a retrieval module 300.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The traditional image feature descriptor has poor matching effect obtained in the retrieval of the same or similar images, and has the following limitations or defects to a certain extent: the commonality feature description stability of the same or similar images is insufficient, and the traditional image feature descriptor can not stabilize the image which is regarded as the same or basically the same in human vision to obtain a consistent image feature descriptor, thereby causing the omission of the same or similar images in image retrieval; the traditional image feature descriptor operation is too complex, and the extracted image feature information presents poor same or approximate matching effect when being used for searching images with multiple color levels and complex structures. The image retrieval method is based on the graph-looking technology, at least one of a metering value of a coordinate position relation combined and described according to a preset coordinate position combination rule, a metering value of a line length relation combined and described according to a preset line length combination rule, a metering value of an angle relation combined and described according to a preset angle combination rule and a metering value of other types of quantity relations combined and described according to other types of quantity combination rules is used as a retrieval keyword for carrying out image retrieval, the defect that the same or similar images are missed in image retrieval due to insufficient stability of common feature description of the same or similar images in the traditional technology can be effectively overcome, and the matching effect of the same or similar images in image identification retrieval is improved.
In one embodiment, as shown in fig. 1, there is provided an image retrieval method including the steps of:
and step S102, extracting image feature descriptors of the sample images and establishing a sample image database.
Specifically, the image feature descriptors comprise feature descriptors of coordinate position relations of image feature elements, feature descriptors of length relations of the image feature elements, feature descriptors of angle relations of the image feature elements and feature descriptors of other types of quantity relations of the image feature elements. The data stored in the sample image database for extracting the image feature descriptors of the sample images includes: sample images and image feature descriptors of each sample image; the image feature descriptor of the sample image includes: feature descriptors of coordinate position relationships of image feature elements, feature descriptors of length relationships of image feature elements, feature descriptors of angular relationships of image feature elements, feature descriptors of other types of quantitative relationships of image feature elements.
Establishing a sample image database is a basic technical method for image retrieval, and the information stored and recorded in the traditional sample image database mainly comprises the following steps: characters representing characters such as characters contained in an image, codes of graphic elements of the image, objects described in the image, and colors, textures, and shapes of the image. Although these pieces of information play an important role in image retrieval, there are limitations in that missing detection may occur in some identical or similar images in the application of image retrieval.
The feature descriptor of the coordinate position relationship of the image feature elements combines and describes the image barycentric point and the coordinate position of each image feature element by a specially-rounded percentage according to a preset coordinate position combination rule. The feature descriptor of the length relationship of the image feature elements is to combine and describe the barycentric point of the image and the line length of each image feature element according to a preset line length combination rule by particularly rounding percentage. The feature descriptor of the angular relationship of the image feature elements is to combine and describe the image barycentric point and the angle special integer percentage of each image feature element according to a preset angle combination rule. Feature descriptors of other types of quantity relations of the image feature elements combine and describe the image barycentric points and other types of quantities of the image feature elements, particularly integer percentages, according to preset combination rules of other types of quantities.
Extracting image characteristic elements and a metric value thereof in a coordinate system of an image to be processed with an image gravity center point as an origin, wherein the image characteristic elements include but are not limited to: the coordinate system comprises color block center of gravity points, color block connected domain center of gravity points, color block effective areas, color block connected domain effective areas, color block pixel number, color block connected domain pixel number, image contour lines, color block connected domain contour lines, color block contour lines, center line radial lines, included angles formed by the center line radial lines and line segments above the y axis of the coordinate system, and included angles formed by the center line radial lines and line segments above the y axis of the coordinate system; the centerline comprises: the image center line radial lines, the color block center line radial lines and the color blocks are communicated with the domain center line radial lines; the image center line radial line is a connecting line of the positioned image center of gravity point and a point which is intersected with the positioned image contour line on a preset angle; the color block center line radial line is a connecting line of the center of gravity point of each positioned color block and the intersection point of the corresponding positioned color block contour line along a preset angle, and the color block communication domain radial line is a connecting line of the center of gravity point of each positioned color block communication domain and the intersection point of the corresponding positioned color block communication domain contour line along the preset angle; the cardiac radial line comprises: the heart and heart radial lines of the image and the color blocks, and the heart and heart radial lines of the communicated domain of the image and the color blocks; the center radial line of the image and color block is a connecting line of the positioned image center of gravity point and the positioned center of gravity point of each color block, and the center radial line of the image and color block communicating domain is a connecting line of the positioned image center of gravity point and the positioned center of gravity point of each color block communicating domain; the metering values of the image characteristic elements comprise coordinate position values, line segment length values, included angle values and other types of quantity values; the other types of numbers comprise the number of connected domains, the number of color blocks, the number of pixels of the connected domains and the number of pixels of the color blocks.
Converting coordinate position values, line segment length values and other types of quantity values in the obtained metering values of the image characteristic elements into percentages, and then obtaining special rounding percentages of the percentages after the conversion of the image characteristic elements according to a preset rounding rule; and obtaining a special rounding angle value according to a preset rounding rule for the included angle value in the obtained metering value of the image characteristic element.
Step S104, acquiring an input image, and extracting an image feature descriptor of the input image.
Specifically, the image feature descriptors comprise feature descriptors of coordinate position relations of image feature elements, feature descriptors of length relations of the image feature elements, feature descriptors of angle relations of the image feature elements and feature descriptors of other types of quantity relations of the image feature elements. The extracting of the data of the image feature descriptor of the input image includes: an input image and an image feature descriptor of the input image; the image feature descriptor of the input image includes: feature descriptors of coordinate position relationships of image feature elements, feature descriptors of length relationships of image feature elements, feature descriptors of angular relationships of image feature elements, feature descriptors of other types of quantitative relationships of image feature elements.
And step S106, taking the image feature descriptor of the input image as a search word, searching a sample image matched with the image feature descriptor in a sample image database, and taking the matched sample image as an image searching result.
Specifically, the search term includes: at least one of a measurement value of the coordinate position relationship combined and described according to a preset coordinate position combination rule, a measurement value of the line length relationship combined and described according to a preset line length combination rule, a measurement value of the angle relationship combined and described according to a preset angle combination rule, and a measurement value of other types of quantity relationships combined and described according to a preset other types of quantity combination rules. Converting coordinate position values, line segment length values and other types of quantity values in the obtained metering values of the image characteristic elements into percentages, and obtaining special rounding percentages according to preset rounding rules by the percentages; and obtaining a special rounding angle value according to a preset rounding rule by using the included angle value in the obtained metering value of the image characteristic element.
In the actual image retrieval, at least one of the metering value of the coordinate position relationship combined and described according to the preset coordinate position combination rule, the metering value of the line length relationship combined and described according to the preset line length combination rule, the metering value of the angle relationship combined and described according to the preset angle combination rule and the metering value of other types of quantity relationships combined and described according to the preset other types of quantity combination rules is used as a retrieval key word, the sample image database is retrieved, and the metering value of the coordinate position relationship, the metering value of the line length relationship, the metering value of the angle relationship and the records of the metering values of other types of quantity relationships which are completely matched are obtained. A corresponding sample image can be acquired.
The searched sample image may be matched with a plurality of search keywords, that is, a plurality of search results may have repeated image records, and the repeated information is meaningless in the image search work and should be subjected to de-duplication processing. Duplicate sample images are deleted and only one is retained.
The image retrieval method comprises the steps of firstly constructing a database of sample images, then acquiring an input image to be retrieved, and acquiring an image feature descriptor of the image to be detected in the image to be detected. The image feature descriptors comprise feature descriptors of coordinate position relations of image feature elements, feature descriptors of length relations of the image feature elements, feature descriptors of angle relations of the image feature elements and feature descriptors of other types of quantity relations of the image feature elements. And searching in a database according to the image characteristic descriptors to obtain a sample image matched with the image to be detected. Taking the metering value of the coordinate position relation combined and described according to the preset coordinate position combination rule, the metering value of the line length relation combined and described according to the preset line length combination rule, the metering value of the angle relation combined and described according to the preset angle combination rule and the metering value of the other type quantity relation combined and described according to the preset other type quantity combination rule as retrieval keywords, and being capable of stably obtaining consistent image feature descriptors; and the types of image retrieval can be enriched, and the matching effect of the images can be effectively enhanced.
In one embodiment, as shown in fig. 2, there is provided an image feature descriptor extraction method, including the steps of:
step S202, color block segmentation is carried out on the image to be processed, and an image contour line and an image center of gravity point of the image to be processed are extracted.
Specifically, the image to be processed may be an image acquired by a computer device, a camera, a mobile phone with a camera shooting function, a video camera, or other devices integrated with a camera shooting function or capable of storing images. FIG. 3a is an apple trademark image of apple Inc.; fig. 3b is a graphical trademark image of Nippon Enterprise group, Inc. A similar trademark image can be the image to be processed in the present embodiment. The method comprises the steps of utilizing the existing image segmentation technology to segment color blocks of an image to be processed, and taking the image with the same color as the same color block according to different colors. And obtaining the edge contour lines of all connected domains of all color blocks of the image to be processed as image contour lines, and calculating the image gravity center points of the image to be processed according to the characteristic of balanced distribution density of image pixel points.
And step S204, positioning the image to be processed according to a preset positioning rule, and acquiring a coordinate system with the center of gravity point of the image as an origin.
Specifically, all line segments which pass through the image center of gravity point and are intersected with the image contour line are obtained according to the image contour line and the image center of gravity point, and the longest line segment is used as a reference line segment; and rotating the image to be processed by taking the gravity center point of the image as a rotation center to enable the reference line segment to be in a horizontal state, and enabling image pixel points of all color blocks except the background color block in the area below the reference line segment to be the most. And the reference line segment is an image gravity center point, the image contour line is subjected to bipartite cutting, the cutting line passes through the image gravity center point, and the longest cutting line is taken as the reference line segment. As shown in fig. 5, a line segment formed by connecting points a, o, and b is a reference line segment. The points a and b are points on the contour line, and a line segment from the point a to the point b passes through the point o. After the positioning processing, the position information of the positioned image contour line, color block connected domain contour line, color block connected domain gravity center point and color block gravity center point in a coordinate system with the image gravity center point as an origin is obtained. The effective area of the positioned color block contour line of the image to be processed is an area surrounded by an external square, and each side of the external square is at least connected with or coincided with one point on the color block contour line of the image. As shown in fig. 5, the inner area enclosed by the rectangle marked with dotted lines is the effective area of the contour lines of the image to be processed and the color block thereof after positioning.
And step S206, extracting image characteristic elements and a metering value thereof from the coordinate system of the image to be processed with the center of gravity point of the image as the origin.
And step S208, converting the metering value into a percentage, and then obtaining the special rounding percentage according to a preset rounding rule by the percentage.
Converting coordinate position values, line segment length values and other types of quantity values in the obtained metering values of the image characteristic elements into percentages, and then obtaining special rounding percentages of the percentages after the conversion of the image characteristic elements according to a preset rounding rule; and obtaining a special rounding angle value according to a preset rounding rule for the included angle value in the obtained metering value of the image characteristic element.
The coordinate position values in the metric values of the image feature elements include: and coordinate position information of the positioned image contour line, color block connected domain contour line, color block contour line, image gravity center point, color block connected domain gravity center point and color block gravity center point. The segment length values in the metric values of the image feature elements include: the method comprises the following steps of obtaining a length value of an image core line radial line, a length value of a color block communication domain core line radial line, a length value of an image and color block heart radial line and a length value of an image and color block communication domain heart radial line. The included angle angles in the metric values of the image feature elements include: the included angle formed by the image center line radial line and the line segment above the y axis of the coordinate system, the included angle formed by the color block communication domain center line radial line and the line segment above the y axis of the coordinate system, the included angle formed by the image center radial line and the color block center radial line and the line segment above the y axis of the coordinate system, and the included angle formed by the image center radial line and the color block communication domain center radial line and the line segment above the y axis of the coordinate system.
Specifically, the image feature elements include, but are not limited to: the coordinate system comprises color block center of gravity points, color block connected domain center of gravity points, color block effective areas, color block connected domain effective areas, color block pixel number, color block connected domain pixel number, image contour lines, color block connected domain contour lines, color block contour lines, center line radial lines, included angles formed by the center line radial lines and line segments above the y axis of the coordinate system, and included angles formed by the center line radial lines and line segments above the y axis of the coordinate system; the centerline comprises: the image center line radial lines, the color block center line radial lines and the color blocks are communicated with the domain center line radial lines; the image center line radial line is a connecting line of the positioned image center of gravity point and a point which is intersected with the positioned image contour line on a preset angle; the color block center line radial line is a connecting line of the center of gravity point of each positioned color block and the intersection point of the corresponding positioned color block contour line along a preset angle, and the color block communication domain radial line is a connecting line of the center of gravity point of each positioned color block communication domain and the intersection point of the corresponding positioned color block communication domain contour line along the preset angle; the cardiac radial line comprises: the heart and heart radial lines of the image and the color blocks, and the heart and heart radial lines of the communicated domain of the image and the color blocks; the center radial line of the image and color block is a connecting line of the positioned image center of gravity point and the positioned center of gravity point of each color block, and the center radial line of the image and color block communicating domain is a connecting line of the positioned image center of gravity point and the positioned center of gravity point of each color block communicating domain; the metering values of the image characteristic elements comprise coordinate position values, line segment length values, included angle values and other types of quantity values; the other types of numbers comprise the number of connected domains, the number of color blocks, the number of pixels of the connected domains and the number of pixels of the color blocks.
The image contour lines are contour lines of a display image in the image; the color block contour line is a color block contour line of each color; color block connected domain contour lines the contour lines of each connected domain in each color block. As shown in fig. 4a, the o point is the image center of gravity point. The image center of gravity is the center of gravity of a plane figure formed by a set of pixel points of a plurality of color block connected domains of all color blocks (except background colors) in the image to be processed, and the image center of gravity is the pixel point corresponding to a fulcrum which can keep the plane figure formed by the image non-background color block pixel points balanced. As shown in FIG. 4b, o1The point is the 1 st color block center of gravity point. The color block center of gravity is the center of gravity of a plane figure formed by a set of certain color block pixel points in the image to be processed, and the color block center of gravity is the pixel point corresponding to a fulcrum which can keep the plane figure formed by the corresponding color block pixel points balanced. As shown in FIG. 4c, o11The point is the 1 st connected domain center of gravity, o, of the 1 st color block12The point is the center of gravity, o, of the 2 nd connected domain of the 1 st color block13The point is the center of gravity, o, of the 3 rd connected domain of the 1 st color block14The point is the center of gravity, o, of the 4 th connected domain of the 1 st color block15The point is the center of gravity, o, of the 5 th connected domain of the 1 st color block16The point is the center of gravity, o, of the 6 th connected domain of the 1 st color block17The point is the center of gravity, o, of the 7 th connected domain of the 1 st color block18The point is the center of gravity of the 8 th connected domain of the 1 st color block. The center of gravity of the color block connected domain is the center of gravity of a plane figure formed by a set of pixel points of a certain color block connected domain in the image to be processed, and the center of gravity of the color block connected domain is the pixel point corresponding to a fulcrum which can keep the plane figure formed by the pixel points of the corresponding color block connected domain balanced. The position of the center of gravity point is related to the shape of the color block. Most of the center of gravity points of the color patches are at the geometric centers of the color patches. For example, the center of a triangle is the intersection of the three-sided centerlines; the center of gravity of the line segment is at the middle point of the line segment; the center of the rectangle is the intersection point of the two diagonal lines, the gravity center of the parallelogram is the intersection point of the two diagonal lines, and is also the intersection point of the midpoint connecting lines of the two pairs of opposite sides; the center of gravity of the circle is the center of the circle. In other embodiments, the center point of the effective area of the color block can be used instead of the center point of gravity of the color block. The central point of the effective area of the color block refers to the diagonal line of the square circumscribed by the color blockAnd (4) an intersection point.
From the experimental data of a plurality of times, it is known that a plurality of identical or similar images have a feature that the gravity center positions coincide or are close to each other. Therefore, the color block connected domain gravity center point, the color block gravity center point and the gravity center points of the image at a plurality of different angles of the image gravity center point of the image to be processed are selected as important features of the image and are combined for description, and the problem of stability of commonality feature description of the same or similar images can be effectively solved.
Specifically, the core radial lines include: the image center line radial lines, the color block center line radial lines and the color blocks are communicated with the domain center line radial lines; the image center line radial line is a connecting line of the positioned image center point and the positioned image contour line; and the color block center line radial line is a connecting line of the gravity center point of each positioned color block and the corresponding color block contour line after positioning, and the color block communicating domain radial line is a connecting line of the gravity center point of each positioned color block communicating domain and the corresponding color block communicating domain contour line after positioning.
Extracting the core lines and the radial lines in the preset angle direction of the positioned image to be processed, calculating the length of each core line and radial line, and converting the length into a particularly rounded percentage number:
(1) and selecting and setting a preset angle, wherein the preset angle refers to an included angle degree formed by each center line radial line and a line segment above the y axis in a circle with the center of gravity as the center of the circle, and the value of the preset angle is generally within a range of less than 360 degrees.
(2) Extracting an image center line radial line which accords with a preset angle, taking an image gravity center point as an original point, finding out a point which is intersected with an image contour line along the preset angle, and taking a connecting line of the image gravity center point and the point which is intersected with the image contour line as the image center line radial line; extracting color block center line radial lines which accord with a preset angle, finding out points intersected with color block contour lines along the preset angle by taking color block gravity center points as original points, and taking connecting lines of the color block gravity center points and the points intersected with the color block contour lines as the color block center line radial lines; and extracting a color block connected domain center line radial line which accords with a preset angle, finding out a point which is intersected with a color block connected domain contour line along the preset angle by taking a color block connected domain center of gravity point as an original point, and taking a connecting line of the color block connected domain center of gravity point and the point which is intersected with the color block connected domain contour line as the image color block center line radial line.
(3) And respectively calculating the lengths of the image center line radial line, the color block center line radial line and the color block communication domain center line radial line, and converting the lengths into particularly rounded percentage numbers.
Wherein, the expression form of the length of the center line radial line comprises the following steps: the actual length of the core line and the radial line, the relative length of the core line and the radial line and the percentage of the core line and the radial line which are specially integrated are taken; wherein, the actual length of the center line radial line refers to the actual pixel length of the center line radial line; the relative length of the center line and the radial line is the percentage of the actual length of the center line and the radial line to the horizontal pixel length or the vertical pixel length of the effective area of the color block contour line of the positioned image to be processed; the specially rounded percentage of the center line is the specially rounded percentage obtained by rounding the relative length of the center line according to a preset rule.
The method for acquiring the actual length of the radial line of the core wire comprises the following steps:
the actual length of the center line radial line is calculated according to the original pixel data length of the image and is the actual pixel length from the gravity center point of the color block connected domain to the contour line of the color block connected domain.
The method for acquiring the relative length of the radial lines of the core wires comprises the following steps:
the relative length of the center line and the radial line is the percentage of the actual length of the center line and the radial line to the horizontal pixel length or the vertical pixel length of the effective area of the color block contour line of the positioned image to be processed. The effective area of the color block contour line of the image to be processed after positioning is an area surrounded by an external square, and each side of the external square is at least connected with or coincided with one point on the color block contour line of the image. The relative length of the radial lines of the core wires can be calculated and obtained according to the following calculation formula:
G2n=(gn÷r)100%
G2nthe relative length of the center line radial line of the color block connected domain at a preset angle m is shown as gnRepresenting the actual length from the center of gravity point of the color block connected domain to the center line radial line of the color block connected domain contour line at a preset angle m, and r representing the horizontal pixel length of the effective area of the color block contour line of the image to be processed after positioning, wherein the effective area of the image refers to the image contour lineThe image area enclosed by the circumscribed square.
The preset rules for particularly rounding percentages include:
1) equally dividing the percentage of 0% to 100% into n specially rounded percentage intervals, wherein the specially rounded percentage is any number in the preset interval.
2) And checking the section in which the relative length of the core line falls, and replacing the relative length of the core line by a preset rounded percentage of the section.
In one embodiment, n may be 10, that is, the percentage of 0% to 100% is equally divided into 10 intervals, and the corresponding intervals are: 0% to 10% is interval 1, more than 10% to 20% is interval 2, more than 20% to 30% is interval 3, and so on, more than 90% to 100% is interval 10. Assuming that the median value of each interval is a percentage of the particular integer, the percentage of the particular integer of the 10 intervals is: 5%, 15%, 25%, 35%, 45%, 55%, 65%, 75%, 85%, 95%. If the relative length of the core line is 18%, the relative length 18% of the core line falls into the 2 nd interval of 10% to 20%, and the percentage of the interval corresponding to the special integer is 15%, therefore, the relative length 18% of the core line can be replaced by the percentage of the interval preset for the special integer of 15%.
In one embodiment, the value of n may also be 20, that is, the percentage of 0% to 100% is equally divided into 20 intervals, and the corresponding intervals are: 0% to 5% is interval 1, more than 5% to 10% is interval 2, more than 10% to 15% is interval 3, and so on, more than 95% to 100% is interval 20. Assuming that the median value of each interval is a particularly rounded percentage, the particularly rounded percentages of the 20 intervals are: 2.5%, 7.5%, 12.5%, 17.5%, 22.5%, 27.5%, 32.5%, 37.5%, 42.5%, 47.5%, 52.5%, 57.5%, 62.5%, 67.5%, 72.5%, 77.5%, 82.5%, 87.5%, 92.5%, 97.5%. If the relative length of the core line is 18%, the relative length of the core line 18% falls in the 4 th interval of 15% to 20%, and the percentage of the special integer corresponding to the interval is 17.5%, so that the relative length of the core line 18% can be replaced by the percentage of the special integer preset in the interval of 17.5%. In practical application, n can take any value, and the value of n can be set according to the requirement of practical application.
In one embodiment, the selection and setting of the preset angle may be according to the following angle selection scheme:
a: 4, arc: every 90 degrees from 0 is 1 arc, for a total of 4 arcs, such as: 0. 90, 180, 270.
B: 8, arc: every 45 degrees from 0 is 1 arc, for a total of 8 arcs, such as: 0. 45, 90, 135, 180, 225, 270, 315.
C: 18 arc: every 20 degrees of difference is 1 arc from 0, for a total of 18 arcs, such as: 0. 20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260, 280, 300, 320, 340.
D: 36 arc: every 10 degrees from 0 is 1 arc for a total of 36 arcs.
E; 180 arc: every 2 degrees from 0 is 1 arc, for a total of 180 arcs.
As shown in fig. 6, the preset angle is an angular distribution diagram of 8 equal parts, and each 45-degree difference from 0 degrees is 1 arc, for a total of 8 arcs, as follows: 0. 45, 90, 135, 180, 225, 270 and 315, wherein the degree of an included angle NOM formed by an OM line segment and an ON line segment is 45 degrees.
And step S210, combining and describing the special rounding percentage according to a preset coordinate position combination rule to generate an initial feature descriptor.
The initial feature descriptors include: feature descriptors of coordinate position relationships of image feature elements, feature descriptors of length relationships of image feature elements, feature descriptors of angular relationships of image feature elements, feature descriptors of other types of quantitative relationships of image feature elements.
Combining and describing the image barycentric point and the coordinate position of each image feature element by a specific integer percentage according to a preset coordinate position combination rule, and using the combined and described image barycentric point and the coordinate position of each image feature element as a feature descriptor of the coordinate position relation of the image feature elements; combining and describing the image barycentric point and the line length of each image characteristic element according to a preset line length combination rule by particularly taking the integral percentage, and using the combined and described line length as a characteristic descriptor of the length relation of the image characteristic elements; combining and describing the angle of the image barycentric point and each image feature element according to a preset angle combination rule by particularly taking the integral percentage, and using the angle as a feature descriptor of the angle relation of the image feature elements; combining and describing the image barycentric point and other types of quantity special integer percentages of each image characteristic element according to a preset combination rule of other types of quantity, and using the combination rule as a characteristic descriptor of other types of quantity relations of the image characteristic elements.
Specifically, the concrete representation form of the descriptor can be determined according to the actual application needs. In one embodiment, the preset combination rule for combining and describing may be:
1. the percentage of the center line radial line which is particularly rounded is combined according to the image, the image color block connected domain and the color block respectively, and the percentage is sorted according to the angle of the center line radial line.
2. When a plurality of contour lines pass through the center line radial lines, the center line radial lines of each angle also have particularly integral percentage numbers of the corresponding center line radial lines, particularly integral percentage numbers of the center line radial lines of different angles are separated by a given symbol (such as ","), particularly integral percentage numbers of the center line radial lines of different angles are separated by a given symbol (such as ";"), and particularly integral percentage combinations of the center line radial lines of different preset angle standards are separated by a given symbol (such as "|");
3. the combination of the specially rounded percentage of the center line and the radial line of each color block connected domain is used as the feature descriptor of the center line and the radial line of the color block connected domain of the image; the combination of the specially rounded percentage of the center line radial lines of all the connected domains in each color block is used as the characteristic descriptor of the center line radial lines of the color block; and the combination of specially rounded percentage numbers of the center line and the radial line of all the color blocks in each image is used as the feature descriptor of the center line and the radial line of the image.
4. The expression form of the characters can be 'the number of the center line and the radial line + the specially integrated percentage value of the center line and the radial line at the preset angle';
5. the specially rounded percentage values of the center line can also omit the recording of "%" in the actual recording. E.g., 85%, can be noted as 85;
taking a contour line with a circular color block as an example, the preset angle is 36 arcs, namely, every 10 degrees from 0 degrees is 1 arc, and the total number of the arcs is 36, so that the number of the center line radial lines is 36; assuming that the specially rounded percentage is equally divided into 10 intervals, the specially rounded percentage of the 10 intervals is respectively: 5%, 15%, 25%, 35%, 45%, 55%, 65%, 75%, 85%, 95%; further, assuming that the actual length of the centerline is 43 pixels, and the horizontal pixel length of the effective region of the color block contour of the image to be processed after positioning is 95 pixels, the relative length of the centerline is 45.26%, the percentage of the centerline which is particularly rounded is 45%, and the centerline feature descriptor of the color block can be expressed as:
36;45;45;45;45;45;45;45;45;45;45;45;45;45;45;45;45;45;45;45;45;45;45;45;45;45;45;45;45;45;45;45;45;45;45;45;45|。
as shown in fig. 7, which is the image shown in fig. 3b, when the preset angle is 8 radians, the center line of the first color block connected region to the eighth color block connected region in the first color block is radial line.
As shown in fig. 8, which is the image shown in fig. 3b, when the preset angle is 18 radians, the center line of the first color patch is radial.
Specifically, the cardiac radial line includes: the heart and heart radial lines of the image and the color blocks, and the heart and heart radial lines of the communicated domain of the image and the color blocks; the center radial line of the image and color block is the connecting line of the center of gravity point of the positioned image and the center of gravity point of each color block after positioning, and the center radial line of the communicated domain of the image and the color block is the connecting line of the center of gravity point of the positioned image and the center of gravity point of the communicated domain of each color block after positioning.
Extracting the heart radial lines of the positioned image to be processed, calculating the angle and the length of each heart radial line, converting the length into a particularly rounded percentage number, and converting the angle into a particularly rounded angle number:
(1) extracting the heart-center radial line of the positioned image to be processed and the color block, and taking the connecting line of the gravity center point of the image and the gravity center points of the color blocks as the heart-center radial line of the positioned image to be processed and the color block; extracting the center-of-gravity radial line of the positioned to-be-processed image and color block communication domain, and taking the connecting line of the center-of-gravity point of the image and the center-of-gravity points of each color block communication domain as the center-of-gravity radial line of the positioned to-be-processed image and color block communication domain;
(2) calculating the angle of the heart-heart radial line, wherein the angle of the heart-heart radial line is the included angle degree formed by the heart-heart radial line and the line segment above the y axis, and converting the angle into a specially rounded angle degree;
(3) calculating a heart centerline length, a representation of the heart centerline length, comprising: the actual length of the heart-heart radial line, the relative length of the heart-heart radial line and the percentage of the heart-heart radial line which is particularly rounded; the actual length of the heart-heart radial line refers to the actual pixel length of the heart-heart radial line; the relative length of the heart-heart radial lines refers to the percentage of the actual length of the heart-heart radial lines to the horizontal pixel length or the vertical pixel length of the effective area of the color block contour lines of the positioned image to be processed; the specially rounded percentage number of the heart-heart radial line refers to the specially rounded percentage number of the heart-heart radial line of the image obtained by rounding the relative length of the heart-heart radial line according to a preset rule;
the preset rules for particularly rounding percentages include:
1) equally dividing the percentage of 0% to 100% into n specially rounded percentage intervals, wherein the specially rounded percentage is any number in the preset interval;
2) and checking the section in which the relative length of the heart radial line falls, and replacing the relative length of the heart radial line by a preset specially rounded percentage of the section.
The preset rule for calculating the percentage of the special rounding is similar to the preset rule for calculating the percentage of the special rounding of the centerline, and for specific description, reference is made to the preset rule for calculating the percentage of the special rounding of the centerline, which is not described herein again.
Specifically, the concrete representation form of the descriptor can be determined according to the actual application needs. In one embodiment, the preset combination rule for combining and describing may be:
1. the image heart-heart radial line feature descriptor component elements comprise: the number of segments of the heart-heart radial line, the angle of the heart-heart radial line and the length of the heart-heart radial line.
2. The length of the heart-diameter line (i.e. the specially rounded percentage of the heart-diameter line) should be sorted according to the angle of the heart-diameter line; the angles of the heart radial lines are sorted according to the size of the angles.
3. Particularly rounded percentages of the heart lines of different angles or different line segments are separated by a convention symbol (e.g., ";").
4. The angle of the cardiac line and the length of the cardiac line are separated by a given symbol (e.g., "|");
5. the length character expression form of the heart-heart radial line can be 'the number of segments of the heart-heart radial line + the specially rounded percentage value of each heart-heart radial line'; the expression form of the angle character of the heart diameter line can be 'the number of the segments of the heart diameter line + the angle numerical value of each heart diameter line';
6. the specially rounded percentage values of the heart-radial lines can also be omitted in the actual recording. E.g., 85%, can be noted as 85;
as shown in fig. 9, the feature descriptor of the heart centerline of the image and patch connected domain of the image shown in fig. 3 b;
wherein, the angle of the heart radial line: 3; 0; 120 of a solvent; 240 |.
Length of heart radial line: 3; 25; 25; 25.
In step S212, an image feature descriptor is generated from the initial feature descriptor.
And taking a set of feature descriptors of coordinate position relations of the image feature elements, feature descriptors of line length relations of the image feature elements, feature descriptors of angle relations of the image feature elements and feature descriptors of other types of quantity relations of the image feature elements as the image feature descriptors.
Specifically, the above steps acquire feature descriptors of image center line radial lines, feature descriptors of color block connected domain center line radial lines, feature descriptors of image center radial lines of image and color blocks, and feature descriptors of image center radial lines of image and color block connected domain center radial lines, which are described from feature levels and multiple angles of image color block connected domain, image color blocks and whole image, but if they exist independently, the expressed meanings may be limited.
The image feature descriptor extraction method comprises the steps of firstly carrying out color block segmentation on an image to be processed, extracting an image contour line and an image center of gravity point of the image to be processed, and carrying out relocation to be processed according to the image contour line and the image center of gravity point. And acquiring center of gravity points of all color block connected domains, center of gravity points of color blocks, contour lines of all color block connected domains and contour lines of all color blocks of the image to be processed after relocation, and calculating a feature descriptor of an image centerline radial line, a feature descriptor of a centerline radial line of a color block connected domain, a feature descriptor of a color block centerline radial line and a feature descriptor of the image centerline radial line. And taking the feature descriptors of the image core lines, the feature descriptors of the core lines of the color block connected domain, the feature descriptors of the color block core lines and the feature descriptors of the image core lines as image feature descriptors. And the feature descriptors of the center line and the radial line of the color block connected domain, the feature descriptors of the color block center line and the feature descriptors of the image center radial line are used as image feature descriptors, so that the description of the image features is enriched. The method can be applied to wide image retrieval, and effectively enhances the matching effect of the image retrieval. The method can effectively solve the problem of stability of commonality feature description of the same or similar images, overcome the defect that the traditional contour feature line extraction technical method can cause missing detection of the same or similar images in image retrieval, and improve the matching effect of the same or similar images in image identification retrieval. The method also has the advantage of more comprehensive description of the image characteristic information, and avoids omission of the image key characteristic information.
It should be understood that although the various steps in the flow charts of fig. 1-2 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-2 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 10, there is provided an image retrieval apparatus including: a database building module 100, an input image feature descriptor extraction module 200, and a retrieval module 300, wherein:
a database establishing module 100, configured to extract an image feature descriptor of a sample image, and establish a sample image database; the image feature descriptors comprise feature descriptors of coordinate position relations of image feature elements, feature descriptors of length relations of the image feature elements, feature descriptors of angle relations of the image feature elements and feature descriptors of other types of quantity relations of the image feature elements;
an input image feature descriptor extracting module 200, configured to obtain an input image and extract an image feature descriptor of the input image; the image feature descriptors comprise feature descriptors of coordinate position relations of image feature elements, feature descriptors of length relations of the image feature elements, feature descriptors of angle relations of the image feature elements and feature descriptors of other types of quantity relations of the image feature elements;
the retrieval module 300 is configured to retrieve, in a sample image database, a sample image that matches an image feature descriptor of an input image, using the image feature descriptor as a retrieval word, and use the matched sample image as a result of image retrieval.
For specific limitations of the image retrieval apparatus, reference may be made to the above limitations of the image retrieval method, which are not described herein again. The modules in the image retrieval device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 11. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an image retrieval method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 11 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
and extracting image feature descriptors of the sample images and establishing a sample image database. An input image is acquired, and an image feature descriptor of the input image is extracted. And taking the image feature descriptor of the input image as a search word, searching a sample image matched with the image feature descriptor in a sample image database, and taking the matched sample image as an image searching result.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and carrying out color block segmentation on the image to be processed, and extracting an image contour line and an image gravity center point of the image to be processed. And positioning the image to be processed according to a preset positioning rule to obtain a coordinate system with the center of gravity point of the image as an origin. And extracting image characteristic elements and a metering value thereof from a coordinate system of the image to be processed with the center of gravity point of the image as an origin. And converting the metering value into a percentage, and obtaining the special rounding percentage according to a preset rounding rule by using the percentage. And combining and describing the specially rounded percentages according to a preset coordinate position combination rule to generate an initial feature descriptor. An image feature descriptor is generated from the initial feature descriptor.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
and extracting image feature descriptors of the sample images and establishing a sample image database. An input image is acquired, and an image feature descriptor of the input image is extracted. And taking the image feature descriptor of the input image as a search word, searching a sample image matched with the image feature descriptor in a sample image database, and taking the matched sample image as an image searching result.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and carrying out color block segmentation on the image to be processed, and extracting an image contour line and an image gravity center point of the image to be processed. And positioning the image to be processed according to a preset positioning rule to obtain a coordinate system with the center of gravity point of the image as an origin. And extracting image characteristic elements and a metering value thereof from a coordinate system of the image to be processed with the center of gravity point of the image as an origin. And converting the metering value into a percentage, and obtaining the special rounding percentage according to a preset rounding rule by using the percentage. And combining and describing the specially rounded percentages according to a preset coordinate position combination rule to generate an initial feature descriptor. An image feature descriptor is generated from the initial feature descriptor.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (8)

1. An image retrieval method, characterized in that the method comprises:
extracting image feature descriptors of the sample images and establishing a sample image database; the image feature descriptors comprise feature descriptors of coordinate position relations of image feature elements, feature descriptors of length relations of the image feature elements, feature descriptors of angle relations of the image feature elements and feature descriptors of other types of quantity relations of the image feature elements;
acquiring an input image, and extracting an image feature descriptor of the input image; the image feature descriptors comprise feature descriptors of coordinate position relations of image feature elements, feature descriptors of length relations of the image feature elements, feature descriptors of angle relations of the image feature elements and feature descriptors of other types of quantity relations of the image feature elements;
taking an image feature descriptor of an input image as a search word, searching a sample image matched with the image feature descriptor in a sample image database, and taking the matched sample image as an image searching result;
feature descriptors for other types of quantitative relationships of the image feature elements include:
the method comprises the steps of obtaining a feature descriptor of a connected domain quantity relation of image feature elements, a feature descriptor of a color block quantity relation of the image feature elements, a feature descriptor of a connected domain pixel point quantity relation of the image feature elements and a feature descriptor of a color block pixel point quantity relation of the image feature elements;
the extracting of the image feature descriptor includes:
carrying out color block segmentation on an image to be processed, and extracting an image contour line and an image gravity center point of the image to be processed; the image to be processed includes: a sample image and an input image;
extracting image characteristic elements and a metering value thereof from a coordinate system of an image to be processed with an image gravity center point as an origin;
converting coordinate position values, line segment length values and other types of quantity values in the obtained metering values of the image characteristic elements into percentages, and then obtaining special rounding percentages of the percentages after the conversion of the image characteristic elements according to a preset rounding rule; obtaining a special rounding angle value for the included angle value in the obtained metering values of the image characteristic elements according to a preset rounding rule;
combining and describing the image barycentric point and the coordinate position of each image feature element by a specific integer percentage according to a preset coordinate position combination rule, and using the combined and described image barycentric point and the coordinate position of each image feature element as a feature descriptor of the coordinate position relation of the image feature elements; combining and describing the image barycentric point and the line length of each image characteristic element according to a preset line length combination rule by particularly taking the integral percentage, and using the combined and described line length as a characteristic descriptor of the length relation of the image characteristic elements; combining and describing the angle of the image barycentric point and each image feature element according to a preset angle combination rule by particularly taking the integral percentage, and using the angle as a feature descriptor of the angle relation of the image feature elements; combining and describing the image barycentric point and other types of quantity special integer percentages of each image characteristic element according to a preset combination rule of other types of quantity, and using the combination rule as a characteristic descriptor of other types of quantity relations of the image characteristic elements;
and taking a set of feature descriptors of coordinate position relations of the image feature elements, feature descriptors of length relations of the image feature elements, feature descriptors of angle relations of the image feature elements and feature descriptors of other types of quantity relations of the image feature elements as the image feature descriptors.
2. The method of claim 1,
the data stored in the sample image database for extracting the image feature descriptors of the sample images includes: sample images and image feature descriptors of each sample image; the image feature descriptor of the sample image includes: the image feature element comprises feature descriptors of coordinate position relations of image feature elements, feature descriptors of length relations of the image feature elements, feature descriptors of angle relations of the image feature elements and feature descriptors of other types of quantity relations of the image feature elements;
the extracting of the data of the image feature descriptor of the input image includes: an input image and an image feature descriptor of the input image; the image feature descriptor of the input image includes: feature descriptors of coordinate position relationships of image feature elements, feature descriptors of length relationships of image feature elements, feature descriptors of angular relationships of image feature elements, feature descriptors of other types of quantitative relationships of image feature elements.
3. The method of claim 2, wherein:
before the extracting the image feature descriptor, the method further comprises the following steps: positioning the image to be processed according to a preset positioning rule to obtain a coordinate system with an image gravity center point as an origin;
the image feature elements include, but are not limited to: the coordinate system comprises color block center of gravity points, color block connected domain center of gravity points, color block effective areas, color block connected domain effective areas, color block pixel number, color block connected domain pixel number, image contour lines, color block connected domain contour lines, color block contour lines, center line radial lines, included angles formed by the center line radial lines and line segments above the y axis of the coordinate system, and included angles formed by the center line radial lines and line segments above the y axis of the coordinate system; the centerline comprises: the image center line radial lines, the color block center line radial lines and the color blocks are communicated with the domain center line radial lines; the image center line radial line is a connecting line of the positioned image center of gravity point and a point which is intersected with the positioned image contour line on a preset angle; the color block center line radial line is a connecting line of the center of gravity point of each positioned color block and the intersection point of the corresponding positioned color block contour line along a preset angle, and the color block communication domain radial line is a connecting line of the center of gravity point of each positioned color block communication domain and the intersection point of the corresponding positioned color block communication domain contour line along the preset angle; the cardiac radial line comprises: the heart and heart radial lines of the image and the color blocks, and the heart and heart radial lines of the communicated domain of the image and the color blocks; the center radial line of the image and color block is a connecting line of the positioned image center of gravity point and the positioned center of gravity point of each color block, and the center radial line of the image and color block communicating domain is a connecting line of the positioned image center of gravity point and the positioned center of gravity point of each color block communicating domain; the metering values of the image characteristic elements comprise coordinate position values, line segment length values, included angle values and other types of quantity values.
4. The method of claim 3,
the search term comprises: at least one of a measurement value of the coordinate position relationship combined and described according to a preset coordinate position combination rule, a measurement value of the line length relationship combined and described according to a preset line length combination rule, a measurement value of the angle relationship combined and described according to a preset angle combination rule, and a measurement value of other types of quantity relationships combined and described according to a preset other types of quantity combination rules.
5. The method according to claim 4, characterized in that coordinate position values, line segment length values and other types of quantity values in the obtained metering values of the image feature elements are converted into percentages, and the percentages are further subjected to a preset rounding rule to obtain special rounding percentages; and obtaining a special rounding angle value according to a preset rounding rule by using the included angle value in the obtained metering value of the image characteristic element.
6. An image retrieval apparatus, characterized in that the apparatus comprises:
the database establishing module is used for extracting the image feature descriptors of the sample images and establishing a sample image database; the image feature descriptors comprise feature descriptors of coordinate position relations of image feature elements, feature descriptors of length relations of the image feature elements, feature descriptors of angle relations of the image feature elements and feature descriptors of other types of quantity relations of the image feature elements;
the input image feature descriptor extraction module is used for acquiring an input image and extracting an image feature descriptor of the input image; the image feature descriptors comprise feature descriptors of coordinate position relations of image feature elements, feature descriptors of length relations of the image feature elements, feature descriptors of angle relations of the image feature elements and feature descriptors of other types of quantity relations of the image feature elements;
the retrieval module is used for retrieving a sample image matched with the image feature descriptor in a sample image database by taking the image feature descriptor of the input image as a retrieval word, and taking the matched sample image as an image retrieval result;
feature descriptors for other types of quantitative relationships of the image feature elements include:
the method comprises the steps of obtaining a feature descriptor of a connected domain quantity relation of image feature elements, a feature descriptor of a color block quantity relation of the image feature elements, a feature descriptor of a connected domain pixel point quantity relation of the image feature elements and a feature descriptor of a color block pixel point quantity relation of the image feature elements;
the database establishing module and the input image feature descriptor extracting module further comprise:
carrying out color block segmentation on an image to be processed, and extracting an image contour line and an image gravity center point of the image to be processed; the image to be processed includes: a sample image and an input image;
extracting image characteristic elements and a metering value thereof from a coordinate system of an image to be processed with an image gravity center point as an origin;
converting coordinate position values, line segment length values and other types of quantity values in the obtained metering values of the image characteristic elements into percentages, and then obtaining special rounding percentages of the percentages after the conversion of the image characteristic elements according to a preset rounding rule; obtaining a special rounding angle value for the included angle value in the obtained metering values of the image characteristic elements according to a preset rounding rule;
combining and describing the image barycentric point and the coordinate position of each image feature element by a specific integer percentage according to a preset coordinate position combination rule, and using the combined and described image barycentric point and the coordinate position of each image feature element as a feature descriptor of the coordinate position relation of the image feature elements; combining and describing the image barycentric point and the line length of each image characteristic element according to a preset line length combination rule by particularly taking the integral percentage, and using the combined and described line length as a characteristic descriptor of the length relation of the image characteristic elements; combining and describing the angle of the image barycentric point and each image feature element according to a preset angle combination rule by particularly taking the integral percentage, and using the angle as a feature descriptor of the angle relation of the image feature elements; combining and describing the image barycentric point and other types of quantity special integer percentages of each image characteristic element according to a preset combination rule of other types of quantity, and using the combination rule as a characteristic descriptor of other types of quantity relations of the image characteristic elements;
and taking a set of feature descriptors of coordinate position relations of the image feature elements, feature descriptors of length relations of the image feature elements, feature descriptors of angle relations of the image feature elements and feature descriptors of other types of quantity relations of the image feature elements as the image feature descriptors.
7. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 5.
CN201811038704.2A 2018-09-06 2018-09-06 Image retrieval method, image retrieval device, computer equipment and storage medium Active CN109063197B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811038704.2A CN109063197B (en) 2018-09-06 2018-09-06 Image retrieval method, image retrieval device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811038704.2A CN109063197B (en) 2018-09-06 2018-09-06 Image retrieval method, image retrieval device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109063197A CN109063197A (en) 2018-12-21
CN109063197B true CN109063197B (en) 2021-07-02

Family

ID=64759823

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811038704.2A Active CN109063197B (en) 2018-09-06 2018-09-06 Image retrieval method, image retrieval device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109063197B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110727814B (en) * 2019-10-10 2022-10-11 徐庆 Method for acquiring image shape feature descriptor
CN111340015B (en) * 2020-02-25 2023-10-20 北京百度网讯科技有限公司 Positioning method and device
CN111563181B (en) * 2020-05-12 2023-05-05 海口科博瑞信息科技有限公司 Digital image file query method, device and readable storage medium
CN114428876B (en) * 2021-12-29 2023-03-07 广州盖盟达工业品有限公司 Image searching method, device, storage medium and equipment for industrial apparatus

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101853386A (en) * 2010-05-14 2010-10-06 武汉大学 Topological tree based extraction method of image texture element features of local shape mode
CN104021138A (en) * 2014-04-23 2014-09-03 北京智谷睿拓技术服务有限公司 Image retrieval method and image retrieval device
CN104464079A (en) * 2014-12-29 2015-03-25 北京邮电大学 Multi-currency-type and face value recognition method based on template feature points and topological structures of template feature points
WO2015133699A1 (en) * 2014-03-06 2015-09-11 에스케이플래닛 주식회사 Object recognition apparatus, and recording medium in which method and computer program therefor are recorded
CN105574533A (en) * 2015-12-15 2016-05-11 徐庆 Image feature extraction method and device
CN106909552A (en) * 2015-12-22 2017-06-30 成都理想境界科技有限公司 Image retrieval server, system, coordinate indexing and misarrangement method
CN107908646A (en) * 2017-10-10 2018-04-13 西安电子科技大学 A kind of image search method based on layering convolutional neural networks
CN108052653A (en) * 2016-12-30 2018-05-18 徐庆 Acquisition methods, device, storage medium, terminal and the image search method of characteristics of image descriptor

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101853386A (en) * 2010-05-14 2010-10-06 武汉大学 Topological tree based extraction method of image texture element features of local shape mode
WO2015133699A1 (en) * 2014-03-06 2015-09-11 에스케이플래닛 주식회사 Object recognition apparatus, and recording medium in which method and computer program therefor are recorded
CN104021138A (en) * 2014-04-23 2014-09-03 北京智谷睿拓技术服务有限公司 Image retrieval method and image retrieval device
CN104464079A (en) * 2014-12-29 2015-03-25 北京邮电大学 Multi-currency-type and face value recognition method based on template feature points and topological structures of template feature points
CN105574533A (en) * 2015-12-15 2016-05-11 徐庆 Image feature extraction method and device
CN106909552A (en) * 2015-12-22 2017-06-30 成都理想境界科技有限公司 Image retrieval server, system, coordinate indexing and misarrangement method
CN108052653A (en) * 2016-12-30 2018-05-18 徐庆 Acquisition methods, device, storage medium, terminal and the image search method of characteristics of image descriptor
CN107908646A (en) * 2017-10-10 2018-04-13 西安电子科技大学 A kind of image search method based on layering convolutional neural networks

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于轮廓重构和特征点弦长的图像检索;师文 等;《软件学报》;20140327;第1557-1569页 *
综合颜色和形状特征的交通标志图像检索算法;赵宏伟 等;《吉林大学学报(工学版)》;20130315;第128-132页 *

Also Published As

Publication number Publication date
CN109063197A (en) 2018-12-21

Similar Documents

Publication Publication Date Title
CN109063197B (en) Image retrieval method, image retrieval device, computer equipment and storage medium
CN109460770B (en) Image feature descriptor extraction method, image feature descriptor extraction device, computer device and storage medium
CN109643318B (en) Content-based searching and retrieval of brand images
CN109543663A (en) A kind of dog personal identification method, device, system and storage medium
CN108763380B (en) Trademark identification retrieval method and device, computer equipment and storage medium
CN110765770A (en) Automatic contract generation method and device
CN109871490B (en) Media resource matching method and device, storage medium and computer equipment
Ahmad et al. Saliency-weighted graphs for efficient visual content description and their applications in real-time image retrieval systems
CN111160288A (en) Gesture key point detection method and device, computer equipment and storage medium
CN110033515B (en) Graph conversion method, graph conversion device, computer equipment and storage medium
CN109299307B (en) Trademark retrieval early warning method and device based on structural analysis
Ahmad et al. Describing colors, textures and shapes for content based image retrieval-a survey
CN109190615B (en) Shape-near word recognition determination method, device, computer device and storage medium
Kurchaniya et al. Analysis of different similarity measures in image retrieval based on texture and shape
CN108664945B (en) Image text and shape-pronunciation feature recognition method and device
CN110688995B (en) Map query processing method, computer-readable storage medium and mobile terminal
Zhang et al. An adaptive affinity graph with subspace pursuit for natural image segmentation
CN110688516A (en) Image retrieval method, image retrieval device, computer equipment and storage medium
CN115082999A (en) Group photo image person analysis method and device, computer equipment and storage medium
WO2022110492A1 (en) Finger vein-based identity identification method and apparatus, computer device, and storage medium
CN108009233B (en) Image restoration method and device, computer equipment and storage medium
CN114741489A (en) Document retrieval method, document retrieval device, storage medium and electronic equipment
JP6175904B2 (en) Verification target extraction system, verification target extraction method, verification target extraction program
CN107766863B (en) Image characterization method and server
CN113077410A (en) Image detection method, device and method, chip and computer readable storage medium

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
GR01 Patent grant
GR01 Patent grant