Repeated Texture Recognition Method and Device

By identifying the slope and distribution of feature points connection lines in the image pair, the accuracy of repeated texture recognition in three-dimensional reconstruction is solved, effective filtering of repeated textures in small areas is achieved, and the accuracy of the three-dimensional reconstruction model is improved.

CN118691848BActive Publication Date: 2025-05-27HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410741680.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-31
Publication Date
2025-05-27
Estimated Expiration
2042-10-31

AI Technical Summary

Technical Problem

During the three-dimensional reconstruction process, how to accurately identify duplicate textures and filter them out to avoid incorrect matches caused by objects with the same shape and texture.

Method used

By obtaining feature point matching information of image pairs, calculating the slope of feature point connection lines, and counting the number and proportion of connections that meet the preset conditions, we identify image pairs containing repeating textures in small areas. This method does not need to analyze the image feature content information, and only recognizes the repeated textures through the line slope and distribution of feature points.

Benefits of technology

It improves the accuracy and robustness of repeated texture recognition, reduces sensitivity to input images, and enhances the accuracy of the three-dimensional reconstruction model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118691848B_ABST
    Figure CN118691848B_ABST
Patent Text Reader

Abstract

The present application provides a method and apparatus for repetitive texture recognition. The method horizontally stitches two images corresponding to an image pair and calculates the slope of the line connecting the matching feature point pairs in the two images. Further, it statistically counts the proportion of the lines whose deviation between the slope and the standard value of the slope is greater than or equal to a set value. If this proportion is greater than the corresponding preset value, it indicates that there are small areas of repetitive textures in the image pair in the non-primary direction of feature matching, that is, it determines that the matching relationship of the image pair is incorrect and deletes the matching relationship of the image pair. It can be seen that this method does not need to analyze the content information of the feature points in the image pair, and only recognizes the repetitive textures not in the primary direction of feature matching through the slope of the feature point connection line. Therefore, this method is not sensitive to the input image and improves the robustness of this method.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the invention patent application with the application number 202211348049.7, the application date of October 31, 2022, and the invention creation name of "Method and Device for Repeated Texture Recognition" submitted to the China National Patent Office. Technical Field

[0002] This application relates to the field of 3D reconstruction technology, and particularly to a method and device for repeated texture recognition. Background Art

[0003] 3D Reconstruction is to restore the 3D structure of an object or scene from multiple 2D images, and finally establish a virtual reality expressing the objective world in a computer. 3D reconstruction is applied to many scenarios. For example, scenarios of constructing 3D digital models based on real-world scenarios, such as AR augmented reality, and creating 3D digital models of cultural relics.

[0004] In the 2D images used for 3D reconstruction, there may be objects with the same shape and the same texture. These object features with the same shape and texture may form incorrect matches, resulting in errors in the 3D reconstruction model. For example, the same electrical appliances are placed at different positions in a certain spatial environment, such as water dispensers with the same shape and texture. When performing 3D reconstruction for this scene, it is very likely to identify the water dispensers at different positions as the same water dispenser, thus leading to errors in the 3D reconstruction model of this environment. Therefore, in the process of 3D reconstruction, how to accurately identify and filter out repeated textures is an urgent problem to be solved currently. Summary of the Invention

[0005] In view of this, this application provides a method and device for repeated texture recognition to solve the above technical problems. The disclosed technical solutions are as follows:

[0006] In a first aspect, this application provides a method for repeated texture recognition, which is applied to an electronic device. The method includes: obtaining the feature point matching information included in at least two images with a matching relationship, where the feature point matching information includes the information of the matching feature points included in at least two images; horizontally splicing at least two images, and calculating the slopes of the lines connecting all the matching feature points in at least two images; counting the number of lines that meet the first preset condition in at least two images, where the first preset condition includes that the deviation between the slope and the slope standard value is greater than or equal to the first preset value; determining that the number of lines meets the second preset condition, where the second preset condition includes that the proportion of the lines that meet the first preset condition is greater than or equal to the second preset value; determining that at least two images contain small-area repeated textures. It can be seen that this solution does not need to analyze the content information of the feature points in the image pair, and only identifies the repeated textures that are not in the main direction of feature matching through the slopes of the feature point connections. Therefore, this method is not sensitive to the input images and improves the robustness of this method.

