Modeling model segmentation processing method, electronic equipment and storage medium

By performing area division and clustering analysis on the initial model of the modeling object, areas with abnormal point cloud density are identified and deleted, stray points and light and shadow problems during the modeling process are solved, and the model quality is improved.

CN119169237APending Publication Date: 2024-12-20MOBILE TECH COMPANY CHINA TRAVELSKY HLDG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411316338.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-20
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

During the process of object or scene modeling, the real scene photos taken often contain unnecessary objects or light and shadow problems, resulting in low model quality and it is difficult for the prior art to effectively remove stray points and abnormal feature points.

Method used

Using the modeling model segmentation method, the initial model is divided into regions and cluster analysis based on point cloud density and clustering analysis, and the model point cloud in the model area with too low or too high point cloud density is identified and deleted, thereby improving the model quality. .

Benefits of technology

Through segmented processing, the verification processing volume of each model point cloud is saved, and stray points are determined and deleted in a refined manner, which significantly improves the model quality of the modeled object.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119169237A_ABST
    Figure CN119169237A_ABST
Patent Text Reader

Abstract

The invention provides a modeling model segmentation processing method, electronic equipment and a storage medium, and the method comprises the steps: carrying out the region division of an initial model corresponding to a modeling object, so as to obtain a plurality of model regions; if the model area is a first model area, deleting a plurality of model point clouds included in the model area; if the model area is a second model area or a third model area, clustering a plurality of model point clouds included in the model area to obtain a plurality of model point cloud class groups; and if the average point cloud spacing corresponding to the model point cloud class group is greater than a preset point cloud spacing threshold, deleting a plurality of model point clouds included in the model point cloud class group. According to the embodiment of the invention, the plurality of model point clouds in the initial model of the modeling object are segmented and grouped, so that the processing amount for verifying each model point cloud can be saved, and whether each model point cloud is a stray point needing to be deleted or not can be determined more finely, so as to improve the model quality of the modeling object.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] When modeling an object or scene, it is necessary to construct a model of the modeling object based on the collected real-life photos of the modeling object. When taking real-life photos of the modeling object, it is inevitable that objects that are close to the modeling object but do not belong to the modeling object will also be photographed. Or when taking photos, if there are objects on the modeling object that do not need to be modeled, the objects will also be photographed in the photos. Although the photographed pictures will be processed before modeling the modeling object to remove abnormal feature points on the modeling object, the processed pictures may have light and shadow problems, or improper processing, resulting in incomplete processing of abnormal feature points. At this time, if modeling is performed based on the pictures, the obtained model will also have corresponding abnormal points, resulting in too low quality of the obtained model. Summary of the invention

[0003] In view of the above technical problems, the technical solution adopted by the present invention is:

[0004] According to one aspect of the present application, a model segmentation processing method is provided, comprising the following steps:

[0005] Step S100, in response to receiving an initial model corresponding to a modeling object, dividing the initial model into regions to obtain a plurality of model regions; each model region includes a plurality of model point clouds of the initial model; and each model region has an equal spatial volume;

[0006] Step S200, traverse each model area, if the model area is the first model area, execute step S300; if the model area is the second model area, execute step S400; if the model area is the third model area, execute step S500;

[0007] The first model region is a model region where the point cloud density of the model point cloud is less than a preset first point cloud density threshold;

[0008] The second model area is a model area where the point cloud density of the model point cloud is greater than or equal to a preset first point cloud density threshold, and less than or equal to a preset second point cloud density threshold;

[0009] The third model area is a model area where the point cloud density of the model point cloud is greater than a preset second point cloud density threshold;

[0010] The first point cloud density threshold is less than the second point cloud density threshold;

[0011] Step S300, deleting a number of model point clouds included in the model area;

[0012] Step S400: According to the preset number of groups K 1, cluster the model point clouds included in the model area to obtain K 1 model point cloud groups, and execute step S600; each model point cloud group includes a number of model point clouds of the initial model in the model area;

[0013] Step S500: According to the preset number of groups K 2 , cluster the model point clouds included in the model area to obtain K 2 model point cloud clusters, and execute step S600; wherein, K 2 >K 1 ;

[0014] Step S600, determining an average point cloud spacing corresponding to each model point cloud group according to the mutual distances between a plurality of model point clouds in each model point cloud group;

[0015] Step S700: traverse each model point cloud group corresponding to the model area, and if the average point cloud spacing corresponding to the model point cloud group is greater than a preset point cloud spacing threshold, delete a number of model point clouds included in the model point cloud group.

[0016] In an exemplary embodiment of the present application, step S100 includes:

[0017] Step S110: performing modeling processing on a plurality of modeling pictures of the modeling object to obtain an initial model corresponding to the modeling object;

