Repeated texture recognition method and device

By calculating the slope and distribution range of the line connecting image feature points to identify small-area repetitive textures, the accuracy problem of repetitive texture recognition in three-dimensional reconstruction is solved, and the recognition efficiency and robustness are improved.

CN118691848AActive Publication Date: 2024-09-24HONOR DEVICE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410741680.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2022-10-31
Publication Date
2024-09-24
Estimated Expiration
2042-10-31

AI Technical Summary

Technical Problem

During the 3D reconstruction process, objects of the same shape and texture may lead to mismatching, resulting in 3D reconstruction model errors. How to accurately identify and filter repeated textures is an urgent problem that needs to be solved.

Method used

By obtaining the feature point matching information of the image, calculating the slope of the feature point connection lines, and counting the number and distribution range of the matching lines according to the preset conditions, it can identify repeated textures in small areas and improve the recognition accuracy and robustness.

Benefits of technology

This method does not need to analyze image content information, but only identifies repeated textures through the slope and distribution of feature point connections, which improves recognition efficiency and accuracy, reduces sensitivity to input images, and enhances robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118691848A
    Figure CN118691848A
Patent Text Reader

Abstract

The invention provides a repeated texture recognition method and device, and the method comprises the steps: carrying out the transverse splicing of two images corresponding to an image pair, and calculating the slope of a connection line of matched feature point pairs in the two images; and further carrying out statistics on a connection line proportion of which the deviation between the slope and the slope standard value is greater than or equal to a set value, and if the proportion is greater than a corresponding preset value, indicating that the image pair has small-region repeated textures in the non-principal direction of feature matching, namely determining that the matching relationship of the image pair is wrong, and deleting the matching relationship of the image pair. Therefore, the method does not need to analyze the content information of the feature points in the image pair, and the repeated texture which is not in the feature matching main direction is recognized only through the slope of the connection line of the feature points, so that the method is not sensitive to the input image, and the robustness of the method is improved.
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 application number 202211348049.7 submitted to the China Patent Office, application date October 31, 2022, and invention name “Repeated Texture Recognition Method and Device”. Technical Field

[0002] The present application relates to the technical field of three-dimensional reconstruction, and in particular to a method and device for identifying repeated textures. Background Art

[0003] 3D reconstruction is to restore the 3D structure of an object or scene from multiple 2D images, and finally build a virtual reality that expresses the objective world in the computer. 3D reconstruction is applied to many scenarios, for example, building 3D digital models based on real scenes, such as AR augmented reality, and creating 3D digital models of cultural relics.

[0004] There may be objects of the same shape and texture in the 2D images used for 3D reconstruction. These objects with the same shape and texture may form incorrect matches, resulting in errors in the 3D reconstruction model. For example, if the same electrical appliances are placed in different locations in a certain space environment, such as water dispensers with the same shape and texture, when 3D reconstruction is performed for this scene, the water dispensers in different locations may be identified as the same water dispenser, resulting in errors in the 3D reconstruction model of the environment. Therefore, in the 3D reconstruction process, how to accurately identify repeated textures and filter them out is an urgent problem that needs to be solved. Summary of the invention

[0005] In view of this, the present application provides a repeated texture recognition method and device to solve the above technical problems, and the disclosed technical solution is as follows:

[0006] In the first aspect, the present application provides a method for identifying repeated textures, which is applied to electronic devices, and the method includes: obtaining feature point matching information contained in at least two images with a matching relationship, the feature point matching information includes information of matching feature points contained in at least two images; horizontally splicing at least two images, and calculating the slope of all matching feature point connection lines in at least two images; counting the number of connection lines that meet a first preset condition in at least two images, the first preset condition includes that the deviation between the slope and the slope standard value is greater than or equal to a first preset value; determining that the number of connection lines meets a second preset condition, the second preset condition includes that the proportion of connection lines that meet the first preset condition is greater than or equal to a second preset value; determining that at least two images contain small-area repeated textures. It can be seen that the scheme does not need to analyze the content information of the feature points in the image pair, and only identifies the repeated texture that is not in the main direction of the feature matching through the slope of the feature point connection line, so the method is insensitive to the input image, which improves the robustness of the method.

[0007] In a possible implementation of the first aspect, before horizontally splicing at least two images, the method further includes: counting the number of matching feature points contained in any of the at least two images; if the number of matching feature points is greater than or equal to a first threshold, executing horizontal splicing of the at least two images; if the number of matching feature points is less than the first threshold, determining that small-area repeated textures exist in the at least two images. In this way, the presence of small-area repeated textures can be preliminarily identified by the number of matching feature points in the image, and if the number of matching feature points in the image is less than the first threshold, it is determined that the image pair has small-area repeated textures, and then it is determined that the matching relationship of the image pair is wrong, thereby improving the efficiency of identifying repeated textures.

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

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

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

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

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