[0007] In a possible implementation of the first aspect, before horizontally stitching at least two images, the method further includes: counting the number of matching feature points included in any one of the at least two images; if the number of matching feature points is greater than or equal to a first threshold, performing horizontal stitching of the at least two images; if the number of matching feature points is less than the first threshold, determining that there is small-area repetitive texture in the at least two images. In this way, small-area repetitive texture can be initially identified through the number of matching feature points in the image. If the number of matching feature points in the image is less than the first threshold, it is determined that there is small-area repetitive texture in the image pair, and further, it is determined that the matching relationship of the image pair is incorrect, improving the efficiency of identifying repetitive texture.

[0008] In a possible implementation of the first aspect, the process of determining the slope standard value includes: calculating the median value of the slopes corresponding to all the connecting lines included in the image pair, and determining the median value of the slopes as the slope standard value.

[0009] In a possible implementation of the first aspect, the method further includes: deleting the matching relationship between at least two images including small-area repetitive texture.

[0010] In a possible implementation of the first aspect, the method further includes: after determining that the number of connecting lines meeting the first preset condition in the at least two images does not meet the second preset condition, counting the distribution range of the matching feature points included in any one of the at least two images; if the distribution range is less than or equal to a preset range, determining that the at least two images include small-area repetitive texture. In this way, for repetitive texture that cannot be identified by the slope of the feature point connecting lines, the image pair with repetitive texture can be further identified through the distribution of the matching feature points. It can be seen that this solution improves the accuracy of identifying repetitive texture.

[0011] In a possible implementation of the first aspect, counting the distribution range of the matching feature points included in any one of the at least two images includes: dividing any one of the at least two images into multiple grids, and counting the number of grids including matching feature points in any one of the images; connecting the grids including matching feature points and adjacent in position into a connected region; determining the distribution range of the matching feature points based on the parameters of the connected region included in any one of the images, where the parameters include at least one of the number and area of the regions. It can be seen that this solution counts the distribution of feature points by dividing grids in the image, and this method is simple and effective.

[0012] In a possible implementation of the first aspect, determining the distribution range of matching feature points based on the parameters of the regions included in any image includes: if the number of all connected regions included in any image is less than or equal to a third threshold, determining that the distribution range of the matching feature points is less than a preset range; if the number of all connected regions included in any image is greater than the third threshold, determining whether the total area of all connected regions in any image is less than or equal to a fourth threshold; if the total area is less than or equal to the fourth threshold, determining that at least two images include small-region repeated textures; if the total area is greater than the fourth threshold, determining that the matching relationship of at least two images is correct. In this way, by counting the number of connected regions or the area of the connected regions included in the image, the distribution of the matching feature points is determined, improving the accuracy of the repeated texture recognition result.

[0013] In a possible implementation of the first aspect, before counting the distribution range of the matching feature points included in any image in at least two image pairs, the method further includes: counting the number of matching feature points included in any image in at least two images; if the number of the matching feature points is less than or equal to a second threshold, performing the step of counting the distribution range of the matching feature points included in any image in at least two image pairs; if the number of the matching feature points is greater than the second threshold, determining that the matching relationship of at least two images is correct. It can be seen that this solution initially identifies the images without small-region repeated textures through the number of matching feature points included in the image, reducing the number of images for identifying whether there are small-region repeated textures. Therefore, the efficiency of identifying repeated textures is improved.

[0014] In the second aspect, the present application further provides a repeated texture recognition method, which is applied to an electronic device. The method includes: obtaining the feature point matching information included in at least two image pairs with a matching relationship, where the feature point matching information includes the information of the matching feature points included in at least two images; counting the distribution range of the matching feature points included in any image in at least two images; determining that at least two images with the distribution range less than or equal to the preset range include small-region repeated textures. It can be seen that this solution does not need to analyze the image feature information, but identifies the small-region repeated textures through the distribution of the matching feature points included in the image pair. Therefore, this method is not sensitive to the input image, improving the robustness of this method.

[0015] In a possible implementation of the second aspect, counting the distribution range of the matching feature points included in any image in the image pair includes: dividing any one of the at least two images into multiple grids, and counting the number of grids including the matching feature points in any image; connecting the grids including the matching feature points and adjacent in position into a connected region; determining the distribution range of the matching feature points based on the parameters of the connected region included in any image, where the parameters include at least one of the number and the area of the region.

[0016] In a possible implementation of the second aspect, determining the distribution range of matching feature points based on the parameters of the regions included in any image includes: if the number of all connected regions included in any image is less than or equal to a third threshold, determining that the distribution range of the matching feature points is less than a preset range; if the number of all connected regions included in any image is greater than the third threshold, determining whether the total area of all connected regions in any image is less than or equal to a fourth threshold; if the total area is less than or equal to the fourth threshold, determining that at least two images include small-region repeated textures; if the total area is greater than the fourth threshold, determining that the matching relationship of at least two images is correct.