[0018] Step S120, simulating the model point cloud of the initial model to obtain a target volume value of the model area;

[0019] Step S130, determining the target side length of each model area according to the target volume value of the model area;

[0020] Step S140: According to each model region, the initial model is divided into regions so that any part of the initial model is located in one model region.

[0021] In an exemplary embodiment of the present application, step S110 includes:

[0022] Step S111: sort the modeling pictures according to the ascending order of the shooting time of each modeling picture to obtain a picture identification list A=(A 1 ,A 2 ,...,A i ,...,A n ), where i = 1, 2, ..., n, and n is the number of modeling images. A i is the image identifier corresponding to the i-th modeling image after sorting;

[0023] Step S112, traverse the picture identification list A in sequence, if A i The shooting time of the corresponding modeling picture and A i+1 If the shooting time of the corresponding modeling pictures is within the same preset shooting period, then A i The corresponding modeling pictures and A i+1 The corresponding modeling pictures are determined to be in the same modeling picture group to obtain a plurality of modeling picture groups; each modeling picture group includes a plurality of modeling pictures;

[0024] Step S113, traversing a number of modeling pictures included in each modeling picture group, if the clarity of any modeling picture is less than a preset picture clarity threshold, determining the modeling picture as an adjusted modeling picture;

[0025] Step S114: Obtain the number of adjusted modeling pictures included in each modeling picture group, and obtain a list of adjusted modeling picture numbers C=(C 1 ,C 2 ,...,C j ,...,C m ), where j = 1, 2, ..., m, and m is the number of modeling picture groups; C j is the number of adjusted modeling pictures included in the j-th modeling picture group;

[0026] Step S115: If C j is the number of modeling pictures included in the j-th modeling picture group, the j-th modeling picture group is determined as the first modeling picture group; otherwise, the j-th modeling picture group is determined as the second modeling picture group;

[0027] Step S116: determining the modeling picture with the highest definition in the first modeling picture group as the target modeling picture;

[0028] Step S117: deleting the adjusted modeling pictures included in the second modeling picture group, and determining the remaining modeling pictures as target modeling pictures;

[0029] Step S118: performing model matching on key features of modeling objects contained in a plurality of target modeling pictures according to a preset feature matching algorithm, so as to establish an association relationship between each target modeling picture and the modeling object;

[0030] Step S119: Generate an initial model corresponding to the modeling object according to the association relationship between each target modeling picture and the modeling object.

[0031] In an exemplary embodiment of the present application, step S120 includes:

[0032] Step S121, obtaining the initial volume value of the model area;

[0033] Step S122, determining the initial side length of the model area according to the initial volume value of the model area;

[0034] Step S123, dividing the initial model into regions according to the initial side lengths of the model regions, so as to obtain the point cloud density of the initial model corresponding to each model region;

[0035] Step S124: If the point cloud density corresponding to any model area is less than D 0 , then the model area is determined as the initial model area; where D 0 is the preset processing density threshold;

[0036] Step S125: Obtain the number of model point clouds included in each initial model area, and obtain a list of model point cloud numbers E=(E 1 ,E 2 ,...,E c ,...,E d ), where c = 1, 2, ..., d, d is the number of initial model regions, E c is the number of model point clouds included in the cth initial model area;

[0037] Step S126: If 1 ≤(∑ d c=1 E c ) / t≤e 2 , then the initial volume value is determined as the target volume value;

[0038] If (∑ d c=1 E c ) / t<e 1 , the ratio of the initial volume value to the preset volume coefficient is determined as the initial volume value, and step S122 is executed;

[0039] If (∑ d c=1 E c ) / t>e 2 , the product of the initial volume value and the preset volume coefficient is determined as the initial volume value, and step S122 is executed;

[0040] Where t is the total number of model point clouds of the initial model; e 1 is the preset first point cloud processing ratio threshold; 2 is the preset second point cloud processing ratio threshold; 0<e 1 <e 2 <1; volume coefficient is greater than 1.

[0041] In an exemplary embodiment of the present application, step S400 includes:

[0042] Step S410: Obtain the point cloud identifier corresponding to each model point cloud included in the model area, and obtain a point cloud identifier list F=(F 1 ,F 2 ,...,F s ,...,F t ), where s = 1, 2, ..., t, t is the total number of model point clouds included in the model area, F s is the point cloud identifier corresponding to the s-th model point cloud included in the model area;

[0043] Step S420: According to the preset number of groups K 1 , cluster each model point cloud included in the model area to obtain a model point cloud cluster list set G = (G 1 ,G 2 ,...,G u ,...,G v );G u =(G u1 ,G u2 ,...,G uq ,...,G ur(u) ), where u = 1, 2, ..., v, v is the number of model point cloud clusters, and v = K 1 ; G u is the model point cloud cluster list corresponding to the u-th model point cloud cluster; q = 1, 2, ..., r(u); r(u) is the number of model point clouds of the initial model included in the u-th model point cloud cluster; G uq is the point cloud identifier corresponding to the qth model point cloud included in the uth model point cloud group; ∑ v u=1 r(u)=t.

