Image quality analysis method, device and storage medium
Through image corner detection and feature descriptor algorithm analysis, high-quality images are determined to improve the success rate of anchor point establishment and relocation query, and the problem of low relocation success rate caused by poor image quality is solved.
Patent Information
- Application Number
- CN201910580622.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-06-28
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2040-06-02
AI Technical Summary
In the prior art, if the image used for anchor points or image used for relocation query is of poor quality, the relocation success rate is lower, especially if the pattern is repeated in the image or too few feature points.
Feature points are extracted by image corner point detection method, and the feature descriptor algorithm is used to determine whether the image meets the number of features and repetitive constraints, and high-quality images are determined to establish anchor points or perform relocation query.
Improve the effectiveness of anchor point establishment and relocation query, ensuring rich image features and high distinction, thereby improving success rate.
Smart Images

Figure CN112150405B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of image processing technology, and in particular to an image quality analysis method and device, and a storage medium. Background Art
[0002] At present, the visual relocalization process mainly includes: establishing an anchor point based on image features and three-dimensional points, and uploading it to the cloud. After that, the terminal can collect the current scene image and transmit it to the cloud. After receiving the query instruction, the cloud uses the anchor point to perform a positioning query and return the positioning result. The positioning result can be success or failure.
[0003] However, in the prior art, if the image used for the anchor point or the image used for the relocation query is of poor quality, for example, there are a large number of repeated patterns in the image, there are many redundant feature points, or there are too few feature points in the image, it will lead to a low relocation success rate. Summary of the invention
[0004] The embodiments of the present application provide an image quality analysis method and device, and a storage medium, which perform quality analysis on an image based on its feature points, determine a high-quality image with rich features and high discrimination, and use the high-quality image to establish an anchor point or perform a relocation query, thereby improving the effect of establishing an anchor point or performing a relocation query.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] The present application provides an image quality analysis method, the method comprising:
[0007] The image corner detection method is used to extract feature points of the image to be analyzed, and N feature points are obtained; N is a natural number greater than or equal to 1;
[0008] Based on the relationship between N and a preset number threshold, determining whether the image to be analyzed meets the feature number constraint condition;
[0009] Calculating N feature descriptors corresponding to the N feature points using a feature descriptor algorithm, and judging whether the image to be analyzed satisfies a repeatability constraint condition based on the N feature descriptors;
[0010] If the image to be analyzed satisfies the feature quantity constraint and the repeatability constraint, the image to be analyzed is determined to be a high-quality image, and the high-quality image is used to establish an anchor point or perform a relocation query.
[0011] In the above scheme, the method of extracting feature points from the image to be analyzed by using the image corner point detection method to obtain N feature points includes:
[0012] Using a selection box of a preset size, a group of comparison points corresponding to each pixel in the image to be analyzed is selected, and the sum of grayscale differences between each pixel and the corresponding group of comparison points is determined;
[0013] In the image to be analyzed, a pixel point whose total grayscale difference is greater than a preset grayscale threshold is determined as a feature point, thereby obtaining the N feature points.
[0014] In the above solution, judging whether the image to be analyzed satisfies the feature quantity constraint condition based on the relationship between N and the preset quantity threshold includes:
[0015] If N is greater than the preset number threshold, it is determined that the image to be analyzed meets the feature number constraint condition;
[0016] If N is less than or equal to the preset quantity threshold, it is determined that the image to be analyzed does not satisfy the feature quantity constraint condition.
[0017] In the above solution, judging whether the image to be analyzed satisfies the repeatability constraint condition based on the N feature descriptors includes:
[0018] Among the N feature descriptors, the feature descriptors whose similarity is greater than a preset similarity threshold are classified into the same category, thereby obtaining at least one group of descriptors of the same category;
[0019] Based on the at least one group of similar descriptors, determining a corresponding number of repetitions of at least one feature;
[0020] Based on the number of repetitions of the at least one feature, it is determined whether the image to be analyzed satisfies the repeatability constraint condition.
[0021] In the above solution, determining at least one feature repetition number based on the at least one group of similar descriptors includes:
[0022] Determine, among the N feature points, a feature point corresponding to each feature descriptor in the first group of similar descriptors as a first feature point, thereby obtaining at least one first feature point; wherein the first group of similar descriptors is any group of similar descriptors in the at least one group of similar descriptors;
[0023] Acquire at least one group of neighborhood points corresponding to the at least one first feature point from the image to be analyzed;
[0024] Using the feature descriptor algorithm, calculating at least one group of neighborhood descriptors corresponding to the at least one group of neighborhood points;
[0025] The number of groups whose similarity between the at least one group of neighborhood descriptors is greater than the preset similarity threshold is counted, and the number of groups is used as a repetition number in the at least one feature repetition number, so as to obtain the at least one feature repetition number.
[0026] In the above solution, judging whether the image to be analyzed satisfies the repeatability constraint condition based on the number of repetitions of the at least one feature includes:
[0027] If the at least one feature repetition number includes a number greater than a preset feature repetition number, determining that the image to be analyzed does not satisfy the repeatability constraint condition;
[0028] If the at least one feature repetition number does not include a number greater than the preset feature repetition number, it is determined that the image to be analyzed satisfies the repeatability constraint condition.
[0029] In the above solution, after determining whether the image to be analyzed satisfies the repeatability constraint condition based on the N feature points, the method further includes:
[0030] If the image to be analyzed does not satisfy the feature quantity constraint or does not satisfy the repeatability constraint, the image to be analyzed is determined to be a low-quality image, and corresponding prompt information is output.
[0031] The present application provides an image quality analysis device, comprising:
[0032] An acquisition unit is used to extract feature points of the image to be analyzed by using an image corner point detection method to obtain N feature points; N is a natural number greater than or equal to 1;
[0033] A first judgment unit, configured to judge whether the image to be analyzed satisfies a feature quantity constraint condition based on a magnitude relationship between N and a preset quantity threshold;
[0034] A second judgment unit is used to calculate N feature descriptors corresponding to the N feature points by using a feature descriptor algorithm, and judge whether the image to be analyzed satisfies a repeatability constraint condition based on the N feature descriptors;
[0035] A determination unit is used to determine the image to be analyzed as a high-quality image if the image to be analyzed satisfies the feature quantity constraint and the repeatability constraint, and to use the high-quality image to establish an anchor point or perform a relocation query.
[0036] In the above-mentioned image quality analysis device, the acquisition unit is specifically used to use a selection box of a preset size to select a group of comparison points corresponding to each pixel point in the image to be analyzed, and determine the sum of the grayscale differences between each pixel point and the corresponding group of comparison points; the pixel point in the image to be analyzed whose sum of grayscale differences is greater than a preset grayscale threshold is determined as a feature point, thereby obtaining the N feature points.
[0037] In the above-mentioned image quality analysis device, the first judgment unit is specifically used to determine that the image to be analyzed meets the feature quantity constraint condition if N is greater than the preset quantity threshold; if N is less than or equal to the preset quantity threshold, determine that the image to be analyzed does not meet the feature quantity constraint condition.
[0038] In the above-mentioned image quality analysis device, the second judgment unit is specifically used to classify the feature descriptors whose similarity is greater than a preset similarity threshold among the N feature descriptors into the same category, thereby obtaining at least one group of similar descriptors; based on the at least one group of similar descriptors, determine the corresponding number of at least one feature repetitions; based on the at least one feature repetition number, judge whether the image to be analyzed meets the repeatability constraint.
[0039] In the above-mentioned image quality analysis device, the second judgment unit is specifically used to determine the feature point corresponding to each feature descriptor in the first group of similar descriptors among the N feature points as a first feature point, and obtain at least one first feature point; wherein the first group of similar descriptors is any group of similar descriptors among the at least one group of similar descriptors; obtain at least one group of neighborhood points corresponding to the at least one first feature point from the image to be analyzed; use the feature descriptor algorithm to calculate at least one group of neighborhood descriptors corresponding to the at least one group of neighborhood points; count the number of groups whose similarity between the at least one group of neighborhood descriptors is greater than the preset similarity threshold, and use the number of groups as one of the repetition numbers of the at least one feature repetition number, thereby obtaining the at least one feature repetition number.
[0040] In the above-mentioned image quality analysis device, the second judgment unit is specifically used to determine that the image to be analyzed does not satisfy the repeatability constraint condition if the at least one feature repetition number includes a number greater than the preset feature repetition number; if the at least one feature repetition number does not include a number greater than the preset feature repetition number, then determine that the image to be analyzed satisfies the repeatability constraint condition.
[0041] In the above-mentioned image quality analysis device, the determination unit is further used to determine the image to be analyzed as a low-quality image and output corresponding prompt information if the image to be analyzed does not satisfy the feature quantity constraint or does not satisfy the repeatability constraint.
[0042] An embodiment of the present application also provides a computer-readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the above-mentioned image quality analysis method.
[0043] The embodiment of the present application provides an image quality analysis method, which uses an image corner detection method to extract feature points of an image to be analyzed to obtain N feature points; N is a natural number greater than or equal to 1; based on the size relationship between N and a preset number threshold, it is determined whether the image to be analyzed meets the feature quantity constraint; the feature descriptor algorithm is used to calculate the N feature descriptors corresponding to the N feature points, and based on the N feature descriptors, it is determined whether the image to be analyzed meets the repeatability constraint; if the image to be analyzed meets the feature quantity constraint and the repeatability constraint, the image to be analyzed is determined to be a high-quality image, and the high-quality image is used to establish an anchor point or perform a relocation query. In other words, the technical solution provided by the embodiment of the present application performs quality analysis on an image according to its feature points, determines a high-quality image with rich features and high discrimination, and uses the high-quality image to establish an anchor point or perform a relocation query, thereby improving the effect of establishing an anchor point or performing a relocation query. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A schematic diagram of a method for analyzing image quality provided in an embodiment of the present application Figure 1 ;
[0045] Figure 2 A schematic diagram of an exemplary method of selecting comparison points using a circle of preset diameter provided in an embodiment of the present application;
[0046] Figure 3 An exemplary feature descriptor diagram provided for an embodiment of the present application;
[0047] Figure 4 A schematic diagram of a method for analyzing image quality provided in an embodiment of the present application Figure 2 ;
[0048] Figure 5 A schematic diagram of the structure of an image quality analysis device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0049] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. It is understood that the specific embodiments described herein are only used to explain the related applications, rather than to limit the applications. It should also be noted that, for the convenience of description, only the parts related to the related applications are shown in the accompanying drawings.
[0050] Embodiment 1
[0051] An embodiment of the present application provides an image quality analysis method. Figure 1 A schematic diagram of a method for analyzing image quality provided in an embodiment of the present application Figure 1 .like Figure 1 As shown, it mainly includes the following steps:
[0052] S101. Extract feature points from an image to be analyzed using an image corner detection method to obtain N feature points; N is a natural number greater than or equal to 1.
[0053] In an embodiment of the present application, the image quality analysis device may utilize an image corner point detection method to extract feature points from the image to be analyzed, thereby obtaining N feature points.
[0054] It should be noted that in the embodiments of the present application, the image quality analysis device performs quality analysis on the image to be analyzed, the purpose of which is to clarify whether the image to be analyzed is suitable for establishing an anchor point or performing a relocation query. The image to be analyzed can be any image that needs to be analyzed for image quality, which is obtained by a camera device. The specific image to be analyzed is not limited in the embodiments of the present application.
[0055] It should be noted that, in the embodiment of the present application, the image corner point detection method is the Features from Accelerated Segment Test (FAST) algorithm. Of course, the image corner point detection method can also be other algorithms that can extract feature points.
[0056] Specifically, in an embodiment of the present application, the image quality analysis device uses an image corner point detection method to extract feature points of the image to be analyzed to obtain N feature points, including: using a selection box of a preset size to select a group of comparison points corresponding to each pixel point in the image to be analyzed, and determining the sum of the grayscale differences between each pixel point and the corresponding group of comparison points; determining the pixel point in the image to be analyzed whose sum of grayscale differences is greater than a preset grayscale threshold as a feature point, thereby obtaining N feature points.
[0057] It should be noted that, in the embodiment of the present application, the selection box of the preset size can be specifically a circle of a preset diameter, and the specific diameter can be set according to actual needs. The image quality analysis device uses each pixel point in the image to be analyzed as the center of a circle of the preset diameter, and each pixel point passed by the circle boundary is a comparison point of the pixel point as the center of the circle, thereby obtaining a set of comparison points corresponding to each pixel point. Of course, the selection box can also be other shapes, which are not limited by the embodiment of the present application.
[0058] Figure 2This is a schematic diagram of an exemplary method of selecting comparison points using a circle with a preset diameter provided in an embodiment of the present application. Figure 2 As shown, for any pixel point p in the image to be analyzed, it is taken as the center of the circle, so that the boundary of the circle passes through 16 pixel points, namely pixel point 1 to pixel point 16. These 16 pixel points are all comparison points of pixel point p, forming a group of comparison points corresponding to pixel point p.
[0059] It should be noted that, in an embodiment of the present application, the image quality analysis device determines the sum of the grayscale differences between each pixel in the image to be analyzed and a corresponding set of comparison points. Specifically, for each pixel in the image to be analyzed, the grayscale value of the pixel is subtracted from the grayscale value of each comparison point in the corresponding set of comparison points, and the sum of these grayscale differences is calculated, which is the sum of the grayscale differences of the corresponding pixels.
[0060] For example, in the embodiments of the present application, Figure 2 As shown, a group of comparison points corresponding to the pixel point p in the image to be analyzed includes 16 pixel points. Therefore, the image quality analysis device calculates the difference between the grayscale value of the pixel point p and the grayscale values corresponding to each of the 16 pixel points, thereby obtaining 16 grayscale difference values. Afterwards, the sum of these 16 grayscale difference values is the total grayscale difference corresponding to the pixel point p.
[0061] It should be noted that, in the embodiment of the present application, the image quality analysis device specifically determines the pixel points as feature points from the image to be analyzed according to the following formula (1):
[0062]
[0063] Among them, N p is the sum of the grayscale differences between the pixel point p in the image to be analyzed and the corresponding set of comparison points, x is a pixel point passing through the boundary of the circle with the pixel point p as the center, that is, a comparison point of the pixel point p, I(x) is the grayscale value of the comparison point x of the pixel point p, I(p) is the grayscale value of the pixel point p, ε d The image quality analysis device determines each pixel point that can make formula (1) valid as a feature point for the image to be analyzed.
[0064] It should be noted that, in the embodiment of the present application, the preset grayscale threshold can be determined according to actual analysis requirements. The specific preset grayscale threshold is not limited in the embodiment of the present application.
[0065] It can be understood that in the embodiment of the present application, the image quality analysis device extracts feature points of the image to be analyzed in the above-mentioned manner. Since the obtained feature points satisfy the requirement that the sum of the grayscale differences with the corresponding set of comparison points is greater than the preset grayscale threshold, the feature intensity of the feature points is relatively large, that is, the effect of the selected feature points is better.
[0066] S102 . Based on the relationship between N and a preset quantity threshold, determine whether the image to be analyzed meets a feature quantity constraint condition.
[0067] In an embodiment of the present application, after extracting N feature points from the image to be analyzed, the image quality analysis device can determine whether the image to be analyzed meets the feature quantity constraint condition based on the relationship between N and a preset quantity threshold.
[0068] It should be noted that, in the embodiment of the present application, the preset quantity threshold can be predetermined according to actual needs. The specific preset quantity threshold is not limited in the embodiment of the present application.
[0069] Specifically, in an embodiment of the present application, the image quality analysis device determines whether the image to be analyzed satisfies the feature quantity constraint condition based on the size relationship between N and a preset quantity threshold, including: if N is greater than the preset quantity threshold, then it is determined that the image to be analyzed satisfies the feature quantity constraint condition; if N is a natural number that is less than or equal to the preset quantity threshold, then it is determined that the image to be analyzed does not satisfy the feature quantity constraint condition.
[0070] Exemplarily, in an embodiment of the present application, the image quality analysis device obtains 100 feature points from the image to be analyzed, that is, N is equal to 100, and the preset number threshold is 80. Since 100 is greater than 80, that is, N is greater than the preset number threshold, the image quality analysis device determines that the image to be analyzed satisfies the feature number constraint condition.
[0071] It should be noted that in the embodiment of the present application, if the image to be analyzed does not meet the feature quantity constraint condition, it indicates that there are few feature points in the image to be analyzed. For example, when the image to be analyzed is a white paper image or a black screen image, there are too few feature points.
[0072] It is understandable that if an image has too few feature points, such as a white paper image or a black screen image, using the image to establish an anchor point will interfere with the entire image database, causing the image database to be unable to match and a high probability of mismatching. Using the image for relocation query will also cause repeated positioning and identification. Therefore, in an embodiment of the present application, the number of feature points is determined for the image to be analyzed. If the number of feature points is too small, the image to be analyzed will not be used to establish an anchor point or perform a relocation query.
[0073] S103, using a feature descriptor algorithm to calculate N feature descriptors corresponding to the N feature points, and based on the N feature descriptors, determining whether the image to be analyzed satisfies a repeatability constraint condition.
[0074] In an embodiment of the present application, after extracting N feature points from the image to be analyzed, the image quality analysis device can use a feature descriptor algorithm to calculate N feature descriptors corresponding to the N feature points, and further determine whether the image to be analyzed satisfies the repeatability constraint based on the N feature descriptors.
[0075] It should be noted that, in the embodiments of the present application, the feature descriptor algorithm can be any algorithm in the prior art that can calculate the feature descriptor corresponding to the feature point, for example, a binary robust primitive independent feature (Binary Robust Independent Elementary Features, BRIEF) algorithm, a binary oriented simple descriptor (Oriented FAST and Rotated BRIEF, ORB) algorithm, etc. The specific feature descriptor algorithm is not limited in the embodiments of the present application. The specific process of calculating the N feature descriptors corresponding to the N feature points using the feature descriptor algorithm is not repeated here.
[0076] It should be noted that, in the embodiment of the present application, each of the N feature descriptors can actually be a 256-bit binary feature vector, that is, each bit is either 0 or 1. In fact, 0 and 1 represent the comparison results of the grayscale values of the corresponding feature point and the corresponding pixel point in a selected surrounding area.
[0077] Specifically, in an embodiment of the present application, an image quality analysis device determines whether the image to be analyzed satisfies a repeatability constraint condition based on N feature descriptors, including: classifying feature descriptors among the N feature descriptors whose similarity is greater than a preset similarity threshold into the same category, thereby obtaining at least one group of similar descriptors; based on at least one group of similar descriptors, determining at least one corresponding feature repetition number; based on at least one feature repetition number, determining whether the image to be analyzed satisfies the repeatability constraint condition.
[0078] It should be noted that, in the embodiment of the present application, the preset similarity threshold can be determined according to the actual quality analysis requirements. The specific preset similarity threshold is not limited in the embodiment of the present application.
[0079] It is understandable that in an embodiment of the present application, among the N feature descriptors, the similarity is based on the comparison of the bits in the feature descriptors. Each of the N feature descriptors can be a 256-bit feature vector. When comparing two feature descriptors, it is possible to specifically compare whether the values of each corresponding bit are the same to calculate the similarity between the two feature descriptors. For example, if each bit of the two feature descriptors is the same, that is, the similarity of the two feature descriptors is 100%, if the preset similarity threshold is 80%, the two feature descriptors can be classified into the same class.
[0080] It should be noted that, in the embodiment of the present application, classification indexing can be performed in the form of an index tree, so as to classify N feature descriptors in turn to obtain at least one group of similar descriptors. Of course, a group of similar descriptors includes at least one feature descriptor.
[0081] Specifically, in an embodiment of the present application, an image quality analysis device determines at least one feature repetition number based on at least one group of similar descriptors, including: determining a feature point corresponding to each feature descriptor in a first group of similar descriptors among N feature points as a first feature point, thereby obtaining at least one first feature point; the first group of similar descriptors is any group of similar descriptors in at least one group of similar descriptors; obtaining at least one group of neighborhood points corresponding to at least one first feature point from the image to be analyzed; calculating at least one group of neighborhood descriptors corresponding to at least one group of neighborhood points according to a feature descriptor algorithm; counting the number of groups whose similarity between at least one group of neighborhood descriptors is greater than a preset similarity threshold, and using the number of groups as one of the repetition numbers in at least one feature repetition number, thereby obtaining at least one feature repetition number.
[0082] It should be noted that in the embodiment of the present application, there is a one-to-one correspondence between the N feature points and the N feature descriptors. Therefore, the feature points actually corresponding to each group of similar descriptors can be determined directly from the N feature points, that is, at least one first feature point corresponding to the first group of similar descriptors can be directly obtained.
[0083] It should be noted that in an embodiment of the present application, the image quality analysis device determines the eight adjacent pixel points around each first feature point in at least one first feature point in the image to be analyzed as neighborhood points corresponding to the first feature point, forming a group of neighborhood points corresponding to the first feature point.
[0084] It is understandable that in the embodiment of the present application, after obtaining a group of neighborhood points corresponding to each feature point in at least one first feature point, that is, at least one group of neighborhood points, the image quality analysis device can use a feature descriptor algorithm to calculate a group of neighborhood descriptors corresponding to each group of neighborhood points in at least one group of neighborhood points, thereby obtaining at least one group of neighborhood descriptors. The specific feature descriptor algorithm is not limited in the embodiment of the present application.
[0085] It should be noted that in the embodiments of the present application, for each group of neighborhood points in at least one group of neighborhood points, it actually includes 8 pixel points, and the image quality analysis device calculates the corresponding descriptor for each of the 8 pixel points, that is, 8 descriptors are actually calculated for a group of neighborhood points, and these 8 descriptors constitute a group of neighborhood descriptors corresponding to the group of neighborhood points.
[0086] It should be noted that in an embodiment of the present application, after calculating at least one group of neighborhood descriptors corresponding to at least one group of neighborhood points, the image quality analysis device can compare the similarities between at least one group of neighborhood descriptors and determine the number of groups whose similarities are greater than a preset similarity threshold as a repetition number.
[0087] It should be noted that, in the embodiment of the present application, each group of neighborhood descriptors in at least one group of neighborhood descriptors actually includes descriptors of 8 corresponding neighborhood points. Therefore, when comparing the similarity with other neighborhood descriptors, it is actually to compare whether the similarity of the corresponding descriptors is greater than the preset similarity threshold. If the similarity between each corresponding descriptor is only greater than the preset similarity threshold, the similarity between the two compared groups of neighborhood descriptors is greater than the preset similarity threshold, and the two groups can be counted into the number of groups that need to be counted. The specific comparison of descriptor similarity is the same as the above-mentioned comparison of similarity of N feature descriptors, both of which are bitwise comparisons, which will not be repeated here.
[0088] It can be understood that in the embodiments of the present application, when dividing at least one group of similar descriptors, the similarity between the feature descriptors in each group is relatively high. In addition, for the feature descriptors included in each group of similar descriptors, the similarities of the corresponding neighborhood descriptors are compared with each other. If the similarity is high, it actually means that the feature descriptors and the neighborhood descriptors are highly similar, which are repeated features in the image to be analyzed, and are reflected as repeated patterns in the image to be analyzed.
[0089] Figure 3 This is an exemplary feature descriptor diagram provided in the embodiment of the present application. Figure 3As shown, P1, P2, P3 and P4 all belong to the first group of similar descriptors, that is, P1, P2, P3 and P4 are highly similar. Around P1, P2, P3 and P4, there are corresponding sets of neighborhood descriptors, each of which includes 8 neighborhood descriptors. For example, a set of neighborhood descriptors corresponding to P1 includes: P11, P12, P13, P14, P15, P16, P17 and P18. Among them, the descriptors at corresponding positions are highly similar. For example, P11, P21, P31 and P41 are highly similar, that is, P1, P2, P3 and P4 are not only highly similar, but also their neighborhood descriptors are highly similar. In the image to be analyzed, the patterns of the areas corresponding to P1, P2, P3 and P4 are actually the same, that is, repeated patterns.
[0090] It can be understood that in the embodiments of the present application, the above-mentioned determination of a feature repetition number is for the first group of similar descriptors, and the first group of similar descriptors can be any group of at least one group of similar descriptors. In fact, for each group of similar descriptors, a corresponding feature repetition number can be determined according to the above method, so as to finally determine at least one feature repetition number, which will not be repeated here.
[0091] Specifically, in an embodiment of the present application, after determining at least one feature repetition number, the image quality analysis device judges whether the image to be analyzed satisfies the repeatability constraint condition based on at least one feature repetition number, including: if at least one feature repetition number includes a number greater than a preset feature repetition number, then it is judged that the image to be analyzed does not satisfy the repeatability constraint condition; if at least one feature repetition number does not include a number greater than the preset feature repetition number, then it is judged that the image to be analyzed satisfies the repeatability constraint condition.
[0092] It should be noted that, in the embodiments of the present application, the preset feature repetition number can be preset according to the actual quality analysis requirements. The specific preset feature repetition number is not limited in the embodiments of the present application.
[0093] It can be understood that in the embodiments of the present application, if at least one feature repetition number includes a number greater than a preset feature repetition number, it indicates that at least one pattern in the image to be analyzed is repeated a large number of times, such as a cloth image.
[0094] It is understandable that if a pattern is repeated a lot in an image, such as a cloth image, using the image to establish an anchor point will cause redundancy problems, and using the image for relocation query will also cause mismatch problems. Therefore, in the embodiment of the present application, the repeatability of the image to be analyzed is judged. If a pattern appears repeatedly a lot, the image to be analyzed will not be used to establish an anchor point or perform a relocation query.
[0095] S104: If the image to be analyzed satisfies the feature quantity constraint and the repeatability constraint, the image to be analyzed is determined to be a high-quality image, and an anchor point is established or a relocation query is performed using the high-quality image.
[0096] In an embodiment of the present application, after the image quality analysis device determines whether the image to be analyzed satisfies the feature quantity constraint and the repeatability constraint, if the image to be analyzed satisfies the feature quantity constraint and the repeatability constraint, the image to be analyzed is determined to be a high-quality image, and the high-quality image is used to establish an anchor point or perform a repositioning query.
[0097] It is understandable that in the embodiments of the present application, if the image to be analyzed satisfies the feature quantity constraint and the repeatability constraint, it indicates that the image to be analyzed has rich features, a low degree of feature repetition, and a high degree of recognition, and is a high-quality image that can be used to establish anchor points or perform relocation queries. Using the image to be analyzed to establish anchor points or relocation queries can achieve better results.
[0098] Figure 4 A schematic diagram of a method for analyzing image quality provided in an embodiment of the present application Figure 2 .like Figure 4 As shown, after step S103, step S105 may also be included, and the specific steps are as follows:
[0099] S105: If the image to be analyzed does not satisfy the feature quantity constraint condition or the repeatability constraint condition, the image to be analyzed is determined as a low-quality image, and corresponding prompt information is output.
[0100] In an embodiment of the present application, after the image quality analysis device determines whether the image to be analyzed satisfies the feature quantity constraint and the repeatability constraint, if the image to be analyzed does not satisfy the feature quantity constraint or does not satisfy the repeatability constraint, the image to be analyzed is determined to be a low-quality image and a corresponding prompt message is output.
[0101] It can be understood that in the embodiments of the present application, if the image to be analyzed does not meet the feature quantity constraint, it means that the image features to be analyzed are relatively small; if the image to be analyzed does not meet the repeatability constraint, it means that the image features to be analyzed have a high degree of repetition and low recognition, and cannot be used to establish anchor points or perform relocation queries.
[0102] It can be understood that in the embodiments of the present application, if the image to be analyzed does not satisfy the feature quantity constraint or does not satisfy the repeatability constraint, the image quality analysis device can output corresponding prompt information, which can be information indicating that the image to be analyzed has too few features or a high degree of feature repetition. After knowing this information, the user can reselect a new image for quality analysis and continue to determine high-quality images that satisfy the feature quantity constraint and the repeatability constraint to establish an anchor point or perform a repositioning query.
[0103] The embodiment of the present application provides an image quality analysis method, which uses an image corner detection method to extract feature points of an image to be analyzed to obtain N feature points; N is a natural number greater than or equal to 1; based on the size relationship between N and a preset number threshold, it is determined whether the image to be analyzed meets the feature quantity constraint; the feature descriptor algorithm is used to calculate the N feature descriptors corresponding to the N feature points, and based on the N feature descriptors, it is determined whether the image to be analyzed meets the repeatability constraint; if the image to be analyzed meets the feature quantity constraint and the repeatability constraint, the image to be analyzed is determined to be a high-quality image, and the high-quality image is used to establish an anchor point or perform a relocation query. In other words, the technical solution provided by the embodiment of the present application performs quality analysis on an image according to its feature points, determines a high-quality image with rich features and high discrimination, and uses the high-quality image to establish an anchor point or perform a relocation query, thereby improving the effect of establishing an anchor point or performing a relocation query.
[0104] Embodiment 2
[0105] An embodiment of the present application provides an image quality analysis device. Figure 5 This is a schematic diagram of the structure of an image quality analysis device provided in an embodiment of the present application. Figure 5 As shown, the image quality analysis device comprises:
[0106] An acquisition unit 501 is used to extract feature points from the image to be analyzed using an image corner point detection method to obtain N feature points, where N is a natural number greater than or equal to 1;
[0107] A first judging unit 502 is used to judge whether the image to be analyzed satisfies a feature quantity constraint condition based on a magnitude relationship between N and a preset quantity threshold;
[0108] The second judgment unit 503 is used to calculate N feature descriptors corresponding to the N feature points by using a feature descriptor algorithm, and judge whether the image to be analyzed satisfies a repeatability constraint condition based on the N feature descriptors;
[0109] The determination unit 504 is configured to determine the image to be analyzed as a high-quality image if the image to be analyzed satisfies the feature quantity constraint and the repeatability constraint, and use the high-quality image to establish an anchor point or perform a relocation query.
[0110] Optionally, the acquisition unit 501 is specifically used to use a circle of preset diameter to select a group of comparison points corresponding to each pixel point in the image to be analyzed, and determine the sum of grayscale differences between each pixel point and the corresponding group of comparison points; the pixel point in the image to be analyzed whose sum of grayscale differences is greater than a preset grayscale threshold is determined as a feature point, thereby obtaining the N feature points.
[0111] Optionally, the first judgment unit 502 is specifically used to determine that the image to be analyzed meets the feature quantity constraint if N is greater than the preset quantity threshold; if N is less than or equal to the preset quantity threshold, determine that the image to be analyzed does not meet the feature quantity constraint.
[0112] Optionally, the second judgment unit 503 is specifically used to classify the feature descriptors among the N feature descriptors whose similarity is greater than a preset similarity threshold into the same category, thereby obtaining at least one group of similar descriptors; based on the at least one group of similar descriptors, determine the corresponding number of at least one feature repetitions; based on the at least one feature repetition number, judge whether the image to be analyzed satisfies the repeatability constraint.
[0113] Optionally, the second judgment unit 503 is specifically used to determine the feature point corresponding to each feature descriptor in the first group of similar descriptors among the N feature points as a first feature point, thereby obtaining at least one first feature point; wherein the first group of similar descriptors is any group of similar descriptors in the at least one group of similar descriptors; obtaining at least one group of neighborhood points corresponding to the at least one first feature point from the image to be analyzed; using the feature descriptor algorithm, calculating at least one group of neighborhood descriptors corresponding to the at least one group of neighborhood points; counting the number of groups whose similarity between the at least one group of neighborhood descriptors is greater than the preset similarity threshold, and using the number of groups as one of the repetition numbers in the at least one feature repetition number, thereby obtaining the at least one feature repetition number.
[0114] Optionally, the second judgment unit 503 is specifically used to determine that the image to be analyzed does not satisfy the repeatability constraint condition if the at least one feature repetition number includes a number greater than the preset feature repetition number; if the at least one feature repetition number does not include a number greater than the preset feature repetition number, then determine that the image to be analyzed satisfies the repeatability constraint condition.
[0115] Optionally, the determination unit 504 is further configured to determine the image to be analyzed as a low-quality image and output corresponding prompt information if the image to be analyzed does not satisfy the feature quantity constraint or does not satisfy the repeatability constraint.
[0116] The embodiment of the present application provides an image quality analysis device, which uses an image corner detection method to extract feature points from an image to be analyzed, and obtains N feature points; N is a natural number greater than or equal to 1; based on the size relationship between N and a preset number threshold, it is determined whether the image to be analyzed meets the feature quantity constraint; the feature descriptor algorithm is used to calculate the N feature descriptors corresponding to the N feature points, and based on the N feature descriptors, it is determined whether the image to be analyzed meets the repeatability constraint; if the image to be analyzed meets the feature quantity constraint and the repeatability constraint, the image to be analyzed is determined to be a high-quality image, and the high-quality image is used to establish an anchor point or perform a relocation query. In other words, the image quality analysis device provided in the embodiment of the present application performs quality analysis on an image according to the feature points of the image, determines a high-quality image with rich features and high discrimination, and uses the high-quality image to establish an anchor point or perform a relocation query, thereby improving the effect of establishing an anchor point or performing a relocation query.
[0117] The embodiment of the present application also provides a computer-readable storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the above-mentioned image quality analysis method. The computer-readable storage medium can be a volatile memory (volatile memory), such as a random access memory (Random-Access Memory, RAM); or a non-volatile memory (non-volatile memory), such as a read-only memory (Read-Only Memory, ROM), a flash memory (flash memory), a hard disk (Hard Disk Drive, HDD) or a solid-state drive (Solid-State Drive, SSD); or it can be a respective device including one or any combination of the above-mentioned memories, such as a mobile phone, a computer, a tablet device, a personal digital assistant, etc.
[0118] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of hardware embodiments, software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.
[0119] The present application is described with reference to implementation flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0120] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which is implemented in the implementation flow diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0121] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing the steps in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0122] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by any technician familiar with the technical field within the technical scope disclosed in the utility application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for analyzing image quality, It is characterized in that The method comprises: The image corner detection method is used to extract feature points of the image to be analyzed, and N feature points are obtained; N is a natural number greater than or equal to 1; Based on the relationship between N and a preset number threshold, determining whether the image to be analyzed meets the feature number constraint condition; Calculating N feature descriptors corresponding to the N feature points using a feature descriptor algorithm, and judging whether the image to be analyzed satisfies a repeatability constraint condition based on the N feature descriptors; If the image to be analyzed satisfies the feature quantity constraint and the repeatability constraint, the image to be analyzed is determined to be a high-quality image, and an anchor point is established or a relocation query is performed using the high-quality image; The determining, based on the N feature descriptors, whether the image to be analyzed satisfies a repeatability constraint condition includes: Among the N feature descriptors, the feature descriptors whose similarity is greater than a preset similarity threshold are classified into the same category, thereby obtaining at least one group of descriptors of the same category; Based on the at least one group of similar descriptors, determining a corresponding number of repetitions of at least one feature; Based on the number of repetitions of the at least one feature, determining whether the image to be analyzed satisfies the repeatability constraint condition; The determining, based on the at least one feature repetition number, whether the image to be analyzed satisfies the repeatability constraint condition comprises: If the at least one feature repetition number includes a number greater than a preset feature repetition number, determining that the image to be analyzed does not satisfy the repeatability constraint condition; If the at least one feature repetition number does not include a number greater than the preset feature repetition number, it is determined that the image to be analyzed satisfies the repeatability constraint condition.
2. The method according to claim 1, It is characterized in that The method of using the image corner point detection method to extract feature points of the image to be analyzed to obtain N feature points includes: Using a selection box of a preset size, a group of comparison points corresponding to each pixel in the image to be analyzed is selected, and the sum of grayscale differences between each pixel and the corresponding group of comparison points is determined; In the image to be analyzed, a pixel point whose total grayscale difference is greater than a preset grayscale threshold is determined as a feature point, thereby obtaining the N feature points.
3. The method according to claim 1, It is characterized in that The determining whether the image to be analyzed satisfies the feature quantity constraint condition based on the relationship between N and a preset quantity threshold comprises: If N is greater than the preset number threshold, it is determined that the image to be analyzed meets the feature number constraint condition; If N is less than or equal to the preset quantity threshold, it is determined that the image to be analyzed does not satisfy the feature quantity constraint condition.
4. The method according to claim 1, It is characterized in that The step of determining at least one feature repetition number based on the at least one group of similar descriptors comprises: Determine a feature point corresponding to each feature descriptor in the first group of similar descriptors among the N feature points as a first feature point, thereby obtaining at least one first feature point; wherein the first group of similar descriptors is any group of similar descriptors in the at least one group of similar descriptors; Acquire at least one group of neighborhood points corresponding to the at least one first feature point from the image to be analyzed; Using the feature descriptor algorithm, calculating at least one group of neighborhood descriptors corresponding to the at least one group of neighborhood points; The number of groups whose similarity between the at least one group of neighborhood descriptors is greater than the preset similarity threshold is counted, and the number of groups is used as a repetition number in the at least one feature repetition number, so as to obtain the at least one feature repetition number.
5. The method according to claim 1, It is characterized in that After determining whether the image to be analyzed satisfies the repeatability constraint condition based on the N feature points, the method further includes: If the image to be analyzed does not satisfy the feature quantity constraint or does not satisfy the repeatability constraint, the image to be analyzed is determined to be a low-quality image, and corresponding prompt information is output.
6. An image quality analysis device, It is characterized in that include: An acquisition unit is used to extract feature points from the image to be analyzed by using an image corner point detection method to obtain N feature points; N is a natural number greater than or equal to 1; A first judgment unit, configured to judge whether the image to be analyzed satisfies a feature quantity constraint condition based on a magnitude relationship between N and a preset quantity threshold; A second judgment unit is used to calculate N feature descriptors corresponding to the N feature points by using a feature descriptor algorithm, and judge whether the image to be analyzed satisfies a repeatability constraint condition based on the N feature descriptors; a determination unit, configured to determine the image to be analyzed as a high-quality image if the image to be analyzed satisfies the feature quantity constraint and the repeatability constraint, and to use the high-quality image to establish an anchor point or perform a relocation query; The second judgment unit is specifically configured to classify the feature descriptors whose similarity is greater than a preset similarity threshold among the N feature descriptors into the same category, thereby obtaining at least one group of similar descriptors; based on the at least one group of similar descriptors, determine the corresponding number of at least one feature repetitions; based on the at least one feature repetition number, determine whether the image to be analyzed satisfies the repeatability constraint condition; The second judgment unit is specifically used to determine that the image to be analyzed does not satisfy the repeatability constraint condition if the at least one feature repetition number includes a number greater than the preset feature repetition number; if the at least one feature repetition number does not include a number greater than the preset feature repetition number, then determine that the image to be analyzed satisfies the repeatability constraint condition.
7. The device according to claim 6, It is characterized in that The acquisition unit is specifically used to select a group of comparison points corresponding to each pixel point in the image to be analyzed using a selection box of a preset size, and determine the sum of grayscale differences between each pixel point and the corresponding group of comparison points; In the image to be analyzed, a pixel point whose total grayscale difference is greater than a preset grayscale threshold is determined as a feature point, thereby obtaining the N feature points.
8. The device according to claim 6, It is characterized in that The first judgment unit is specifically used to determine that the image to be analyzed meets the feature quantity constraint condition if N is greater than the preset quantity threshold; if N is less than or equal to the preset quantity threshold, determine that the image to be analyzed does not meet the feature quantity constraint condition.
9. The device according to claim 6, It is characterized in that The second judgment unit is specifically used to determine the feature point corresponding to each feature descriptor in the first group of similar descriptors among the N feature points as a first feature point, thereby obtaining at least one first feature point; wherein the first group of similar descriptors is any group of similar descriptors among the at least one group of similar descriptors; obtaining at least one group of neighborhood points corresponding to the at least one first feature point from the image to be analyzed; using the feature descriptor algorithm, calculating at least one group of neighborhood descriptors corresponding to the at least one group of neighborhood points; counting the number of groups whose similarity between the at least one group of neighborhood descriptors is greater than the preset similarity threshold, and using the number of groups as one of the repetition times of the at least one feature repetition time, thereby obtaining the at least one feature repetition time.
10. The device according to claim 6, It is characterized in that The determination unit is further configured to determine the image to be analyzed as a low-quality image and output corresponding prompt information if the image to be analyzed does not satisfy the feature quantity constraint or the repeatability constraint.
11. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the image quality analysis method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Information processing method, system and equipment
CN104424635A
Image processing method for detecting pulmonary tuberculosis focus in chest X-ray DR film
CN105139390A
Corner detection method
CN108615041A
Repositioning method and device in camera attitude tracking process, equipment and storage medium
CN108615248A
Robot repositioning and environment map construction method, robot and storage medium
CN108759844A