[0017] In a possible implementation of the second aspect, before counting the distribution range of the matching feature points included in any image in at least two image pairs, the method further includes: counting the number of matching feature points included in any image in at least two images; if the number of the matching feature points is less than or equal to a second threshold, performing the step of counting the distribution range of the matching feature points included in any image in at least two image pairs; if the number of the matching feature points is greater than the second threshold, determining that the matching relationship of at least two images is correct.

[0018] In a third aspect, the present application further provides an electronic device, which includes: one or more processors, a memory, and a touch screen; the memory is used for storing program codes; the processor is used for running the program codes so that the electronic device implements the repeated texture recognition method according to any one of the first aspect or the second aspect.

[0019] In a fourth aspect, the present application further provides a computer-readable storage medium, on which instructions are stored. When the instructions are run on the electronic device, the electronic device is enabled to execute the repeated texture recognition method according to any one of the first aspect or the second aspect.

[0020] In a fifth aspect, the present application further provides a computer program product, on which an execution is stored. When the computer program product is run on the electronic device, the electronic device is enabled to implement the repeated texture recognition method according to any one of the first aspect or the second aspect.

[0021] It should be understood that the descriptions of technical features, technical solutions, beneficial effects or similar terms in this application do not imply that all features and advantages can be achieved in any single embodiment. On the contrary, it can be understood that the description of a feature or beneficial effect means that a specific technical feature, technical solution or beneficial effect is included in at least one embodiment. Therefore, the descriptions of technical features, technical solutions or beneficial effects in this specification do not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions and beneficial effects described in this embodiment can be combined in any appropriate manner. Those skilled in the art will understand that an embodiment can be implemented without one or more specific technical features, technical solutions or beneficial effects of a specific embodiment. In other embodiments, additional technical features and beneficial effects can also be identified in specific embodiments that do not embody all embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0023] Figure 1 is a flowchart of a method for identifying repeated textures provided by an embodiment of the present application;

[0024] Figure 2 is a schematic diagram of an image pair provided by an embodiment of the present application;

[0025] Figure 3 is another schematic diagram of an image pair provided by an embodiment of the present application;

[0026] Figure 4 is a flowchart of another method for identifying repeated textures provided by an embodiment of the present application;

[0027] Figure 5 is a flowchart of yet another method for identifying repeated textures provided by an embodiment of the present application;

[0028] Figure 6 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0029] The terms "first", "second", "third", etc. in the specification, claims and drawings of this application are used to distinguish different objects, rather than to limit a specific order.

[0030] In the embodiments of the present application, words such as "exemplary" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary" or "for example" is intended to present relevant concepts in a specific manner.

[0031] Please refer to Figure 1 , which shows a flowchart of a method for repetitive texture recognition provided by an embodiment of the present application. This method can be applied to electronic devices such as servers. The electronic device includes a feature extraction module, a feature matching module, a first filtering module, and a second filtering module.

[0032] As Figure 1 shown, the method includes the following steps:

[0033] S11, the feature extraction module obtains multiple views of the three-dimensional reconstruction object.

[0034] For example, multiple images of the three-dimensional reconstruction object from different perspectives can be collected through a terminal device (such as a camera, a smartphone, a virtual reality device, etc.), that is, multiple views.

[0035] The multiple views of the three-dimensional reconstruction object collected by the terminal device are uploaded to the electronic device for the three-dimensional reconstruction process.

[0036] S12, the feature extraction module extracts feature points from each view to obtain a feature map.

[0037] In an exemplary embodiment of the present application, the scale-invariant feature transform (SIFT) method can be used to extract feature points from each image. The purpose of SIFT feature point screening: to find extreme points in different scale spaces to ensure the existence of these feature points under the conditions of magnification or reduction.

[0038] S13, the feature extraction module transfers all feature maps to the feature matching module.

[0039] S14, the feature matching module performs feature matching on all feature maps to obtain image pairs with matching relationships, and transfers all image pairs with matching relationships to the first filtering module.

[0040] In an exemplary embodiment, each image has a unique identifier. The image pairs in this article include the unique identifiers of two matching images and their mapping relationships. For example, after the feature matching module performs feature matching on image A and image B, it is confirmed that the successfully matched features in these two images meet the preset conditions (for example, the number of successfully matched features is greater than the preset value).