[0044] In an exemplary embodiment of the present application, a K-nearest neighbor algorithm is used to cluster the model point cloud.

[0045] In an exemplary embodiment of the present application, step S600 includes:

[0046] Step S610: According to G u , determine G uq The corresponding model point cloud and G u The distance between the model point clouds corresponding to the other point cloud identifiers in G uq Corresponding point cloud spacing list I uq =(I uq1 ,I uq2 ,...,I uqf ,...,Iuq(r(u)-1) ); where, f=1,2,...,r(u)-1; I uqf G uq The corresponding model point cloud and G u In addition to G uq The distance between the model point clouds corresponding to the f-th point cloud identifier outside;

[0047] Step S620: According to I uq , determine G uq The average point cloud spacing H of the corresponding model point cloud uq =(∑ r(u)-1 f=1 I uqf ) / (r(u)-1).

[0048] In an exemplary embodiment of the present application, the structure corresponding to the model area is a cube.

[0049] According to one aspect of the present application, a non-transitory computer-readable storage medium is provided, in which at least one instruction or at least one program is stored, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the aforementioned modeling model segmentation processing method.

[0050] According to one aspect of the present application, an electronic device is provided, including a processor and the aforementioned non-transitory computer-readable storage medium.

[0051] The present invention has at least the following beneficial effects:

[0052] The model segmentation processing method of the present invention divides the initial model of the modeling object into regions to obtain a plurality of model regions, and then determines the type of each model region through the point cloud density corresponding to each model region. If the model region is the first model region, it means that the point cloud density in the model region is too low, and the model point cloud in the model region is considered to be a stray point, so the plurality of model point clouds included in the model region are deleted; if the model region is the second model region or the third model region, it means that the point cloud density in the model region is too high, and then clustering is performed on the plurality of model point clouds in the model region to verify whether the plurality of model point clouds in the model region are discrete, and the degree of looseness of the plurality of model point clouds in each model point cloud group clustered from the model region is determined through the mutual distance between the plurality of model point clouds in each model point cloud group, and if the plurality of model point clouds in the model point cloud group are too loose, the plurality of model point clouds in the model point cloud group are also considered to be stray points, and the plurality of model point clouds in the model point cloud group are deleted. By segmenting and grouping several model point clouds in the initial model of the modeling object, the amount of processing for verifying each model point cloud can be saved, and it can be more precisely determined whether each model point cloud is a stray point that needs to be deleted, so as to improve the model quality of the modeling object. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0054] Figure 1 A flowchart of a model segmentation processing method for a model building embodiment provided in the present invention. DETAILED DESCRIPTION

[0055] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0056] like Figure 1 As shown, the model segmentation processing method described in this application includes the following steps:

[0057] Step S100: in response to receiving an initial model corresponding to a modeling object, dividing the initial model into regions to obtain a plurality of model regions;

[0058] Each model region includes several model point clouds of the initial model, the space volume corresponding to each model region is equal, and the structure corresponding to the model region is a cube.

[0059] Further, step S100 includes steps S110 to S140:

[0060] Step S110: performing modeling processing on a plurality of modeling pictures of the modeling object to obtain an initial model corresponding to the modeling object;

[0061] The modeling object is an object or scene that needs to be modeled, and the modeling picture is a real-life photo of the modeling object taken from various angles. The optimal embodiment is a 360° panoramic photo of the modeling object.

[0062] The modeling picture is processed so that an initial model corresponding to the modeling object is obtained according to the features of the modeling object in the modeling picture.

[0063] Since a modeling object needs to be modeled, a panoramic photo of the modeling object is required. Any position point of the modeling object is taken as the initial point, and an image acquisition device is used to uniformly circle the modeling object with the initial point as the starting point to obtain a full-body photo of the modeling object. Therefore, the number of modeling pictures must be multiple, and there must be photos of each angle of the modeling object. However, due to the large number of modeling pictures, if every modeling picture is used during modeling, the data processing amount will be too large, and the image acquisition device may take pictures that are too blurred due to external environmental reasons. If the lens of the image acquisition device captures a moving object near the modeling object when photographing the modeling object, the light and shadow or image of the moving object will also exist in the photographed picture. If the picture is also used as a standard picture for modeling, the established model will also have blurred points. Therefore, it is necessary to pre-process several modeling pictures to reduce the data processing amount of the modeling process and improve the modeling quality.

[0064] Wherein, step S110 includes steps S111 to S119:

