Intrinsic symmetry image detection method and device, equipment and storage medium
By extracting and matching image feature points, combining iterative optimization and merging segmentation strategies, the axis of symmetry of the image is determined, the problem of high error detection rate in the existing technology is solved, the accuracy and robustness of image segmentation and recognition are improved, and the realization of Automated and intelligent image processing.
Patent Information
- Application Number
- CN202411612505.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-11-13
AI Technical Summary
The prior art is prone to false detection in image segmentation and target recognition, and the accuracy is not high, especially the sensitivity to the selection of seed pixels and poor noise robustness, resulting in false detection and reduced accuracy.
By obtaining image information, extracting multiple feature points, matching feature points, performing iterative optimization, determining symmetric pairs, and determining the axis of symmetry of the image based on symmetric pairs, using feature point feature description algorithm and scale invariant feature conversion algorithm, combining and combining Segmentation strategy removes noise and redundant feature points and improves detection accuracy.
The error detection rate of intrinsic symmetry is reduced, the detection accuracy and robustness is improved, and the image processing is automated and intelligent, and the key points and axes of symmetry in the image can be automatically identified to adapt to scale and rotation changes.
Smart Images

Figure CN119131416A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of image processing technology, and in particular relates to an intrinsically symmetrical image detection method, device, equipment and storage medium. Background Art
[0002] Symmetry is a significant and important feature of an object. Users can use symmetry to drive memory and perceptual classification. Therefore, symmetry is widely used in computer vision algorithms and applications, including image segmentation and image recognition.
[0003] The prior art uses a region growing algorithm to perform image segmentation or target recognition. The region growing algorithm is an image segmentation method based on the similarity between pixels. Starting from one or more seed pixels, adjacent pixels similar to the seed pixels are gradually merged into the same region, thereby gradually "growing" a complete region. Although the existing method can effectively process objects on the edge. However, this method is prone to false detection and has low accuracy. For example, it may be sensitive to the selection of seed pixels and have poor robustness to noise and outliers. If the similarity measurement criterion is improperly set or the growth stop condition is unreasonable, it may also lead to false detection and decreased accuracy. Summary of the invention
[0004] The present invention provides an image detection method of intrinsic symmetry, which can reduce the false detection rate of intrinsic symmetry and improve the detection accuracy.
[0005] Methods include: S101: Acquire image information; S102: extracting a plurality of feature points from the image information; S103: Match the multiple feature points to obtain at least one target feature pair; Iteratively optimizing the at least one target feature pair to determine at least one symmetric pair; S104: Determine a symmetry axis of the image information according to the at least one symmetry pair.
[0006] It should be further explained that, in step S102, the image information is parsed based on a preset algorithm, and a plurality of feature points are extracted from the image information; The preset algorithms include: a feature point feature description algorithm and / or a scale-invariant feature conversion algorithm.
[0007] It should be further explained that step S103 also includes: Determine feature information of the plurality of feature points, the feature information comprising at least one of orientation, scale, and content; Traversing any two feature points among the plurality of feature points as candidate feature pairs; Based on the feature information of the candidate feature pair, calculating the confidence corresponding to the candidate feature pair; Determining whether the confidence level satisfies a first preset condition; If satisfied, the candidate feature pair is determined to be the target feature pair.
[0008] It should be further explained that the method further includes: traversing any two feature points among the plurality of feature points as candidate feature pairs, wherein the two feature points of the candidate feature pair are vectorized and vector Give a description; Candidate feature pairs using ternary numbers To describe, according to the feature information of the two feature points of the candidate feature pair, the confidence corresponding to the candidate feature pair is calculated; According to the orientation, scale, and content of the two feature points of the candidate feature pair, the position reliability of the candidate feature pair is calculated. , scale confidence and content confidence ; The calculation formula of the position reliability is:
[0009] The calculation formula of scale confidence is:
[0010] in, It is the influencing factor used to constrain the scale.
[0011] The calculation formula for content confidence is:
[0012] Determining whether the confidence level satisfies a first preset condition; If satisfied, the candidate feature pair is determined as the target feature pair.
[0013] It should be further explained that step S103 further includes: iteratively optimizing the at least one target feature pair to determine at least one symmetric pair, including: In a polar coordinate system, according to a merging strategy, merging at least one center point corresponding to the at least one target feature pair to obtain at least one first cluster; In a Cartesian coordinate system, segmenting the at least one first cluster according to a segmentation strategy to obtain at least one second cluster; Iteratively performing the merging process and the segmentation process to determine at least one target cluster; The at least one target cluster is determined as the at least one symmetric pair.
[0014] It should be further explained that the merging strategy includes: if the distance between the center points of the target feature pair is less than a preset distance threshold and the number of center points in the cluster is greater than a preset number threshold; Calculate the distance between the center points of any two target feature pairs; select any two target feature pairs whose distance is less than the preset threshold, that is, when any two target feature pairs are and When , the two target feature pairs are merged to obtain a merged cluster; in, and All are fixed values; Merge clusters into ; Determine whether the number of internal points of the merged cluster is greater than the preset value ; If the number of inner points of the merged cluster is greater than the preset value , then the merged cluster is determined to be the first cluster; If the number of inner points of the merged cluster is less than or equal to the preset value , then the merged cluster will be deleted; According to the merging strategy, at least one center point corresponding to at least one target feature pair is merged to obtain at least one first cluster.
[0015] It should be further explained that the segmentation strategy at least includes the nearest neighbor principle; The nearest neighbor principle is the K nearest neighbor principle, that is, the inner point whose distance from the center point exceeds the K value is an outlier. The outlier point is segmented and re-formed into a new first cluster. The outlier point includes the center point where the outlier point is located, the weight of the outlier point direction and the outlier point weight factor. At least one first cluster removes the outlier point to obtain at least one second cluster. Iteratively perform wild point segmentation to form a new cluster, and perform merging and segmentation processing to determine at least one target cluster, and determine the at least one target cluster as at least one symmetric pair.
[0016] The present application also provides an image detection device for intrinsic symmetry of an image, the device comprising: an acquisition module, an extraction module, a matching module, a first determination module and a second determination module; An acquisition module, used for acquiring image information; An extraction module, used for extracting a plurality of feature points from the image information; A matching module, used for matching the plurality of feature points to obtain at least one target feature pair; A first determination module is used to iteratively optimize the at least one target feature pair to determine at least one symmetric pair; The second determination module is used to determine the symmetry axis of the image information according to the at least one symmetry pair.
[0017] According to another embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of an image detection method of intrinsic symmetry when executing the program.
[0018] According to another embodiment of the present application, a storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the image detection method of intrinsic symmetry are implemented.
[0019] It can be seen from the above technical solutions that the present invention has the following advantages: In the image detection method of intrinsic symmetry provided by the present application, irrelevant information and noise in the image can be removed, making subsequent feature point detection and matching more accurate and efficient. The key points in the image can be automatically and accurately identified, and redundant feature points can be removed by methods such as non-maximum suppression to improve processing speed. The present application has scale invariance and rotation invariance, and can cope with scale changes and rotation changes in the image, thereby improving the robustness of symmetry detection. It can also further eliminate mismatches and noise to ensure that the final symmetry pair is accurate and reliable. The method can automatically extract feature points from the image, match feature points, screen symmetry pairs, and finally determine the symmetry axis without manual intervention, thereby realizing the automation and intelligence of image processing.
[0020] The present application obtains at least one target feature pair by extracting multiple feature points from the image information and matching them. It can not only detect image information with multiple symmetry axes, but also make full use of the image information through feature point matching; iteratively optimizes at least one target feature pair to determine at least one symmetry pair, so that the obtained symmetry pair has high accuracy; based on at least one symmetry pair, the symmetry axis of the image information is determined, thereby reducing the false detection rate of intrinsic symmetry. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0022] Figure 1 A flow chart of a method for detecting intrinsic symmetry provided in an embodiment of the present disclosure; Figure 2 A schematic diagram of image information provided by an embodiment of the present disclosure; Figure 3 A schematic diagram of multiple feature points in image information provided by an embodiment of the present disclosure; Figure 4 A schematic diagram of a feature pair of image information provided by an embodiment of the present disclosure; Figure 5 A schematic diagram of a symmetric pair of image information provided by an embodiment of the present disclosure; Figure 6 A schematic diagram of the structure of a device for detecting intrinsic symmetry provided in an embodiment of the present disclosure; Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0023] The following describes in detail the image detection method of intrinsic symmetry involved in the present application. For the purpose of illustration rather than limitation, specific details such as specific system structures and technologies are provided to facilitate a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details.
[0024] In the image detection method of intrinsic symmetry provided by the present application, when used in the present specification, the term "comprising" indicates the existence of the described features, wholes, steps, operations, elements and / or components, but does not exclude the existence or addition of one or more other features, wholes, steps, operations, elements, components and / or their collections. The terms "comprising", "including", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0025] The "one or more" mentioned in this application refers to one, two or more than two, and the "multiple" mentioned in this application refers to two or more. In the description of this application, unless otherwise specified, " / " means or, for example, A / B can mean A or B. The "and / or" in this article is just a way to describe the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0026] In order to clearly describe the technical solution of the present application, the words "first", "second" and the like are used to distinguish the same or similar items with substantially the same functions and effects. Those skilled in the art can understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not necessarily limit the difference.
[0027] The phrases such as "one embodiment" or "some embodiments" described in the present application mean that the specific features, structures or characteristics described in the embodiment are included in one or more embodiments of the present application. Therefore, the phrases such as "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments" etc. that appear in different places in the present application do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways.
[0028] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0029] See also Figure 1 The figure is a flow chart of a method for detecting an image with intrinsic symmetry in a specific embodiment, the method comprising: S101: Acquire image information.
[0030] In some embodiments, the system can obtain image information containing at least one pair of symmetry axes. The image information can be obtained in a variety of ways, such as loading from a file, capturing from a camera in real time, or obtaining from a network request. After the image is loaded into the system, it will be used as input image information for subsequent processing.
[0031] Exemplarily speaking, the image information acquired and processed may be operating image information of equipment at the port, or image information of port roads, or image information of port environment, etc. The specific usage scenarios of the image information are not limited in this application.
[0032] S102: extracting a plurality of feature points from the image information.
[0033] In some embodiments, before extracting feature points, the image needs to be preprocessed, such as grayscale, noise reduction, edge detection, etc., to improve the efficiency and accuracy of subsequent processing.
[0034] Optionally, feature point detection is performed on the image using an ORB image preprocessing algorithm or a SIFT image preprocessing algorithm. The ORB image preprocessing algorithm or the SIFT image preprocessing algorithm can automatically detect key points in the image, and the key points may be corner points, edge points, or points with certain unique properties in the image.
[0035] This embodiment uses the FAST algorithm to quickly find candidate points, and then uses a machine learning method to screen out the optimal feature points. It uses rotation invariance to calculate the main direction of the feature points and builds an image pyramid based on scale invariance to enhance the robustness of the feature points.
[0036] The extreme points are found in the scale space as candidate feature points, and then one or more directions are determined for each candidate point by fitting the gradient direction histogram of the local image, thereby generating a feature descriptor with scale invariance and rotation invariance.
[0037] S103: Match the multiple feature points to obtain at least one target feature pair; iteratively optimize the at least one target feature pair to determine at least one symmetric pair.
[0038] In this embodiment, the similarity between feature descriptors can be used to match the detected feature points. The matching result may include multiple candidate feature point pairs. Here, the similarity between feature descriptors can be obtained based on Euclidean distance or Hamming distance.
[0039] Based on distance constraints, angle constraints and symmetry assumptions, possible symmetric pairs are selected from candidate feature point pairs. Symmetric pairs should satisfy certain symmetric properties, such as the distances from two points to a line are equal and in opposite directions.
[0040] This embodiment further eliminates mismatches and noise by iteratively optimizing candidate symmetric pairs to determine the final symmetric pairs.
[0041] The iterative optimization method may adopt the least square method or the RANSAC method.
[0042] S104: Determine a symmetry axis of the image information according to the at least one symmetry pair.
[0043] In some embodiments, for each determined symmetry pair, their axis of symmetry about may be calculated. This may be accomplished by finding the perpendicular bisectors of all symmetry pairs and combining the perpendicular bisectors by weighted averaging.
[0044] This embodiment also calculates whether the calculated symmetry axis really conforms to the symmetry property of the image. Fine-tuning or recalculation is performed according to the specific content and symmetry property of the image. Finally, the system outputs the symmetry axis information of the image for further analysis, processing or visualization. In this way, the whole process combines technologies from multiple fields such as image processing, feature detection and matching, and geometric calculation to achieve the goal of automatically detecting and identifying the symmetry axis from the image.
[0045] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process in this embodiment, the image detection method of intrinsic symmetry includes the following specific steps: S201. Obtain image information.
[0046] In some embodiments, the acquired image information includes at least one pair of symmetry axes. Figure 2 The image information 21 is shown.
[0047] S202: Extract multiple feature points from the image information according to the image information.
[0048] according to Figure 2 The image information shown in FIG. 1 is used to extract multiple feature points from the image information.
[0049] Optionally, based on the image information, multiple feature points are extracted from the image information, including: detecting the image information through a preset algorithm, and extracting multiple feature points from the image information, the preset algorithm at least including a feature point feature description algorithm and / or a scale-invariant feature conversion algorithm.
[0050] The steps of the feature point feature description algorithm (Oriented Fast and Rotated Brief, ORB) are rough extraction, machine learning method to select the best feature points, non-maximum suppression to remove local dense feature points, scale invariance of feature points, and rotation invariance of feature points.
[0051] Scale Invariant Feature Transform (SIFT) is a local feature description algorithm in the field of image processing.
[0052] Specifically, the above image information is detected by a preset algorithm, and the preset algorithm may be a feature point feature description algorithm and a scale-invariant feature conversion algorithm, to extract a plurality of feature points from the above image information.
[0053] For example, Figure 3 As shown, the image information 21 is detected by the feature point feature description algorithm and the scale-invariant feature conversion algorithm, and multiple feature points such as feature point 31, feature point 32, and feature point 33 are extracted from the image information 21.
[0054] Optionally, the feature information of the feature point includes at least one of orientation, scale, and content.
[0055] Specifically, SIFT is used to describe the feature sub-points, that is, each feature point can be described by a vector Describe it. Representing feature points The coordinates of Indicates the direction of the feature point, that is Indicates the orientation of the feature point, represents the scale of the feature points, and Indicates the content of the feature point.
[0056] S203: Match the multiple feature points to obtain at least one target feature pair.
[0057] In some embodiments, the matching of the two feature points is detected by the identification ability of the local feature sub-characters of the two feature points. If the local feature sub-characters or all feature sub-characters corresponding to the two feature points match, a feature pair consisting of the two feature points can be obtained. The above multiple feature points are matched to obtain at least one target feature pair.
[0058] For example, Figure 3 As shown, multiple feature points such as feature point 31, feature point 32, and feature point 33 are matched to obtain a target feature pair consisting of feature point 31 and feature point 33, and a target feature pair consisting of other matched feature points, and at least two feature points constituting the target feature pair are connected to obtain the following Figure 4 The four lines A, B, C, and D shown may be axes of symmetry.
[0059] Optionally, matching the multiple feature points to obtain at least one target feature pair includes: traversing any two feature points among the multiple feature points as candidate feature pairs; calculating the confidence corresponding to the candidate feature pair based on feature information of the candidate feature pair; judging whether the confidence satisfies a first preset condition; if so, determining that the candidate feature pair is a target feature pair.
[0060] Specifically, if two feature points can form a feature pair, the average values of the orientations of the two feature points are close to the perpendicular bisectors of the coordinate lines, the scales are close, and the contents are similar. Therefore, any two feature points among multiple feature points are traversed as candidate feature pairs. The two feature points of the candidate feature pair can be represented by vectors and vector To describe, the candidate feature pairs can be represented by ternary To describe, according to the feature information of the two feature points of the candidate feature pair, the corresponding confidence of the candidate feature pair is calculated, that is, according to the orientation, scale, and content of the two feature points of the candidate feature pair, the position confidence of the candidate feature pair is calculated. , scale confidence and content confidence .
[0061] in, and Represent feature points The horizontal and vertical coordinates in the image are the location information of the feature points.
[0062] and Represent feature points The horizontal and vertical coordinates in the image are the location information of the feature points.
[0063] Representative feature points The direction of the feature point The orientation of the object.
[0064] Representative feature points The direction of the feature point The orientation of the object.
[0065] Represents the scale of the feature point and describes the scale information of the object where the feature point is located.
[0066] Represents the scale of the feature point and describes the scale information of the object where the feature point is located.
[0067] Representative feature points Content descriptor used to describe feature points The visual characteristics of similar feature points make them have similar value.
[0068] Representative feature points Content descriptor used to describe feature points The visual characteristics of similar feature points make them have similar value.
[0069] The calculation formula of the square position reliability is:
[0070] Representative feature points and The angle between the connecting line and the horizontal direction. hour, Used to measure the consistency of the directions of two feature points.
[0071] The calculation formula of scale confidence is:
[0072] in, It is the influencing factor used to constrain the scale.
[0073] The calculation formula for content confidence is:
[0074] In some embodiments, it is determined whether the confidence level satisfies a first preset condition; if so, the candidate feature pair is determined to be a target feature pair.
[0075] Specifically, when the position confidence of the two feature points in the candidate feature pair , scale confidence and content confidence When the first preset condition is met, the two feature points are determined to be a target feature pair.
[0076] For example, when any two feature points are feature point 31 and feature point 33, that is, feature point 31 and feature point 33 are used as candidate feature pairs, feature point 31 is represented by vector Describe, feature point 33 with vector Describe, the candidate feature pair consisting of feature point 31 and feature point 33 is represented by ternary To describe, according to the feature information of the feature points 31 and 33 of the candidate feature pair, the corresponding confidence of the candidate feature pair is calculated, that is, according to the orientation, scale, and content of the feature points 31 and 33, the orientation confidence of the feature points 31 and 33 is calculated. , scale confidence and content confidence , when the position reliability of feature point 31 and feature point 33 , scale confidence and content confidence When the first preset condition is met, the feature point 31 and the feature point 33 are determined to be a target feature pair.
[0077] The first preset condition is that the location confidence is greater than a first threshold, the scale confidence is greater than a second threshold, and the content confidence is greater than a third threshold.
[0078] In some embodiments, according to the fact that the position confidence of the candidate feature pair composed of the feature point 31 and the feature point 33 is greater than the first threshold, the scale confidence is greater than the second threshold, and the content confidence is greater than the third threshold, the candidate feature pair composed of the feature point 31 and the feature point 33 is determined to be the target feature pair. It can be understood that the first threshold, the second threshold and the third threshold can be the same or different, and are specifically set according to actual conditions, and this embodiment does not limit it.
[0079] Optionally, when any one of the location confidence, scale confidence and content confidence does not satisfy the first preset condition, the candidate feature pair is determined to be a non-target feature pair.
[0080] Specifically, if any two feature points are feature point 31 and feature point 32, that is, feature point 31 and feature point 32 form a candidate feature pair, the confidence corresponding to the candidate feature pair is calculated according to the feature information of feature point 31 and feature point 32 of the candidate feature pair, that is, the position confidence of feature point 31 and feature point 32 is calculated according to the orientation, scale, and content of feature point 31 and feature point 32. , scale confidence and content confidence , when the square position reliability , scale confidence and content confidence When any one of the above does not meet the first preset condition, it is determined that feature point 31 and feature point 32 constitute a candidate feature pair and a non-target feature pair. , scale confidence and content confidence If any one of the items does not meet the first preset condition, it can be the square position confidence Less than or equal to the first threshold, which can be the scale confidence Less than or equal to the second threshold, or content confidence Less than or equal to one or more items of the third threshold value, which will not be elaborated in this embodiment.
[0081] S204: Iteratively optimize the at least one target feature pair to determine at least one symmetric pair.
[0082] Iteratively optimize the at least one target feature pair and select a symmetric pair from the at least one target feature pair.
[0083] S205: Determine a symmetry axis of the image information according to the at least one symmetry pair.
[0084] Based on the at least one symmetry pair, the symmetry axis of the image information 21 is determined.
[0085] Specifically, Figure 5 As shown, according to the at least one symmetry pair mentioned above, the symmetry axes of the image information 21 are determined to be straight line A and straight line B.
[0086] The disclosed embodiment obtains at least one target feature pair by extracting multiple feature points from the image information for matching, which can not only detect image information with multiple axes of symmetry, but also make full use of the image information through feature point matching; iteratively optimizes at least one target feature pair to determine at least one symmetry pair, so that the obtained symmetry pair has high accuracy; and determines the axis of symmetry of the image information based on at least one symmetry pair, thereby reducing the false detection rate of intrinsic symmetry.
[0087] In some specific embodiments, the at least one target feature pair is iteratively optimized to determine at least one symmetric pair, including: in a polar coordinate system, according to a merging strategy, merging at least one center point corresponding to the at least one target feature pair to obtain at least one first cluster; in a Cartesian coordinate system, according to a segmentation strategy, segmenting the at least one first cluster to obtain at least one second cluster; iteratively performing the merging and segmenting to determine at least one target cluster; and determining the at least one target cluster as the at least one symmetric pair.
[0088] Specifically, the center point of each feature pair is , in the Cartesian coordinate system, the confidence of the center point is expressed as , the direction is expressed as , the center point of each feature pair All represent the feature pair, and the center point of the target feature pair is ; For each target feature pair, align the center point of the target feature pair and perform polar coordinate transformation to obtain the polar coordinate of the center point .
[0089] They represent the horizontal and vertical coordinates of the center point of the target feature pair in the image respectively.
[0090] The parametric equation in the polar coordinate system is:
[0091] Specifically, one cluster and two clusters are initialized; in a polar coordinate system, at least one center point corresponding to at least one target feature pair is merged according to a merging strategy to obtain at least one first cluster; in a Cartesian coordinate system, at least one first cluster is segmented according to a segmentation strategy to obtain at least one second cluster; merging and segmentation are iteratively performed to determine at least one target cluster, and at least one target cluster is determined as at least one symmetric pair.
[0092] Optionally, the merging strategy is: the distance between the center points of the target feature pairs is less than a preset distance threshold and the number of center points in the cluster is greater than a preset number threshold.
[0093] Specifically, the merging strategy is: the distance between the center points of the target feature pairs is less than the preset distance threshold and the number of center points in the cluster is greater than the preset number threshold. Calculate the distance between the center points of any two target feature pairs; select any two target feature pairs whose distance is less than the preset threshold, that is, when any two target feature pairs are and When, among them, and are all fixed values; the two target feature pairs are merged to obtain a merged cluster, which is ; Determine whether the number of internal points of the merged cluster is greater than the preset value , if the number of internal points of the merged cluster is greater than the preset value , then the merged cluster is determined to be the first cluster; if the number of internal points of the merged cluster is less than or equal to the preset value , then delete the merged cluster. According to the merging strategy, merge at least one center point corresponding to at least one target feature pair is processed to obtain at least one first cluster.
[0094] In this embodiment, is the distance value of the center point of the first target feature pair in space.
[0095] is the distance value of the center point of the second target feature pair in space.
[0096] Among them, r represents the distance value, m and n represent two different target feature pairs, and c represents the center point. is the azimuth of the center point of the first target feature pair in the preset angle dimension. The azimuth of the center point of the second target feature pair in a preset angle dimension. is the feature vector of the first target feature pair. is the feature vector of the second target feature pair. Represents the weight of the first target feature pair in two target feature pairs; Represents the weight of the second target feature pair in two target feature pairs.
[0097] Optionally, the segmentation strategy includes at least a nearest neighbor principle.
[0098] In some specific embodiments, the center point of the first cluster in the polar coordinate system may be discretely distributed in the Cartesian coordinate system. Therefore, at least one first cluster is segmented according to the nearest neighbor principle. The nearest neighbor principle can specifically be the K nearest neighbor principle, that is, the inner point whose distance from the center point exceeds the K value is a wild point. The wild point is segmented and a new first cluster is re-formed. The wild point includes the center point where the wild point is located, the weighted direction of the wild point, and the wild point weight factor. At least one first cluster is eliminated to obtain at least one second cluster.
[0099] The merging process and the segmentation process are iteratively performed to determine at least one target cluster, and the at least one target cluster is determined as at least one symmetric pair.
[0100] Optionally, the second clusters satisfying the second preset condition are merged to obtain a third cluster.
[0101] In some specific embodiments, after iterative clustering, the target clusters corresponding to the symmetry axes have been extracted. In the polar coordinate system, if the distance between two target clusters corresponding to the same symmetry axis is less than a fourth threshold, but the two target clusters have not been merged, the two target clusters are refined. If the two target clusters meet the second preset condition, the two target clusters that meet the second preset condition are merged.
[0102] The second preset condition is and , the third cluster after merging The expression is:
[0103] The disclosed embodiments specifically describe how to screen symmetric pairs, and compared with the prior art, further reduce the false detection rate of intrinsic symmetry under the same precision and recall rate.
[0104] The following is an embodiment of an image detection device for image intrinsic symmetry provided in an embodiment of the present disclosure. The device and the image detection method for intrinsic symmetry in the above-mentioned embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the image detection device for image intrinsic symmetry, reference can be made to the embodiment of the above-mentioned image detection method for intrinsic symmetry.
[0105] A mobile terminal implementing various embodiments of the present invention will now be described with reference to the accompanying drawings. In the subsequent description, suffixes such as "module", "component" or "unit" used to represent elements are used only to facilitate the description of the embodiments of the present invention and have no specific meaning in themselves. Therefore, "module" and "component" can be used interchangeably.
[0106] like Figure 6 As shown, the intrinsic symmetry detection device 60 includes: the intrinsic symmetry detection device 60 includes: an acquisition module 61, an extraction module 62, a matching module 63, a first determination module 64 and a second determination module 65.
[0107] In this embodiment, the acquisition module 61 is used to acquire image information; the extraction module 62 is used to extract multiple feature points from the image information based on the image information; the matching module 63 is used to match the multiple feature points to obtain at least one target feature pair; the first determination module 64 is used to iteratively optimize the at least one target feature pair to determine at least one symmetry pair; the second determination module 65 is used to determine the symmetry axis of the image information based on the at least one symmetry pair.
[0108] In some embodiments, the extraction module 62 is further used to detect the image information through a preset algorithm to extract multiple feature points from the image information. The preset algorithm includes a feature point feature description algorithm and / or a scale-invariant feature conversion algorithm.
[0109] In some embodiments, the matching module 63 is also used to determine feature information of the multiple feature points, wherein the feature information includes at least one of orientation, scale and content; traverse any two feature points among the multiple feature points as candidate feature pairs; based on the feature information of the candidate feature pairs, calculate the confidence corresponding to the candidate feature pairs; determine whether the confidence satisfies a first preset condition; if so, determine that the candidate feature pair is a target feature pair.
[0110] In some embodiments, the first preset condition is that the location confidence is greater than a first threshold, the scale confidence is greater than a second threshold, and the content confidence is greater than a third threshold.
[0111] In some embodiments, the first determination module 64 is further used to merge at least one center point corresponding to the at least one target feature pair in a polar coordinate system according to a merging strategy to obtain at least one first cluster; to segment the at least one first cluster in a Cartesian coordinate system according to a segmentation strategy to obtain at least one second cluster; to iteratively perform the merging process and the segmentation process to determine at least one target cluster; and to determine the at least one target cluster as the at least one symmetric pair.
[0112] In some embodiments, the merging strategy is: the distance between the center points of the target feature pair is less than a preset distance threshold and the number of center points in the cluster is greater than a preset number threshold. The segmentation strategy includes at least the nearest neighbor principle.
[0113] Figure 6 The intrinsic symmetry detection device of the illustrated embodiment can be used to implement the technical solution of the intrinsic symmetry detection method embodiment described above, and its implementation principle and technical effect are similar and will not be described in detail here.
[0114] Figure 7 Schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. The electronic device may be a terminal as described in the above embodiment. The electronic device provided in an embodiment of the present disclosure may execute the processing flow provided in the embodiment of the method for detecting the intrinsic symmetry, such as Figure 7 As shown, the electronic device 70 includes: a memory 71, a processor 72, a computer program and a communication interface 73; wherein the computer program is stored in the memory 71 and is configured so that the processor 72 executes the intrinsic symmetry detection method as described above.
[0115] In addition, an embodiment of the present disclosure further provides a computer-readable storage medium on which a computer program is stored. The computer program is executed by a processor to implement the intrinsic symmetry detection method described in the above embodiment.
[0116] In addition, an embodiment of the present disclosure further provides a computer program product, which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the intrinsic symmetry detection method as described above is implemented.
[0117] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0118] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0119] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0120] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: Get image information; Extracting a plurality of feature points from the image information according to the image information; Matching the multiple feature points to obtain at least one target feature pair; Iteratively optimizing the at least one target feature pair to determine at least one symmetric pair; Based on the at least one symmetry pair, an axis of symmetry of the image information is determined.
[0121] In addition, the electronic device can also perform other steps in the intrinsic symmetry detection method as described above.
[0122] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0123] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0124] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0125] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0126] The storage medium disclosed in the present invention may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0127] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for detecting intrinsic symmetry in an image, characterized in that: Methods include: S101: Acquire image information; S102: extracting a plurality of feature points from the image information; S103: Match the multiple feature points to obtain at least one target feature pair; Iteratively optimizing the at least one target feature pair to determine at least one symmetric pair; S104: Determine a symmetry axis of the image information according to the at least one symmetry pair.
2. The image detection method of intrinsic symmetry according to claim 1, characterized in that: In step S102, the image information is parsed based on a preset algorithm, and a plurality of feature points are extracted from the image information; The preset algorithms include: a feature point feature description algorithm and / or a scale-invariant feature conversion algorithm.
3. The image detection method of intrinsic symmetry according to claim 1, characterized in that: Step S103 also includes: Determine feature information of the plurality of feature points, the feature information comprising at least one of orientation, scale, and content; Traversing any two feature points among the plurality of feature points as candidate feature pairs; Based on the feature information of the candidate feature pair, calculating the confidence corresponding to the candidate feature pair; Determining whether the confidence level satisfies a first preset condition; If satisfied, the candidate feature pair is determined to be the target feature pair.
4. The image detection method of intrinsic symmetry according to claim 3, characterized in that: The method further includes: traversing any two feature points among the plurality of feature points as candidate feature pairs, wherein the two feature points of the candidate feature pair are represented by vectors and vector Give a description; in, and Represent feature points The horizontal and vertical coordinates in the image; Represent feature points The horizontal and vertical coordinates in the image; Representative feature points The direction of the feature point The orientation of the object; Representative feature points The direction of the feature point The orientation of the object; Represents the scale of the feature point, describing the scale information of the object where the feature point is located; Represents the scale of the feature point, describing the scale information of the object where the feature point is located; Representative feature points Content descriptor used to describe feature points The visual characteristics of similar feature points make them have similar value; Representative feature points Content descriptor used to describe feature points The visual characteristics of similar feature points make them have similar value; Candidate feature pairs using ternary numbers To describe, according to the feature information of the two feature points of the candidate feature pair, the confidence corresponding to the candidate feature pair is calculated; According to the orientation, scale, and content of the two feature points of the candidate feature pair, the position reliability of the candidate feature pair is calculated. , scale confidence and content confidence ; The calculation formula of the position reliability is: Representative feature points and The angle between the line and the horizontal direction; The calculation formula of scale confidence is: in, It is the influencing factor used to constrain the scale; The calculation formula for content confidence is: Determining whether the confidence level satisfies a first preset condition; If satisfied, the candidate feature pair is determined as the target feature pair.
5. The image detection method of intrinsic symmetry according to claim 1, characterized in that: Step S103 further includes: iteratively optimizing the at least one target feature pair to determine at least one symmetric pair, including: In a polar coordinate system, according to a merging strategy, merging at least one center point corresponding to the at least one target feature pair to obtain at least one first cluster; In a Cartesian coordinate system, segmenting the at least one first cluster according to a segmentation strategy to obtain at least one second cluster; Iteratively performing the merging process and the segmentation process to determine at least one target cluster; The at least one target cluster is determined as the at least one symmetric pair.
6. The image detection method of intrinsic symmetry according to claim 5, characterized in that: The merging strategy includes: if the distance between the center points of the target feature pair is less than a preset distance threshold and the number of center points in the cluster is greater than a preset number threshold; Calculate the distance between the center points of any two target feature pairs; select any two target feature pairs whose distance is less than the preset threshold, that is, when any two target feature pairs are and When , the two target feature pairs are merged to obtain a merged cluster; in, and All are fixed values; Merge clusters into ; is the distance value of the center point of the first target feature pair in space; is the distance value of the center point of the second target feature pair in spatial position; is the azimuth of the center point of the first target feature pair in a preset angle dimension; The azimuth of the center point of the second target feature pair in a preset angle dimension; is the feature vector of the first target feature pair; is the feature vector of the second target feature pair; Represents the weight of the first target feature pair in two target feature pairs; Represents the weight of the second target feature pair in two target feature pairs; Determine whether the number of internal points of the merged cluster is greater than the preset value ; If the number of inner points of the merged cluster is greater than the preset value , then the merged cluster is determined to be the first cluster; If the number of inner points of the merged cluster is less than or equal to the preset value , then the merged cluster will be deleted; According to the merging strategy, at least one center point corresponding to at least one target feature pair is merged to obtain at least one first cluster.
7. The image detection method of intrinsic symmetry according to claim 5, characterized in that: The segmentation strategy at least includes the nearest neighbor principle; The nearest neighbor principle is the K nearest neighbor principle, that is, the inner point whose distance from the center point exceeds the K value is an outlier. The outlier point is segmented and re-formed into a new first cluster. The outlier point includes the center point where the outlier point is located, the weight of the outlier point direction and the outlier point weight factor. At least one first cluster removes the outlier point to obtain at least one second cluster. Iteratively perform wild point segmentation to form a new cluster, and perform merging and segmentation processing to determine at least one target cluster, and determine the at least one target cluster as at least one symmetric pair.
8. An image detection device for image intrinsic symmetry, characterized in that: The device is used to implement the image detection method of intrinsic symmetry as claimed in any one of claims 1 to 7; The device comprises: an acquisition module, an extraction module, a matching module, a first determination module and a second determination module; An acquisition module, used for acquiring image information; An extraction module, used for extracting a plurality of feature points from the image information; A matching module, used for matching the plurality of feature points to obtain at least one target feature pair; A first determination module is used to iteratively optimize the at least one target feature pair to determine at least one symmetric pair; The second determination module is used to determine the symmetry axis of the image information according to the at least one symmetry pair.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the image detection method of intrinsic symmetry according to any one of claims 1 to 7 are implemented.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the image detection method of intrinsic symmetry according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method to detect illegal parking
CN103116984A
Image symmetry detection method and device, and terminal equipment
CN107633506A
Gradual graph matching method and device based on clustering deformation graph
CN109934298A
Track prediction method for removing wrong matching of feature points in visual SLAM (Simultaneous Localization and Mapping) system
CN115619821A
Fingerprint image matching identification method and device, electronic equipment and storage medium
CN118823837A