[0041] In an exemplary embodiment, the random sample consensus (RANSAC) algorithm can be used to perform feature matching on all feature maps to obtain image pairs with matching relationships, and information on feature point pairs (or called matching feature point pairs) with matching relationships included in the image pairs. The RANSAC algorithm is a simple and effective method for removing the influence of noise and estimating a model. This algorithm uses as few points as possible to estimate the model parameters, and then expands the influence range of the obtained model parameters as much as possible.

[0042] S15. The first filtering module obtains the feature point matching information of the image pair.

[0043] For example, in an exemplary embodiment, the feature point matching information may include the number, position information, feature values, etc. of the feature points with matching relationships.

[0044] S16. Determine whether the number of matching feature points included in one image in the image pair is greater than or equal to a first threshold; if so, execute S17; if not, execute S20.

[0045] The matching feature points refer to the feature points with matching relationships in the two images included in the image pair.

[0046] As Figure 2 shown, Image 30 and Image 40 are two images determined to have a matching relationship after feature matching by the feature matching module. Among them, the scenes shown in Image 30 and 40 include objects such as a table.

[0047] In this example, there is a matching relationship between the feature point A included in Image 30 and the feature point B included in Image 20, that is, point A and point B are a pair of matching feature point pairs. This example only shows one pair of matching feature point pairs.

[0048] Count the number of feature points in any one image of the image pair that have a matching relationship with the other image. If the number of feature points with a matching relationship is greater than or equal to the first threshold, it indicates that the matching relationship of the image pair may be correct.

[0049] Among them, the first threshold can be statistically obtained based on the results of a limited number of tests. In this example, the value of the first threshold can be 15, and the present application does not limit the numerical range of the first threshold.

[0050] In an application scenario, for the successfully matched feature points corresponding to an image pair (or called matching feature points), the proportion of the slopes of the lines connecting all the matching feature points in the two images within a slope range is greater than or equal to a preset proportion. The slope range in this scenario can be called the main direction of feature matching for the image pair. For example, for the lines connecting the successfully matched feature points in images A and B, more than 80% of the slopes are around 60°, and the main direction of feature matching between image A and image B is around 60°.

[0051] However, there are still matching feature points in the two images that are not in the main direction. Such feature points are mis-matched feature points. If there are mis-matched feature points in the two images, it can be determined that the two images are mis-matched images. This situation can be identified through the process shown in the following steps S17 - S19.

[0052] S17, Horizontally splice the image pair and calculate the slopes and the median slope of the lines connecting all pairs of matching feature points.

[0053] Among them, horizontal splicing means splicing the two images in the horizontal direction (such as the X-axis direction).

[0054] Figure 2 Shown is a schematic diagram of the splicing of image 30 and image 40 in the X-axis direction, and calculate the slope of the line AB connecting feature point B and feature point A.

[0055] The median slope is the median of the slopes of the lines connecting all the matching feature points in the image pair. For example, if the image pair contains 20 pairs of matching feature points, that is, the image pair can obtain 20 feature point connection lines. Calculate the slopes of these 20 feature point connection lines respectively, and then calculate the median of the slopes of these 20 feature point connection lines.

[0056] S18, Count the number of lines whose deviation between the connection slope and the median slope corresponding to the same image pair is greater than or equal to a first preset value.

[0057] In the embodiments of the present application, the first preset value can be determined according to the statistical results of a limited number of experiments. For example, the first preset value is 8°, and the present application does not limit the preset value corresponding to the slope deviation.

[0058] S19, Determine whether the proportion of the lines meeting the conditions is greater than or equal to a second preset value; if so, execute S20; if not, execute S22.

[0059] In the embodiments of the present application, the second preset value can be determined according to the experimental statistical results. For example, the numerical range of the second preset value can be 5% - 15%.

[0060] The ratio of the number of qualified connection lines refers to the ratio of the number of connection lines of qualified feature points to the number of all connection lines of feature points included in the image pair. For example, assume that the second preset value is 5%. An image pair contains 8 connection lines of qualified feature points, and a total of 100 connection lines of feature points are included in this image pair. That is, the ratio of the connection lines of qualified feature points is 8%. Obviously, the ratio of the qualified connection lines included in this image pair is greater than the second preset value.

[0061] S20. Delete the matching relationship of this image pair.

[0062] For example, image A and image B are two images with incorrect matching relationships. Delete the matching mapping relationship between image A and image B.

[0063] The process described in S15 - S20 above can screen out image pairs where the matching feature points are inconsistent with the main direction of feature matching. Such images usually have incorrect matching relationships.