[0065] Step S111: sort the modeling pictures according to the ascending order of the shooting time of each modeling picture to obtain a picture identification list A=(A 1 ,A 2 ,...,A i ,...,A n ), where i = 1, 2, ..., n, and n is the number of modeling images. A i is the image identifier corresponding to the i-th modeling image after sorting;

[0066] Step S112, traverse the picture identification list A in sequence, if A iThe shooting time of the corresponding modeling picture and A i+1 If the shooting time of the corresponding modeling pictures is within the same preset shooting period, then A i The corresponding modeling pictures and A i+1 The corresponding modeling pictures are determined to be in the same modeling picture group to obtain a plurality of modeling picture groups;

[0067] Each modeling picture group includes a number of modeling pictures. Since the image acquisition device is uniformly moving around the modeling object to acquire images, the shooting angle of the modeling object is uniformly changed, and the shooting frequency of the image acquisition device is determined according to its own frame rate. For example, if the frame rate is 30, the image acquisition device will acquire 30 pictures of the modeling object within one second. In order to ensure the clarity of the pictures of the modeling object, the rotation speed of the image acquisition device will not be too fast. Therefore, the angle of rotation of the image acquisition device within one second will not be too large. 30 pictures are continuously taken at a small rotation angle. If these 30 pictures are all selected as the pictures required for modeling, the number of overall pictures required for modeling is too large. Therefore, by determining a number of modeling picture groups according to the shooting time of each modeling picture, only pictures that meet the standards are selected from the modeling picture groups as the pictures required for modeling, which will reduce the amount of picture data processing for modeling. Moreover, the feature difference between several modeling pictures in the same modeling picture group is not large. Therefore, deleting several modeling pictures that do not meet the standards from the same modeling picture group will not affect the final modeling process.

[0068] The preset shooting period can be one second, that is, among the several modeling picture groups obtained, the modeling pictures in the first modeling picture group are all pictures collected by the image acquisition device within the first second, the modeling pictures in the second modeling picture group are all pictures collected by the image acquisition device within the second second, and so on, the modeling pictures in the last modeling picture group are all pictures collected by the image acquisition device within the last second.

[0069] Step S113, traversing a number of modeling pictures included in each modeling picture group, and if the clarity of any modeling picture is less than a preset picture clarity threshold, determining the modeling picture as an adjusted modeling picture, wherein the clarity can be obtained by an existing image processing method;

[0070] If the clarity of the modeling image is lower than a preset clarity threshold, it is determined as an adjusted modeling image, indicating that the modeling image is too blurry and needs to be removed and cannot be selected as the image required for modeling.

[0071] Step S114: Obtain the number of adjusted modeling pictures included in each modeling picture group, and obtain a list of adjusted modeling picture numbers C=(C 1 ,C 2 ,...,Cj ,...,C m ), where j = 1, 2, ..., m, and m is the number of modeling picture groups; C j is the number of adjusted modeling pictures included in the j-th modeling picture group;

[0072] Step S115: If C j is the number of modeling pictures included in the j-th modeling picture group, the j-th modeling picture group is determined as the first modeling picture group; otherwise, the j-th modeling picture group is determined as the second modeling picture group;

[0073] Step S116: determining the modeling picture with the highest definition in the first modeling picture group as the target modeling picture;

[0074] Since the images in the first modeling picture group all have a clarity lower than a preset clarity threshold, they should be deleted in theory. However, if all the images in the first modeling picture group are deleted, then in the subsequent process of establishing the initial model corresponding to the modeling object, the establishment of the initial model may be affected due to the lack of images of the shooting period corresponding to the first modeling picture group. Since the distinction between several modeling pictures in the same modeling picture group is not large, the modeling picture with the highest clarity is selected from the first modeling picture group as the target modeling picture for subsequent model establishment.

[0075] Step S117: deleting the adjusted modeling pictures included in the second modeling picture group, and determining the remaining modeling pictures as target modeling pictures;

[0076] Step S118: performing model matching on key features of modeling objects contained in a plurality of target modeling pictures according to a preset feature matching algorithm, so as to establish an association relationship between each target modeling picture and the modeling object;

[0077] Step S119: Generate an initial model corresponding to the modeling object according to the association relationship between each target modeling picture and the modeling object.

[0078] The preset feature matching algorithm may adopt an existing feature matching algorithm, that is, an initial model of the modeling object is established through the features of the modeling object in the target modeling picture.

[0079] Step S120, simulating the model point cloud of the initial model to obtain a target volume value of the model area;

[0080] Each model region includes a number of model point clouds of the initial model, and the space volume corresponding to each model region is equal.

[0081] After the initial model is established, in order to make the model more accurately express the characteristics of the modeling object, the initial model needs to be processed to remove stray points and abnormal points in the initial model. The model point cloud of the initial model is all the point clouds used to construct the initial model.

