Scene model modeling method and device based on point cloud category and medium
By performing point cloud clustering and average point cloud spacing calculation on the initial model of the modeled object, fuzzy or discrete point cloud class groups are removed, and the problem of no objects and light and shadow in real scene photos is solved, and the quality and fineness of the model are improved.
Patent Information
- Application Number
- CN202411316344.3
- 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
During the process of object or scene modeling, the real scene photos inevitably contain unnecessary objects or light and shadow problems, resulting in low model quality and difficult to effectively deal with in the prior art.
Using a scene model modeling method based on point cloud category, point cloud clustering is performed on the initial model of the modeled object, the average point cloud spacing of each model point cloud group is calculated, and point clouds with larger average point cloud spacing are deleted. Class groups to remove blur or discrete points and improve model fineness.
Through clustering and average point cloud spacing calculation, fuzzy or discrete points in the model are effectively removed, the model quality of the model is improved, and the model is ensured that the model expresses its structural characteristics more refined.
Smart Images

Figure CN119169193A_ABST
Abstract
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 method for modeling a scene model based on point cloud categories is provided, comprising the following steps:
[0005] Step S100: in response to receiving a plurality of modeling pictures of a modeling object, performing modeling processing on the plurality of modeling pictures to obtain an initial model corresponding to the modeling object;
[0006] Step S200, clustering a number of model point clouds in the initial model to obtain a number of model point cloud clusters; each model point cloud cluster includes a number of model point clouds of the initial model;
[0007] Step S300, determining a target point cloud cluster from a plurality of model point cloud clusters according to an average point cloud spacing corresponding to a plurality of model point clouds in each model point cloud cluster;
[0008] Step S400: Delete the model point cloud included in each target point cloud group corresponding to the initial model to obtain the target model corresponding to the modeling object.
[0009] In an exemplary embodiment of the present application, step S200 includes:
[0010] Step S210: Obtain the point cloud identifier corresponding to each model point cloud in the initial model, and obtain a point cloud identifier list F = (F1, F2, ..., F s ,...,F t ), where s = 1, 2, ..., t; t is the total number of model point clouds in the initial model; F s is the point cloud identifier corresponding to the s-th model point cloud in the initial model;
[0011] Step S220: cluster each model point cloud in the initial model 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, and v is the number of model point cloud clusters; 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.
[0012] In an exemplary embodiment of the present application, the model point cloud is clustered using a K-nearest neighbor algorithm.
[0013] In an exemplary embodiment of the present application, step S300 includes:
[0014] Step S310, determining an average point cloud spacing corresponding to each model point cloud according to the distance between any model point cloud in each model point cloud group and the remaining model point clouds in the model point cloud group to which the model point cloud belongs;
[0015] Step S320: If the average point cloud spacing corresponding to each model point cloud in any model point cloud cluster group is greater than a preset spacing threshold, the model point cloud cluster group is determined as a target point cloud cluster group.
[0016] In an exemplary embodiment of the present application, step S310 includes:
[0017] Step S311: 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 Except Guq The distance between the model point clouds corresponding to the f-th point cloud identifier outside;
[0018] Step S312: 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).
[0019] In an exemplary embodiment of the present application, step S100 includes:
[0020] Step S110: determining a number of modeling picture groups according to the shooting time of each modeling picture; each modeling picture group includes a number of modeling pictures;
[0021] Step S120: determining a plurality of adjusted modeling pictures from the plurality of modeling pictures according to the clarity of the plurality of modeling pictures included in each modeling picture group;
[0022] Step S130: Obtain the number of adjusted modeling pictures included in each modeling picture group, and obtain a list of adjusted modeling picture numbers C = (C1, C2, ..., C j ,...,C m ), where C j is the number of adjusted modeling pictures included in the j-th modeling picture group;
[0023] Step S140: 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;
[0024] Step S150: determining the modeling picture with the highest definition in the first modeling picture group as the target modeling picture;
[0025] Step S160: deleting the adjusted modeling pictures included in the second modeling picture group, and determining the remaining modeling pictures as target modeling pictures;
[0026] Step S170: 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;
[0027] Step S180: Generate an initial model corresponding to the modeling object according to the association relationship between each target modeling picture and the modeling object.
[0028] In an exemplary embodiment of the present application, step S110 includes:
[0029] 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 ), 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;
[0030] 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.
[0031] In an exemplary embodiment of the present application, step S120 includes:
[0032] Step S121: Obtain the definition of several modeling pictures included in each modeling picture group, and obtain a picture definition list set B = (B1, B2, ..., B j ,...,B m );B j =(B j1 ,B j2 ,...,B jk ,...,B jp(j) ), where j = 1, 2, ..., m, and m is the number of modeling picture groups; B j is the picture definition list corresponding to the j-th modeling picture group; k = 1, 2, ..., p(j); p(j) is the number of modeling pictures included in the j-th modeling picture group; B jk is the definition of the kth modeling picture included in the jth modeling picture group;
[0033] Step S122, traverse the picture definition list set B, if B jk <B0, then B jk The corresponding modeling picture is determined as the adjusted modeling picture, wherein B0 is a preset picture clarity threshold.
[0034] 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 point cloud category-based scene modeling method.
[0035] 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.
[0036] The present invention has at least the following beneficial effects:
[0037] The scene modeling method based on point cloud categories of the present invention obtains an initial model corresponding to the modeling object by modeling a modeling image of the modeling object, and then clusters a number of model point clouds in the initial model to obtain a number of model point cloud groups, and calculates the average point cloud spacing corresponding to each model point cloud group according to the mutual distance between two model point clouds in each model point cloud group, and determines the target point cloud group from the number of model point cloud groups according to the average point cloud spacing, and finally deletes the model point cloud included in each target point cloud group corresponding to the initial model to obtain the target model corresponding to the modeling object. By clustering a number of model point clouds of the initial model, and calculating the average point cloud spacing corresponding to each clustered model point cloud group, the larger the average point cloud spacing, the looser the model point clouds in the model point cloud group are, and it is considered that they are discrete points or fuzzy points, and they need to be deleted to make the obtained target model more refined, and the structural characteristics of the modeling object can be more clearly expressed. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. 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.
[0039] Figure 1 A flowchart of a method for modeling a scene model based on point cloud categories provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0040] 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.
[0041] like Figure 1 As shown, the scene modeling method based on point cloud category described in this application includes the following steps:
[0042] Step S100: in response to receiving a plurality of modeling pictures of a modeling object, performing modeling processing on the plurality of modeling pictures to obtain an initial model corresponding to the modeling object;
[0043] 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.
[0044] 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.
[0045] 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.
[0046] Further, step S100 includes steps S110 to S180:
[0047] Step S110, determining a plurality of modeling picture groups according to the shooting time of each modeling picture;
[0048] Each modeling picture group includes a plurality of modeling pictures.
[0049] Since the image acquisition device is uniformly moving around the modeling object to acquire images, the shooting angle of the modeling object changes uniformly, 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 pictures required for modeling, the number of overall pictures required for modeling is too large. Therefore, by determining a number of modeling picture groups through the shooting time of each modeling picture, only pictures that meet the standards are selected from the modeling picture groups as pictures required for modeling, which will reduce the amount of picture data processing for modeling, and 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.
[0050] Wherein, step S110 includes steps S111-S112:
[0051] 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 ), 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;
[0052] 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.
[0053] 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.
[0054] Step S120: determining a plurality of adjusted modeling pictures from the plurality of modeling pictures according to the clarity of the plurality of modeling pictures included in each modeling picture group;
[0055] Further, step S120 includes step S121-step S122:
[0056] Step S121: Obtain the definition of several modeling pictures included in each modeling picture group, and obtain a picture definition list set B = (B1, B2, ..., B j ,...,B m );B j =(B j1 ,B j2 ,...,B jk ,...,B jp(j) ), where j = 1, 2, ..., m, and m is the number of modeling picture groups; B j is the picture definition list corresponding to the j-th modeling picture group; k = 1, 2, ..., p(j); p(j) is the number of modeling pictures included in the j-th modeling picture group; B jk is the clarity of the kth modeling picture included in the jth modeling picture group, and the clarity can be obtained by an existing image processing method;
[0057] Step S122, traverse the picture definition list set B, if B jk <B0, then B jk The corresponding modeling picture is determined as the adjusted modeling picture, wherein B0 is a preset picture clarity threshold.
[0058] 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.
[0059] Step S130: Obtain the number of adjusted modeling pictures included in each modeling picture group, and obtain a list of adjusted modeling picture numbers C = (C1, C2, ..., C j ,...,C m ), where C j is the number of adjusted modeling pictures included in the j-th modeling picture group;
[0060] Step S140: 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;
[0061] Step S150: determining the modeling picture with the highest definition in the first modeling picture group as the target modeling picture;
[0062] 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.
[0063] Step S160: deleting the adjusted modeling pictures included in the second modeling picture group, and determining the remaining modeling pictures as target modeling pictures;
[0064] Step S170: 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;
[0065] Step S180: Generate an initial model corresponding to the modeling object according to the association relationship between each target modeling picture and the modeling object.
[0066] 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.
[0067] Step S200, clustering a plurality of model point clouds in the initial model to obtain a plurality of model point cloud cluster groups;
[0068] Each model point cloud group includes several model point clouds of the initial model.
[0069] Further, step S200 includes steps S210 to S220:
[0070] Step S210: Obtain the point cloud identifier corresponding to each model point cloud in the initial model, and obtain a point cloud identifier list F = (F1, F2, ..., F s ,...,F t ), where s = 1, 2, ..., t; t is the total number of model point clouds in the initial model; F s is the point cloud identifier corresponding to the s-th model point cloud in the initial model;
[0071] Step S220: cluster each model point cloud in the initial model 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, and v is the number of model point cloud clusters; 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.
[0072] Among them, the K nearest neighbor algorithm can be used to cluster the model point clouds in the initial model. Each model point cloud group includes several model point clouds, and 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 initial model. Each model point cloud may represent different parts of the modeling object.
[0073] Step S300, determining a target point cloud cluster from a plurality of model point cloud clusters according to an average point cloud spacing corresponding to a plurality of model point clouds in each model point cloud cluster;
[0074] The average point cloud spacing corresponding to several model point clouds in 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.
[0075] Further, step S300 includes step S310-step S320:
[0076] Step S310, determining an average point cloud spacing corresponding to each model point cloud according to the distance between any model point cloud in each model point cloud group and the remaining model point clouds in the model point cloud group to which the model point cloud belongs;
[0077] Wherein, step S310 includes steps S311-S312:
[0078] Step S311: 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;
[0079] Step S312: 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).
[0080] Step S320: If the average point cloud spacing corresponding to each model point cloud in any model point cloud cluster group is greater than a preset spacing threshold, the model point cloud cluster group is determined as a target point cloud cluster group.
[0081] If the average point cloud spacing corresponding to each model point cloud in 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 correlation 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.
[0082] Step S400: Delete the model point cloud included in each target point cloud group corresponding to the initial model to obtain the target model corresponding to the modeling object.
[0083] The scene modeling method based on point cloud categories of the present invention obtains an initial model corresponding to the modeling object by modeling a modeling image of the modeling object, and then clusters a number of model point clouds in the initial model to obtain a number of model point cloud groups, and calculates the average point cloud spacing corresponding to each model point cloud group according to the mutual distance between two model point clouds in each model point cloud group, and determines the target point cloud group from the number of model point cloud groups according to the average point cloud spacing, and finally deletes the model point cloud included in each target point cloud group corresponding to the initial model to obtain the target model corresponding to the modeling object. By clustering a number of model point clouds of the initial model, and calculating the average point cloud spacing corresponding to each clustered model point cloud group, the larger the average point cloud spacing, the looser the model point clouds in the model point cloud group are, and it is considered that they are discrete points or fuzzy points, and they need to be deleted to make the obtained target model more refined, and the structural characteristics of the modeling object can be more clearly expressed.
[0084] 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.
[0085] 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.
[0086] 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.
[0087] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
[0088] 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".
[0089] 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.
[0090] 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).
[0091] 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.
[0092] 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).
[0093] 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 the implementation of a network environment.
[0094] 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.
[0095] 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.
[0096] 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.
[0097] 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.
[0098] 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.
[0099] 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.
[0100] 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.
[0101] 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).
[0102] 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.
[0103] 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.
[0104] 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 scene modeling method based on point cloud category, characterized in that: The method comprises the following steps: Step S100: in response to receiving a plurality of modeling pictures of a modeling object, performing modeling processing on the plurality of modeling pictures to obtain an initial model corresponding to the modeling object; Step S200: clustering a plurality of model point clouds in the initial model to obtain a plurality of model point cloud clusters; each of the model point cloud clusters includes a plurality of model point clouds of the initial model; Step S300, determining a target point cloud cluster from a plurality of the model point cloud clusters according to an average point cloud spacing corresponding to a plurality of model point clouds in each of the model point cloud clusters; Step S400: deleting the model point cloud included in each target point cloud group corresponding to the initial model to obtain a target model corresponding to the modeling object.
2. The method according to claim 1, characterized in that The step S200 includes: Step S210: Obtain the point cloud identifier corresponding to each model point cloud in the initial model, and obtain a point cloud identifier list F=(F1, F2, ..., F s ,...,F t ), where s = 1, 2, ..., t, and t is the total number of model point clouds in the initial model; F s is the point cloud identifier corresponding to the s-th model point cloud in the initial model; Step S220: cluster each model point cloud in the initial model 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, and v is the number of point cloud clusters of the model; 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.
3. The method according to claim 2, characterized in that The model point cloud is clustered using the K nearest neighbor algorithm.
4. The method according to claim 2, characterized in that: The step S300 includes: Step S310, determining an average point cloud spacing corresponding to each of the model point clouds according to the distance between any model point cloud in each of the model point cloud clusters and the remaining model point clouds in the model point cloud cluster to which the model point cloud belongs; Step S320: If the average point cloud spacing corresponding to each of the model point clouds in any of the model point cloud clusters is greater than a preset spacing threshold, the model point cloud cluster is determined as a target point cloud cluster.
5. The method according to claim 4, characterized in that The step S310 includes: Step S311: 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 Except G uq The distance between the model point clouds corresponding to the f-th point cloud identifier outside; Step S312: 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).
6. The method according to claim 1, characterized in that The step S100 includes: Step S110: determining a plurality of modeling picture groups according to the shooting time of each of the modeling pictures; each of the modeling picture groups includes a plurality of modeling pictures; Step S120: determining a plurality of adjusted modeling pictures from the plurality of modeling pictures according to the clarity of the plurality of modeling pictures included in each of the modeling picture groups; Step S130: 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 ), where C j is the number of adjusted modeling pictures included in the j-th modeling picture group; Step S140: 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 S150: determining the modeling picture with the highest definition in the first modeling picture group as the target modeling picture; Step S160: deleting the adjusted modeling pictures included in the second modeling picture group, and determining the remaining modeling pictures as target modeling pictures; Step S170: 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 S180: Generate an initial model corresponding to the modeling object according to the association relationship between each of the target modeling pictures and the modeling object.
7. The method according to claim 6, 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.
8. The method according to claim 7, characterized in that The step S120 includes: Step S121: Obtain the definition of several modeling pictures included in each of the modeling picture groups, and obtain a picture definition list set B = (B1, B2, ..., B j ,...,B m );B j =(B j1 ,B j2 ,...,B jk ,...,B jp(j) ), wherein j=1, 2, ..., m, and m is the number of the modeling picture groups; B j is a picture definition list corresponding to the jth modeling picture group; k=1, 2, ..., p(j); p(j) is the number of modeling pictures included in the jth modeling picture group; B jk is the definition of the kth modeling picture included in the jth modeling picture group; Step S122, traverse the picture definition list set B, if B jk <B0, then B jk The corresponding modeling picture is determined as the adjusted modeling picture, wherein B0 is a preset picture clarity threshold.
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 scene modeling method based on point cloud category 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.