[0064] In another scenario, as Figure 3 shown, image 10 and image 20 are an image pair with a matching relationship. Figure 3 In Figure 3 image 10 and image 20 are horizontally spliced. Moreover, the matching feature points included in image 10 and image 20 are concentrated in the area where the character "Fu" is located. Figure 3 The dotted line in the area of the character "Fu" in

[0065] S21. Determine whether the number of matching feature points is less than or equal to the second threshold; if so, execute S22; if not, execute S26.

[0066] In the embodiments of the present application, the second threshold is greater than the first threshold. The second threshold can also be obtained based on the statistical results of a limited number of tests. For example, the value of the second threshold in this example can be 500. The present application does not limit the numerical range of the second threshold.

[0067] If the number of matching feature points included in an image is greater than the first threshold and less than or equal to the second threshold, it is necessary to further identify whether there is small - area repeated texture in the image. If the number of matching feature points is greater than the second threshold, determine that the matching relationship of this image pair is correct and directly retain this image pair.

[0068] S22, divide any one of the images corresponding to the image pair into N*M grids, and count the distribution of the grids containing matching feature points in this image.

[0069] It can be understood that M and N can be adjusted according to the size of the image. In an exemplary embodiment, it is necessary to ensure that a certain number of pixel points are included in each grid. For example, each grid contains 40×40 pixel points.

[0070] S23, connect the grids that contain matching feature points and are adjacent to each other in any one of the images into a region (or called a connected region).

[0071] The matching feature points refer to the feature points in any one of the images of the image pair that have a matching relationship with the feature points of the other image. For example, Figure 2 the feature point A in image 30 matches the feature point B in image 40. Therefore, both point A and point B can be called matching feature points.

[0072] In an exemplary embodiment, first traverse the N*M grids in the image, filter out the grids containing feature points, and then traverse the grids containing feature points to filter out the grids containing feature points that have a matching relationship with the other image in the image pair. Finally, connect the grids that contain matching feature points and are adjacent in position into a region.

[0073] S24, determine whether the number of regions contained in the image is less than a third threshold; if so, execute S26, if not, execute S25.

[0074] Count the number of regions obtained by connecting the grids contained in any one of the images in the image pair. If this number is less than a preset value, such as 3, it is determined that the matching feature points of this image pair are distributed in a region with a relatively small range, and then it is determined that there are repeated textures in this small range region.

[0075] Generally, the matching feature points of correctly matched image pairs are relatively evenly distributed on the image. Therefore, if the matching feature points of the image pair are concentrated in a small range region, it can be determined that there is an error in the matching relationship of this image pair.

[0076] As Figure 3 shown, image 10 and image 20 are an image pair with a matching relationship, Figure 3 where image 10 and image 20 are spliced horizontally. Moreover, the matching feature points contained in image 10 and image 20 are concentrated in the region where the character "Fu" is located. Therefore, by determining whether the number of regions contained in the image is less than the third threshold, it can be determined whether this image pair is an image pair containing repeated textures and there is an error in its matching relationship.

[0077] S25, determine whether the maximum value of the number of grids contained in the region is less than a fourth threshold; if so, execute S26, if not, execute S27.

[0078] If the number of regions contained in any one of the image pairs is greater than a third threshold, then continue to determine whether the total number of grids contained in all connected regions in the image is less than a fourth threshold. If so, it indicates that the matching feature points of the image are concentrated in a small area.

[0079] In an exemplary embodiment of the present application, the fourth threshold can be determined according to the total number of grids contained in the image. For example, in one example, the fourth threshold can be set to 0.05 × the total number of grids.

[0080] S26. Delete the matching relationship of this image pair.

[0081] If the number of regions is less than the third threshold, or the number of grids contained in the region with the largest area is less than the fourth threshold, it is determined that the matching feature points of the image pair are concentratedly distributed in a small area. As previously mentioned, the matching feature points of correctly matched image pairs are usually evenly distributed throughout the entire image. Therefore, if the matching feature points of two images are concentratedly distributed in a small area, it is determined that the matching relationship between these two images is incorrect, and the incorrectly matched image pair needs to be deleted.

[0082] For example, image A and image B are an image pair with an incorrect matching relationship, and the matching mapping relationship between image A and image B is deleted.

[0083] S27. Retain the matching relationship of this image pair.

[0084] If the total number of grids contained in all connected regions in the image is greater than the fourth threshold, it indicates that the area of the sum of the connected regions is large. In other words, the distribution range of the matching feature points of this image pair is large, and finally it is determined that the matching relationship of this image pair is correct. Therefore, the matching relationship of this image pair is retained.

[0085] S28. Determine whether there is an unprocessed image pair.