[0082] Wherein, step S120 includes steps S121 to S126:

[0083] Step S121, obtaining the initial volume value of the model area;

[0084] The initial volume value is a preset volume value, and the initial volume value of the model area is adjusted according to the model point cloud of the initial model.

[0085] Since the volumes and specifications of the initial models corresponding to different modeling objects are different, the total number of model point clouds that make up the modeling objects is also different. In order to more accurately remove the stray points existing in the initial models of the modeling objects, it is necessary to determine model areas of different volume specifications according to different modeling objects.

[0086] Step S122, determining the initial side length of the model area according to the initial volume value of the model area;

[0087] The model area is set as a cube structure. After setting an initial volume value, the cube root is taken to obtain the initial side length of the model area.

[0088] Step S123, dividing the initial model into regions according to the initial side lengths of the model regions, so as to obtain the point cloud density of the initial model corresponding to each model region;

[0089] After determining the initial side length of the model area, that is, determining the size of the model area, the initial model is divided into regions so that any part of the initial model falls within a model area and the size of all model areas corresponding to the initial model are equal.

[0090] Step S124: If the point cloud density corresponding to any model area is less than D 0 , then the model area is determined as the initial model area; where D 0 is the preset processing density threshold;

[0091] Step S125: Obtain the number of model point clouds included in each initial model area, and obtain a list of model point cloud numbers E=(E 1 ,E 2 ,...,E c ,...,E d ), where c = 1, 2, ..., d, d is the number of initial model regions, E cis the number of model point clouds included in the cth initial model area;

[0092] Step S126: If 1 ≤(∑ d c=1 E c ) / t≤e 2 , then the initial volume value is determined as the target volume value;

[0093] If (∑ d c=1 E c ) / t<e 1 , the ratio of the initial volume value to the preset volume coefficient is determined as the initial volume value, and step S122 is executed;

[0094] If (∑ d c=1 E c ) / t>e 2 , the product of the initial volume value and the preset volume coefficient is determined as the initial volume value, and step S122 is executed;

[0095] Where t is the total number of model point clouds of the initial model; e 1 is the preset first point cloud processing ratio threshold; 2 is the preset second point cloud processing ratio threshold; 0<e 1 <e 2 <1; volume coefficient is greater than 1.

[0096] In order to make the amount of model point cloud processed (i.e. the number of model point clouds deleted) of the initial model within a reasonable range, that is, to remove some stray points of the initial model, but not to remove most of the body points belonging to the initial model, it is necessary to set two point cloud processing ratio thresholds, such as setting e 1 is 10%, e 2 It is 20%, which means that only when the ratio of the processed amount of the initial model to the total amount of the model point cloud of the initial model is between 0.1 and 0.2, the point cloud processing of the initial model is considered reasonable, and the delineation specifications of the model area at this time are accurate.

[0097] If the ratio of the processed amount of the initial model to the total amount of model point cloud of the initial model is in e 1 and e 2 If it is within the range between , it means that the model area determined at this time meets the point cloud processing conditions, and it is determined as the target volume value.

[0098] If the ratio is less than e 1, it means that the amount of processing of the initial model is small, only a small part of the point cloud is deleted as stray points, and it does not meet the minimum deletion standard. The amount of processing is related to the point cloud density in the model area. When the point cloud density in the model area is less than the preset density threshold, the point cloud in the model area will be processed. Since the model area will cover the initial model, the larger the volume of the model area, the fewer the number of model areas corresponding to the initial model, and the greater the density of the model point cloud included in each model area. Therefore, when the ratio is less than e 1 , it means that the volume of the model area determined at this time is too large, and it needs to be reduced. The ratio of the current initial volume value to the preset volume coefficient is re-determined as the initial volume value, and the processing volume verification is performed again (return to step S212) until the volume of the determined model area meets the point cloud processing conditions.

[0099] On the contrary, if the ratio is greater than e 2 , it means that the volume of the model area determined at this time is too small and needs to be expanded. The product of the current initial volume value and the preset volume coefficient is determined as the new initial volume value, and the processing volume verification is performed again.

[0100] Step S130, determining the target side length of each model area according to the target volume value of the model area;

[0101] Step S140: According to each model region, the initial model is divided into regions so that any part of the initial model is located in one model region.

[0102] Step S200, traverse each model area, if the model area is the first model area, execute step S300; if the model area is the second model area, execute step S400; if the model area is the third model area, execute step S500;

[0103] Among them, the first model area is a model area where the point cloud density of the model point cloud is less than a preset first point cloud density threshold; the second model area is a model area where the point cloud density of the model point cloud is greater than or equal to the preset first point cloud density threshold, and less than or equal to the preset second point cloud density threshold; the third model area is a model area where the point cloud density of the model point cloud is greater than the preset second point cloud density threshold; the first point cloud density threshold is less than the second point cloud density threshold.