[0013] In a possible implementation of the first aspect, before counting the distribution range of matching feature points contained in any image of at least two image pairs, the method further includes: counting the number of matching feature points contained in any image of at least two images; if the number of matching feature points is less than or equal to a second threshold, executing the step of counting the distribution range of matching feature points contained in any image of at least two image pairs; if the number of matching feature points is greater than the second threshold, determining that the matching relationship between at least two images is correct. It can be seen that the scheme preliminarily identifies images without small area repeated textures through the number of matching feature points contained in the image, reduces the number of images to identify whether there are small area repeated textures, and thus improves the efficiency of identifying repeated textures.

[0014] In the second aspect, the present application also provides a repeated texture recognition method, which is applied to electronic devices, and the method includes: obtaining feature point matching information contained in at least two image pairs with a matching relationship, the feature point matching information includes information of matching feature points contained in at least two images; counting the distribution range of matching feature points contained in any of the at least two images; and determining that at least two images with a distribution range less than or equal to a preset range contain small-area repeated textures. It can be seen that this solution does not need to analyze image feature information, but identifies small-area repeated textures through the distribution of matching feature point pairs contained in the image pairs, so the method is insensitive to the input image, which improves the robustness of the method.

[0015] In a possible implementation of the second aspect, counting the distribution range of matching feature points contained in any image in the image pair includes: dividing any image of at least two images into multiple grids, and counting the number of grids containing matching feature points in any image; connecting the grids containing matching feature points and adjacent to each other into a connected area; determining the distribution range of the matching feature points based on parameters of the connected area contained in any image, the parameters including at least one of the number and area of ​​the areas.

[0016] In a possible implementation of the second aspect, the distribution range of matching feature points is determined based on the parameters of the area contained in any image, including: if the number of all connected areas contained in any image is less than or equal to a third threshold, determining that the distribution range of matching feature points is less than a preset range; if the number of all connected areas contained in any image is greater than the third threshold, judging whether the total area of ​​all connected areas 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 contain small area repeated textures; if the total area is greater than the fourth threshold, determining that the matching relationship between at least two images is correct.

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

[0018] In a third aspect, the present application also provides an electronic device, comprising: one or more processors, a memory and a touch screen; the memory is used to store program code; the processor is used to run the program code, so that the electronic device implements the repeated texture recognition method as described in 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 having instructions stored thereon, which, when the instructions are executed on an electronic device, enables the electronic device to execute the repeated texture recognition method of any one of the first aspect or the second aspect.

[0020] In a fifth aspect, the present application further provides a computer program product having an executable program stored thereon. When the computer program product is run on an electronic device, the electronic device implements the repetitive texture recognition method as described in any one of the first aspect or the second aspect.

[0021] It should be understood that the description of technical features, technical solutions, beneficial effects or similar language in this application does not imply that all features and advantages can be realized in any single embodiment. On the contrary, it is understood that the description of features or beneficial effects means that specific technical features, technical solutions or beneficial effects are included in at least one embodiment. Therefore, the description of technical features, technical solutions or beneficial effects in this specification does not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions and beneficial effects described in the present embodiment can also be combined in any appropriate manner. Those skilled in the art will understand that the embodiment can be realized 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 a specific embodiment that does not embody all embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0023] Figure 1 is a flow chart of a repeated texture recognition method provided in an embodiment of the present application;

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

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

[0026] Figure 4 is a flow chart of another repeated texture recognition method provided by an embodiment of the present application;

[0027] Figure 5 is a flow chart of another repeated texture recognition method provided in an embodiment of the present application;

[0028] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[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 indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0031] See also Figure 1 , shows a flow chart of a repeated texture recognition method provided in an embodiment of the present application, which can be applied to electronic devices such as servers, and the electronic device includes a feature extraction module, a feature matching module, a first filtering module and a second filtering module.

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

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

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

[0035] The multiple views of the three-dimensional reconstructed 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 of 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 is to find extreme points in different scale spaces to ensure that these feature points exist under the conditions of enlargement 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 images to obtain image pairs with matching relationships, and transmits all image pairs with matching relationships to the first filtering module.

[0040] In an exemplary embodiment, each image has a unique identifier, and the image pair herein includes the unique identifiers of two matching images and their mapping relationship. For example, after image A and image B are feature matched by the feature matching module, it is confirmed that the successfully matched features in the two images meet the preset conditions (for example, the number of successfully matched features is greater than a preset value).