[0086] In an exemplary embodiment, a parameter i can be set to represent the number of currently unprocessed image pairs corresponding to the same 3D reconstruction object. The value of the parameter i is updated for each processed image pair, such as i = i - 1. In this scenario, if the value of i is equal to 0, it indicates that there is no unprocessed image pair. If the value of i is greater than 0, it indicates that there is an unprocessed image pair.

[0087] In another exemplary embodiment of the present application, a parameter j can be set to represent the number of processed image pairs corresponding to the same 3D reconstruction object. j is incremented by 1 for each processed image pair. In this scenario, if the value of j is less than the number of all image pairs corresponding to the 3D reconstruction object, it indicates that there is an unprocessed image pair. If the value of j is equal to the number of all image pairs corresponding to the 3D reconstruction object, it indicates that there is no unprocessed image pair.

[0088] If there are unprocessed image pairs, return to execute S15 to continue processing the next pair of image pairs. If there are no unprocessed image pairs, execute S29.

[0089] S29, output the image pairs retaining the matching relationship.

[0090] The image pairs retaining the matching relationship are the image pairs with correct matching relationships screened out. Finally, output the image pairs with correct matching relationships and continue with subsequent processing.

[0091] It can be understood that the process shown in only S15 - S20 can be used to filter out image pairs with small - area repeated textures in non - principal directions, or the process shown in only S21 - S27 can be used to filter out image pairs with repeated textures concentrated in small areas.

[0092] For the repeated - texture recognition method provided in this embodiment, calculate the slope of the line connecting the matching feature - point pairs included in the image pair and the median slope of the image pair, and count the number of lines whose deviation between the slope and the median slope is greater than a first preset value. If the proportion of lines meeting this condition is greater than a second preset value, it indicates that the matching relationship of the image pair is incorrect, and delete the matching relationship of the image pair. Further, this method can identify whether the matching relationship of the image pair is correct according to the distribution of the matching feature - point pairs included in the image pair. Specifically, the image can be divided into multiple grids, and the distribution of feature points on the grids is counted. Connect adjacent grids containing matching feature - point pairs into a region, and count the number of regions included in the image and the number of grids included in each region. If the number of regions included in the image is less than or equal to a third threshold, or the maximum value of the number of grids included in the region is less than or equal to a fourth threshold, it indicates that the matching feature - point pairs included in the image pair are concentrated in a small - range area, and delete the matching relationship of the image pair. If the maximum value of the number of grids included in the region is greater than the fourth threshold, then retain the matching relationship of the image pair. Finally, output the image pairs retaining the matching relationship and continue with subsequent processing. This solution does not require analyzing image feature information, but identifies small - area repeated textures through the slope or distribution of the matching feature - point pairs included in the image pair. Therefore, this method is not sensitive to input images and improves the robustness of the method.

[0093] Figure 4 It is a flowchart of another repeated - texture recognition method provided by an embodiment of the present application. In this embodiment, it is determined whether there are repeated textures in the image pair through the slope of the line connecting the matching feature - point pairs in the image pair. This method is applied to an electronic device, and the electronic device includes a feature extraction module, a feature matching module, and a first filtering module.

[0094] As Figure 4 shown, this method may include the following steps:

[0095] S31. The feature extraction module obtains multiple views of the three-dimensional reconstruction object.

[0096] S32. The feature extraction module extracts feature points of each view to obtain a feature map.

[0097] S33. The feature extraction module transfers all the feature maps to the feature matching module.

[0098] S34. The feature matching module performs feature matching on all the feature maps to obtain image pairs with matching relationships, and transfers all the image pairs with matching relationships to the first filtering module.

[0099] S35. The first filtering module obtains the feature point matching information of the image pairs.

[0100] S36. Determine whether the number of matching feature points included in one image in the image pair is greater than or equal to the first threshold; if so, execute S37; if not, execute S310.

[0101] S37. Horizontally splice the image pair, and calculate the slope and the median slope of the connecting lines of all pairs of matching feature points.

[0102] S38. Count the number of connecting lines in the same image pair whose deviation between the connecting line slope and the median slope is greater than or equal to the first preset value.

[0103] S39. Determine whether the ratio of the connecting lines meeting the conditions is greater than or equal to the second preset value; if so, execute S310; if not, execute S311.

[0104] S310. Delete the matching relationship of the image pair.

[0105] In this embodiment, the implementation processes of the above S31 to S310 are the same as Figure 1 the implementation processes of S11 to S20 in the embodiment shown, and will not be elaborated here.

[0106] S311. Retain the matching relationship of the image pair.