[0104] Step S300, deleting a number of model point clouds included in the model area;

[0105] If the point cloud density of the model point cloud in the model area is less than the preset first point cloud density threshold, it means that the three-dimensional points in the point cloud in the model area are relatively scattered and are considered to be stray points, and they need to be deleted.

[0106] Step S400: According to the preset number of groups K 1 , cluster the model point clouds included in the model area to obtain K 1 A model point cloud group is formed, and step S600 is executed;

[0107] Among them, the K nearest neighbor algorithm can be used to cluster the model point clouds in the model area. Each model point cloud group includes several model point clouds of the initial model in the model area. Each model point cloud is composed of several three-dimensional points. Clustering each model point cloud is to cluster several three-dimensional points in the model area. Each model point cloud may represent different parts of the modeling object.

[0108] Further, step S400 includes step S410-step S420:

[0109] Step S410: Obtain the point cloud identifier corresponding to each model point cloud included in the model area, and obtain a point cloud identifier list F=(F 1 ,F 2 ,...,F s ,...,F t ), where s = 1, 2, ..., t, t is the total number of model point clouds included in the model area, F s is the point cloud identifier corresponding to the s-th model point cloud included in the model area;

[0110] Step S420: According to the preset number of groups K 1 , cluster each model point cloud included in the model area to obtain a model point cloud cluster list set G = (G 1 ,G 2 ,...,G u ,...,G v );G u =(G u1 ,G u2 ,...,G uq ,...,G ur(u) ), where u = 1, 2, ..., v, v is the number of model point cloud clusters, and v = K 1 ; G u is the model point cloud cluster list corresponding to the u-th model point cloud cluster; q = 1, 2, ..., r(u); r(u) is the number of model point clouds of the initial model included in the u-th model point cloud cluster; G uq is the point cloud identifier corresponding to the qth model point cloud included in the uth model point cloud group; ∑ v u=1 r(u)=t.

[0111] Step S500: According to the preset number of groups K 2 , cluster the model point clouds included in the model area to obtain K 2 model point cloud clusters, and execute step S600; wherein, K 2 >K 1 ;

[0112] By setting two different numbers of groups, the model point clouds in different types of model areas are clustered to achieve different processing of model areas with different point cloud densities.

[0113] Step S600, determining an average point cloud spacing corresponding to each model point cloud group according to the mutual distances between a plurality of model point clouds in each model point cloud group;

[0114] The average point cloud spacing corresponding to each model point cloud cluster is the average value of the distance between every two model point clouds in the model point cloud cluster, and is used to indicate the degree of discreteness of the model point clouds in the model point cloud cluster.

[0115] Further, step S600 includes step S610-step S620:

[0116] Step S610: According to G u , determine G uq The corresponding model point cloud and G u The distance between the model point clouds corresponding to the other point cloud identifiers in G uq Corresponding point cloud spacing list I uq =(I uq1 ,I uq2 ,...,I uqf ,...,I uq(r(u)-1) ); where, f=1,2,...,r(u)-1; I uqf G uq The corresponding model point cloud and G u In addition to G uq The distance between the model point clouds corresponding to the f-th point cloud identifier outside;

[0117] Step S620: According to I uq , determine G uq The average point cloud spacing H of the corresponding model point cloud uq =(∑ r(u)-1 f=1 I uqf ) / (r(u)-1).

[0118] Step S700: traverse each model point cloud group corresponding to the model area, and if the average point cloud spacing corresponding to the model point cloud group is greater than a preset point cloud spacing threshold, delete a number of model point clouds included in the model point cloud group.

[0119] If the average point cloud spacing corresponding to the model point cloud group is greater than the preset spacing threshold, it means that the model point clouds in the model point cloud group are all discrete point clouds, which are regarded as having scattered parts from the main body of the modeled object. This part may be a stray point, which is a part that has no association with the main body of the modeled object. It may be an object that was mistakenly captured by the image acquisition device when the modeled object was photographed in a circle, and it will be deleted.

[0120] The model segmentation processing method of the present invention divides the initial model of the modeling object into regions to obtain a plurality of model regions, and then determines the type of each model region through the point cloud density corresponding to each model region. If the model region is the first model region, it means that the point cloud density in the model region is too low, and the model point cloud in the model region is considered to be a stray point, so the plurality of model point clouds included in the model region are deleted; if the model region is the second model region or the third model region, it means that the point cloud density in the model region is too high, and then clustering is performed on the plurality of model point clouds in the model region to verify whether the plurality of model point clouds in the model region are discrete, and the degree of looseness of the plurality of model point clouds in each model point cloud group clustered from the model region is determined through the mutual distance between the plurality of model point clouds in each model point cloud group, and if the plurality of model point clouds in the model point cloud group are too loose, the plurality of model point clouds in the model point cloud group are also considered to be stray points, and the plurality of model point clouds in the model point cloud group are deleted. By segmenting and grouping several model point clouds in the initial model of the modeling object, the amount of processing for verifying each model point cloud can be saved, and it can be more precisely determined whether each model point cloud is a stray point that needs to be deleted, so as to improve the model quality of the modeling object.