[0041] In an exemplary embodiment, a 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 about feature point pairs (or matching feature point pairs) with matching relationships contained in the image pairs. The RANSAC algorithm is a simple and effective method for removing noise effects and estimating models. The algorithm uses as few points as possible to estimate model parameters and then expands the influence range of the obtained model parameters as much as possible.

[0042] S15, the first filtering module obtains 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 feature points having a matching relationship.

[0044] S16, determining whether the number of matching feature points contained in one image of the image pair is greater than or equal to a first threshold; if yes, executing S17; if no, executing S20.

[0045] Matching feature points refer to feature points with matching relationship in two images contained in an image pair.

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

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

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

[0049] Among them, the first threshold can be obtained based on the statistics of a limited number of test results. In this example, the value of the first threshold can be 15. This application does not limit the value range of the first threshold.

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

[0051] However, there are still matching feature points that are not in the main direction in the two images. Such feature points are mismatched feature points. If there are mismatched feature points in the two images, it can be determined that the two images are mismatched images. Such a situation can be identified by the process shown in the following steps S17 to S19.

[0052] S17, stitching the image pairs horizontally, and calculating the slopes and median values ​​of the lines connecting all the matching feature point pairs.

[0053] The horizontal stitching refers to stitching two images in the horizontal direction (eg, the X-axis direction).

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

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

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

[0057] In an embodiment of the present application, the first preset value can be determined based on the statistical results of a finite number of tests. For example, the first preset value is 8°. The present application does not limit the preset value corresponding to the slope deviation.

[0058] S19, determining whether the proportion of qualified connections is greater than or equal to a second preset value; if yes, executing S20; if no, executing S22.

[0059] In the embodiment of the present application, the second preset value may be determined according to experimental statistical results. For example, the value range of the second preset value may be 5% to 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 the second preset value is 5%. An image pair contains 8 connection lines of qualified feature points, and the image pair contains a total of 100 connection lines of feature points. 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 by 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 value 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 are small - area repeated textures 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, screen out the grids containing feature points, and then traverse the grids containing feature points to screen 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 the 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 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 the fourth threshold; if so, execute S26, if not, execute S27.

[0078] If the number of regions contained in any image in the image pair is greater than the third threshold, it is continued to be determined whether the sum of the number of grids contained in all connected regions in the image is less than the 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 may be determined according to the total number of grids contained in the image. For example, in one example, the fourth threshold may be set to 0.05×the total number of grids.

[0080] S26, deleting the matching relationship of the 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 concentrated in a small area. As mentioned above, the matching feature points of the correctly matched image pair are usually evenly distributed in the entire image. Therefore, if the matching feature points of the two images are concentrated in a small area, it is determined that the matching relationship between the two images is wrong, and the wrongly matched image pair needs to be deleted.

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

[0083] S27, retaining the matching relationship of the 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 the image pair is large, and it is finally determined that the matching relationship of the image pair is correct, so the matching relationship of the image pair is retained.

[0085] S28, determining whether there is any unprocessed image pair.

[0086] In an exemplary embodiment, a parameter i may be set to represent the number of currently unprocessed image pairs corresponding to the same 3D reconstructed object, and the value of the parameter i is updated each time an image pair is processed, 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, and 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 may be set to represent the number of processed image pairs corresponding to the same 3D reconstructed object, and j increases by 1 each time an image pair is processed. In this scenario, if the value of j is less than the number of all image pairs corresponding to the 3D reconstructed object, it indicates that there are unprocessed image pairs, and if the value of j is equal to the number of all image pairs corresponding to the 3D reconstructed object, it indicates that there are no unprocessed image pairs.

[0088] If there is an unprocessed image pair, the process returns to S15 to continue processing the next image pair. If there is no unprocessed image pair, the process proceeds to S29.

[0089] S29, outputting the image pair that retains the matching relationship.

[0090] The image pairs with matching relationships are retained, that is, the image pairs with correct matching relationships are screened out, and finally the image pairs with correct matching relationships are output for subsequent processing.

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

