WO2020015210A1 - 模型轮廓的切分方法及装置、存储介质、计算机设备 - Google Patents

模型轮廓的切分方法及装置、存储介质、计算机设备 Download PDF

Info

Publication number
WO2020015210A1
WO2020015210A1 PCT/CN2018/109865 CN2018109865W WO2020015210A1 WO 2020015210 A1 WO2020015210 A1 WO 2020015210A1 CN 2018109865 W CN2018109865 W CN 2018109865W WO 2020015210 A1 WO2020015210 A1 WO 2020015210A1
Authority
WO
WIPO (PCT)
Prior art keywords
equation
curve
straight line
curve equation
coarse
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2018/109865
Other languages
English (en)
French (fr)
Inventor
叶俊锋
赖云辉
罗先贤
孙成
龙觉刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Publication of WO2020015210A1 publication Critical patent/WO2020015210A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/13Architectural design, e.g. computer-aided architectural design [CAAD] related to design of buildings, bridges, landscapes, production plants or roads
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/12Computing arrangements based on biological models using genetic models
    • G06N3/126Evolutionary algorithms, e.g. genetic algorithms or genetic programming
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Definitions

  • the present application relates to the field of data processing technology, and in particular, to a method and a device for segmenting a model contour, a storage medium, and a computer device.
  • the present application provides a method and device for segmenting a model profile, a storage medium, and a computer device.
  • the main purpose of the present application is to remove the excess parts before the curved wall and the linear wall by manual removal methods. Misoperation occurs, which makes it difficult to determine the contact points, and the segmentation efficiency of the model contour is low.
  • a method for segmenting a model contour including:
  • a straight line equation corresponding to the straight line information is established according to a preset straight line equation, and a curve equation corresponding to the curve part information is established according to a preset curve equation.
  • the linear equation and the curve equation are intersected and solved simultaneously, and line segments and curves other than the building model are eliminated according to the intersection point after the intersection to obtain the divided building model outline.
  • a model contour segmentation device including:
  • the establishing unit is configured to establish a straight line equation corresponding to the straight line information according to a preset straight line equation, and to establish a curve equation corresponding to the curved line information according to a preset curve equation.
  • a culling unit is configured to solve the intersection of the straight line equation and the curve equation with each other, and remove line segments and curves other than the building model according to the intersection point after the intersection to obtain a divided building model outline.
  • a non-volatile readable storage medium stores at least one computer-readable instruction, and the computer-readable instruction causes a processor Perform the operations corresponding to the segmentation method of the model contour described above.
  • a computer device including: a processor, a memory, a communication interface, and a communication bus, and the processor, the memory, and the communication interface complete each other through the communication bus.
  • Communication the memory is used to store at least one computer-readable instruction, and the computer-readable instruction causes the processor to perform an operation corresponding to the segmentation method of the model contour.
  • the application provides a method and a device for segmenting a model contour. First, extract straight line information and curved line information in a building model; establish a straight line equation corresponding to the straight line information according to a preset straight line equation, and follow a preset curve.
  • the excess parts before the curved wall and the linear wall are not sufficiently accurate, which is prone to misoperation, which makes it difficult to determine the contact points and the model contour segmentation efficiency is lower.
  • the genetic algorithm is used to solve the curve equation parameters to establish the curve equation, and the straight line equation and the curve equation are used to determine the intersection point, and the straight line and the curve other than the contour of the building model are eliminated according to the intersection point to avoid the manual operation of the wrong operation. Draw the outline of the building model and improve the efficiency of segmentation of the outline.
  • FIG. 1 shows a flowchart of a method for segmenting a model contour according to an embodiment of the present application
  • FIG. 2 is a schematic diagram of an outline of a building model that is not segmented according to an embodiment of the present application
  • FIG. 3 is a schematic diagram of an outline of a segmented building model according to an embodiment of the present application.
  • FIG. 4 shows a flowchart of another model contour segmentation method provided by an embodiment of the present application.
  • FIG. 5 shows a block diagram of a model contour segmentation device according to an embodiment of the present application
  • FIG. 6 shows a block diagram of another model contour segmentation device provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a terminal according to an embodiment of the present application.
  • An embodiment of the present application provides a method for segmenting a model contour. As shown in FIG. 1, the method includes:
  • the building model is a plane in a three-dimensional solid model, which is used to represent the outline of the plane in a certain direction.
  • the outline of the building model is composed of a straight line portion and a curved line portion, the outline is being drawn. In this case, there will be multiple intersections between curves and straight lines.
  • the building model needs to be extracted. The information of the straight line part and the information of the curve part in.
  • part of the curve information can be sample points within a certain range.
  • Sweet Home 3D software is used to provide m sample points (x, y) in a certain surface, and it can be based on the distribution of the curve in the software. The maximum and minimum values of x and y in this curve are determined, so that when the intersection between the curve equation and the straight line equation is calculated in step 103, the extra intersections are eliminated.
  • the straight line equation can be obtained by solving the coordinate information of any two points in the straight line information, which is not specifically limited in the embodiment of the present application.
  • a genetic algorithm is used to compare a 0 according to the curve part information, a 1 , a 2 , a 3 , and a 4 are solved, and the obtained a 0 , a 1 , a 2 , a 3 , and a 4 are substituted into a preset curve equation to obtain a curve equation.
  • the genetic algorithm in the embodiment of the present application is in accordance with the steps: initialization, individual evaluation, selection operation, crossover operation, mutation operation, etc., until the termination condition is reached, and the individual with the maximum fitness is obtained as the optimal solution output, and a 0 , a 1 , a 2 , a 3 , a 4 .
  • the straight line equation and the curve equation are solved simultaneously, and one or more intersection points can be obtained.
  • the specific intersection point coordinates are determined according to the information of the curve part in step 101.
  • the information of the straight part and the part of the curve determine the line segments and curves that need to be proposed, and delete them to obtain the completed building model outline after segmentation, as shown in FIG. 3.
  • This application provides a method for segmenting model contours, and the existing manual culling method makes the excess parts of curved and linear walls inaccurately removed, which is prone to misoperation, which makes the determination of contact points more difficult.
  • the model Contour segmentation efficiency is relatively low.
  • the curve equation parameters are solved by the genetic algorithm to establish the curve equation, and the straight line equation and the curve equation are used to determine the intersection point. Avoid manual operation to eliminate the wrong operation, easily and accurately determine the contour of the building model, and improve the efficiency of contour segmentation.
  • An embodiment of the present application provides another method for segmenting a model contour. As shown in FIG. 4, the method includes:
  • One of the three-dimensional three-dimensional building models is a two-dimensional building model to be subjected to curve division.
  • the center point of the three-dimensional three-dimensional architectural model is selected as the origin, and the visual operation is performed according to the x-axis, y-axis, and z-axis so that the user can perform the operation on different coordinate axes with the mouse When moving, you can display two-dimensional planes on different coordinate axes.
  • the user can determine the plane that needs to be segmented by the contour of the building model by entering specific coordinate axis information.
  • the input methods include mouse movement, coordinate axis value input, etc., which are not specifically limited in the embodiments of the present application.
  • This step is the same as the method of step 101 shown in FIG. 1, and details are not described herein again.
  • a two-point coordinate is used to determine a straight line, and the coordinates of any two points are directly extracted from the information of the straight line, and substituted into a preset straight line equation to obtain the a, b, determine the linear equation.
  • the embodiment of the present application performs the solution according to the two-round solution process of coarse granularity and accuracy, respectively.
  • the difference between the first round of coarse-grained genetic algorithm solving process and the second round of precision genetic algorithm solving process is that the parameter step in the genetic algorithm is different, that is, the value range of the parameters of the selected curve equation is different, and the genetic The fitness thresholds are different in the algorithm.
  • step 204 is specifically: using the curve equation parameter in the preset curve equation as a numerical vector A with a parameter value range within a first preset threshold range, and using a simulated annealing method Determining the number of executions based on the genetic algorithm and optimizing the number of samples based on the genetic algorithm using roulette; performing the numerical vector A of the coarse-grained genetic algorithm of the first round according to the number of executions and the number of samples, A coarse-grained solution value A1 is obtained, and the parameter range of the coarse-grained solution value A1 is updated to a second preset threshold range; the second round of precision genetic algorithm is performed according to the number of executions and the number of samples.
  • the coarse-grained solution value A1 is solved to obtain an accurate solution value A2, and the precise solution value A2 is determined as a curve equation parameter to obtain a curve equation.
  • the curve equation parameter is taken as a numerical vector A with a parameter value range within a first preset threshold range, where the first A preset threshold range is [-100,100] with a step size of 10, and a genetic algorithm operation is performed to obtain a coarse-grained solution value A1, and then the parameter range of A1 is updated to a second preset threshold range, and the second preset threshold is The range is [ai-1, ai + 1], where ai represents the best value of the i-th a calculated in the previous round, and the genetic algorithm operation is performed to obtain an accurate solution value A2.
  • the simulated annealing method was used to determine the number of executions of the genetic algorithm and the roulette method was used to optimize the number of samples based on the genetic algorithm.
  • the simulated annealing method is used to select individuals that do not perform well with a certain probability, which can avoid local optimization of the algorithm, and this probability gradually decreases with the number of times the simulated annealing method is run.
  • Roulette method is used for Increasing the probability of selecting outstanding performers.
  • step 204 in order to satisfy the calculation difference between the applicability thresholds in the first round and the second round, and reduce the impact of the mutation on the fitness, so that the genetic algorithm is more continuous and stable, it also includes: During the solution process, the first round of coarse-grained genetic algorithm and the second round of precision genetic algorithm are configured with a first fitness threshold and a second fitness threshold, respectively, and pass through the process of crossover and mutation genetic operations.
  • the Gray code performs encoding and decoding operations, and updates the population algebra based on the decoded mutant individuals.
  • the first fitness threshold value and the second fitness threshold value are respectively used to determine the first round of coarse-grained solution value A1 and the second round of accuracy solution value A2, and the fitness function is Where y i is the value of y in the i-th sample point, and y i 'is the value of y in the i-th sample point calculated by the surface equation. When f is smaller, it indicates that the fitness is better.
  • the first fitness threshold of the first round of coarse-grained configuration is 10
  • the second fitness threshold of the second round of precise configuration is 0.1. That is, in the process of solving the genetic algorithm, if the fitness meets the configured first fitness threshold, then A1 is determined, and the second round is performed; if the fitness meets the configured second fitness threshold, A2 is determined.
  • Gray code is used to reduce the influence of mutation on fitness and make the genetic algorithm more continuous and stable.
  • the crossover is randomly taken from the parameter a of two individuals, and for the parameter a, two individuals
  • the Gray code of the parameters is 10011 and 11101, then some values are randomly crossed, such as 10001 and 11111, and the last 2 digits are crossed.
  • the mutation is to randomly mutate one individual parameter's Gray code and one position, such as 10011 to 10111, which is not specifically limited in the embodiment of the present application.
  • the initial population number of each generation is set to 1000.
  • the mutation operator in the mutation operation is applied to the population, that is, to certain loci of individual strings in the population.
  • the next generation population needs to be updated. For example, the mutant population P (t) is selected, crossed, and mutated to obtain the next generation population P (t +1).
  • Coding encode each individual of the obtained new population into a Gray code
  • the straight line equation and the curve equation are simultaneously solved to obtain the coordinates of the intersection point. If there are multiple intersection points, the straight line and the The two intersection points where the curves intersect, and then the outline of the entire building model is determined according to the information of the straight line and the information of the curve part, and rendered to achieve the purpose of highlighting the outline of the building model.
  • the visualization can be hidden, and the straight and curved parts other than the building model are no longer displayed, so as to obtain the contour of the divided building model outline.
  • the segmented building model is stored in the corresponding storage location under this coordinate information, so that after the user enters the current coordinate information again, the background The system no longer performs calculations, and extracts the segmented building model directly from the storage location for display.
  • This application provides another method for segmenting model contours.
  • the curve equation parameters are solved by using a genetic algorithm to establish a curve equation, and a straight line equation and a curve equation are used to determine an intersection point, and a straight line other than the contour of the building model is eliminated according to the intersection point.
  • curve to avoid the manual operation of erroneous operation, to easily and accurately determine the contour of the building model, and improve the efficiency of contour segmentation.
  • an embodiment of the present application provides a model contour segmentation device.
  • the device includes an extraction unit 31, a establishment unit 32, and a rejection unit 33. .
  • An extraction unit 31 is configured to extract straight line information and curve portion information in the building model.
  • the extraction unit 31 is a module that extracts the straight line information and the curve portion information in the building model for the segmentation device of the model contour.
  • the unit 32 is a module that executes a model contour segmentation device to establish a straight line equation corresponding to the straight line part information according to a preset straight line equation, and to establish a curve equation corresponding to the curve part information according to a preset curve equation.
  • the rejection unit 33 is configured to solve the intersection of the straight line equation and the curve equation in an intersecting manner, and remove line segments and curves other than the building model according to the intersection point after the intersection to obtain a divided building model outline.
  • the culling unit 33 is a segmentation device for model contours. The linear equation and the curve equation are intersected and solved, and line segments and curves other than the building model are eliminated according to the intersection points to obtain segmentation. Modules of the building model silhouette.
  • This application provides a model contour segmentation device, and the existing manual culling method makes the curved wall and the linear wall in front of the excess part are not accurately removed, which is prone to misoperation, which makes it difficult to determine the contact point.
  • the model Contour segmentation efficiency is relatively low.
  • the curve equation parameters are solved by the genetic algorithm to establish the curve equation, and the straight line equation and the curve equation are used to determine the intersection point.
  • the line and curve other than the contour of the building model are eliminated according to the intersection point. Avoid manual operation to eliminate the wrong operation, easily and accurately determine the contour of the building model, and improve the efficiency of contour segmentation.
  • an embodiment of the present application provides another model contour segmentation device.
  • the device includes an extraction unit 41, a establishment unit 42, and a rejection unit. 43.
  • An extraction unit 41 configured to extract straight line information and curved line information in a building model
  • a rejection unit 43 is configured to solve the intersection of the straight line equation and the curve equation with each other, and remove line segments and curves other than the building model according to the intersection point after the intersection to obtain a segmented building model outline.
  • the establishing unit 42 includes:
  • a first solving module 4201 configured to extract any two sample coordinates located on a straight line from the straight line partial information, and use the sample coordinates to solve a straight line equation corresponding to the straight line partial information;
  • the curve equation corresponding to the information of the curve is determined by combining the coarse-grained solution value and the accuracy solution value.
  • the second solving module 4202 is specifically configured to use the curve equation parameter in the preset curve equation as a numerical vector A with a parameter value range within a first preset threshold range, and determine the genetic-based genetic algorithm based on the simulated annealing method. The number of executions of the algorithm and the optimization of the number of samples based on genetic algorithms using roulette;
  • the second solving module 4202 is further specifically configured to execute the first round of coarse-grained genetic algorithm to solve the numerical vector A according to the number of executions and the number of samples, to obtain a coarse-grained solution value A1.
  • the parameter range of the coarse-grained solution value A1 is updated to the second preset threshold range;
  • the second solving module 4202 is further specifically configured to execute a second round of precision genetic algorithm according to the number of executions and the number of samples to solve the coarse-grained solution value A1 to obtain an accurate solution value A2,
  • the exact solution value A2 is determined as the curve equation parameter, and the curve equation is obtained.
  • the second solving module 4202 is specifically configured to configure a first adaptation for the first round of coarse-grained genetic algorithm and the second round of precision genetic algorithm during the genetic algorithm solution process.
  • the elimination unit 43 is specifically configured to intersect and solve the straight line equation and the curve equation to obtain two coordinates of the intersection point of the straight line equation and the curve equation, and according to the coordinates of the intersection point and
  • the straight part information and the curved part information in the building model render the outline of the building model, and the line segments and curves other than the building model are visually hidden to obtain the segmented building model outline.
  • the apparatus further includes:
  • a determining unit 44 is configured to select a center point of the three-dimensional three-dimensional architectural model to be curve-divided as an origin, and perform visual display according to the x-axis, y-axis, and z-axis directions, and according to the input x-axis, y-axis, and z-axis directions.
  • the coordinate information of one of the three-dimensional three-dimensional building models determines a two-dimensional building model to be subjected to curve division.
  • the apparatus further includes:
  • a display unit 45 is configured to store the divided building models in corresponding storage locations of the coordinate information, and display the coordinate information when the user triggers the coordinate information.
  • This application provides another model contour segmentation device.
  • the embodiment of the present application solves the curve equation parameters by using a genetic algorithm to establish a curve equation, and uses a linear equation and a curve equation to determine the intersection point.
  • the line other than the contour of the building model is eliminated according to the intersection point.
  • curve to avoid the manual operation of erroneous operation, to easily and accurately determine the contour of the building model, and improve the efficiency of contour segmentation.
  • a computer nonvolatile readable storage medium stores at least one computer readable instruction, and the computer readable instruction can execute any of the foregoing methods. Segmentation method of model contour in the embodiment.
  • FIG. 7 shows a schematic structural diagram of a computer device according to an embodiment of the present application, which may specifically be a terminal.
  • the specific embodiment of the present application does not limit the specific implementation of the terminal.
  • the terminal may include a processor 502, a communications interface 504, a memory 506, and a communication bus 508.
  • the processor 502, the communication interface 504, and the memory 506 complete communication with each other through the communication bus 508.
  • the communication interface 504 is configured to communicate with a network element of another device, such as a client or another server.
  • the processor 502 is configured to execute computer-readable instructions 510, and may specifically perform related steps in the foregoing embodiment of a model contour segmentation method embodiment.
  • the computer-readable instructions 510 may include computer-readable instruction codes, where the computer-readable instruction codes include computer-readable instructions.
  • the processor 502 may be a central processing unit CPU, or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
  • the terminal includes one or more processors, which may be processors of the same type, such as one or more CPUs; or may be processors of different types, such as one or more CPUs and one or more ASICs.
  • the memory 506 is configured to store computer-readable instructions 510.
  • the memory 506 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), for example, at least one disk memory.
  • the computer-readable instructions 510 may be specifically configured to cause the processor 502 to perform the following operations:
  • a straight line equation corresponding to the straight line information is established according to a preset straight line equation, and a curve equation corresponding to the curve part information is established according to a preset curve equation.
  • the linear equation and the curve equation are intersected and solved simultaneously, and line segments and curves other than the building model are eliminated according to the intersection point after the intersection to obtain the divided building model outline.
  • modules or steps of the present application may be implemented by a general-purpose computing device, and they may be concentrated on a single computing device or distributed in a network composed of multiple computing devices.
  • they can be implemented with computer-readable instruction code executable by the computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, can be different from this
  • the steps shown or described are performed in sequence, either by making them into individual integrated circuit modules, or by making multiple modules or steps into a single integrated circuit module. As such, this application is not limited to any particular combination of hardware and software.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Geometry (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Optimization (AREA)
  • Computational Mathematics (AREA)
  • Architecture (AREA)
  • Mathematical Analysis (AREA)
  • Structural Engineering (AREA)
  • Pure & Applied Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Civil Engineering (AREA)
  • Image Analysis (AREA)
  • Image Generation (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本申请公开了一种模型轮廓的切分方法及装置、存储介质、计算机设备,涉及数据处理技术领域,主要目的在于现有手动剔除的方式使得曲面墙体与直线墙体之前多余部分剔除的不够精确,容易出现误操作,导致接触点的确定比较困难,模型轮廓的切分效率较低的问题。包括:提取建筑模型中的直线部分信息以及曲线部分信息;按照预设直线方程建立所述直线部分信息对应的直线方程,以及按照预设曲线方程建立所述曲线部分信息对应的曲线方程;将所述直线方程与所述曲线方程进行相交联立求解,按照相交后的交点剔除掉除所述建筑模型以外的线段及曲线,得到切分后的建筑模型轮廓。

Description

模型轮廓的切分方法及装置、存储介质、计算机设备
本申请要求与2018年7月19日提交中国专利局、申请号为2018107975354、申请名称为“模型轮廓的切分方法及装置、存储介质、终端”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
技术领域
本申请涉及一种数据处理技术领域,特别是涉及一种模型轮廓的切分方法及装置、存储介质、计算机设备。
背景技术
随着建筑行业的快速发展,在对建筑物进行整体设计时,通常都会预先对设计的建筑物就那些模拟,以便确定建筑物的整体效果。在这个过程中,通常利用计算机软件按照特定比例勾画建筑物的轮廓以及内部结构,当出现勾画的线段超出模型的轮廓时,可以通过计算机算法直接进行识别剔除。
目前,现有利用计算机软件进行建筑物模型的模拟时,若曲面墙体与其他墙体之间存在接触点时,都是通过用户手动确定,并手动调整曲面墙体的结构来剔除多余部分的墙体,但是,手动剔除的方式使得曲面墙体与直线墙体之前多余部分剔除的不够精确,容易出现误操作,导致接触点的确定比较困难,模型轮廓的切分效率较低。
发明内容
有鉴于此,本申请提供一种模型轮廓的切分方法及装置、存储介质、计算机设备,主要目的在于现有手动剔除的方式使得曲面墙体与直线墙体之前多余部分剔除的不够精确,容易出现误操作,导致接触点的确定比较困难,模型轮廓的切分效率较低的问题。
依据本申请一个方面,提供了一种模型轮廓的切分方法,包括:
提取建筑模型中的直线部分信息以及曲线部分信息;
按照预设直线方程建立所述直线部分信息对应的直线方程,以及按照预设曲线方程建立所述曲线部分信息对应的曲线方程,所述预设曲线方程为y=a 0+a 1x 0.5+a 2x+a 3x 2+a 4x 3,其中,a 0,a 1,a 2,a 3,a 4为通过遗传算法求解得到的曲线方程参数;
将所述直线方程与所述曲线方程进行相交联立求解,按照相交后的交点剔除掉除所述建筑模型以外的线段及曲线,得到切分后的建筑模型轮廓。
依据本申请一个方面,提供了一种模型轮廓的切分装置,包括:
提取单元,用于提取建筑模型中的直线部分信息以及曲线部分信息;
建立单元,用于按照预设直线方程建立所述直线部分信息对应的直线方程,以及按照预设曲线方程建立所述曲线部分信息对应的曲线方程,所述预设曲线方程为y=a 0+a 1x 0.5+a 2x+a 3x 2+a 4x 3,其中,a 0,a 1,a 2,a 3,a 4为通过遗传算法求解得到的曲线方程参数;
剔除单元,用于将所述直线方程与所述曲线方程进行相交联立求解,按照相交后的交点剔除掉除所述建筑模型以外的线段及曲线,得到切分后的建筑模型轮廓。
根据本申请的又一方面,提供了一种非易失性可读存储介质,所述非易失性可读存储介质中存储有至少一计算机可读指令,所述计算机可读指令使处理器执行如上述模型轮廓的切分方法对应的操作。
根据本申请的再一方面,提供了一种计算机设备,包括:处理器、存储器、通信接口和通信总线,所述处理器、所述存储器和所述通信接口通过所述通信总线完成相互间的通信;所述存储器用于存放至少一计算机可读指令,所述计算机可读指令使所述处理器执行上述模型轮廓的切分方法对应的操作。
借由上述技术方案,本申请实施例提供的技术方案至少具有下列优点:
本申请提供了一种模型轮廓的切分方法及装置,首先提取建筑模型中的直线部分信息以及曲线部分信息;按照预设直线方程建立所述直线部分信息对应的直线方程,以及按照预设曲线方程建立所述曲线部分信息对应的曲线方程,所述预设曲线方程为y=a 0+a 1x 0.5+a 2x+a 3x 2+a 4x 3,其中,a 0,a 1,a 2,a 3,a 4为通过遗传算法求解得到的曲线方程参数;将所述直线方程与所述曲线方程进行相交联立求解,按照相交后的交点剔除掉除所述建筑模型以外的线段及曲线,得到切分后的建筑模型轮廓。与现有手动剔除的方式使得曲面墙体与直线墙体之前多余部分剔除的不够精确,容易出现误操作,导致接触点的确定比较困难,模型轮廓的切分效率较低相比,本申请实施例通过遗传算法求解曲线方程参数建立曲线方程,并利用直线方程与曲线方程联立确定交点,按照交点剔除建筑模型轮廓以外的直线与曲线,以避免手动剔除出现的错误操作,简便、准确的确定出建筑模型的轮廓,提高轮廓的切分效率。
上述说明仅是本申请技术方案的概述,为了能够更清楚了解本申请的技术手段, 而可依照说明书的内容予以实施,并且为了让本申请的上述和其它目的、特征和优点能够更明显易懂,以下特举本申请的具体实施方式。
附图说明
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本申请的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:
图1示出了本申请实施例提供的一种模型轮廓的切分方法流程图;
图2示出了本申请实施例提供的一种未进行切分的建筑模型轮廓的示意图;
图3示出了本申请实施例提供的一种切分后的建筑模型轮廓的示意图;
图4示出了本申请实施例提供的另一种模型轮廓的切分方法流程图;
图5示出了本申请实施例提供的一种模型轮廓的切分装置框图;
图6示出了本申请实施例提供的另一种模型轮廓的切分装置框图;
图7示出了本申请实施例提供的一种终端的结构示意图。
具体实施方式
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。
本申请实施例提供了一种模型轮廓的切分方法,如图1所示,所述方法包括:
101、提取建筑模型中的直线部分信息以及曲线部分信息。
其中,所述建筑模型为三维立体模型中的一个平面,用于表示某个方向上这个平面的轮廓,如图2所示,由于建筑模型的轮廓是由直线部分与曲线部分组成,在进行勾画时,曲线与直线会出现多处的交点,为了完整的勾画出建筑模型的整体轮廓,需要将交点以外部分的除轮廓的线段或曲线删除,因此,本申请实施例中,需要提取出建筑模型中的直线部分信息以及曲线部分信息。
需要说明的是,由于直线部分信息可以利用计算机软件准确的获取样本点的横、纵坐标,而由于曲线方程比较复杂,无法通过两点法确定出唯一一条曲线,因此,本申请 实施例中,为了得到曲线方程,曲线部分信息可以为一定范围内的样本点,例如,利用Sweet Home 3D软件提供某个曲面中的m个样本点(x,y),且可以根据软件中的曲线的分布情况确定出这个曲线中x、y的最大、最小值,以便在步骤103中计算曲线方程与直线方程之间的交点时,排出掉多余交点。
102、按照预设直线方程建立所述直线部分信息对应的直线方程,以及按照预设曲线方程建立所述曲线部分信息对应的曲线方程。
其中,所述预设曲线方程为y=a 0+a 1x 0.5+a 2x+a 3x 2+a 4x 3,其中,a 0,a 1,a 2,a 3,a 4为通过遗传算法求解得到的曲线方程参数,所述预设直线方程即为可以通过两点坐标确定唯一一条直线的直线方程:y=ax+b,a、b分别为直线的斜率、直线的截距,可以通过直线部分信息中任一2点的坐标信息求解得到直线方程,本申请实施例不做具体限定。
需要说明的是,由于预设的曲线方程中包含的曲线方程参数为多个,无法根据简单的代入法计算出每个参数的数值,本申请实施例利用遗传算法根据曲线部分信息对a 0,a 1,a 2,a 3,a 4进行求解,求解得到的a 0,a 1,a 2,a 3,a 4代入预设曲线方程中即可得到曲线方程。
另外,本申请实施例中的遗传算法即为按照步骤:初始化、个体评价、选择运算、交叉运算、变异运算等,直至到达终止条件,得到最大适应度个体作为最优解输出,完成对a 0,a 1,a 2,a 3,a 4的求解。
103、将所述直线方程与所述曲线方程进行相交联立求解,按照相交后的交点剔除掉除所述建筑模型以外的线段及曲线,得到切分后的建筑模型轮廓。
对于本申请实施例,为了求得直线与曲线的交点,将直线方程与曲线方程进行联立求解,可以得到1个或多个交点,根据步骤101中曲线部分信息确定出具体的交点坐标,按照直线部分信息以及曲线部分信息确定出需要提出的线段和曲线,并进行删除,从而得到切分后的完成的建筑模型轮廓,如图3所示。
本申请提供了一种模型轮廓的切分方法,与现有手动剔除的方式使得曲面墙体与直线墙体之前多余部分剔除的不够精确,容易出现误操作,导致接触点的确定比较困难,模型轮廓的切分效率较低相比,本申请实施例通过遗传算法求解曲线方程参数建立曲线方程,并利用直线方程与曲线方程联立确定交点,按照交点剔除建筑模型轮廓以外的直线与曲线,以避免手动剔除出现的错误操作,简便、准确的确定出建筑模型的轮廓,提高轮廓的切分效率。
本申请实施例提供了另一种模型轮廓的切分方法,如图4所示,所述方法包括:
201、选取待进行曲线切分的三维立体建筑模型的中心点作为原点,分别按照x轴、y轴、z轴方向进行可视化展示,根据输入的x轴、y轴、z轴方向的坐标信息确定所述三维立体建筑模型中的一个待进行曲线切分的二维建筑模型。
对于本申请实施例,为了准确确定出需要进行切分的具体平面的建筑模型轮廓,一般在建立三维立体建筑模型时,不同方向、不同维度都会体现不同的二维平面,每个二维平面都可能存在曲线与直线相交的部分,因此,本申请实施例,选取三维立体建筑模型的中心点作为原点,按照x轴、y轴、z轴进行可视化操作,以便用户通过鼠标在不同坐标轴上进行移动时,可以展示不同坐标轴上的二维平面。
需要说明的是,用户可以通过输入具体的坐标轴信息确定需要进行建筑模型轮廓切分的平面,输入的方式包括鼠标移动、坐标轴数值输入等,本申请实施例不做具体限定。例如,可以根据输入x=3、y=5,z轴不限定确定出一个二维平面,作为建筑模型待进行切分的轮廓平面。
202、提取建筑模型中的直线部分信息以及曲线部分信息。
本步骤与图1所示的步骤101方法相同,在此不再赘述。
203、从所述直线部分信息中提取位于直线上的任意2个样本坐标,并利用所述样本坐标求解所述直线部分信息对应的直线方程。
对于本申请实施例,为了直接建立直线方程,利用两点坐标确定一条直线的方法,直接从直线部分信息中提取任意2点的坐标,代入至预设直线方程中进行求解,得到直线方程中的a、b,确定出直线方程。
204、针对预设曲线方程y=a 0+a 1x 0.5+a 2x+a 3x 2+a 4x 3,利用遗传算法分别进行第一轮的粗粒度求解以及第二轮的精确度求解,并结合求解的粗粒度求解值以及精确度求解值确定出所述曲线部分信息对应的曲线方程。
对于本申请实施例,为了提高求解曲线方程参数的精度,本申请实施例分别按照粗粒度与精确度的两轮求解过程进行求解。其中,第一轮的粗粒度的遗传算法求解过程与第二轮的精确度的遗传算法求解过程的区别在于遗传算法中参数步长不同,即选择的曲线方程参数的取值范围不同,以及遗传算法中适应度阈值不同。
另外,本申请实施例在进行遗传算法的求解过程中,首先进行第一轮的粗粒度求解,求解得到的曲线方程参数再作为第二轮的精确度的参数取值范围的最佳值,然后进行第二轮的精确度的遗传算法求解。
对于本申请实施例,为了说明与细化,步骤204具体为:将所述预设曲线方程中的 曲线方程参数作为参数值范围在第一预设阈值范围内的数值向量A,利用模拟退火法确定基于遗传算法的执行次数以及利用轮盘赌法优化基于遗传算法的样本个数;按照所述执行次数以及所述样本个数执行第一轮的粗粒度遗传算法的所述数值向量A求解,得到粗粒度求解值A1,将所述粗粒度求解值A1的参数范围更新至第二预设阈值范围内;按照所述执行次数以及所述样本个数执行第二轮的精确度遗传算法所述粗粒度求解值A1求解,得到精确求解值A2,将所述精确求解值A2确定为曲线方程参数,得到曲线方程。
对于本申请实施例,为了配置出第一轮的粗粒度的遗传算法的参数范围的最佳值,将曲线方程参数作为参数值范围在第一预设阈值范围内的数值向量A,其中,第一预设阈值范围为[-100,100],步长为10,进行遗传算法的运算,得到粗粒度求解值A1,然后将A1的参数范围更新至第二预设阈值范围内,第二预设阈值范围为[ai-1,ai+1],其中,ai表示上一轮次计算的第i个a的最佳值,进行遗传算法的运算,得到精确求解值A2。在进行遗传算法求解的过程中,为了提高参数的选取精度与参数的优化性能,利用模拟退火法确定基于遗传算法的执行次数以及利用轮盘赌法优化基于遗传算法的样本个数。
需要说明的是,模拟退火法用于以一定的概率选择表现并不好的个体,可以避免算法局部最优,而且这个概率随着模拟退火法运行的次数而逐渐降低,轮盘赌法用于提高表现优秀个体选中的概率。
进一步地,步骤204中,为了满足在第一轮与第二轮中适用度阈值的计算差异,以及减小变异对适应度的影响,使得遗传算法更为连续稳定,还包括:在进行遗传算法求解过程中,为所述第一轮的粗粒度遗传算法以及所述第二轮的精确度遗传算法分别配置第一适应度阈值、第二适应度阈值,并在交叉、变异遗传操作过程中通过格雷码进行编码、解码操作,并根据解码后的变异个体进行更新种群代数。
对于本申请实施例,所述第一适应度阈值与所述第二适应度阈值分别用于确定第一轮的粗粒度求解值A1与第二轮的精确度求解值A2,适应度函数为
Figure PCTCN2018109865-appb-000001
其中y i为第i个样本点中y的值,y i'为曲面方程计算出的第i个样本点中y的值,当f越小,则表明适应度越好,本申请实施例中,第一轮的粗粒度配置的第一适应度阈值为10,第二轮的精确度配置的第二适应度阈值为0.1。即在进行遗传算法求解的过程中,若适应度符合配置的第一适应度阈值,则确定出A1,进行第二轮,若适应度符合配置的第二适应度阈值,则确定出A2。
另外,格雷码用于减少变异对适应度的影响,使遗传算法更加连续稳定,如,在进行遗传算法计算时,交叉是随机取2个个体的参数a交叉,如对于参数a,两个个体参 数的格雷码为10011和11101,则随机取部分值交叉,如10001、11111,交叉了后2位。变异是随机变异一个个体参数格雷码一个位置,如10011变异为10111,本申请实施例不做具体限定。
本申请实施例中,初始的每代种群个数设定为1000,在进行遗传算法过程中,将变异操作中变异算子作用于群体,即是对群体中的个体串的某些基因座上的基因值作变动,在本申请实施例中根据解码后的变异个体,需要进行更新下一代的种群,如,变异群体P(t)经过选择、交叉、变异运算之后得到下一代群体P(t+1)。
例如,在进行曲线方程参数的求解时,遗传算法的参数设置如表1所示。
表1、参数设置
Figure PCTCN2018109865-appb-000002
其中,利用遗传算法计算曲线方程的过程为:
(1)设置初始值:设置算法参数,包括利用模拟退火法设置执行次数x=1,种群代数g=0;
(2)初始化种群:根据第一轮的Step和ParaRange计算出所有A的参数组合,获得初始种群个数n;
(3)计算适应度:计算每个个体的适应度fi;
(4)判断退出:判断是否存在fi,即是否fi<FittnessThreshold,若有,选择该个体为最终解,退出;若种群代数g<MaxGeneration,则取当前最优适应度个体为最终解,退出;
(5)模拟退火法选择:以p=1/x的概率随机选择SAABadNum个适应度在后SAABadFitRatio的个体,设置x=x+1;
(6)轮盘赌法选择:取适应度前RWSGoodFitRatio个体P,用轮盘赌法选择P中个体,保证轮盘赌法选择的个体总数+模拟退火过程总数=GenNum;
(7)编码:将获得的新种群每个个体编码成格雷码;
(8)交叉:不放回的随机抽取两个个体,按交叉概率CrossRatio交叉,直到抽取出所有个体;
(9)变异:对每个个体,按变异概率MutationRatio进行变异;
(10)解码:对格雷码解码;
(11)更新种群代数:设置g=g+1,重复执行步骤(3-11),直至求得A1,然后进行第二轮的遗传算法求解,本申请实施例不再进行赘述。
205、将所述直线方程与所述曲线方程进行相交联立求解,得到所述直线方程与所述曲线方程的2个交点坐标,根据所述交点坐标以及所述建筑模型中的直线部分信息以及曲线部分信息渲染所述建筑模型的轮廓,并将除所述建筑模型以外的线段及曲线进行可视化隐藏,得到切分后的建筑模型轮廓。
对于本申请实施例,为了将得到完成、明确的建筑模型轮廓,将直线方程与曲线方程进行联立,求解得到交点坐标,其中,若交点为多个,则可以根据曲线部分信息确定出直线与曲线相交的2个交点,然后再根据直线部分信息以及曲线部分信息确定出整个建筑模型的轮廓,并进行渲染,以实现突出显示建筑模型轮廓的目的。而针对建筑模型以外的直线与曲线部分,为了避免用户进行还原查看,可以进行可视化隐藏,不再显示建筑模型以外的直线与曲线部分,从而得到切分后的建筑模型轮廓的轮廓。
206、将切分后的建筑模型分别存储至于所述坐标信息对应存储位置中,并在用户触发所述坐标信息时进行展示。
对于本申请实施例,为了便于用户再次进行查看当前坐标下平面中的建筑模型轮廓,将切分后的建筑模型存储至此坐标信息下对应的存储位置中,以便用户再次输入当前坐标信息后,后台系统不再进行计算,直接从存储位置中提取切分好的建筑模型进行展示。
本申请提供了另一种模型轮廓的切分方法,本申请实施例通过遗传算法求解曲线方 程参数建立曲线方程,并利用直线方程与曲线方程联立确定交点,按照交点剔除建筑模型轮廓以外的直线与曲线,以避免手动剔除出现的错误操作,简便、准确的确定出建筑模型的轮廓,提高轮廓的切分效率。
进一步的,作为对上述图1所示方法的实现,本申请实施例提供了一种模型轮廓的切分装置,如图5所示,该装置包括:提取单元31、建立单元32、剔除单元33。
提取单元31,用于提取建筑模型中的直线部分信息以及曲线部分信息;所述提取单元31为模型轮廓的切分装置执行提取建筑模型中的直线部分信息以及曲线部分信息的模块。
建立单元32,用于按照预设直线方程建立所述直线部分信息对应的直线方程,以及按照预设曲线方程建立所述曲线部分信息对应的曲线方程,所述预设曲线方程为y=a 0+a 1x 0.5+a 2x+a 3x 2+a 4x 3,其中,a 0,a 1,a 2,a 3,a 4为通过遗传算法求解得到的曲线方程参数;所述建立单元32为模型轮廓的切分装置执行按照预设直线方程建立所述直线部分信息对应的直线方程,以及按照预设曲线方程建立所述曲线部分信息对应的曲线方程的模块。
剔除单元33,用于将所述直线方程与所述曲线方程进行相交联立求解,按照相交后的交点剔除掉除所述建筑模型以外的线段及曲线,得到切分后的建筑模型轮廓。所述剔除单元33为模型轮廓的切分装置执行将所述直线方程与所述曲线方程进行相交联立求解,按照相交后的交点剔除掉除所述建筑模型以外的线段及曲线,得到切分后的建筑模型轮廓的模块。
本申请提供了一种模型轮廓的切分装置,与现有手动剔除的方式使得曲面墙体与直线墙体之前多余部分剔除的不够精确,容易出现误操作,导致接触点的确定比较困难,模型轮廓的切分效率较低相比,本申请实施例通过遗传算法求解曲线方程参数建立曲线方程,并利用直线方程与曲线方程联立确定交点,按照交点剔除建筑模型轮廓以外的直线与曲线,以避免手动剔除出现的错误操作,简便、准确的确定出建筑模型的轮廓,提高轮廓的切分效率。
进一步的,作为对上述图2所示方法的实现,本申请实施例提供了另一种模型轮廓的切分装置,如图6所示,该装置包括:提取单元41、建立单元42、剔除单元43、确定单元44、展示单元45。
提取单元41,用于提取建筑模型中的直线部分信息以及曲线部分信息;
建立单元42,用于按照预设直线方程建立所述直线部分信息对应的直线方程,以及 按照预设曲线方程建立所述曲线部分信息对应的曲线方程,所述预设曲线方程为y=a 0+a 1x 0.5+a 2x+a 3x 2+a 4x 3,其中,a 0,a 1,a 2,a 3,a 4为通过遗传算法求解得到的曲线方程参数;
剔除单元43,用于将所述直线方程与所述曲线方程进行相交联立求解,按照相交后的交点剔除掉除所述建筑模型以外的线段及曲线,得到切分后的建筑模型轮廓。
进一步地,所述建立单元42包括:
第一求解模块4201,用于从所述直线部分信息中提取位于直线上的任意2个样本坐标,并利用所述样本坐标求解所述直线部分信息对应的直线方程;
第二求解模块4202,用于针对预设曲线方程y=a 0+a 1x 0.5+a 2x+a 3x 2+a 4x 3,利用遗传算法分别进行第一轮的粗粒度求解以及第二轮的精确度求解,并结合求解的粗粒度求解值以及精确度求解值确定出所述曲线部分信息对应的曲线方程。
进一步地,所述第二求解模块4202,具体用于将所述预设曲线方程中的曲线方程参数作为参数值范围在第一预设阈值范围内的数值向量A,利用模拟退火法确定基于遗传算法的执行次数以及利用轮盘赌法优化基于遗传算法的样本个数;
所述第二求解模块4202,具体还用于按照所述执行次数以及所述样本个数执行第一轮的粗粒度遗传算法的所述数值向量A求解,得到粗粒度求解值A1,将所述粗粒度求解值A1的参数范围更新至第二预设阈值范围内;
所述第二求解模块4202,具体还用于按照所述执行次数以及所述样本个数执行第二轮的精确度遗传算法所述粗粒度求解值A1求解,得到精确求解值A2,将所述精确求解值A2确定为曲线方程参数,得到曲线方程。
进一步地,所述第二求解模块4202,具体还用于在进行遗传算法求解过程中,为所述第一轮的粗粒度遗传算法以及所述第二轮的精确度遗传算法分别配置第一适应度阈值、第二适应度阈值,并在交叉、变异遗传操作过程中通过格雷码进行编码、解码操作,并根据解码后的变异个体进行更新种群代数。
进一步地,所述剔除单元43,具体用于将所述直线方程与所述曲线方程进行相交联立求解,得到所述直线方程与所述曲线方程的2个交点坐标,根据所述交点坐标以及所述建筑模型中的直线部分信息以及曲线部分信息渲染所述建筑模型的轮廓,并将除所述建筑模型以外的线段及曲线进行可视化隐藏,得到切分后的建筑模型轮廓。
进一步地,所述装置还包括:
确定单元44,用于选取待进行曲线切分的三维立体建筑模型的中心点作为原点,分 别按照x轴、y轴、z轴方向进行可视化展示,根据输入的x轴、y轴、z轴方向的坐标信息确定所述三维立体建筑模型中的一个待进行曲线切分的二维建筑模型。
进一步地,所述装置还包括:
展示单元45,用于将切分后的建筑模型分别存储至于所述坐标信息对应存储位置中,并在用户触发所述坐标信息时进行展示。
本申请提供了另一种模型轮廓的切分装置,本申请实施例通过遗传算法求解曲线方程参数建立曲线方程,并利用直线方程与曲线方程联立确定交点,按照交点剔除建筑模型轮廓以外的直线与曲线,以避免手动剔除出现的错误操作,简便、准确的确定出建筑模型的轮廓,提高轮廓的切分效率。
根据本申请一个实施例提供了一种计算机非易失性可读存储介质,所述计算机非易失性可读存储介质存储有至少一计算机可读指令,该计算机可读指令可执行上述任意方法实施例中的模型轮廓的切分方法。
图7示出了根据本申请一个实施例提供的一种计算机设备的结构示意图,具体可以为一种终端,本申请具体实施例并不对终端的具体实现做限定。
如图7所示,该终端可以包括:处理器(processor)502、通信接口(Communications Interface)504、存储器(memory)506、以及通信总线508。
其中:处理器502、通信接口504、以及存储器506通过通信总线508完成相互间的通信。
通信接口504,用于与其它设备比如客户端或其它服务器等的网元通信。
处理器502,用于执行计算机可读指令510,具体可以执行上述模型轮廓的切分方法实施例中的相关步骤。
具体地,计算机可读指令510可以包括计算机可读指令代码,该计算机可读指令代码包括计算机可读指令。
处理器502可能是中央处理器CPU,或者是特定集成电路ASIC(Application Specific Integrated Circuit),或者是被配置成实施本申请实施例的一个或多个集成电路。终端包括的一个或多个处理器,可以是同一类型的处理器,如一个或多个CPU;也可以是不同类型的处理器,如一个或多个CPU以及一个或多个ASIC。
存储器506,用于存放计算机可读指令510。存储器506可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。
计算机可读指令510具体可以用于使得处理器502执行以下操作:
提取建筑模型中的直线部分信息以及曲线部分信息;
按照预设直线方程建立所述直线部分信息对应的直线方程,以及按照预设曲线方程建立所述曲线部分信息对应的曲线方程,所述预设曲线方程为y=a 0+a 1x 0.5+a 2x+a 3x 2+a 4x 3,其中,a 0,a 1,a 2,a 3,a 4为通过遗传算法求解得到的曲线方程参数;
将所述直线方程与所述曲线方程进行相交联立求解,按照相交后的交点剔除掉除所述建筑模型以外的线段及曲线,得到切分后的建筑模型轮廓。
显然,本领域的技术人员应该明白,上述的本申请的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的计算机可读指令代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本申请不限制于任何特定的硬件和软件结合。
以上所述仅为本申请的优选实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包括在本申请的保护范围之内。

Claims (20)

  1. 一种模型轮廓的切分方法,其特征在于,包括:
    提取建筑模型中的直线部分信息以及曲线部分信息;
    按照预设直线方程建立所述直线部分信息对应的直线方程,以及按照预设曲线方程建立所述曲线部分信息对应的曲线方程,所述预设曲线方程为y=a 0+a 1x 0.5+a 2x+a 3x 2+a 4x 3,其中,a 0,a 1,a 2,a 3,a 4为通过遗传算法求解得到的曲线方程参数;
    将所述直线方程与所述曲线方程进行相交联立求解,按照相交后的交点剔除掉除所述建筑模型以外的线段及曲线,得到切分后的建筑模型轮廓。
  2. 根据权利要求1所述的方法,其特征在于,所述按照预设直线方程建立所述直线部分信息对应的直线方程,以及按照预设曲线方程建立所述曲线部分信息对应的曲线方程包括:
    从所述直线部分信息中提取位于直线上的任意2个样本坐标,并利用所述样本坐标求解所述直线部分信息对应的直线方程;
    针对预设曲线方程y=a 0+a 1x 0.5+a 2x+a 3x 2+a 4x 3,利用遗传算法分别进行第一轮的粗粒度求解以及第二轮的精确度求解,并结合求解的粗粒度求解值以及精确度求解值确定出所述曲线部分信息对应的曲线方程。
  3. 根据权利要求2所述的方法,其特征在于,所述针对预设曲线方程y=a 0+a 1x 0.5+a 2x+a 3x 2+a 4x 3,利用遗传算法分别进行第一轮的粗粒度求解以及第二轮的精确度求解,并结合求解的粗粒度求解值以及精确度求解值确定出所述曲线部分信息对应的曲线方程包括:
    将所述预设曲线方程中的曲线方程参数作为参数值范围在第一预设阈值范围内的数值向量A,利用模拟退火法确定基于遗传算法的执行次数以及利用轮盘赌法优化基于遗传算法的样本个数;
    按照所述执行次数以及所述样本个数执行第一轮的粗粒度遗传算法的所述数值向量A求解,得到粗粒度求解值A1,将所述粗粒度求解值A1的参数范围更新至第二预设阈值范围内;
    按照所述执行次数以及所述样本个数执行第二轮的精确度遗传算法所述粗粒度求解值A1求解,得到精确求解值A2,将所述精确求解值A2确定为曲线方程参数,得到曲 线方程。
  4. 根据权利要求3所述的方法,其特征在于,所述方法还包括:
    在进行遗传算法求解过程中,为所述第一轮的粗粒度遗传算法以及所述第二轮的精确度遗传算法分别配置第一适应度阈值、第二适应度阈值,并在交叉、变异遗传操作过程中通过格雷码进行编码、解码操作,并根据解码后的变异个体进行更新种群代数,所述第一适应度阈值与所述第二适应度阈值分别用于确定第一轮的粗粒度求解值A1与第二轮的精确度求解值A2。
  5. 根据权利要求1所述的方法,其特征在于,所述将所述直线方程与所述曲线方程进行相交联立求解,按照相交后的交点剔除掉除所述建筑模型以外的线段及曲线,得到切分后的建筑模型轮廓包括:将所述直线方程与所述曲线方程进行相交联立求解,得到所述直线方程与所述曲线方程的2个交点坐标,根据所述交点坐标以及所述建筑模型中的直线部分信息以及曲线部分信息渲染所述建筑模型的轮廓,并将除所述建筑模型以外的线段及曲线进行可视化隐藏,得到切分后的建筑模型轮廓。
  6. 根据权利要求1所述的方法,其特征在于,所述提取建筑模型中的直线部分信息以及曲线部分信息之前,所述方法还包括:
    选取待进行曲线切分的三维立体建筑模型的中心点作为原点,分别按照x轴、y轴、z轴方向进行可视化展示,根据输入的x轴、y轴、z轴方向的坐标信息确定所述三维立体建筑模型中的一个待进行曲线切分的二维建筑模型。
  7. 根据权利要求6所述的方法,其特征在于,所述方法还包括:
    将切分后的建筑模型分别存储至于所述坐标信息对应存储位置中,并在用户触发所述坐标信息时进行展示。
  8. 一种模型轮廓的切分装置,其特征在于,包括:
    提取单元,用于提取建筑模型中的直线部分信息以及曲线部分信息;
    建立单元,用于按照预设直线方程建立所述直线部分信息对应的直线方程,以及按照预设曲线方程建立所述曲线部分信息对应的曲线方程,所述预设曲线方程为y=a 0+a 1x 0.5+a 2x+a 3x 2+a 4x 3,其中,a 0,a 1,a 2,a 3,a 4为通过遗传算法求解得到的曲线方程参数;
    剔除单元,用于将所述直线方程与所述曲线方程进行相交联立求解,按照相交后的交点剔除掉除所述建筑模型以外的线段及曲线,得到切分后的建筑模型轮廓。
  9. 根据权利要求8所述的装置,其特征在于,所述建立单元包括:第一求解模块,用于从所述直线部分信息中提取位于直线上的任意2个样本坐标,并利用所述样本坐标求解所述直线部分信息对应的直线方程;
    第二求解模块,用于针对预设曲线方程y=a 0+a 1x 0.5+a 2x+a 3x 2+a 4x 3,利用遗传算法分别进行第一轮的粗粒度求解以及第二轮的精确度求解,并结合求解的粗粒度求解值以及精确度求解值确定出所述曲线部分信息对应的曲线方程。
  10. 根据权利要求9所述的装置,其特征在于,所述第二求解模块,具体用于将所述预设曲线方程中的曲线方程参数作为参数值范围在第一预设阈值范围内的数值向量A,利用模拟退火法确定基于遗传算法的执行次数以及利用轮盘赌法优化基于遗传算法的样本个数;按照所述执行次数以及所述样本个数执行第一轮的粗粒度遗传算法的所述数值向量A求解,得到粗粒度求解值A1,将所述粗粒度求解值A1的参数范围更新至第二预设阈值范围内;按照所述执行次数以及所述样本个数执行第二轮的精确度遗传算法所述粗粒度求解值A1求解,得到精确求解值A2,将所述精确求解值A2确定为曲线方程参数,得到曲线方程。
  11. 根据权利要求10所述的装置,其特征在于,所述第二求解模块,具体还用于在进行遗传算法求解过程中,为所述第一轮的粗粒度遗传算法以及所述第二轮的精确度遗传算法分别配置第一适应度阈值、第二适应度阈值,并在交叉、变异遗传操作过程中通过格雷码进行编码、解码操作,并根据解码后的变异个体进行更新种群代数。
  12. 根据权利要求8所述的装置,其特征在于,所述剔除单元,具体用于将所述直线方程与所述曲线方程进行相交联立求解,得到所述直线方程与所述曲线方程的2个交点坐标,根据所述交点坐标以及所述建筑模型中的直线部分信息以及曲线部分信息渲染所述建筑模型的轮廓,并将除所述建筑模型以外的线段及曲线进行可视化隐藏,得到切分后的建筑模型轮廓。
  13. 根据权利要求8所述的装置,其特征在于,所述装置还包括:确定单元,用于选取待进行曲线切分的三维立体建筑模型的中心点作为原点,分别按照x轴、y轴、z轴方向进行可视化展示,根据输入的x轴、y轴、z轴方向的坐标信息确定所述三维立体建筑模型中的一个待进行曲线切分的二维建筑模型。
  14. 根据权利要求8所述的装置,其特征在于,所述装置还包括:展示单元,用于将切分后的建筑模型分别存储至于所述坐标信息对应存储位置中,并在用户触发所述坐 标信息时进行展示。
  15. 一种非易失性可读存储介质,所述非易失性可读存储介质中存储有至少一计算机可读指令,所述计算机可读指令使处理器执行模型轮廓的切分方法,包括:
    提取建筑模型中的直线部分信息以及曲线部分信息;按照预设直线方程建立所述直线部分信息对应的直线方程,以及按照预设曲线方程建立所述曲线部分信息对应的曲线方程,所述预设曲线方程为y=a 0+a 1x 0.5+a 2x+a 3x 2+a 4x 3,其中,a 0,a 1,a 2,a 3,a 4为通过遗传算法求解得到的曲线方程参数;将所述直线方程与所述曲线方程进行相交联立求解,按照相交后的交点剔除掉除所述建筑模型以外的线段及曲线,得到切分后的建筑模型轮廓。
  16. 根据权利要求15所述的非易失性可读存储介质,其特征在于,所述计算机可读指令使处理器执行所述按照预设直线方程建立所述直线部分信息对应的直线方程,以及按照预设曲线方程建立所述曲线部分信息对应的曲线方程包括:
    从所述直线部分信息中提取位于直线上的任意2个样本坐标,并利用所述样本坐标求解所述直线部分信息对应的直线方程;针对预设曲线方程y=a 0+a 1x 0.5+a 2x+a 3x 2+a 4x 3,利用遗传算法分别进行第一轮的粗粒度求解以及第二轮的精确度求解,并结合求解的粗粒度求解值以及精确度求解值确定出所述曲线部分信息对应的曲线方程。
  17. 根据权利要求16所述的非易失性可读存储介质,其特征在于,所述计算机可读指令使处理器执行所述针对预设曲线方程y=a 0+a 1x 0.5+a 2x+a 3x 2+a 4x 3,利用遗传算法分别进行第一轮的粗粒度求解以及第二轮的精确度求解,并结合求解的粗粒度求解值以及精确度求解值确定出所述曲线部分信息对应的曲线方程包括:
    将所述预设曲线方程中的曲线方程参数作为参数值范围在第一预设阈值范围内的数值向量A,利用模拟退火法确定基于遗传算法的执行次数以及利用轮盘赌法优化基于遗传算法的样本个数;按照所述执行次数以及所述样本个数执行第一轮的粗粒度遗传算法的所述数值向量A求解,得到粗粒度求解值A1,将所述粗粒度求解值A1的参数范围更新至第二预设阈值范围内;按照所述执行次数以及所述样本个数执行第二轮的精确度遗传算法所述粗粒度求解值A1求解,得到精确求解值A2,将所述精确求解值A2确定为曲线方程参数,得到曲线方程。
  18. 一种计算机设备,包括:处理器、存储器、通信接口和通信总线,所述处理器、 所述存储器和所述通信接口通过所述通信总线完成相互间的通信;
    所述存储器用于存放至少一计算机可读指令,所述计算机可读指令使所述处理器执行模型轮廓的切分方法,包括:
    提取建筑模型中的直线部分信息以及曲线部分信息;按照预设直线方程建立所述直线部分信息对应的直线方程,以及按照预设曲线方程建立所述曲线部分信息对应的曲线方程,所述预设曲线方程为y=a 0+a 1x 0.5+a 2x+a 3x 2+a 4x 3,其中,a 0,a 1,a 2,a 3,a 4为通过遗传算法求解得到的曲线方程参数;将所述直线方程与所述曲线方程进行相交联立求解,按照相交后的交点剔除掉除所述建筑模型以外的线段及曲线,得到切分后的建筑模型轮廓。
  19. 根据权利要求18所述的计算机设备,其特征在于,所述计算机可读指令使所述处理器执行所述计算机可读指令使处理器执行所述按照预设直线方程建立所述直线部分信息对应的直线方程,以及按照预设曲线方程建立所述曲线部分信息对应的曲线方程包括:
    从所述直线部分信息中提取位于直线上的任意2个样本坐标,并利用所述样本坐标求解所述直线部分信息对应的直线方程;针对预设曲线方程y=a 0+a 1x 0.5+a 2x+a 3x 2+a 4x 3,利用遗传算法分别进行第一轮的粗粒度求解以及第二轮的精确度求解,并结合求解的粗粒度求解值以及精确度求解值确定出所述曲线部分信息对应的曲线方程。
  20. 根据权利要求19所述的计算机设备,其特征在于,所述计算机可读指令使所述处理器执行所述计算机可读指令使处理器执行所述针对预设曲线方程y=a 0+a 1x 0.5+a 2x+a 3x 2+a 4x 3,利用遗传算法分别进行第一轮的粗粒度求解以及第二轮的精确度求解,并结合求解的粗粒度求解值以及精确度求解值确定出所述曲线部分信息对应的曲线方程包括:将所述预设曲线方程中的曲线方程参数作为参数值范围在第一预设阈值范围内的数值向量A,利用模拟退火法确定基于遗传算法的执行次数以及利用轮盘赌法优化基于遗传算法的样本个数;按照所述执行次数以及所述样本个数执行第一轮的粗粒度遗传算法的所述数值向量A求解,得到粗粒度求解值A1,将所述粗粒度求解值A1的参数范围更新至第二预设阈值范围内;按照所述执行次数以及所述样本个数执行第二轮的精确度遗传算法所述粗粒度求解值A1求解,得到精确求解值A2,将所述精确求解值A2确定为曲线方程参数,得到曲线方程。
PCT/CN2018/109865 2018-07-19 2018-10-11 模型轮廓的切分方法及装置、存储介质、计算机设备 Ceased WO2020015210A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810797535.4 2018-07-19
CN201810797535.4A CN109271654B (zh) 2018-07-19 2018-07-19 模型轮廓的切分方法及装置、存储介质、终端

Publications (1)

Publication Number Publication Date
WO2020015210A1 true WO2020015210A1 (zh) 2020-01-23

Family

ID=65153062

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/109865 Ceased WO2020015210A1 (zh) 2018-07-19 2018-10-11 模型轮廓的切分方法及装置、存储介质、计算机设备

Country Status (2)

Country Link
CN (1) CN109271654B (zh)
WO (1) WO2020015210A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111310933A (zh) * 2020-02-11 2020-06-19 深圳前海微众银行股份有限公司 特征依赖图计算优化方法、装置、设备及可读存储介质
CN112069730A (zh) * 2020-09-02 2020-12-11 彭涛 一种3d打印的立体曲线获取方法及装置
CN112435337A (zh) * 2020-11-13 2021-03-02 郑亮 一种景观可视域分析方法及系统
CN116305653A (zh) * 2023-03-27 2023-06-23 广东鼎泰高科技术股份有限公司 钻针的建模方法、电子设备及计算机可读存储介质
CN117828709A (zh) * 2022-12-31 2024-04-05 美象信息科技有限公司 一种建筑曲面的拆片方法及装置

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111192276B (zh) * 2019-12-18 2024-04-09 中国平安财产保险股份有限公司 图像处理方法、装置、电子设备及存储介质
CN113076040B (zh) * 2021-04-29 2022-10-25 久瓴(江苏)数字智能科技有限公司 幕墙的预览方法、系统及存储介质
CN114444183B (zh) * 2022-01-25 2025-03-04 大元建业集团股份有限公司 一种基于函数关系的复杂墙体建模方法
CN117010308A (zh) * 2022-04-28 2023-11-07 北京小米移动软件有限公司 测试方法、装置、存储介质及电子设备
CN115423980B (zh) * 2022-09-08 2023-12-29 如你所视(北京)科技有限公司 模型展示处理方法、装置以及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101373543A (zh) * 2008-09-28 2009-02-25 武汉大学 三维网格模型的快速剖切方法
CN105279756A (zh) * 2015-10-19 2016-01-27 天津理工大学 基于自适应区域分割的缺口圆弧零件尺寸视觉检测方法
CN107146280A (zh) * 2017-05-09 2017-09-08 西安理工大学 一种基于切分的点云建筑物重建方法

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104809689B (zh) * 2015-05-15 2018-03-30 北京理工大学深圳研究院 一种基于轮廓的建筑物点云模型底图配准方法
CN105446269B (zh) * 2016-01-15 2018-11-02 广东工业大学 基于遗传算法的轮廓曲线数控代码生成方法及其数控机床
US10565324B2 (en) * 2016-07-26 2020-02-18 Mitek Holdings, Inc. Managing a set of candidate spatial zones associated with an architectural layout
CN114626157A (zh) * 2022-03-16 2022-06-14 南京维拓科技股份有限公司 一种基于数字化模型的实体轮廓曲线抽取方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101373543A (zh) * 2008-09-28 2009-02-25 武汉大学 三维网格模型的快速剖切方法
CN105279756A (zh) * 2015-10-19 2016-01-27 天津理工大学 基于自适应区域分割的缺口圆弧零件尺寸视觉检测方法
CN107146280A (zh) * 2017-05-09 2017-09-08 西安理工大学 一种基于切分的点云建筑物重建方法

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111310933A (zh) * 2020-02-11 2020-06-19 深圳前海微众银行股份有限公司 特征依赖图计算优化方法、装置、设备及可读存储介质
CN111310933B (zh) * 2020-02-11 2024-02-02 深圳前海微众银行股份有限公司 特征依赖图计算优化方法、装置、设备及可读存储介质
CN112069730A (zh) * 2020-09-02 2020-12-11 彭涛 一种3d打印的立体曲线获取方法及装置
CN112069730B (zh) * 2020-09-02 2024-01-02 彭涛 一种3d打印的立体曲线获取方法及装置
CN112435337A (zh) * 2020-11-13 2021-03-02 郑亮 一种景观可视域分析方法及系统
CN117828709A (zh) * 2022-12-31 2024-04-05 美象信息科技有限公司 一种建筑曲面的拆片方法及装置
CN116305653A (zh) * 2023-03-27 2023-06-23 广东鼎泰高科技术股份有限公司 钻针的建模方法、电子设备及计算机可读存储介质
CN116305653B (zh) * 2023-03-27 2024-06-04 广东鼎泰高科技术股份有限公司 钻针的建模方法、电子设备及计算机可读存储介质

Also Published As

Publication number Publication date
CN109271654A (zh) 2019-01-25
CN109271654B (zh) 2023-04-18

Similar Documents

Publication Publication Date Title
WO2020015210A1 (zh) 模型轮廓的切分方法及装置、存储介质、计算机设备
CN113963110B (zh) 纹理图生成方法、装置、电子设备及存储介质
CN115330940B (zh) 一种三维重建方法、装置、设备和介质
CN112562069B (zh) 三维模型的构造方法、装置、设备和存储介质
CN112652036A (zh) 道路数据的处理方法、装置、设备及存储介质
CN115482358B (zh) 一种三角网格曲面的生成方法、装置、设备及存储介质
CN113963011A (zh) 图像识别方法、装置、电子设备及存储介质
CN112802037A (zh) 人像提取方法、装置、电子设备及存储介质
CN115222879A (zh) 一种模型减面处理方法、装置、电子设备及存储介质
CN113379932A (zh) 人体三维模型的生成方法和装置
CN117893688A (zh) 一种基于三维建模的建筑幕墙测量施工方法及系统
CN114092673A (zh) 图像处理的方法、装置、电子设备和存储介质
CN114708374A (zh) 虚拟形象生成方法、装置、电子设备和存储介质
CN113012259A (zh) 一种基于三角剖分算法对凹多边形填充处理的方法
CN114494818B (zh) 图像处理方法、模型训练方法、相关装置及电子设备
CN114155508B (zh) 一种道路变化检测方法、装置、设备以及存储介质
CN114972675A (zh) 建筑物的三维点云简化方法
CN114549752A (zh) 三维图形数据处理方法、装置、设备、存储介质及产品
CN114187318A (zh) 图像分割的方法、装置、电子设备以及存储介质
CN116071409B (zh) 导航图像配准方法、装置、设备和存储介质
CN118779973A (zh) Bim模型生成方法、装置、设备、介质以及程序产品
CN114298953A (zh) 障碍物检测方法及装置
CN107577899B (zh) 一种岩体随机结构面的三维离散元表征方法
CN114758391B (zh) 发型图像确定方法、装置、电子设备、存储介质及产品
CN113012281A (zh) 人体模型的确定方法、装置、电子设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18926620

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 17/05/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18926620

Country of ref document: EP

Kind code of ref document: A1