Disclosure of Invention
The present invention aims to solve at least one of the technical problems existing in the prior art. Therefore, an object of the present invention is to provide an automatic generation system and generation method for a planning and design scheme of a residential building, which combines a computer algorithm with a virtual reality technology to realize automatic generation of 3D effects of the planning and design scheme of the residential building in a fantasy engine UE4, thereby greatly reducing the calculation amount of a designer of the building, facilitating verification and correction of the designer, and improving the working efficiency.
In order to solve the above technical problems, the present invention provides an automatic generation system for a planning and design scheme of a residential building, including:
the hardware comprises a computer and virtual simulation equipment, wherein the computer is in signal connection with the virtual simulation equipment, the virtual simulation equipment comprises a junction box, a handle, a head-mounted display and a vertical sensor, and the handle, the head-mounted display and the vertical sensor are respectively and electrically connected with the junction box;
the system comprises software, a server and a user interface, wherein the software comprises a bottom logic module, a UI function module, a gridding module, a model data module, a household proportioning module, an automatic generation module, a scheme optimization module, a sunlight analysis module, a scheme adjustment module, an output scheme module, an archiving module, a link network module and a permission authentication module which are arranged in the computer;
the virtual simulation device is used in cooperation with the software.
The UI function module comprises a UI operation interface unit, a 3D UI display and interaction unit, a module and interface binding unit, a plurality of interface switching units, a user input unit and a scheme output unit.
As an improvement, the gridding module comprises an input parameter obtaining unit, a grid coordinate generating unit and an unavailable grid removing unit, and is used for obtaining output parameters, generating grid coordinates and removing unavailable grids.
The automatic generation module comprises an available grid coordinate acquisition unit, a random generation unit according to specifications and a visual output unit, and is used for acquiring the available grid coordinates, generating a building body according to algorithm logic and outputting the generated building body.
As an improvement, the scheme adjustment module comprises an adjusted grid coordinate data unit, a re-elimination unavailable unit and a regeneration scheme and output unit, and is used for acquiring the adjusted grid coordinate data, eliminating the unavailable grid, regenerating the scheme and outputting the same.
As an improvement, the bottom logic module comprises a model unit, a View unit and a visual output unit.
A method of automatically generating a residential building plan design, the method comprising the steps of:
s1, setting a UI interface
S1-1, adding the number of the required land parcels after entering a setting interface, and respectively inputting economic and technical indexes of different land parcels;
s1-2, inputting coordinates of a building control line to determine a contour formed by the building control line;
s1-3, binding a UI interface with a background, and carrying out data transmission;
s2, terrain drawing: reading coordinates of different land block building control lines, and drawing in the illusion engine UE4 through a drawing tool;
S3, resetting the lens: the lens is placed at a proper position through resetting, and X in the current land block is obtained max And Y max For the coordinates of the lens in the X, Y direction, if the Z-axis height is not equal to 100m, the Z-axis height is determined by X, Y, if X>Y, z=x/2, if X<Y, z=y/2, and if the Z-axis height is equal to 100m, the Z-axis height is set to 100m;
s4, selecting a model to be used for the land parcel by the editing interface: selecting any n models in a model library, importing the models in the model library through a datasmith plug-in, importing the models to require that different types of patterns can be input simultaneously according to requirements, registering related resources of the models through a json tool, and classifying and naming the models with the layers;
s5, household ratio: obtaining a building model selected by an editing interface, reading the square meters of the house types related to the model through a json tool, arranging the house types from small to large according to the square meters, adjusting the duty ratio of each house type according to the requirement, taking the duty ratio as an index for generating strong row, counting the types of the buildings which are discharged and the duty ratio of the current type at the same time when the buildings are discharged at random coordinate points each time, comparing the duty ratio with the target duty ratio, and exiting the random coordinate points when the target duty ratio and the volume ratio meet the requirement at the same time, and automatically generating the model;
S6, generating design scheme by using strong rank algorithm
S6-1, reading economic and technical indexes of different plots input in a UI interface set in S1, house type proportion in S5 and a model selected for use in S4, dividing the different plots into grids of 1X 1, clearing the existing buildings in the space, setting the state of each point to be unused, and ensuring that all points in the plots are in an unused state;
s6-2, setting the unit numbers of the buildings with different heights according to actual requirements, and preferentially placing the buildings with more unit numbers, wherein the unit numbers are gradually decreased;
s6-3, setting a coordinate point of a building as a coordinate of the upper left corner of the building, and taking whether different limiting conditions in economic and technical indexes are met or not as conditions for circulation of random coordinate points, wherein the circulation is carried out according to the following steps: a. a coordinate point of a random building; b. determining the number of units, the model and the area coefficient of the placed building according to the position relation of the coordinate points; c. judging whether the fireproof space and the building space between the building and other buildings at the coordinate point meet the requirements and whether the building is in the current land or not; d. if all the above are satisfied, the point can be placed in a building; e. setting a point within the building's occupied land as used; f. calculating economic and technical indexes after the building is placed, if the limit of the economic and technical indexes is exceeded at the moment, the building is destroyed, and the whole scheme design is finished; otherwise, continuing to circulate, and then calculating the path mark of the corresponding building in json according to the length, width and height corresponding to the FVector, and outputting a corresponding result to generate a building design scheme;
S7, the scheme is optimized
S7-1, CV extracting topography
S7-1-1, edge extraction
S7-1-1-1, gaussian blur: the Gaussian filtering is linear smoothing filtering, mainly used for eliminating Gaussian noise, and is a process of carrying out weighted average on the whole image, and based on a two-dimensional Gaussian function, a weight matrix and a Gaussian kernel are constructed, and each pixel point is subjected to filtering treatment;
s7-1-1-2, gray conversion: adding a conversion format to the Gaussian blurred image, and converting a BGR format into a gray image;
s7-1-1-3, gradient calculation: acquiring a gray level converted image, and respectively calculating sobel operators in the X, Y axial direction;
s7-1-1-4, non-maximum signal suppression: traversing all the pixel points, if the point is the maximum value on the same gradient of surrounding pixel points, reserving the point, otherwise, suppressing the point;
s7-1-1-5, and outputting a binary graph by a high threshold value and a low threshold value: after the operation is finished, the formed virtual edge is processed again and a binary pattern is output;
s7-1-2, angle extraction
S7-1-2-1, hough transform data: invoking a Hough transform function, and extracting straight line segment set data;
s7-1-2-2, and determining a straight line by two points: traversing the data after Hough transformation, and determining a straight line every two points;
S7-1-2-3, floating point number, slope of straight line: converting the data type after Hough transformation into floating point number, and calculating the slope of a straight line;
s7-1-2-4, arctangent and radian degree of rotation: converting the radian into a degree according to the arctangent value of the slope;
s7-1-2-5, updating degrees: updating the inclination angles corresponding to all the straight lines to degrees;
s7-2, judging whether the terrain has an inclination condition or not: judging whether the inclination is horizontal or vertical according to the data obtained in the first step;
s7-3, openCV identifies the topography shape
S7-3-1, after the topography is drawn, converting the topography into jpg format by using the photographing function of the illusion engine UE 4;
s7-3-2, loading the image shot by S7-3-1 by using Imread ();
s7-3-3, using an S7-1-1 edge extraction algorithm to obtain an edge contour of the image;
s7-3-4, detecting whether a curve segment is contained in the image through Hough transformation, and marking the curve segment as 0 if the curve segment is contained in the image; if the image has only straight line segments, judging the shape of the image by combining different characteristic factors including polygonal approximation, length, area and aspect ratio of the outline, and marking the shape as 1;
s7-4, recognizing the arrangement and adjustment of the topography shape to the building in the existing scheme according to OpenCV
S7-4-1, when the terrain identification is 0, the building is horizontally arranged;
S7-4-2, when the terrain is identified as 1, adjusting the building according to the trend of the terrain;
s7-4-3, dividing the terrain under the condition that the part of the terrain is 0 and the part of the terrain is 1, and respectively carrying out corresponding arrangement adjustment on different areas;
s7-5, bp training model: the method for reading the picture with high color contrast and high definition comprises the following steps:
s7-5-1, reading key feature data;
s7-5-2, setting training objects and prediction data;
s7-5-3, carrying out normalization processing on data in the training object;
s7-5-4, constructing a Bp nerve grid;
s7-5-5, setting training parameters of the grid, including training times, learning efficiency and errors of training targets;
s7-5-6, bp training;
s7-5-7, normalizing the test sample data;
s7-5-8, and predicting results;
s7-5-9, comparing actual and predicted errors;
s7-5-10, comparing actual and predicted results;
s7-5-11, if the comparison condition of the two is poor, adjusting a Bp training model;
s7-6, if the situation of unreleased adjustment occurs in the adjustment process, reasonably adjusting by using a scheme adjustment module;
s8, sunlight analysis
S8-1, calculating declination angle: determining local longitude and latitude, and converting local time into an earth rotation time angle at a corresponding moment;
S8-2, calculating sun time, sun altitude and sun azimuth: determining the angular position of the sun through the solar altitude and the solar azimuth;
s8-3, carrying out sunlight analysis on the east, west and south parts;
s9, outputting sunlight analysis results and design scheme
S9-1, outputting a sunlight analysis result: dividing a plan view of the east, west and south of a building into grids of 1 multiplied by 1, marking the sunlight time of each grid in sequence by taking an hour as a unit, representing different sunlight times by different colors, and displaying the specific sunlight time of each grid on the grid until the specific sunlight time is accurate to the position behind a decimal point;
s9-2, design scheme output: the output scheme is a top view of the design scheme and carries out data marking, and the method comprises the steps of outputting economic and technical indexes, building sizes, building spacing buildings, building and boundary lines, ground boundary lines and building control lines of a current land block, wherein the building sizes are the sizes of minimum circumscribed rectangles, and the building and the boundary lines are the distances between closest points parallel to the boundary lines;
s10, archiving: the first part is that after the design scheme step of rearranging the design scheme generated in the step S6 by the scheme optimization algorithm and analyzing the sunlight of the step S8 to be qualified, the economic and technical indexes (total land area, net land area, total building area, residence part area, business part area, other part areas, building occupied area, volume rate and building density) of the current land, the coordinate points of the building control line of the land, the coordinate points of the building, the model of the building, the total number and the occupied ratio of each house type and each floor total number and the sunlight analysis result of the scheme design diagram are obtained and stored by json tools; the second part is to select the saved scheme to restore the saved design through the archived record;
S11, immersive VR experience: and S6, after a step of generating a design scheme by using a forced-ventilated algorithm, setting a scene for the generated scheme, and experiencing the actual situation of the scheme after the scheme is particularly landed, wherein the actual sunlight change is actually felt for simulating the winter sun sunlight situation.
As an improvement, the model naming principle is layer number+building+model number, wherein the format of the name to be independently named is layer number-what model the number of households of the model is.
As improvement, the solar analysis of the east, west and south three parts in the S8-3 is as follows:
east: dividing an east wall into grids of 1m multiplied by 1m, circularly calculating the sunlight influence of each building on each grid, wherein the calculation time is winter to date or severe cold day, the sunlight influence statistics of eight hours is carried out by 0.1 hour, and the accumulated result is sunlight data of the grids;
western: dividing an east wall into grids of 1m multiplied by 1m, circularly calculating the sunlight influence of each building on each grid, wherein the calculation time is winter to day or severe cold day, the sunlight influence statistics of eight hours is 0.1 hour, the accumulated result is sunlight data of the grids, each grid needs to meet the minimum two hours of sunlight, and the grids are qualified if the grids meet the minimum two hours of sunlight, otherwise, the grids are unqualified;
South: dividing a south wall into grids of 1m multiplied by 1m, circularly calculating the sunshine influence of each building on each grid, calculating the sunshine influence statistics from eight points in winter to four points in the morning to four points in the afternoon or the cold day, calculating whether each grid is shielded by other buildings every 0.1 hour, namely, calculating the shadow range of each building every 0.1 hour, judging whether each grid is in the shadow range, accumulating the sunshine data of each grid of 1m multiplied by 1m if each grid is not in the shadow range, namely, not shielded, for 0.1 hour, and calculating the sunshine data of each grid of 1m multiplied by 1m after eight hours.
As an improvement, the data label in S9-2 further includes a distance between the surrounding building and the building, including a straight line distance and a bevel edge distance, and if the building is closer to the building control line, the distance between the building and the building control line is labeled, the building number, the number of floors, and the rectangular range of the minimum accommodation of the building are labeled, and the computer interface display contents include: (1) total building area, volume fraction, building density; (2) a main technical economic index table; (3) After clicking a certain block, displaying all relevant attributes; and (4) marking building numbers, building heights and floor numbers on the top layer of the square block.
Compared with the prior art, the invention has the advantages that:
the system plans the terrain on the basis of the whole layout and algorithm, can generate a plurality of different schemes at one time, selectively adjusts, outputs in batches, and gives the calculation process to a computer, thereby being efficient and accurate. The 3D effect display of the planning scheme can be conveniently realized based on the functional application of the illusion engine based on the computer algorithm, and the advanced computer technology is used for providing technical support for the building design with large operand. The system has strong adaptability and supports various system operations, on the other hand, the system has the advantages of openness, has strong functions, and can be suitable for various scenes such as residential building planning design, road generation, landscape design and the like along with the expansion of the functional modules. The customized function is convenient, new functions can be added according to different project conditions, the method is simple and flexible to use, model parameters can be adjusted in time, schemes can be regenerated, multiple schemes can be selected freely for observation, and a viewing angle observation scheme model can be adjusted freely.
The foregoing summary is for the purpose of the specification only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features of the present invention will become apparent by reference to the drawings and the following detailed description.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
In the description of the present application, it should be noted that, unless explicitly specified and limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be either fixedly connected, detachably connected, or integrally connected, for example; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communicated with the inside of two elements or the interaction relationship of the two elements. The specific meaning of the terms in this application will be understood by those of ordinary skill in the art as the case may be.
The present invention will be described in further detail with reference to the accompanying drawings.
Referring to fig. 1 to 14, an automatic generation system for a residential building planning design scheme includes:
the hardware comprises a computer and virtual simulation equipment, the computer is in signal connection with the virtual simulation equipment, the virtual simulation equipment comprises a junction box, a handle, a head-mounted display and a vertical sensor, and the handle, the head-mounted display and the vertical sensor are respectively and electrically connected with the junction box;
the software comprises a bottom logic module, a UI function module, a gridding module, a model data module, a household matching module, an automatic generation module, a scheme optimization module, a sunlight analysis module, a scheme adjustment module, an output scheme module, an archiving module, a link internet module, a permission authentication module and the like which are arranged in the computer;
the software adopts the illusion engine UE4 as an operation display platform, the source codes are all programmed by C++ autonomous controllable innovation, each functional module can realize immersive virtual reality experience under the environment of the illusion engine UE4, the mode of one-key generation after data input is achieved, and the completed planning scheme is in accordance with the legal, regulation and technical specification regulation requirements of the urban and rural planning method of the people's republic of China, the management method of the people's republic of China, the common central national institute of China about establishing a national and local space planning system and supervising and implementing a plurality of opinions and the like.
The underlying logic module is used for the underlying architecture, and the system uses a model-view-controller pattern, also called MVC pattern, to divide the entire interactive application into 3 parts: 1. and (3) model: including core functions and models; view: displaying information, namely a UI, to a user; 3. and (3) a controller: input data of the user is processed. The virtual simulation device is matched with software for use, and the UI functional module comprises a UI operation interface unit, a 3D UI display and interaction unit, a module and interface binding unit, a plurality of interface switching units, a user input unit and a scheme output unit; the gridding module comprises an input parameter obtaining unit, a grid coordinate generating unit and an unavailable grid removing unit, and is used for obtaining output parameters, generating grid coordinates and removing unavailable grids; the model data module comprises a house type contour conversion algorithm unit, a house type input data storage functional unit and a model import unit; the household type proportioning module comprises a household type obtaining unit and a household type ratio inputting unit, wherein the household type obtaining unit is used for customizing the ratio of each household type through a user and generating the demand according to the adjusted ratio; the automatic generation module comprises an available grid coordinate acquisition unit, a random generation unit according to specifications and a visual output unit, and is used for acquiring the available grid coordinates, generating a building body according to algorithm logic and outputting the generated building body; the scheme optimization module comprises an edge extraction unit, an angle extraction unit, an inclination adjustment unit and a Bp training unit, and is used for learning a large amount of model data by a machine to optimize the current design scheme; the sunlight analysis module comprises a local longitude and latitude and analysis date unit, a sunlight range determining unit and a sunlight condition calculating unit, wherein the sunlight condition calculating unit is used for calculating the condition of east, west and south sunlight of a building and analyzing whether an automatically generated scheme meets the national requirement on basic sunlight; the scheme adjusting module comprises a generated grid coordinate data obtaining unit, an unavailable removing unit, a regenerated scheme unit, an angle adjusting unit and an output unit, wherein the angle adjusting unit and the output unit are used for obtaining adjusted grid coordinate data, removing unavailable grids, regenerating a scheme, adjusting the building angle and outputting the same; the output scheme module comprises an automatic generation scheme design total graph output unit and a building sunshine condition output unit, and is used for designing total graph output and building economic parameter index chart output, and simultaneously is used for outputting the east-west three-face sunshine condition of each building in the design scheme, including sunshine time output and color board mapping output; the archiving module comprises a unit for acquiring the current design scheme and the economic and technical index table, a unit for storing the design scheme and a unit for restoring the stored design scheme, and is used for storing the design scheme and restoring the design scheme; the link internet module is used for accessing internet transmission data and other related operations when the system is used on line, so that a user can conveniently form a local area network or a remote network for use; the permission authentication module is used for authorizing a user to use the system resource, and the virtual simulation equipment adopts HTC VIVE.
Module function implementation
1. UI function module
1.1 user input
The reference automatic generation technical scheme comprises the following steps: 1. inputting a condition;
1.2 Generation scheme display
The reference automatic generation technical scheme comprises the following steps: 2. outputting conditions;
1.3 scheme output
And selecting the generated display scheme and then converting the selected display scheme into a single file for outputting.
2. Gridding module
2.1 obtaining output parameters
User input obtained by the UI interface is stored in the structure body, so that the user input is conveniently invoked at any time;
2.2 gridding coordinate Generation
Calling the length and width of the terrain, generating a grid coordinate system according to the numerical value of the terrain, and judging whether a single grid can be judged by using a bool;
2.3 unavailable grid exclusion
The occupied grid coordinates are called to make the bool value be wire.
3. Automatic generation module
3.1 obtaining available grid coordinates
The grid coordinate system is obtained again, and the grid coordinate with the bool value of false is obtained through screening, which represents that the grid coordinate system is available;
3.2 random Generation scheme according to specification
Generating a building body according to the algorithm logic on the available grids according to the building specification;
3.3 visual output
And outputting the grid coordinates and the grid bool values occupied by the generated building body, and updating the UI interface.
4. Scheme adjustment module
The output parameters are obtained through multiplexing, the unavailable grids are removed, and the automatic generation module is used for automatically generating the output parameters, after the forced arrangement or the optimization scheme is adopted, the local land parcels can be further arranged into a building, and under the condition that the local land parcels exceed a building control line, the angle of the residential building is only required to be adjusted, so that the residential building is positioned in the building control line.
5. Authority authentication module
To ensure the rights of the developer, the software is bound by one machine and one code so that the software cannot be used on unauthorized computers.
An automatic generation method of a residential building planning design scheme, comprising the following steps:
s1, setting a UI interface
S1-1, adding the required land quantity after entering a setting interface, and respectively inputting economic and technical indexes of different land areas, wherein the economic and technical indexes comprise total land area, net land area, commercial part area, other part area, volume rate and building density, and the total land area is set to 72686m as shown in figure 3 2 The net floor area is set to 72686m 2 Commercial part area was set to 16055m 2 Other partsThe area is set to 0m 2 The volume ratio is set to 1.19, and the building density is set to 0.21;
s1-2, inputting coordinates of building control lines of all plots, and determining outlines formed by the building control lines;
s1-3, binding a UI interface with a background, and carrying out data transmission;
s2: and (3) terrain drawing: reading the coordinates of building control lines of different plots, and drawing in the illusion engine UE4 through a drawing tool, as shown in FIG. 4;
s3: lens resetting: the lens is placed at a proper position through resetting, and X in the current land block is obtained max And Y max For the coordinates of the lens in the X, Y direction, if the Z-axis height is not equal to 100m, the Z-axis height is determined by X, Y, if X>Y, z=x/2, if X<Y, z=y/2, and if the Z-axis height is equal to 100m, the Z-axis height is set to 100m;
s4: the editing interface selects the model to be used for the parcel: selecting any n models in a model library as shown in fig. 5, wherein the design of the models comprises 01-06 layers, 07-11 layers, 12-18 layers and 19-33 layers of four different house types, the models in the model library are imported through a datasmith plug-in, different types of models can be simultaneously input according to requirements by importing the models, building blocks with different house types and different heights can be simultaneously built like a block, relevant resources of the models are registered through json tools, the models with the layers are classified and named, and the model naming principle is as follows: layer number + building + model number, e.g. 6building1 means the first model of a total of 6 layers of building, wherein the format of the name to be named separately is: the number of layers, i.e. what number of households H-model of the model is, for example, 6-2H-001 means that the total number of the models is 6, namely, the first model with two households, and then the key parameters such as the lowest height and the highest height of the model, the total square meters, the length, the width, the household type composition, the total number of households, the change of each household, the square meters, the contour coordinates and the like are confirmed;
S5: the room type ratio: obtaining a building model selected by an editing interface, reading the square meters of the house type related to the model through a json tool, and arranging the house type from small to large according to the square meters without artificial workUnder the condition of modifying the duty ratio of each house type, the duty ratio of all house types is uniform, the total duty ratio is 100%, the duty ratio of each house type can be adjusted according to the requirement, the duty ratio is used as an index for generating strong row, each time when building is discharged at random coordinate points, the duty ratio of the type of the building which is discharged and the current type are counted, compared with the target duty ratio, when the target duty ratio and the volume ratio meet the requirement at the same time, the random coordinate points are withdrawn, automatic generation of a model is carried out, as shown in fig. 6, the house type area is 120m 2 The household duty cycle is set to 34%; the house type area is 116m 2 The household duty is set to 33%; the house type area is 100m 2 The household duty is set to 33%;
s6: generating design schemes using forced rank algorithm
S6-1, reading economic and technical indexes of different plots input in a UI interface set in S1, house type proportion in S5 and a model selected for use in S4, dividing the different plots into grids of 1X 1, clearing a space of an existing building, setting the state of each point as unused, and ensuring that all points in the plots are in an unused state;
S6-2, setting the unit numbers of the buildings with different heights according to actual requirements, and preferentially placing the buildings with more unit numbers, wherein the unit numbers are gradually decreased;
s6-3, setting a coordinate point of a building as a coordinate of the upper left corner of the building, and taking whether different limiting conditions in economic and technical indexes are met or not as conditions for circulation of random coordinate points, wherein the following steps are executed in the circulation: a. a coordinate point of a random building; b. determining the number of units, the model and the area coefficient of the placed building according to the position relation of the coordinate points; c. judging whether the fireproof space between the building under the coordinate point and other buildings, the building space are met or not and whether the building is in the current land or not; d. if all the above are satisfied, the point can be placed in a building; e. setting the point in the building occupied land under the point as used; f. calculating economic and technical indexes after the building is placed, if the limit of the economic and technical indexes is exceeded at the moment, the building is destroyed, and the whole scheme is designedA bundle; otherwise, continuing to circulate, then calculating the path mark of the corresponding building in json according to the length, width and height corresponding to FVector, and outputting the corresponding result to generate the building design scheme, as shown in FIG. 7, with the area of 120m 2 288 households in total, accounting for 33.30 percent; area 116m 2 226 households in total, accounting for 26.20 percent; area 100m 2 The total of the households is 350 households, and the proportion is 40.50 percent;
s7, the scheme is optimized
S7-1, CV extracting topography
S7-1-1, edge extraction
S7-1-1-1, gaussian blur: the Gaussian filtering is linear smoothing filtering, mainly used for eliminating Gaussian noise, and is a process of carrying out weighted average on the whole image, and based on a two-dimensional Gaussian function, a weight matrix and a Gaussian kernel are constructed, and each pixel point is subjected to filtering treatment;
s7-1-1-2, gray conversion: adding a conversion format to the Gaussian blurred image, and converting a BGR format into a gray image;
s7-1-1-3, gradient calculation: acquiring a gray level converted image, and respectively calculating sobel operators in the X, Y axial direction;
s7-1-1-4, non-maximum signal suppression: traversing all the pixel points, if the point is the maximum value on the same gradient of surrounding pixel points, reserving the point, otherwise, suppressing the point;
s7-1-1-5, and outputting a binary graph by a high threshold value and a low threshold value: and after the operation is finished, the formed virtual edge is processed again and a binary pattern is output, and the method specifically comprises the following steps:
a. if the gradient value of the pixel point of the current edge is greater than or equal to the high threshold value, the pixel point is marked as a strong edge;
b. If the gradient value of the pixel point at the current edge is positioned between the high threshold value and the low threshold value, the pixel point is marked as a virtual edge;
c. if the gradient value of the pixel point at the current edge is smaller than the low valve, the pixel point is restrained;
d. for the obtained virtual edges, if the virtual edges are connected with the strong edges, the virtual edges are processed into edges, otherwise, the virtual edges are restrained;
s7-1-2, angle extraction
S7-1-2-1, hough transform data: invoking a Hough transform function, and extracting straight line segment set data;
s7-1-2-2, and determining a straight line by two points: traversing the data after Hough transformation, and determining a straight line every two points;
s7-1-2-3, floating point number, slope of straight line: converting the data type after Hough transformation into floating point number, and calculating the slope of a straight line;
s7-1-2-4, arctangent and radian degree of rotation: converting the radian into a degree according to the arctangent value of the slope;
s7-1-2-5, updating degrees: updating the inclination angles corresponding to all the straight lines to degrees;
s7-2, judging whether the terrain has an inclination condition or not: judging whether the inclination is horizontal or vertical according to the data obtained in the first step, if the inclination is horizontal, summarizing the horizontal inclination condition, determining the optimal angle range of the horizontal inclination, and obtaining the optimal angle range of the horizontal inclination; if the inclination is vertical, summarizing vertical inclination conditions, determining a vertical inclination optimal angle range, and obtaining an optimal inclination angle range;
S7-3, openCV identifies the topography shape
S7-3-1, after the topography is drawn, converting the topography into jpg format by using the photographing function of the illusion engine UE 4;
s7-3-2, loading the image photographed by S7-3-1 by using Imread ();
s7-3-3, using an S7-1-1 edge extraction algorithm to obtain an edge contour of the image;
s7-3-4, detecting whether a curve segment is contained in the image through Hough transformation, and marking the curve segment as 0 if the curve segment is contained in the image; if the image has only straight line segments, judging the shape of the image by combining different characteristic factors such as polygonal approximation, length, area and aspect ratio of the outline, and marking the shape as 1;
s7-4, recognizing the arrangement and adjustment of the topography shape to the building in the existing scheme according to OpenCV
S7-4-1, when the terrain identification is 0, the building is horizontally arranged;
s7-4-2, when the terrain is identified as 1, adjusting the building according to the trend of the terrain;
s7-4-3, dividing the terrain under the condition that the part of the terrain is 0 and the part of the terrain is 1, and respectively carrying out corresponding arrangement adjustment on different areas;
s7-5, bp training model: the method for reading the picture with high color contrast and high definition comprises the following steps:
s7-5-1, reading key feature data;
s7-5-2, setting training objects and prediction data;
S7-5-3, carrying out normalization processing on data in the training object;
s7-5-4, constructing a Bp nerve grid;
s7-5-5, setting training parameters of the grid, including training times, learning efficiency and errors of training targets;
s7-5-6, bp training;
s7-5-7, normalizing the test sample data;
s7-5-8, predicting results, as shown in FIG. 8;
s7-5-9, comparing actual and predicted errors;
s7-5-10, comparing actual and predicted results;
s7-5-11, if the comparison condition of the two is poor, adjusting a Bp training model;
s7-6, reasonably adjusting if the situation of unreleased condition occurs in the adjustment process;
s8, sunlight analysis
S8-1, calculating an declination angle, determining local longitude and latitude, and converting local time into an earth rotation time angle at a corresponding moment;
s8-2, calculating a solar time, a solar altitude and a solar azimuth, and determining the angular position of the sun through the solar altitude and the solar azimuth;
s8-3, as shown in fig. 9-12, the solar analysis of the east, west and south three parts is as follows:
east: dividing an east wall into grids of 1m multiplied by 1m, circularly calculating the sunlight influence of each building on each grid, wherein the calculation time is winter to date or severe cold day, the sunlight influence statistics of eight hours is carried out by 0.1 hour, and the accumulated result is sunlight data of the grids;
Western: dividing an east wall into grids of 1m multiplied by 1m, circularly calculating the sunlight influence of each building on each grid, wherein the calculation time is winter to day or severe cold day, the sunlight influence statistics of eight hours is 0.1 hour, the accumulated result is sunlight data of the grids, each grid needs to meet the minimum two hours of sunlight, and the grids are qualified if the grids meet the minimum two hours of sunlight, otherwise, the grids are unqualified;
south: dividing a south wall into grids of 1m multiplied by 1m, circularly calculating the sunshine influence of each building on each grid, calculating the sunshine influence statistics from eight points in winter to four points in the morning to four points in the afternoon or the cold day, calculating whether each grid is shielded by other buildings every 0.1 hour, namely calculating the shadow range of each building every 0.1 hour, judging whether each grid is in the shadow range, accumulating the sunshine data of each grid of 1m multiplied by 1m if each grid is not in the shadow range, namely not shielded, for 0.1 hour, and calculating the sunshine data of each grid of 1m multiplied by 1m after eight hours;
s9, outputting sunlight analysis results and design scheme
S9-1, outputting a sunlight analysis result: dividing a plan view of the east, west and south of a building into grids of 1 multiplied by 1, marking the sunlight time of each grid in sequence by taking an hour as a unit, and representing different sunlight time with different colors, wherein the specific sunlight time of each grid is displayed on the grid as shown in fig. 12, and the specific sunlight time is accurate to the position behind a decimal point, and the accurate value can be adjusted according to the actual implementation;
S9-2, design scheme output: as shown in fig. 13-14, the output solution is a top view of the design solution and performs data labeling, including building number, building height, number of floors, economic and technical indexes of the current land, building size, building space building and building, building and boundary line, ground boundary line, building control line, building size is the minimum circumscribed rectangle size, building and boundary line are distances parallel to the nearest point of the boundary, the data labeling further includes distances from the building around each building as a center, including straight line distance and hypotenuse distance, if the building is close to the building control line, labeling the distance from the building to the building control line, labeling the building number of each building, the number of floors, and the minimum accommodated rectangle range of the building, and the computer interface display content includes: (1) total building area, volume fraction, building density; (2) a main technical economic index table; (3) After clicking a certain block, displaying all relevant attributes; (4) labeling building numbers, building heights and floor numbers on the top layer of the square block;
s10, archiving: as shown in fig. 15, the first part is that after the design scheme step of rearranging the design scheme generated in the step S6 by the scheme optimization algorithm and performing the S8 solar analysis to be qualified, the economic and technical indexes (total land area, net land area, total building area, residential area, commercial area, other area, building occupied area, volume rate and building density) of the current land, the coordinate points of the building control lines of the land, the coordinate points of the building, the model of the building, the total number and the occupied ratio of each house type and the total number of each floor, the solar analysis result and the scheme design diagram are obtained and stored by json tools; the second part is to select the saved scheme to restore the saved design through the archived record;
S11, immersive VR experience: after the step of generating the design scheme by using the forced-ventilated algorithm in the S6, setting a scene for the generated scheme, and experiencing the actual situation of the scheme after the scheme is particularly landed, and actually sensing the actual sunlight change for the simulation of the winter sun exposure situation.
The invention and its embodiments have been described above with no limitation, and the actual construction is not limited to the embodiments of the invention as shown in the drawings. In summary, if one of ordinary skill in the art is informed by this disclosure, a structural manner and an embodiment similar to the technical solution should not be creatively devised without departing from the gist of the present invention.