[0092] The repeated texture recognition method provided in this embodiment calculates the slope of the line connecting the matching feature point pairs contained in the image pair and the median of the slope of the image pair, and counts the number of lines whose deviation from the median of the slope is greater than the first preset value. If the proportion of lines that meet the condition is greater than the second preset value, it indicates that the matching relationship of the image pair is wrong, and the matching relationship of the image pair is deleted. Further, the method can identify whether the matching relationship of the image pair is correct according to the distribution of the matching feature point pairs contained in the image pair. Specifically, the image can be divided into multiple grids, and the distribution of feature points on the grids is counted. The adjacent grids containing matching feature point pairs are connected into a region, and the number of regions contained in the image and the number of grids contained in each region are counted. If the number of regions contained in the image is less than or equal to the third threshold, or the maximum number of grids contained in the region is less than or equal to the fourth threshold, it indicates that the matching feature point pairs contained in the image pair are concentrated in a small area, and the matching relationship of the image pair is deleted. If the maximum number of grids contained in the region is greater than the fourth threshold, the matching relationship of the image pair is retained. Finally, the image pair with the matching relationship retained is output, and subsequent processing is continued. This scheme does not need to analyze image feature information, but identifies small area repetitive textures through the slope or distribution of matching feature point pairs contained in the image pairs. Therefore, this method is insensitive to the input image, which improves the robustness of the method.

[0093] Figure 4 1 is a flow chart of another repeated texture recognition method provided by an embodiment of the present application. In this embodiment, the slope of the line connecting the matching feature point pairs in the image pair is used to determine whether the image pair has repeated texture. The 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] like Figure 4 As shown, the method may include the following steps:

[0095] S31, a feature extraction module obtains multiple views of a three-dimensional reconstructed 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 feature maps to the feature matching module.

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

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

[0100] S36, determining whether the number of matching feature points contained in one image of the image pair is greater than or equal to a first threshold; if yes, executing S37; if no, executing S310.

[0101] S37, splicing the image pairs horizontally, and calculating the slopes and median values ​​of the lines connecting all the matching feature point pairs.

[0102] S38, counting 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 a first preset value.

[0103] S39, determining whether the proportion of qualified connections is greater than or equal to a second preset value; if yes, executing S310; if no, executing S311.

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

[0105] In this embodiment, the implementation process of the above S31 to S310 is the same as Figure 1 The implementation process of S11 to S20 in the illustrated embodiment is the same and will not be repeated here.

[0106] S311, retaining the matching relationship of the image pair.

[0107] In this embodiment, if the first filtering module determines that the proportion of qualified lines is less than the second preset value, it indicates that the proportion of feature points not in the main direction of feature matching is small and can be ignored, and then 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 is an unprocessed image pair. If yes, it returns to execute S35; if no, it executes S313.

[0109] In this embodiment, the process of the first filtering module determining whether there is an unprocessed image pair is similar to Figure 1The implementation of S28 in the illustrated embodiment is the same and will not be described again here.

[0110] S313: The first filtering module outputs the image pair with the matching relationship preserved.

[0111] The implementation process of each step in this embodiment is similar to Figure 1 The implementation process of the relevant steps in the illustrated embodiment is basically the same and will not be described in detail in this embodiment.

[0112] The repeated texture recognition method provided in this embodiment horizontally splices the two images corresponding to the image pair, calculates the slope of the line connecting the matching feature point pairs in the image pair, and the median slope of all the lines in the image pair. Then, the proportion of lines whose deviation from the slope median is greater than or equal to the set value is counted. If the proportion is greater than the corresponding preset value, it indicates that the image pair has a small area of ​​repeated texture in the non-main direction of feature matching, that is, the matching relationship of the image pair is determined to be wrong, and the matching relationship of the image pair is deleted. 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 texture that is not in the main direction of feature matching through the slope of the line connecting the feature points. Therefore, this method is insensitive to the input image, which improves the robustness of the method.

[0113] Figure 5 A flowchart of another repeated texture recognition method provided by an embodiment of the present application is shown. In this embodiment, the distribution of matching feature points in an image pair is analyzed to identify whether there is repeated texture in the image pair. The 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] like Figure 5 As shown, the method may include the following steps:

[0115] S41, a feature extraction module obtains multiple views of a three-dimensional reconstructed object.

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

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

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

[0119] S45: The second filtering module obtains 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 yes, execute S47; if not, execute S412.

[0121] S47, dividing any image in the image pair into N*M grids, and counting the distribution of corresponding grids containing feature points in the image.

[0122] S48, connecting adjacent grids containing matching feature points in the image into one area.

[0123] S49, determining whether the number of regions included in the image is less than a third threshold; if yes, executing S411, if not, executing S410.

[0124] S410, determining whether the maximum number of meshes included in all connected regions is less than a fourth threshold; if so, executing S411, if not, executing S412.

[0125] S411, deleting the matching relationship of the image pair.

[0126] S412: retain the matching relationship of the image pair.

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

[0128] S414: Output the image pair that retains the matching relationship.

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