[0107] In this embodiment, if the first filtering module determines that the ratio of the connecting lines meeting the conditions is less than the second preset value, it indicates that the proportion of the feature points not in the main direction of feature matching is small and can be ignored. Furthermore, it can be determined that the matching relationship of the image pair is correct, and the matching relationship of the image pair is retained.

[0108] S312. The first filtering module determines whether there are unprocessed image pairs. If so, return to execute S35; if not, execute S313.

[0109] In this embodiment, the process by which the first filtering module determines whether there are unprocessed image pairs is the same as Figure 1The implementation manner of S28 in the illustrated embodiment is the same, and will not be elaborated here.

[0110] S313, the first filtering module outputs the image pairs retaining the matching relationships.

[0111] In this embodiment, the implementation processes of each step are the same as Figure 1 the implementation processes of the relevant steps in the illustrated embodiment, and will not be elaborated in this embodiment.

[0112] The method for identifying repeated textures provided in this embodiment splices the two images corresponding to the image pair horizontally, calculates the connection slope of the matching feature point pairs in the image pair, and the median value of the slopes of all the connections in the image pair. Furthermore, it counts the proportion of the connections whose deviation between the slope and the median value of the slopes is greater than or equal to the set value. If this proportion is greater than the corresponding preset value, it indicates that there are small areas of repeated textures in the image pair in the non-main direction of feature matching, that is, it determines that the matching relationship of the image pair is incorrect, and deletes the matching relationship of the image pair. It can be seen that this method does not need to analyze the content information of the feature points in the image pair, and only identifies the repeated textures not in the main direction of feature matching through the connection slope of the feature points. Therefore, this method is not sensitive to the input image and improves the robustness of this method.

[0113] Figure 5 The flowchart of another method for identifying repeated textures provided in the embodiment of the present application is shown. In this embodiment, the distribution of the matching feature points in the image pair is analyzed to identify whether there are repeated textures in the image pair. This method is applied to an electronic device, and the electronic device includes a feature extraction module, a feature matching module, and a second filtering module.

[0114] As Figure 5 shown, this method may include the following steps:

[0115] S41, the feature extraction module obtains multiple views of the 3D reconstruction object.

[0116] S42, the feature extraction module extracts the feature points of each view to obtain a feature map.

[0117] S43, the feature extraction module transfers all the feature maps to the feature matching module.

[0118] S44, the feature matching module performs feature matching on all the feature maps to obtain image pairs with matching relationships, and transfers all the image pairs with matching relationships to the first filtering module.

[0119] S45, the second filtering module obtains the feature point matching information of the image pair.

[0120] S46, the second filtering module determines whether the number of matching feature points is less than or equal to the second threshold; if so, execute S47; if not, execute S412.

[0121] S47. Divide any one of the images in the image pair into N*M grids, and count the grid distribution of the corresponding grids containing feature points in this image.

[0122] S48. Connect adjacent grids containing matching feature points in the image into one region.

[0123] S49. Determine whether the number of regions contained in the image is less than the third threshold; if so, execute S411, if not, execute S410.

[0124] S410. Determine whether the maximum value of the number of grids contained in all connected regions is less than the fourth threshold; if so, execute S411, if not, execute S412.

[0125] S411. Delete the matching relationship of this image pair.

[0126] S412. Retain the matching relationship of this image pair.

[0127] S413. Determine whether there is an unprocessed image pair. If there is an unprocessed image pair, return to execute S45 to continue processing the next pair of image pairs. If there is no unprocessed image pair, execute S414.

[0128] S414. Output the image pairs with retained matching relationships.

[0129] In this embodiment, the processes described in S45 to S414 all run in the second filtering module.

[0130] In this embodiment, the processes described in S41 to S414 are the same as the implementation processes of the same steps in the Figure 1 illustrated embodiment, and will not be elaborated here.

[0131] The method for identifying repeated textures provided in this embodiment identifies whether there are small-area repeated textures in the image pair according to the distribution of the matching feature point pairs contained in the image pair. If so, it deletes the matching relationship of this image pair, that is, filters out the matching relationships of the image pairs with incorrect matching relationships. This solution does not require analyzing image feature information, but identifies small-area repeated textures through the distribution of the matching feature point pairs contained in the image pair. Therefore, this method is not sensitive to the input image and improves the robustness of this method.

[0132] On the other hand, the present application also provides an electronic device applicable to the method for identifying repeated textures provided in the present application.