[0121] An embodiment of the present invention further provides a computer program product, which includes program code. When the program product is run on an electronic device, the program code is used to enable the electronic device to execute the steps of the method according to various exemplary embodiments of the present invention described above in this specification.

[0122] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0123] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0124] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.

[0125] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as a system, method or program product. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as a "circuit", "module" or "system".

[0126] The electronic device according to this embodiment of the present invention is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0127] The electronic device is presented in the form of a general-purpose computing device. The components of the electronic device may include, but are not limited to: the at least one processor mentioned above, the at least one storage device mentioned above, and a bus connecting different system components (including storage devices and processors).

[0128] The storage stores program codes, which can be executed by the processor, so that the processor executes the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification.

[0129] The memory may include readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory, and may further include read only memory (ROM).

[0130] The storage may also include a program / utility having a set (at least one) of program modules, such program modules including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include an implementation of a network environment.

[0131] The bus may represent one or more of several types of bus structures including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures.

[0132] The electronic device may also communicate with one or more external devices (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device, and / or any device that enables the electronic device to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface. Furthermore, the electronic device may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter.

[0133] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0134] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.

[0135] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0136] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0137] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0138] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0139] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0140] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0141] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A model segmentation processing method, characterized in that: The method comprises the following steps: Step S100: in response to receiving an initial model corresponding to a modeling object, the initial model is divided into regions to obtain a plurality of model regions; each of the model regions includes a plurality of model point clouds of the initial model; and the spatial volume corresponding to each of the model regions is equal; Step S200, traverse each of the model regions, if the model region is the first model region, execute step S300; if the model region is the second model region, execute step S400; if the model region is the third model region, execute step S500; The first model region is a model region where the point cloud density of the model point cloud is less than a preset first point cloud density threshold; The second model area is a model area where the point cloud density of the model point cloud is greater than or equal to a preset first point cloud density threshold, and less than or equal to a preset second point cloud density threshold; The third model area is a model area where the point cloud density of the model point cloud is greater than a preset second point cloud density threshold; The first point cloud density threshold is less than the second point cloud density threshold; Step S300, deleting a number of model point clouds included in the model area; Step S400, clustering the model point clouds included in the model area according to a preset number of groups K1 to obtain K1 model point cloud clusters, and executing step S600; each of the model point cloud clusters includes a number of model point clouds of the initial model in the model area; Step S500, clustering the model point clouds included in the model area according to a preset number of groups K2 to obtain K2 model point cloud clusters, and executing step S600; wherein K2>K1; Step S600, determining an average point cloud spacing corresponding to each of the model point cloud clusters according to the mutual distances between a plurality of model point clouds in each of the model point cloud clusters; Step S700: traverse each model point cloud group corresponding to the model area, and if the average point cloud spacing corresponding to the model point cloud group is greater than a preset point cloud spacing threshold, delete a number of model point clouds included in the model point cloud group.

2. The method according to claim 1, characterized in that The step S100 includes: Step S110: performing modeling processing on a plurality of modeling pictures of the modeling object to obtain an initial model corresponding to the modeling object; Step S120, simulating the model point cloud of the initial model to obtain a target volume value of the model area; Step S130, determining a target side length of each of the model regions according to the target volume value of the model region; Step S140: dividing the initial model into regions according to each of the model regions, so that any part of the initial model is located in one of the model regions.