[0130] The process described in S41 to S414 in this embodiment is similar to Figure 1 The implementation process of the same steps in the illustrated embodiment is the same and will not be repeated here.

[0131] The repeated texture recognition method provided in this embodiment identifies whether there is a small area repeated texture in the image pair according to the distribution of the matching feature point pairs contained in the image pair, and if there is, deletes the matching relationship of the image pair, that is, filters out the matching relationship of the image pair with incorrect matching relationship. This solution does not need to analyze image feature information, but identifies small area repeated textures through the distribution of matching feature point pairs contained in the image pair. Therefore, the method is not sensitive to the input image, which improves the robustness of the method.

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

[0133] Figure 6A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. For example, the electronic device may be an electronic device such as a server or a terminal device. The terminal device may include a mobile phone, a tablet computer, a desktop, a laptop, 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, and other devices.

[0134] like Figure 6 As shown, the electronic device may include a processor 101, a memory 102, a bus 103, and a communication interface 104, wherein 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 communicate with each other through the bus 103. The processor 101 can 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 the external 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 external device through the sending unit. The processor 101 is used to call the program instructions in the memory 102 to execute Figure 1 , Figure 4 or Figure 5 The repetitive texture recognition method shown.

[0136] Through the description of the above implementation methods, technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned 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 process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0137] In the 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 only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as 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 mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

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

[0139] In addition, each functional unit in each embodiment of the present embodiment may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0140] If the 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 is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the method described in each embodiment. The aforementioned storage medium includes: flash memory, mobile hard disk, read-only memory, random access memory, disk or optical disk and other media that can store program codes.

[0141] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for identifying repeated textures, It is characterized in that Applied to electronic equipment, the method comprises: Acquire feature point matching information contained in at least two images having a matching relationship, wherein the feature point matching information includes information of matching feature points contained in the at least two images; Splicing the at least two images horizontally, and calculating the slope of the line connecting all matching feature points in the at least two images; Counting the number of connecting lines in the at least two images that meet a first preset condition, where the first preset condition includes that a deviation between a slope and a standard slope value is greater than or equal to a first preset value; If the number of the connecting lines meets a second preset condition, it is determined that the at least two images contain a small area repeated texture, and it is determined that the matching relationship of the at least two images is wrong, and the second preset condition includes that the proportion of the connecting lines meeting the first preset condition is greater than or equal to a second preset value; If the number of connecting lines in the at least two images that meet the first preset condition does not meet the second preset condition, dividing any image in the at least two images into a plurality of grids, and connecting the grids that contain the matching feature points and are adjacent in position into a connected area; If the number of all connected regions included in any one of the at least two images is less than or equal to a third threshold, determining that the at least two images include repeated textures in a small area and a matching relationship error; If the number of all connected regions included in any one of the at least two images is greater than the third threshold, determining whether the total area of ​​all connected regions in the any one image is less than or equal to a fourth threshold; If the total area is less than or equal to the fourth threshold, it is determined that the at least two images contain small-area repeated textures and the matching relationship is wrong; if the total area is greater than the fourth threshold, it is determined that the matching relationship between the at least two images is correct.

2. The method according to claim 1, It is characterized in that Before horizontally splicing the at least two images, the method further includes: Counting the number of matching feature points contained 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 the step of horizontally splicing the at least two images; If the number of the matching feature points is less than the first threshold, it is determined that there is a small area of ​​repeated texture in the at least two images.

3. The method according to claim 1, It is characterized in that The process of determining the slope standard value includes: The median values ​​of the slopes corresponding to all the connecting lines included in the image pair are calculated, and the median value of the slopes is determined as the standard value of the slopes.

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

5. The method according to claim 1, It is characterized in that Before dividing any image of the at least two images into a plurality of grids, the method further comprises: Counting 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, performing the step of dividing any one of the at least two images into a plurality of grids, and connecting the grids containing the matching feature points and adjacent to each other into a connected area; If the number of the matching feature points is greater than the second threshold, it is determined that the matching relationship between the at least two images is correct.

6. An electronic device, It is characterized in that The electronic device comprises: one or more processors, a memory and a touch screen; the memory is used to store program code; the processor is used to run the program code, so that the electronic device implements the repetitive texture recognition method as described in any one of claims 1 to 5.

7. A computer-readable storage medium, It is characterized in that Instructions are stored thereon, and when the instructions are executed on an electronic device, the electronic device executes the repetitive texture recognition method as claimed in any one of claims 1 to 5.

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

  • Image feature point matching method, computer equipment and storage device

    CN112686302A