Blob association method and apparatus based on gradient histogram features
By using gradient histogram features and affine transformation to associate clusters, the problem of adjusting the position of feature points within the ROI box in visual inspection is solved, the accuracy of cluster association is improved, and the correct comparison between the gold plate and the test plate is ensured.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIAMEN HUALIAN ELECTRONICS CO LTD
- Filing Date
- 2023-06-05
- Publication Date
- 2026-06-19
AI Technical Summary
In existing visual inspection technologies, errors are prone to occur when adjacent segments or icons are associated within the ROI box, resulting in the inability to correctly compare the consistency between the gold plate and the test plate, and the size and position adjustment of the ROI box are difficult to control precisely.
The method employs gradient histogram features and affine transformation. By obtaining the mean of the contour point set as the feature point position, feature information is extracted using gradient histogram, and transformation is performed using affine matrix. The nearest neighbor search strategy is used to associate clusters.
It improves the accuracy of cluster association, solves the problem of adjusting the position of feature points within the ROI box, and ensures correct comparison between the gold plate and the test plate.
Smart Images

Figure CN116883689B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of visual inspection technology, and in particular to a clumping association method based on gradient histogram features and a clumping association device based on gradient histogram features. Background Technology
[0002] In related technologies, when a vision system inspects a panel, adjacent segments or icons are placed within a Region of Interest (ROI). The ROI is drawn using a graphical interface; smaller ROIs are difficult for developers to draw, and without sufficient margin between different ROIs, production lines face significant challenges when changing darkrooms. To accurately analyze the information of each segment or icon within an ROI, the analysis first extracts the outline, then uses an index to detect the outline of each segment or icon for feature extraction. Finally, the extracted features are correlated with standard features using an index, and the differences are compared.
[0003] The existing method generally involves the following steps: Step 1, setting the grid width gw and height gh; Step 2, taking the top left corner or center point of the contour to represent the position point of that contour; Step 3, placing the position point into the corresponding grid; Step 4, sorting the position points containing the grid from left to right and from top to bottom. In Step 1, the grid width and height represent the allowed "movement" range of the position point. As long as the position point remains within the same grid after rotation, the index will not change, thus providing anti-rotation capability. For example, given position points A(2,2), B(6,3), and C(4,4), and two types of grids {gw=3,gh=3} and {gw=4,gh=4}, the position point division would be as follows: Figure 1 As shown; then using the rules from step 4, the grid {gw=3,gh=3} yields position points in the order A->C->B, and the grid {gw=4,gh=4} yields position points in the order A->B->C; in practical applications, the grid and position points cannot be guaranteed to be relatively stationary, and there will be relative movement; for example, Figure 1 If the position point C(4,4) of b is moved up one unit, then the order of the positions becomes A->C->B. Therefore, as Figure 2 As shown, existing methods may encounter errors when associating blocks, leading to situations where the consistency between the gold plate and the tested plate cannot be correctly compared. Summary of the Invention
[0004] This application aims to at least partially address one of the technical problems in the aforementioned technologies. To this end, one objective of this application is to propose a clumping association method based on gradient histogram features. This method improves the accuracy of clumping association by using gradient histograms in conjunction with location and affine transformation to search for the nearest neighbor position.
[0005] The second objective of this application is to propose a clumping association device based on gradient histogram features.
[0006] To achieve the above objectives, the first aspect of this application proposes a cluster association method based on gradient histogram features, comprising the following steps: obtaining the contour corresponding to each cluster in the cluster group to be associated to obtain a contour point set, and obtaining the mean of each contour point set so as to use the mean of each contour point set as the feature point position of each contour to obtain a feature point position set; using gradient histogram features to extract feature information of the feature points corresponding to each contour based on the contour point set and the feature point position set of each contour to obtain a feature point information set; randomly selecting corresponding features from the feature point information set corresponding to the first associated cluster group in the cluster group to be associated according to a preset number of feature points to be extracted. The system first obtains the feature point information by comparing the distance between each feature point and all feature points in the second associated block group within the group to be associated, thus obtaining the matching object corresponding to each feature point. It then calculates an affine matrix based on the feature point positions of randomly selected feature points and the feature point positions of the matching objects. The affine matrix is then used to perform an affine transformation on the feature point position set of the second associated block group to obtain a transformation result. Finally, a nearest neighbor search strategy is used to search for the nearest neighbor positions of all feature point positions in the first associated block group within the transformation result, thereby completing the association between the first and second associated block groups.
[0007] According to the cluster association method based on gradient histogram features in this application embodiment, firstly, the contour corresponding to each cluster in the cluster group to be associated is obtained to obtain a contour point set, and the mean of each contour point set is obtained so that the mean of each contour point set is used as the feature point position of each contour to obtain a feature point position set; then, gradient histogram features are used to extract feature information of the feature points corresponding to each contour based on the contour point set and the feature point position set of each contour to obtain a feature point information set; next, according to the preset number of feature points to be extracted, corresponding feature point information is randomly extracted from the feature point information set corresponding to the first associated cluster group in the cluster group to be associated, and each feature point information is associated with the second associated cluster group in the cluster group to be associated. Distance judgment is performed on all feature point information corresponding to the clique group to obtain the matching object corresponding to each feature point information. Next, an affine matrix is calculated based on the feature point positions corresponding to the randomly selected feature point information and the feature point positions corresponding to the matching object. Finally, the affine matrix is used to perform an affine transformation on the feature point position set of the second associated clique group to obtain the transformation result. The nearest neighbor search strategy is used to search for the nearest neighbor position of the feature point position corresponding to all feature point information of the first associated clique group in the transformation result, so as to complete the association between the first associated clique group and the second associated clique group. Thus, by using gradient histogram in conjunction with position and searching for the nearest neighbor position after affine transformation for association, the accuracy of clique association is improved.
[0008] In addition, the clumping association method based on gradient histogram features proposed in the above embodiments of this application may also have the following additional technical features:
[0009] Optionally, the feature point positions of each contour can be obtained according to the following formula:
[0010]
[0011] Among them, kp i This indicates the location of the feature point with index i. Let p(x) represent the set of contour points corresponding to the contour with index i, where l indicates that the contour with index i consists of l points. j ,y j ) represents the coordinates of the j-th point.
[0012] Optionally, gradient histogram features are used to extract feature information of feature points corresponding to each contour based on the contour point set and the feature point position set of each contour, so as to obtain a feature point information set. This includes: taking the feature point position corresponding to each contour as the center, obtaining the radius corresponding to the largest inscribed circle of each contour; stretching the radius according to a preset radius magnification factor to obtain a stretched circle, and using the stretched circle as the gradient histogram statistical range, so as to extract feature information of feature points corresponding to each contour, so as to obtain a feature point information set.
[0013] Optionally, the distance between each feature point information and all feature point information corresponding to the second associated block group in the group to be associated is determined to obtain the matching object corresponding to each feature point information. This includes: determining the distance between any one feature point information in each feature point information and all feature point information corresponding to the second associated block group in the group to be associated, so as to obtain the feature point information with the smallest distance from the arbitrary feature point information among all feature point information corresponding to the second associated block group, and using it as the matching object of the arbitrary feature point information, and so on, until the matching object corresponding to each feature point information is obtained.
[0014] Optionally, the cluster association method based on gradient histogram features further includes: obtaining a threshold reflecting the overall deviation based on the feature point positions corresponding to all feature point information of the first associated cluster group and the nearest neighbor position in the transformation result; if the threshold is greater than a preset deviation threshold or the current number of matches is less than a preset maximum number of matches, then re-matching and association is performed; otherwise, the matching and association is completed.
[0015] To achieve the above objectives, a second aspect of this application proposes a cluster association device based on gradient histogram features, comprising: an acquisition module, configured to acquire a set of contour points corresponding to each cluster in a cluster group to be associated, and acquire the mean of each contour point set, so as to use the mean of each contour point set as the feature point position of each contour to obtain a feature point position set; a feature extraction module, configured to extract feature information of the feature points corresponding to each contour based on the contour point set and the feature point position set of each contour using gradient histogram features to obtain a feature point information set; and a first judgment module, configured to randomly extract corresponding features from the feature point information set corresponding to the first associated cluster group in the cluster group to be associated according to a preset number of extracted feature points. The system comprises: a point information module, which performs distance judgment on each feature point information and all feature point information corresponding to the second associated block group in the group to be associated, to obtain the matching object corresponding to each feature point information; a calculation module, which calculates an affine matrix based on the feature point positions corresponding to the randomly selected feature point information and the feature point positions corresponding to the matching object; and a feature association module, which performs an affine transformation on the feature point position set of the second associated block group using the affine matrix to obtain a transformation result, and uses a nearest neighbor search strategy to search for the nearest neighbor position of the feature point positions corresponding to all feature point information of the first associated block group in the transformation result, so as to complete the association between the first associated block group and the second associated block group.
[0016] According to an embodiment of this application, a clumping association device based on gradient histogram features improves the accuracy of clumping association by searching for the nearest neighbor position after combining gradient histogram with position and affine transformation.
[0017] In addition, the cluster association device based on gradient histogram features proposed in the above embodiments of this application may also have the following additional technical features:
[0018] Optionally, the feature point positions of each contour can be obtained according to the following formula:
[0019]
[0020] Among them, kp i This indicates the location of the feature point with index i. Let p(x) represent the set of contour points corresponding to the contour with index i, where l indicates that the contour with index i consists of l points. j ,y j ) represents the coordinates of the j-th point.
[0021] Optionally, the feature extraction module is further configured to: take the feature point position corresponding to each contour as the center, obtain the radius corresponding to the largest inscribed circle of each contour; stretch the radius according to a preset radius magnification factor to obtain a stretched circle, and use the stretched circle as the gradient histogram statistical range, so as to extract the feature information of the feature points corresponding to each contour to obtain a feature point information set.
[0022] Optionally, the first judgment module is further configured to perform distance judgment on any one of the feature point information in each feature point information and all feature point information corresponding to the second associated block group in the block group to be associated, so as to obtain the feature point information with the smallest distance from the arbitrary feature point information among all feature point information corresponding to the second associated block group, and use it as the matching object of the arbitrary feature point information, and so on, until the matching object corresponding to each feature point information is obtained.
[0023] Optionally, the cluster association device based on gradient histogram features further includes a second judgment module, used to obtain a threshold reflecting the overall deviation based on the feature point positions corresponding to all feature point information of the first associated cluster group and the nearest neighbor position in the transformation result; if the threshold is greater than a preset deviation threshold or the current matching number is less than a preset maximum matching number, then the matching association is performed again; otherwise, the matching association is completed. Attached Figure Description
[0024] Figure 1 This is a schematic diagram of the existing grid division and the placement of position points, where a is a schematic diagram of the grid {gw=3,gh=3} and b is a schematic diagram of the grid {gw=4,gh=4}.
[0025] Figure 2 This is a schematic diagram illustrating the shortcomings of existing methods.
[0026] Figure 3 This is a flowchart illustrating the cluster association method based on gradient histogram features according to an embodiment of this application;
[0027] Figure 4 This is a schematic diagram of the process of calculating feature point positions according to an embodiment of this application, wherein a is a schematic diagram of ROI clusters, b is a contour map of ROI, and c is a schematic diagram of the feature point position set.
[0028] Figure 5 This is a schematic diagram of the gradient histogram statistical range according to an embodiment of this application, where a is a schematic diagram of the relationship between the inscribed circle and the stretched circle, and b is a schematic diagram of the statistical region;
[0029] Figure 6This is a gradient histogram according to an embodiment of this application;
[0030] Figure 7 This is a comparative diagram of the offset before and after according to an embodiment of this application, where a is a diagram before offset and b is a diagram after offset;
[0031] Figure 8 This is a schematic diagram illustrating the block association effect according to an embodiment of this application;
[0032] Figure 9 This is a block diagram of a cluster association device based on gradient histogram features according to an embodiment of this application. Detailed Implementation
[0033] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0034] To better understand the above technical solutions, exemplary embodiments of this application will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of this application and to fully convey the scope of this application to those skilled in the art.
[0035] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.
[0036] Figure 3 This is a flowchart illustrating the cluster association method based on gradient histogram features according to an embodiment of this application, as shown below. Figure 3 As shown, this clumping association method based on gradient histogram features includes the following steps:
[0037] S101, obtain the contour corresponding to each block in the group of blocks to be associated to obtain the contour point set, and obtain the mean of each contour point set so as to use the mean of each contour point set as the feature point position of each contour to obtain the feature point position set.
[0038] As an example, the feature point positions of each contour are obtained according to the following formula:
[0039]
[0040] Among them, kp i This indicates the location of the feature point with index i. Let p(x) represent the set of contour points corresponding to the contour with index i, where l indicates that the contour with index i consists of l points. j ,y j ) represents the coordinates of the j-th point.
[0041] It should be noted that the cliques to be associated must include at least two cliques, each clique must include at least three cliques, and each clique corresponds to a contour; where, for example Figure 8 As shown, each segment of the digital tube or each element of the icon is called a cluster.
[0042] As a specific example, such as Figure 4 As shown, for example, the contour with index 0 consists of n points, then the set of points for this contour is denoted as ct0={p(x0,y0),p(x1,y1),...,p(x n-1 ,y n-1 If the ROI contour map contains m contours, then the overall contour point set is denoted as CT = {ct0, ct1, ... ct}. m-1}, take the mean of each contour point set to represent the contour, and take each mean point representing the contour as a feature point position kp, with the feature position kp having index i. i This can be expressed by the formula (assuming that the contour at index i consists of l points): Then the set of feature point locations is KP = {kp0, kp1, ..., kp} m-1} contains m positions.
[0043] S102, using gradient histogram features, extracts feature information of the feature points corresponding to each contour based on the contour point set and feature point location set of each contour, so as to obtain the feature point information set.
[0044] As an example, gradient histogram features are used to extract feature information of feature points corresponding to each contour based on the contour point set and feature point location set of each contour, so as to obtain a feature point information set. This includes: taking the feature point location corresponding to each contour as the center, obtaining the radius corresponding to the largest inscribed circle of each contour; stretching the radius according to a pre-set radius magnification factor to obtain a stretched circle, and using the stretched circle as the gradient histogram statistical range, so as to extract feature information of feature points corresponding to each contour, so as to obtain a feature point information set.
[0045] As a specific implementation, firstly, a radius magnification factor α is set to stretch the radius length, ensuring that the feature extraction region contains sufficient edge information (the gradient information of the edges is relatively rich); simultaneously, the contour ct is calculated. i Using the corresponding feature point position kp iLet be the radius of the largest inscribed circle centered at the center of the circle, and stretch the radius. The calculation process can be expressed as follows:
[0046] r i =α×MaxInscribedCircle(ct i ,kp i )
[0047] Then, center the circle at kp i The radius is r i The circle is used as the statistical range of the gradient histogram to extract kp. i The corresponding unoffset feature information f i ′, the statistical range is as follows Figure 5 As shown.
[0048] The gradient histogram, containing the gradient values G(k,z) and gradient directions θ(k,z), can be represented by the following formula:
[0049] G x (k,z)=I(k+1,z)-I(k-1,z)
[0050] G y (k,z)=I(k,z+1)-I(k,z-1)
[0051]
[0052] For example, if we want to extract feature information at index i, then k and z are restricted to values starting with kp. i With the center of the circle, r i Within a circle with radius b, and setting the number of bins in the histogram to b (the number of bins b can be adjusted according to actual needs), the horizontal axis represents the gradient direction of the equally divided circumferential angle bins, and the vertical axis represents the cumulative gradient values. Thus, we can obtain the following... Figure 6 The gradient histogram shown yields the unoffset feature information f. i '={v'0,v1',...,v' b-1}
[0053] Next, offset initiation and amplitude normalization are performed (mainly to enhance feature stability); the bin with the largest accumulated gradient value is taken as the starting point, and the bins before the interval with the largest gradient value are extended sequentially, such as... Figure 7 As shown; assuming f i The maximum gradient magnitude is v. j The offset feature information is denoted as f. i ", then f i = {v″0,v″1,...,v″ b-2 ,v″ b-1}={v' j ,v' j+1,...,v' j-2 ,v' j-1}; then for f i "Normalization yields f" i The formula is expressed as:
[0054]
[0055] Thus, the contour feature point information f at index i is obtained. i ={v0,v1,...,v b-1}
[0056] Finally, the feature point positions kp and the corresponding feature point information f form the feature point fp = {kp, f}, thus the ROI feature point information set FP = {fp0, fp1, ..., fp} for m contours. m-1}
[0057] S103, according to the preset number of extracted feature points, randomly extract corresponding feature point information from the feature point information set corresponding to the first associated block group in the block group to be associated, and perform distance judgment on each feature point information with all feature point information corresponding to the second associated block group in the block group to be associated, so as to obtain the matching object corresponding to each feature point information.
[0058] As one embodiment, the distance between each feature point information and all feature point information corresponding to the second associated block group in the block group to be associated is determined to obtain the matching object corresponding to each feature point information. This includes: determining the distance between any one feature point information in each feature point information and all feature point information corresponding to the second associated block group in the block group to be associated, so as to obtain the feature point information with the smallest distance from any one feature point information among all feature point information corresponding to the second associated block group, and using it as the matching object of any one feature point information, and so on, until the matching object corresponding to each feature point information is obtained.
[0059] It should be noted that, assuming two ROIs are extracted for association, ROI-A and ROI-B, the feature point information sets are denoted as FP respectively. A FP B (In practical applications, a baseline FP can be extracted) base Then use the benchmark FP base (With other related ROIs); set a deviation threshold T d Maximum number of matches C(T) d C is set according to the actual situation and requirements. Set the number of randomly selected feature points n (usually there is a minimum requirement for n, which is related to solving the affine matrix). Randomly selecting feature points and multiple matching are both to enhance the stability of the algorithm.
[0060] As a specific embodiment, let's first start with FP A Randomly select n feature points, denoted as FP′ A ,FP′ A ={fp' A,0 ,fp' A,1 ,...,fp' A,n-1} = Random(FP A Then comes feature information matching, such as fp' A,i ={kp' A,i ,f′ A,i Feature matching is the calculation of FP. B ={FP B}={KP B ,F B} contains all feature information F B ={f B,0 ,f B,1 ,f B,2 ...} and f′ A-i The distance is calculated, and the information feature with the smallest distance is taken as the matching object f′. B,i , can be represented as:
[0061] f′ B,i =Min(Distance(f′) A,i ,f B,0 ),Distance(f′ A,i ,f B,1 ),...)
[0062] After matching n feature points respectively, we obtain F′. B ={f′ B,0 ,f′ B,1 ,...,f′ B,n-1}
[0063] S104, calculate the affine matrix based on the feature point positions corresponding to the randomly selected feature point information and the feature point positions corresponding to the matching object.
[0064] As a specific embodiment, FP′ is used A Location point set KP′ A and F′ B The corresponding set of location points KP′ B Calculate the affine matrix: A = GetAffineTrans(KP′) A ,KP′ B )
[0065] In this function, GetAffineTrans() is used to solve for an affine matrix. There are many methods for solving an affine matrix, and any one of them can be used. A represents the affine matrix.
[0066] S105, an affine matrix is used to perform an affine transformation on the feature point location set of the second associated block group to obtain the transformation result, and a nearest neighbor search strategy is used to search for the nearest neighbor position of the feature point location corresponding to all feature point information of the first associated block group in the transformation result, so as to complete the association between the first associated block group and the second associated block group.
[0067] As a specific implementation, an affine matrix is used to represent the set of location points KP of ROI-B. B Perform affine transformation:
[0068] AKP B =A×KP B
[0069] After completing the affine transformation, the nearest neighbor search strategy is used to search the location set KP of ROI-A. A Each position in AKP B The nearest neighbor in the array, so that KP A A position kp A,i There is a corresponding
[0070]
[0071] In addition, as an example, the cluster association method based on gradient histogram features further includes: obtaining a threshold reflecting the overall deviation based on the feature point positions corresponding to all feature point information of the first associated cluster group and the nearest neighbor position in the transformation result; if the threshold is greater than the preset deviation threshold or the current matching number is less than the preset maximum matching number, then re-matching and association is performed; otherwise, the matching and association is completed.
[0072] As a specific embodiment, Where m is KP A The number of locations included; if ΔD, used to reflect the overall deviation, is greater than the previously set threshold deviation T. d If the current number of matches is less than the maximum number of matches C, then repeat steps S103-S105; if ΔD, which reflects the overall deviation, is less than or equal to the previously set threshold deviation T. d If the key point mapping relationship is recorded, then the association between the RIO-A cluster and the corresponding cluster in RIO-B is completed; otherwise, the association cannot be completed.
[0073] In other words, after the affine transformation, the first associated clique group and the second associated clique group can be associated using the nearest neighbor search strategy. It can be understood that the affine transformation "aligns" the positions of each clique in the first associated clique group and each clique in the second associated clique group. Therefore, each clique in the aligned first associated clique group can find its corresponding clique in the second associated clique group by using the nearest neighbor search.
[0074] In summary, the cluster association method based on gradient histogram features according to the embodiments of this application firstly obtains the contour corresponding to each cluster in the cluster group to be associated to obtain a contour point set, and obtains the mean of each contour point set so as to use the mean of each contour point set as the feature point position of each contour to obtain a feature point position set; then, using gradient histogram features, the feature information of the feature points corresponding to each contour is extracted according to the contour point set and the feature point position set of each contour to obtain a feature point information set; next, according to the preset number of feature points to be extracted, a corresponding number of feature point information is randomly extracted from the feature point information set corresponding to the first associated cluster group in the cluster group to be associated, and each feature point information is associated with the first associated cluster group in the cluster group to be associated. Distance is determined for all feature points in the second associated clique group to obtain the matching object for each feature point. Next, an affine matrix is calculated based on the randomly selected feature point positions and the matching object positions. Finally, the affine matrix is used to perform an affine transformation on the feature point position set of the second associated clique group to obtain the transformation result. A nearest neighbor search strategy is then used to search for the nearest neighbor positions of all feature point positions in the first associated clique group within the transformation result, thus completing the association between the first and second associated clique groups. Therefore, by using gradient histograms in conjunction with location and the search for nearest neighbor positions after affine transformation, the accuracy of clique association is improved.
[0075] To implement the above embodiments, this application also proposes a cluster association device based on gradient histogram features, including: an acquisition module 10, a feature extraction module 20, a first judgment module 30, a calculation module 40, and a feature association module 50.
[0076] The acquisition module 10 is used to acquire the contour corresponding to each block in the group of blocks to be associated to obtain a contour point set, and to acquire the mean of each contour point set so as to use the mean of each contour point set as the feature point position of each contour to obtain a feature point position set; the feature extraction module 20 is used to extract the feature information of the feature points corresponding to each contour based on the contour point set and the feature point position set of each contour using gradient histogram features to obtain a feature point information set; the first judgment module 30 is used to randomly extract corresponding feature point information from the feature point information set corresponding to the first associated block group in the group of blocks to be associated according to the preset number of extracted feature points, and to set the feature point information of each feature point... Distance judgments are performed on all feature point information corresponding to the second associated block group in the block group to be associated, so as to obtain the matching object corresponding to each feature point information; the calculation module 40 is used to calculate the affine matrix based on the feature point positions corresponding to the randomly selected feature point information and the feature point positions corresponding to the matching object; the feature association module 50 is used to perform affine transformation on the feature point position set of the second associated block group using the affine matrix to obtain the transformation result, and uses the nearest neighbor search strategy to search for the nearest neighbor position of the feature point position corresponding to all feature point information of the first associated block group in the transformation result, so as to complete the association between the first associated block group and the second associated block group.
[0077] As an example, the feature point positions of each contour are obtained according to the following formula:
[0078]
[0079] Among them, kp i This indicates the location of the feature point with index i. Let p(x) represent the set of contour points corresponding to the contour with index i, where l indicates that the contour with index i consists of l points. j ,y j Let represent the coordinates of the j-th point.
[0080] As an example, the feature extraction module 20 is further configured to: take the feature point position corresponding to each contour as the center of the circle, obtain the radius corresponding to the largest inscribed circle of each contour; stretch the radius according to the preset radius magnification factor to obtain the stretched circle, and use the stretched circle as the gradient histogram statistical range, so as to extract the feature information of the feature points corresponding to each contour, so as to obtain the feature point information set.
[0081] As an example, the first judgment module 30 is further configured to perform distance judgment between any one feature point information in each feature point information and all feature point information corresponding to the second associated block in the block to be associated, so as to obtain the feature point information with the smallest distance from any one feature point information among all feature point information corresponding to the second associated block, and use it as the matching object of any one feature point information, and so on, until the matching object corresponding to each feature point information is obtained.
[0082] As an example, the cluster association device based on gradient histogram features further includes a second judgment module, which is used to obtain a threshold reflecting the overall deviation based on the feature point positions corresponding to all feature point information of the first associated cluster and the nearest neighbor position in the transformation result; if the threshold is greater than the preset deviation threshold or the current matching number is less than the preset maximum matching number, then the matching association is performed again; otherwise, the matching association is completed.
[0083] It should be noted that the foregoing explanation of the embodiment of the cluster association method based on gradient histogram features also applies to the cluster association device based on gradient histogram features in this embodiment, and will not be repeated here.
[0084] In summary, the clumping association device based on gradient histogram features according to the embodiments of this application improves the accuracy of clumping association by searching for the nearest neighbor position after combining gradient histogram with position and affine transformation.
[0085] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0086] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0087] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0088] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0089] It should be noted that any reference signs placed between parentheses in the claims should not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. This application can be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.
[0090] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0091] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
[0092] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0093] In this application, unless otherwise expressly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0094] In this application, unless otherwise expressly specified and limited, "above" or "below" the second feature can mean that the first feature is in direct contact with the second feature, or that the first feature is in indirect contact with the second feature through an intermediate medium. Furthermore, "above," "on top of," and "over" the second feature can mean that the first feature is directly above or diagonally above the second feature, or simply that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature can mean that the first feature is directly below or diagonally below the second feature, or simply that the first feature is at a lower horizontal level than the second feature.
[0095] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. The illustrative expressions of the above terms in this specification should not be construed as necessarily referring to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0096] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A cluster association method based on gradient histogram features, characterized in that, Includes the following steps: Obtain the contour corresponding to each block in the group of blocks to be associated to obtain a set of contour points, and obtain the mean of each set of contour points so as to use the mean of each set of contour points as the feature point position of each contour to obtain a set of feature point positions. Gradient histogram features are used to extract feature information of the feature points corresponding to each contour based on the contour point set and the feature point position set of each contour, so as to obtain the feature point information set. According to the preset number of feature points to be extracted, a number of feature points are randomly extracted from the feature point information set corresponding to the first associated block group in the group to be associated. The distance between each feature point information and all feature point information corresponding to the second associated block group in the group to be associated is determined to obtain the matching object corresponding to each feature point information. Calculate the affine matrix based on the feature point positions corresponding to the randomly extracted feature point information and the feature point positions corresponding to the matching object; The affine matrix is used to perform an affine transformation on the feature point location set of the second associated clique group to obtain the transformation result. Then, the nearest neighbor search strategy is used to search for the nearest neighbor position of the feature point information corresponding to all feature point information of the first associated clique group in the transformation result, so as to complete the association between the first associated clique group and the second associated clique group. A threshold reflecting the overall deviation is obtained based on the feature point positions corresponding to all feature point information of the first associated cluster group and the nearest neighbor position in the transformation result; If the threshold is greater than the preset deviation threshold or the current number of matches is less than the preset maximum number of matches, then the matching association is re-performed; otherwise, the matching association is completed.
2. The cluster association method based on gradient histogram features as described in claim 1, characterized in that, The feature point positions of each contour are obtained using the following formula: Among them, kp i This indicates the location of the feature point with index i. Let p(x) represent the set of contour points corresponding to the contour with index i, where l indicates that the contour with index i consists of l points. j ,y j ) represents the coordinates of the j-th point.
3. The cluster association method based on gradient histogram features as described in claim 1, characterized in that, Gradient histogram features are used to extract feature information of the feature points corresponding to each contour based on the contour point set and the feature point location set of each contour, so as to obtain a feature point information set, including: Using the feature point position corresponding to each contour as the center, the radius corresponding to the largest inscribed circle of each contour is obtained; The radius is stretched according to a pre-set radius magnification factor to obtain a stretched circle, and the stretched circle is used as the gradient histogram statistical range to extract the feature information of the feature points corresponding to each contour, so as to obtain a feature point information set.
4. The cluster association method based on gradient histogram features as described in claim 1, characterized in that, Each feature point is compared with all feature points in the second associated block group within the group to be associated, and distance is determined to obtain the matching object corresponding to each feature point, including: Distance is determined between any one of the feature points in each feature point information and all the feature points corresponding to the second associated block group in the block group to be associated, so as to obtain the feature point information with the smallest distance from any one of the feature points in the second associated block group, and use it as the matching object of any one of the feature points. This process is repeated until the matching object corresponding to each feature point information is obtained.
5. A cluster association device based on gradient histogram features, characterized in that, include: The acquisition module is used to acquire the contour corresponding to each block in the group of blocks to be associated to obtain a set of contour points, and to acquire the mean of each set of contour points so as to use the mean of each set of contour points as the feature point position of each contour to obtain a set of feature point positions. The feature extraction module is used to extract feature information of the feature points corresponding to each contour based on the contour point set and the feature point position set of each contour using gradient histogram features, so as to obtain a feature point information set. The first judgment module is used to randomly extract corresponding feature point information from the feature point information set corresponding to the first associated block group in the group to be associated according to the preset number of extracted feature points, and to perform distance judgment between each feature point information and all feature point information corresponding to the second associated block group in the group to be associated, so as to obtain the matching object corresponding to each feature point information. The calculation module is used to calculate the affine matrix based on the feature point positions corresponding to the randomly extracted feature point information and the feature point positions corresponding to the matching object; The feature association module is used to perform an affine transformation on the feature point location set of the second associated clique group using the affine matrix to obtain the transformation result, and to use a nearest neighbor search strategy to search for the nearest neighbor position of the feature point information corresponding to all feature point information of the first associated clique group in the transformation result, so as to complete the association between the first associated clique group and the second associated clique group. The second judgment module is used to obtain a threshold reflecting the overall deviation based on the feature point positions corresponding to all feature point information of the first associated block group and the nearest neighbor position in the transformation result; if the threshold is greater than the preset deviation threshold or the current matching number is less than the preset maximum matching number, then the matching association is re-performed; otherwise, the matching association is completed.
6. The cluster association device based on gradient histogram features as described in claim 5, characterized in that, The feature point positions of each contour are obtained using the following formula: Among them, kp i This indicates the location of the feature point with index i. Let p(x) represent the set of contour points corresponding to the contour with index i, where l indicates that the contour with index i consists of l points. j ,y j ) represents the coordinates of the j-th point.
7. The cluster association device based on gradient histogram features as described in claim 5, characterized in that, The feature extraction module is further configured to: take the feature point position corresponding to each contour as the center, obtain the radius corresponding to the largest inscribed circle of each contour; stretch the radius according to a preset radius magnification factor to obtain a stretched circle, and use the stretched circle as the gradient histogram statistical range, so as to extract the feature information of the feature points corresponding to each contour to obtain a feature point information set.
8. The cluster association device based on gradient histogram features as described in claim 5, characterized in that, The first judgment module is also used for, Distance is determined between any one of the feature points in each feature point information and all the feature points corresponding to the second associated block group in the block group to be associated, so as to obtain the feature point information with the smallest distance from any one of the feature points in the second associated block group, and use it as the matching object of any one of the feature points. This process is repeated until the matching object corresponding to each feature point information is obtained.