3. The method according to claim 2, characterized in that The step S110 includes: Step S111: sort the modeling pictures according to the ascending order of the shooting time of each modeling picture to obtain a picture identification list A=(A1, A2, ..., A i ,...,A n ); wherein i=1, 2, ..., n; n is the number of the modeling pictures; A i is the image identifier corresponding to the i-th modeling image after sorting; Step S112, traverse the picture identification list A in sequence, if A i The shooting time of the corresponding modeling picture and A i+1 If the shooting time of the corresponding modeling pictures is within the same preset shooting period, then A i The corresponding modeling pictures and A i+1 The corresponding modeling pictures are determined to be in the same modeling picture group to obtain a plurality of modeling picture groups; each of the modeling picture groups includes a plurality of modeling pictures; Step S113, traversing a number of modeling pictures included in each of the modeling picture groups, and if the clarity of any modeling picture is less than a preset picture clarity threshold, determining the modeling picture as an adjusted modeling picture; Step S114: Obtain the number of adjusted modeling pictures included in each of the modeling picture groups, and obtain a list of adjusted modeling picture numbers C = (C1, C2, ..., C j ,...,C m ); wherein j = 1, 2, ..., m; m is the number of the modeling picture groups; C j is the number of adjusted modeling pictures included in the j-th modeling picture group; Step S115: If C j is the number of modeling pictures included in the j-th modeling picture group, the j-th modeling picture group is determined as the first modeling picture group; otherwise, the j-th modeling picture group is determined as the second modeling picture group; Step S116: determining the modeling picture with the highest definition in the first modeling picture group as the target modeling picture; Step S117: deleting the adjusted modeling pictures included in the second modeling picture group, and determining the remaining modeling pictures as target modeling pictures; Step S118: performing model matching on key features of the modeling objects contained in the target modeling pictures according to a preset feature matching algorithm, so as to establish an association relationship between each of the target modeling pictures and the modeling objects; Step S119: generating an initial model corresponding to the modeling object according to the association relationship between each of the target modeling pictures and the modeling object.

4. The method according to claim 2, characterized in that: The step S120 includes: Step S121, obtaining an initial volume value of the model area; Step S122, determining the initial side length of the model area according to the initial volume value of the model area; Step S123, dividing the initial model into regions according to the initial side lengths of the model regions, so as to obtain a point cloud density of the initial model corresponding to each of the model regions; Step S124: if the point cloud density corresponding to any of the model regions is less than D0, the model region is determined as the initial model region; wherein D0 is a preset processing density threshold; Step S125: Obtain the number of model point clouds included in each of the initial model regions, and obtain a list of model point cloud numbers E=(E1, E2, ..., E c ,...,E d ), wherein c = 1, 2, ..., d, d is the number of the initial model regions, E c is the number of model point clouds included in the cth initial model area; Step S126: If e1≤(∑ d c=1 E c ) / t≤e2, the initial volume value is determined as the target volume value; If (∑ d c=1 E c ) / t<e1, the ratio of the initial volume value to the preset volume coefficient is determined as the initial volume value, and step S122 is executed; If (∑ d c=1 E c ) / t>e2, the product of the initial volume value and the preset volume coefficient is determined as the initial volume value, and step S122 is executed; Among them, t is the total number of model point clouds of the initial model; e1 is the preset first point cloud processing ratio threshold; e2 is the preset second point cloud processing ratio threshold; 0<e1<e2<1; and the volume coefficient is greater than 1.

5. The method according to claim 1, characterized in that: The step S400 includes: Step S410: Obtain the point cloud identifier corresponding to each model point cloud included in the model area, and obtain a point cloud identifier list F=(F1, F2, ..., F s ,...,F t ), wherein s=1, 2, ..., t, t is the total number of model point clouds included in the model area, F s is the point cloud identifier corresponding to the s-th model point cloud included in the model area; Step S420: cluster each model point cloud included in the model area according to a preset number of groups K1 to obtain a model point cloud cluster list set G = (G1, G2, ..., G u ,...,G v );G u =(G u1 ,G u2 ,...,G uq ,...,G ur(u) ); where u = 1, 2, ..., v; v is the number of the model point cloud clusters; v = K1; G u is the model point cloud cluster list corresponding to the u-th model point cloud cluster; q=1,2,...,r(u); r(u) is the number of model point clouds of the initial model included in the u-th model point cloud cluster; G uq is the point cloud identifier corresponding to the qth model point cloud included in the uth model point cloud group; ∑ v u=1 r(u)=t.

6. The method according to claim 5, characterized in that The model point cloud is clustered using the K nearest neighbor algorithm.

7. The method according to claim 5, characterized in that The step S600 includes: Step S610: According to G u , determine G uq The corresponding model point cloud and G u The distance between the model point clouds corresponding to the other point cloud identifiers in G uq Corresponding point cloud spacing list I uq =(I uq1 ,I uq2 ,...,I uqf ,...,I uq(r(u)-1) ); where, f=1,2,...,r(u)-1; I uqf G uq The corresponding model point cloud and G u In addition to G uq The distance between the model point clouds corresponding to the f-th point cloud identifier outside; Step S620: According to I uq , determine G uq The average point cloud spacing H of the corresponding model point cloud uq =(∑ r(u)-1 f=1 I uqf ) / (r(u)-1).

8. The method according to claim 1, characterized in that The structure corresponding to the model area is a cube.

9. A non-transitory computer-readable storage medium, wherein at least one instruction or at least one program is stored in the storage medium, characterized in that: The at least one instruction or the at least one program is loaded and executed by the processor to implement the model segmentation processing method as described in any one of claims 1-8.

10. An electronic device, characterized in that: The invention comprises a processor and the non-transitory computer-readable storage medium as claimed in claim 9.