[0133] Figure 6The figure is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Such an electronic device may be an electronic device such as a server or a terminal device. The terminal device may include devices such as a mobile phone, a tablet computer, a desktop computer, a laptop computer, a notebook computer, an Ultra-mobile Personal Computer (UMPC), a handheld computer, a netbook, a Personal Digital Assistant (PDA), a wearable electronic device, a smart watch, etc.

[0134] As Figure 6 shown, the electronic device may include a processor 101, a memory 102, a bus 103, and a communication interface 104. Among them, the number of processors 101 may be 1 to N, where N is an integer greater than 1.

[0135] The processor 101 and the memory 102 complete mutual communication through the bus 103. The processor 101 may communicate with external devices through the bus 103 and the communication interface 104. For example, the communication interface 104 includes a sending unit and a receiving unit. The communication interface 104 receives data sent by a peripheral device through the receiving unit, and the data is transmitted to the processor 101 via the bus 103. The data sent by the processor 101 is transmitted to the communication interface 104 via the bus 103, and the communication interface 104 sends it to the peripheral device through the sending unit. The processor 101 is used to call program instructions in the memory 102 to execute Figure 1 、 Figure 4 or Figure 5 the repeated texture recognition method shown.

[0136] Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and brevity of description, only the above division of each functional module is used as an example. In actual applications, the above functions can be allocated to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0137] In several embodiments provided in this embodiment, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections between each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.

[0138] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0139] In addition, in each embodiment of this embodiment, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0140] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods described in each embodiment. The foregoing storage medium includes: various media such as flash memory, mobile hard disk, read-only memory, random access memory, magnetic disk, or optical disk that can store program codes.

[0141] As described above, the above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims

1. A method for recognizing repeated textures, characterized in that, applied to an electronic device, the method includes: Obtain the feature point matching information included in at least two images with a matching relationship, where the feature point matching information includes the information of the matching feature points included in the at least two images; Horizontally stitch the at least two images, and calculate the slope of the line connecting all the matching feature points in the at least two images; Count the number of lines that meet the first preset condition in the at least two images, where the first preset condition includes that the deviation between the slope and the slope standard value is greater than or equal to the first preset value, and the slope standard value is the median of the slopes corresponding to all the lines included in the at least two images; If the number of the lines meets the second preset condition, determine that the at least two images include small-area repeated textures and determine that the matching relationship of the at least two images is incorrect, where the second preset condition includes that the proportion of the lines that meet the first preset condition is greater than or equal to the second preset value; If the number of the lines that meet the first preset condition in the at least two images does not meet the second preset condition, divide any one of the at least two images into multiple grids, and connect the grids that contain the matching feature points and are adjacent in position into a connected region; If the number of all the connected regions included in any one of the at least two images is less than or equal to the third threshold, determine that the at least two images include small-area repeated textures and the matching relationship is incorrect; If the number of all the connected regions included in any one of the at least two images is greater than the third threshold, determine whether the total area of all the connected regions in any one of the images is less than or equal to the fourth threshold; If the total area is less than or equal to the fourth threshold, determine that the at least two images include small-area repeated textures and the matching relationship is incorrect; if the total area is greater than the fourth threshold, determine that the matching relationship of the at least two images is correct.

2. The method according to claim 1, characterized in that, Before horizontally stitching the at least two images, the method further includes: Count the number of matching feature points included in any one of the at least two images; if the number of the matching feature points is greater than or equal to the first threshold, perform the step of horizontally stitching the at least two images; If the number of the matching feature points is less than the first threshold, determine that the at least two images have small-area repeated textures.

3. The method according to any one of claims 1-2, characterized in that, The method further includes: deleting the matching relationship between at least two images that include small-area repeated textures.

4. The method according to claim 1, characterized in that, Before dividing any one of the at least two images into multiple grids, the method further includes: Count the number of matching feature points included in any one of the at least two images; If the number of the matching feature points is less than or equal to the second threshold, perform the step of dividing any one of the at least two images into multiple grids and connecting the grids that contain the matching feature points and are adjacent in position into a connected region; If the number of the matched feature points is greater than the second threshold, determine that the matching relationship of the at least two images is correct.

5. An electronic device, characterized in that the electronic device includes: one or more processors, a memory, and a touch screen; the memory is used for storing program codes; the processor is used for running the program codes so that the electronic device implements the repeated texture recognition method according to any one of claims 1 to 4.

6. A computer-readable storage medium, characterized in that instructions are stored thereon, and when the instructions are run on an electronic device, the electronic device is caused to execute the repeated texture recognition method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Panoramic image synthesis device and method and computer readable storage medium

    CN108805799A

  • Image splicing method and system and electronic equipment

    CN109949227A