CN116468838B - Regional resource rendering method, system, computer and readable storage medium - Google Patents

Regional resource rendering method, system, computer and readable storage medium Download PDF

Info

Publication number
CN116468838B
CN116468838B CN202310692747.7A CN202310692747A CN116468838B CN 116468838 B CN116468838 B CN 116468838B CN 202310692747 A CN202310692747 A CN 202310692747A CN 116468838 B CN116468838 B CN 116468838B
Authority
CN
China
Prior art keywords
pixel
polygon
preset
land block
land
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.)
Active
Application number
CN202310692747.7A
Other languages
Chinese (zh)
Other versions
CN116468838A (en
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.)
Jiangxi Shuitou Jianghe Information Technology Co ltd
Original Assignee
Jiangxi Shuitou Jianghe Information Technology 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 Jiangxi Shuitou Jianghe Information Technology Co ltd filed Critical Jiangxi Shuitou Jianghe Information Technology Co ltd
Priority to CN202310692747.7A priority Critical patent/CN116468838B/en
Publication of CN116468838A publication Critical patent/CN116468838A/en
Application granted granted Critical
Publication of CN116468838B publication Critical patent/CN116468838B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/10Geometric effects
    • G06T15/30Clipping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/05Geographic models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/04Indexing scheme for image data processing or generation, in general involving 3D image data
    • 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
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention provides a regional resource rendering method, a system, a computer and a readable storage medium, wherein the method comprises the steps of obtaining a digital background bottom plate of a region, and performing first virtual segmentation or second virtual segmentation on the digital background bottom plate to obtain a plurality of land blocks with preset shapes; performing pixel clustering iterative processing on the digital background bottom plate based on the preset-shape land block to obtain a segmented land block; extracting characteristic edges of the partitioned land parcels, determining a grid vertex set according to the characteristic edges, and generating a grid model based on the grid vertex set; the grid model is subjected to streaming loading and rendering processing to generate the regional resource rendering model, and the method can improve the loading speed of the model and simultaneously control the frame rate to be kept at a stable output value, so that no extra burden and waste are generated on the performance.

Description

Regional resource rendering method, system, computer and readable storage medium
Technical Field
The invention belongs to the technical field of three-dimensional model rendering, and particularly relates to a regional resource rendering method, a regional resource rendering system, a regional resource rendering computer and a readable storage medium.
Background
When the resource rendering is performed on a large area, cpu calculates the position information of all objects, decides which objects are to participate in the rendering, then needs to perform the actual rendering, wherein the first part of the actual rendering is the rendering geometry, the geometric rendering is a part occupying a larger part in the rendering process, which has a major influence on performance, but faces a problem before the rendering of the geometry, the objects participating in the rendering are known, but the order of performing the rendering is unknown, and the rendering is performed on each model, taking a preset area range as an example, the model of the background bottom plate is rendered, then the preset area model is rendered, then the contour, the river and the like in the preset area model are rendered, and the whole interface is rendered 3 times.
All the content displayed in the whole is finally displayed on the background, the preset area model blocks a part of the background model, that is, when the background model is rendered, the renderer renders the part which is blocked by the preset area model (performs relevant pixel calculation), and then when the preset area model is rendered, the pixels of the preset area are calculated again, so that when hundreds of models exist in one picture, the repeated pixel calculation can generate great waste on performance, and the rendering loading speed is seriously influenced.
Disclosure of Invention
In order to solve the technical problems, the invention provides a regional resource rendering method, a regional resource rendering system, a regional resource rendering computer and a regional resource rendering readable storage medium, which are used for solving the technical problems in the prior art.
In a first aspect, the present invention provides the following technical solutions, and a method for rendering a regional resource, where the method includes:
acquiring a digital background bottom plate of an area, and performing first virtual segmentation or second virtual segmentation on the digital background bottom plate to obtain a plurality of land blocks with preset shapes;
performing pixel clustering iterative processing on the digital background bottom plate based on the preset-shape land block to obtain a segmented land block;
extracting characteristic edges of the partitioned land parcels, determining a grid vertex set according to the characteristic edges, and generating a grid model based on the grid vertex set;
carrying out streaming loading and rendering processing on the grid model to generate a regional resource rendering model;
the step of performing pixel clustering iterative processing on the digital background bottom plate based on the preset shape land block to obtain a segmented land block comprises the following steps:
setting the number of super pixels, distributing a plurality of initial clustering centers to each preset shape land block, calculating gradient values of all pixels in a first preset neighborhood of the initial clustering centers, and selecting a pixel corresponding to the minimum gradient value as a new clustering center;
Calculating the pixel distance between each pixel and the new clustering center in a second preset adjacent area of the new clustering center, selecting a new clustering center with the smallest pixel distance as the pixel clustering center of the pixel for each pixel, and distributing class labels of the corresponding pixel clustering centers for the pixel;
and for a plurality of super pixels, respectively calculating the average vector of all pixels contained in each super pixel to obtain an iterative clustering center, and replacing the new clustering center with the iterative clustering center and repeatedly iterating until convergence to obtain a plurality of partitioned plots.
Compared with the prior art, the application has the beneficial effects that: firstly, acquiring a digital background bottom plate of an area, and performing first virtual segmentation or second virtual segmentation on the digital background bottom plate to obtain a plurality of land parcels with preset shapes; then, carrying out pixel clustering iterative processing on the digital background bottom plate based on the preset-shape land block so as to obtain a segmented land block; then extracting characteristic edges of the partitioned land parcels, determining a grid vertex set according to the characteristic edges, and generating a grid model based on the grid vertex set; finally, the grid model is subjected to streaming loading and rendering processing to generate a region resource rendering model, pre-rendering is performed during virtual segmentation before actual rendering, namely, a relatively light rendering calculation is performed, the rendering sequence of a convoluted object is calculated, and a pixel region which is clearly shielded by a post-rendering object is shielded, so that the effect and efficiency of the region resource rendering process are improved, and meanwhile, for a scene with higher precision and a scene with a larger range, the loading speed of the model can be improved, the frame rate is controlled to be kept at a stable output value, and no extra burden and waste are generated on performance.
Preferably, the step of performing a first virtual segmentation on the digital background bottom plate to obtain a land block with a preset shape includes:
based on the digital background bottom plate, buildingFOCUSONA focus polygon dataset;
based on the followingFOCUSONThe focus polygon data set picks up and stores a plurality of polygon points, and performs distance calculation on the polygon points to obtain a plurality of virtual polygons;
assigning vector values to the edges of each virtual polygon to obtain edge vectors, calculating the cross multiplication results of adjacent edge vectors in each virtual polygon, and judging whether the edge vectors with the cross multiplication results smaller than a preset value exist or not;
if no side vector with the cross multiplication result smaller than the preset value exists, the virtual polygon corresponding to the side vector is a convex polygon so as to obtain a plurality of land parcels with preset shapes;
if an edge vector with the cross multiplication result smaller than the preset value exists, the virtual polygon corresponding to the edge vector is a concave polygon, the virtual polygon is used as a polygon to be processed, and segmentation conversion and concave-convex testing are carried out on the polygon to be processed so as to obtain a plurality of land blocks with preset shapes.
Preferably, the step of performing segmentation conversion and concave-convex testing on the polygon to be processed to obtain a plurality of land areas with preset shapes includes:
Selecting an edge vector corresponding to a cross multiplication result smaller than a preset value from the polygon to be processed as a segmentation vector, and inputting the polygon to be processed into a two-dimensional coordinate system;
moving an edge vector adjacent to the segmentation vector of the polygon to be processed to coincide with an abscissa axis, and moving a starting point of the edge vector to an origin position of the two-dimensional coordinate system;
dividing the polygon to be processed based on the dividing vector to obtain a first polygon, rotating the first polygon clockwise to enable the dividing vector to coincide with the abscissa axis, and judging whether the end point of the adjacent next side vector of the dividing vector is located below the abscissa axis;
and if the end point of the adjacent next side vector of the split vector is not positioned below the abscissa axis, the first polygon is a convex polygon, and the first polygon is taken as a preset shape land block.
Preferably, the step of performing a second virtual segmentation on the digital background bottom plate to obtain a plurality of plots with preset shapes includes:
inputting a preset triangle into an area land block of the digital background bottom plate, performing triangle cutting on the area land block based on the preset triangle to generate a first cutting land block in the area land block and a second cutting land block outside the area land block, discarding the second cutting land block, and obtaining a plurality of preset shape land blocks based on the first cutting land block.
Preferably, the step of extracting the feature edges of the partitioned land block includes:
performing Gaussian filtering on the divided land block, and utilizingSobelThe operator calculates a first pixel gradient matrix of the divided land block in the X direction and a second pixel gradient matrix of the divided land block in the Y direction respectively;
calculating a gradient intensity matrix according to the first pixel gradient matrix and the second pixel gradient matrix, determining the current pixel gradient intensity based on the gradient intensity matrix, and judging whether the current pixel gradient intensity contrast and the pixel gradient intensity of the adjacent pixel along the positive and negative gradient directions are maximum values or not;
if the current pixel gradient strength contrast and the pixel gradient strength of the adjacent pixels along the positive and negative gradient directions are the maximum values, the corresponding pixel edge points are reserved, and if the current pixel gradient strength contrast and the pixel gradient strength of the adjacent pixels along the positive and negative gradient directions are not the maximum values, the corresponding pixel points are omitted;
Removing pixel edge points lower than a first preset intensity threshold, taking pixel edge points between the first preset intensity threshold and a second preset intensity threshold as weak edge pixel points, taking pixel edge points higher than the second preset intensity threshold as strong edge pixel points, and determining characteristic edges of the partitioned land block based on the strong edge pixel points.
Preferably, the step of determining a grid vertex set according to the feature edge, and generating a grid model based on the grid vertex set includes:
extracting the pixel boundary of the super pixel by using an 8-neighborhood boundary tracking method, and taking the point on the pixel boundary as a first grid vertex;
based on the pixel boundary, extracting intersection points of adjacent super pixels as second grid vertexes;
extracting a first point set on the characteristic edge of the partitioned land block and a second point set of the 2-neighborhood set of the pixel boundary, calculating a point difference set between the first point set and the second point set, and uniformly sampling the point difference set to obtain a third grid vertex;
and determining a grid vertex set according to the first grid vertex, the second grid vertex and the third grid vertex, and decomposing the partitioned land block into a plurality of triangle clusters based on points in the grid vertex set to obtain a grid model.
In a second aspect, the present invention provides a regional resource rendering system, where the system includes:
the segmentation module is used for acquiring a digital background bottom plate of the region, and performing first virtual segmentation or second virtual segmentation on the digital background bottom plate to obtain a plurality of land parcels with preset shapes;
the iteration module is used for carrying out pixel clustering iteration processing on the digital background bottom plate based on the preset-shape land block so as to obtain a segmented land block;
the extraction module is used for extracting characteristic edges of the partitioned land parcels, determining a grid vertex set according to the characteristic edges and generating a grid model based on the grid vertex set;
the rendering module is used for carrying out streaming loading and rendering processing on the grid model so as to generate a regional resource rendering model;
the iteration module comprises:
the distribution sub-module is used for setting the number of super pixels, distributing a plurality of initial clustering centers to each preset shape land block, calculating gradient values of all pixels in a first preset neighborhood of the initial clustering centers, and selecting the pixel corresponding to the minimum gradient value as a new clustering center;
a pixel distance ion module, configured to calculate a pixel distance between each pixel and the new cluster center in a second preset neighborhood of the new cluster center, select, for each pixel, a new cluster center corresponding to the pixel distance that is the smallest as a pixel cluster center of the pixel, and allocate a class label of the corresponding pixel cluster center to the pixel;
And the iteration sub-module is used for respectively calculating average vectors of all pixels contained in each super pixel for a plurality of super pixels to obtain an iteration clustering center, and replacing the new clustering center with the iteration clustering center and repeatedly iterating until convergence to obtain a plurality of partitioned plots.
In a third aspect, the present invention provides a computer, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the above-mentioned region resource rendering method when executing the computer program.
In a fourth aspect, the present invention provides a readable storage medium, where a computer program is stored, where the computer program is executed by a processor to implement the above-mentioned method for rendering regional resources.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a method for rendering regional resources according to a first embodiment of the present invention;
fig. 2 is a detailed flowchart of step S11 in the area resource rendering method according to the first embodiment of the present invention;
fig. 3 is a detailed flowchart of step S115 in the area resource rendering method according to the first embodiment of the present invention;
fig. 4 is a detailed flowchart of step S2 in the area resource rendering method according to the first embodiment of the present invention;
fig. 5 is a detailed flowchart of step S31 in the area resource rendering method according to the first embodiment of the present invention;
fig. 6 is a detailed flowchart of step S32 in the area resource rendering method according to the first embodiment of the present invention;
FIG. 7 is a block diagram illustrating a region resource rendering system according to a second embodiment of the present invention;
fig. 8 is a block diagram of a hardware structure of a computer according to another embodiment of the present invention.
Embodiments of the present invention will be further described below with reference to the accompanying drawings.
Detailed Description
In order that the invention may be readily understood, a more complete description of the invention will be rendered by reference to the appended drawings. Several embodiments of the invention are presented in the figures. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and/or" as used herein includes any and all combinations of one or more of the associated listed items.
Example 1
As shown in fig. 1, in a first embodiment of the present invention, the present invention provides a method for rendering a region resource, where the method includes:
s1, acquiring a digital background bottom plate of an area, and performing first virtual segmentation or second virtual segmentation on the digital background bottom plate to obtain a plurality of land parcels with preset shapes;
specifically, in this embodiment, the digital background bottom board is a background three-dimensional model, and in this embodiment, a preset area is used as a range, so that the digital background bottom board is a three-dimensional model of the preset area, so that land block segmentation, mapping and rendering can be performed on the digital background bottom board;
meanwhile, in the present embodiment, step S1 includes: step S11, performing first virtual segmentation on the digital background bottom plate to obtain a plurality of preset-shape plots, and step S12, performing second virtual segmentation on the digital background bottom plate to obtain a plurality of preset-shape plots, wherein the first virtual segmentation is convex polygon cutting, the second virtual segmentation is triangular cutting, the two cutting modes can be alternatively used, the precision of the mode of the first virtual segmentation is lower according to the precision requirement of a model, the segmentation time is short, the precision of the mode of the second virtual segmentation is higher, the detail is rich, and the segmentation time is long, so that the preset-shape plots can be triangular plots or convex polygon plots.
As shown in fig. 2, the step S11 includes:
s111, based on the digital background bottom plate, establishingFOCUSONA focal polygon dataset.
S112, based on theFOCUSONThe focus polygon data set picks up and stores a plurality of polygon points, and performs distance calculation on the polygon points to obtain a plurality of virtual polygons;
specifically, after a plurality of polygonal points are picked up, the picked up points form polygons each consisting of more than three sides, and the concave-convex property of the polygons can be judged by judging whether the picked up points and the side length extension line are on the same side or the other side.
S113, assigning vector values to the edges of each virtual polygon to obtain edge vectors, calculating the cross multiplication results of adjacent edge vectors in each virtual polygon, and judging whether the edge vectors with the cross multiplication results smaller than a preset value exist or not;
specifically, each side of the virtual polygon is converted into an edge vector, the convexity and convexity of the polygon can be judged by judging the cross multiplication result between the continuous direction changing amounts and judging the positive and negative of the cross multiplication result, and if three continuous vertexes are collinear, the cross multiplication result between the adjacent two side vectors is 0;
for example, for a virtual polygon, the edge vectors of the virtual polygon are E1, E2, E3, E4, E5, E6, where E1= (1, 0), E2= (1, 0), E3= (1, -1, 0), E4= (0,2,0), E5= (-3,0,0), E6= (0, -2, 0), so that the adjacent two edge vectors are cross multiplied to obtain a plurality of cross products E1 x E2, E2 x E3, E3 x E4, E4 x E5, E5 x E6, E6 x E1, where the result of the presence of E2 x E3 is negative, and thus the virtual polygon is determined to be a concave vector.
S114, if no side vector with the cross multiplication result smaller than a preset value exists, the virtual polygon corresponding to the side vector is a convex polygon so as to obtain a plurality of land parcels with preset shapes;
specifically, if there is no edge vector whose cross multiplication result is smaller than the preset value, that is, the cross multiplication result of all edge vectors is not negative, the virtual polygon is a convex polygon, and the convex polygon meets the requirement of the land parcel with the preset shape.
S115, if an edge vector with a cross multiplication result smaller than a preset value exists, the virtual polygon corresponding to the edge vector is a concave polygon, the virtual polygon is used as a polygon to be processed, and segmentation conversion and concave-convex testing are carried out on the polygon to be processed so as to obtain a plurality of land parcels with preset shapes;
specifically, if there is an edge vector with a cross product less than 0, the virtual polygon corresponding to the edge vector is a concave polygon, but the concave polygon does not meet the requirement of the land parcel with the preset shape, so that the polygon to be processed needs to be divided and converted into a convex polygon, and the concave-convex test and the division and conversion are continuously performed until all the concave polygons are converted into convex polygons.
As shown in fig. 3, the step S115 includes:
s1151, selecting an edge vector corresponding to the cross multiplication result smaller than a preset value from the polygon to be processed as a segmentation vector, and inputting the polygon to be processed into a two-dimensional coordinate system.
S1152, moving one side vector of the polygon to be processed adjacent to the segmentation vector to coincide with the abscissa axis, and moving the starting point of the side vector to the origin position of the two-dimensional coordinate system.
S1153, dividing the polygon to be processed based on the dividing vector to obtain a first polygon, rotating the first polygon clockwise to enable the dividing vector to coincide with the abscissa axis, and judging whether the end point of the adjacent next side vector of the dividing vector is located below the abscissa axis.
S1154, if the end point of the adjacent next side vector of the split vector is located below the abscissa axis, the first polygon is a concave polygon, and the split conversion and the concave-convex test are repeatedly performed on the first polygon until a plurality of land blocks with preset shapes are obtained, and if the end point of the adjacent next side vector of the split vector is not located below the abscissa axis, the first polygon is a convex polygon, and the first polygon is taken as a land block with preset shapes;
Specifically, as the virtual polygons listed above, the edge vectors of the virtual polygons are E1, E2, E3, E4, E5, E6, wherein E1= (1, 0), E2= (1, 0), E3= (1, -1, 0), E4= (0,2,0), E5= (-3,0,0), E6= (0, -2, 0), and the cross product is E1 x E2, E2 x E3, E3 x E4, E4 x E5, E5 x E6, E6 x E1, wherein E2 x E3 has a negative result, the virtual polygon has six vertices, i.e., V1, V2, V3, V4, V5, V6, respectively, wherein e1=v2-V1, e2=v3-V2, e3=v4-V3, e4=v5-V4, e5=v6-V5, e6=v1-V6, and the rest of the edge vectors are analogized sequentially;
the split vector is E2, so that the edge vector E1 is moved to coincide with the abscissa axis, and V1 coincides with the origin of coordinates, the polygon to be processed is split along the split vector E2, i.e. a straight line with a slope of 1 intercept of-1, to obtain a first polygon, and then the first polygon is rotated along E1, so that the split vector E2 coincides with the abscissa axis, and therefore, it is known that if the first polygon is a convex polygon, the point V4 is located above the abscissa axis or on the abscissa axis, and if the first polygon is a concave polygon, the point V4 is located below the abscissa axis, and then the split and concave-convex arrangement are continuously performed by using the abscissa axis until all the concave polygons are converted into convex polygons, so as to meet the requirement of the land block with the preset shape.
Wherein, the step S12 includes:
inputting a preset triangle into an area land block of the digital background bottom plate, performing triangle cutting on the area land block based on the preset triangle to generate a first cutting land block in the area land block and a second cutting land block outside the area land block, discarding the second cutting land block, and obtaining a plurality of land blocks with preset shapes based on the first cutting land block;
specifically, firstly, for a rectangular regional plot, a triangle is input, and three vertexes of the triangle are located outside the regional plot, so that after the triangle is cut, two plots exist, namely, a plot located in the range of the regional plot, and a plot located outside the range of the regional plot, the first cut plot is reserved, and the second cut plot is removed, so that the second virtual cut can be realized.
S2, performing pixel clustering iterative processing on the digital background bottom plate based on the land block with the preset shape to obtain a segmented land block;
specifically, in the image segmentation processing flow of the model importing and model modifying stage, firstly, super-pixel segmentation is performed on the pre-segmented preset-shape land block, and then, feature edge extraction is performed, so that the virtually segmented digital background bottom plate can be converted into a high-precision model with a plurality of triangular clusters, and rendering is facilitated.
As shown in fig. 4, the step S2 includes:
s21, setting the number of super pixels, distributing a plurality of initial clustering centers to each preset shape land block, calculating gradient values of all pixels in a first preset neighborhood of the initial clustering centers, and selecting a pixel corresponding to the minimum gradient value as a new clustering center;
specifically, for a preset-shaped block containing N pixels, the preset-shaped block is pre-divided into K superpixels with the same size, so that the distance between every two adjacent initial cluster centers is approximately equal toAnd the first preset neighborhood is a 3×3 neighborhood range.
S22, calculating the pixel distance between each pixel and the new clustering center in a second preset adjacent area of the new clustering center, selecting a new clustering center with the smallest pixel distance for each pixel as the pixel clustering center of the pixel, and distributing class labels of the corresponding pixel clustering centers for the pixel;
specifically, the second preset neighborhood is a neighborhood range of 2sx2s, and the pixel distanceThe method comprises the following steps:
in the method, in the process of the invention,for the color distance>For the spatial distance>Is constant.
S23, for a plurality of super pixels, calculating average vectors of all pixels contained in each super pixel respectively to obtain an iterative clustering center, and replacing the new clustering center with the iterative clustering center and iterating repeatedly until convergence to obtain a plurality of divided plots;
Specifically, after the iterative clustering center is replaced by the initial clustering center, the step S22 is executed again, and the iteration is repeated until convergence.
Specifically, after step S23, in order to enhance connectivity, a connected domain algorithm is used to allocate class labels of cluster centers nearest to the isolated pixels for forced connection, so as to ensure that the generated super-pixel segmentation can better fit object boundaries and has a regular shape.
S3, extracting characteristic edges of the segmented plots, determining a grid vertex set according to the characteristic edges, and generating a grid model based on the grid vertex set;
the step S3 includes a step S31 of extracting characteristic edges of the partitioned land block by utilizing an edge detection algorithm, and a step S32 of determining a grid vertex set according to the characteristic edges and generating a grid model based on the grid vertex set.
As shown in fig. 5, the step S31 includes:
s311, performing Gaussian filtering processing on the divided land block and utilizingSobelThe operator calculates a first pixel gradient matrix of the divided land block in the X direction and a second pixel gradient matrix of the divided land block in the Y direction respectively;
wherein use is made ofSobelThe operator is two 3×3 matrices, sx and Sy respectively, so the first pixel gradient matrix Gx and the second pixel gradient matrix Gy are:
In the method, in the process of the invention,gray matrix is a cross-correlation operation, (convolution operation can be regarded as a cross-correlation operation in which the convolution kernel is rotated 180 °).
S312, calculating a gradient intensity matrix according to the first pixel gradient matrix and the second pixel gradient matrix, determining the current pixel gradient intensity based on the gradient intensity matrix, and judging whether the current pixel gradient intensity contrast and the pixel gradient intensity of the adjacent pixels along the positive gradient direction are maximum values or not.
S313, if the current pixel gradient intensity contrast and the pixel gradient intensity of the adjacent pixel along the positive and negative gradient directions are the maximum values, the corresponding pixel edge points are reserved, and if the current pixel gradient intensity contrast and the pixel gradient intensity of the adjacent pixel along the positive and negative gradient directions are not the maximum values, the corresponding pixel points are omitted.
S314, eliminating pixel edge points lower than a first preset intensity threshold, taking pixel edge points between the first preset intensity threshold and a second preset intensity threshold as weak edge pixel points, taking pixel edge points higher than the second preset intensity threshold as strong edge pixel points, and determining characteristic edges of the partitioned land block based on the strong edge pixel points;
Specifically, the origin of the image matrix coordinate system is at the upper left corner, the positive x direction is from left to right, and the positive y direction is from top to bottom, the gradient intensity matrix Gxy can be determined and obtained based on the first pixel gradient matrix Gx and the second pixel gradient matrix Gy, and the gradient intensity matrix Gxy is obtained byThe gradient intensity of the current pixel can be obtained;
the first pixel gradient intensity of the central pixel point isThe second pixel gradient intensity is +>The current pixel gradient intensity is +.>The first pixel gradient intensity is the gradient intensity in the x direction, the second pixel gradient intensity is the gradient intensity in the y direction, then according to +.>And->The positive and negative and the size of the gradient direction can be judged, and then the gradient strength of the positive and negative gradient directions and the gradient strength of the two parts participating in comparison can be obtained by linear interpolation according to the pixel gradient direction and the pixel gradient of the adjacent point>And->
Wherein t is a scale factor, if the first pixel gradient strengthEqual to the second pixel gradient intensityIt is indicated that the pixel gradient is 0 and therefore the pixel is not an edge pixel.
As shown in fig. 6, the step S32 includes:
s321, extracting a pixel boundary of the super pixel by using an 8-neighborhood boundary tracking method, and taking a point on the pixel boundary as a first grid vertex;
S322, based on the pixel boundary, extracting intersection points of adjacent super pixels as second grid vertexes;
s323, extracting a first point set on the characteristic edge of the segmented land block and a second point set of the 2-neighborhood set of the pixel boundary, calculating a point difference set between the first point set and the second point set, and uniformly sampling the point difference set to obtain a third grid vertex;
s324, determining a grid vertex set according to the first grid vertex, the second grid vertex and the third grid vertex, and decomposing the partitioned land block into a plurality of triangle clusters based on points in the grid vertex set to obtain a grid model.
S4, carrying out streaming loading and rendering processing on the grid model to generate a regional resource rendering model;
specifically, after the grid model is obtained, the grid model can be converted and integrated into streaming loading data, corresponding preview scene units are set, and meanwhile, the grid model is rendered based on a streaming rendering part, so that the regional resource rendering model is obtained.
The first advantage of this embodiment is: firstly, acquiring a digital background bottom plate of an area, and performing first virtual segmentation or second virtual segmentation on the digital background bottom plate to obtain a plurality of land parcels with preset shapes; then, carrying out pixel clustering iterative processing on the digital background bottom plate based on the preset-shape land block so as to obtain a segmented land block; then extracting characteristic edges of the partitioned land parcels, determining a grid vertex set according to the characteristic edges, and generating a grid model based on the grid vertex set; finally, the grid model is subjected to streaming loading and rendering processing to generate a region resource rendering model, pre-rendering is performed during virtual segmentation before actual rendering, namely, a relatively light rendering calculation is performed, the rendering sequence of a convoluted object is calculated, and a pixel region which is clearly shielded by a post-rendering object is shielded, so that the effect and efficiency of the region resource rendering process are improved, and meanwhile, for a scene with higher precision and a scene with a larger range, the loading speed of the model can be improved, the frame rate is controlled to be kept at a stable output value, and no extra burden and waste are generated on performance.
Example two
As shown in fig. 7, in a second embodiment of the present invention, there is provided a zone resource rendering system, the system including:
the segmentation module 1 is used for acquiring a digital background bottom plate of an area, and performing first virtual segmentation or second virtual segmentation on the digital background bottom plate to obtain a plurality of land parcels with preset shapes;
the iteration module 2 is used for carrying out pixel clustering iteration processing on the digital background bottom plate based on the preset-shape land block so as to obtain a segmented land block;
the extraction module 3 is used for extracting characteristic edges of the partitioned land block, determining a grid vertex set according to the characteristic edges and generating a grid model based on the grid vertex set;
and the rendering module 4 is used for carrying out streaming loading and rendering processing on the grid model so as to generate a regional resource rendering model.
The segmentation module 1 comprises:
a data set sub-module for establishing based on the digital background base plateFOCUSONA focus polygon dataset;
a distance calculation sub-module for based on theFOCUSONThe focus polygon data set picks up and stores a plurality of polygon points, and performs distance calculation on the polygon points to obtain a plurality of virtual polygons;
the vector giving sub-module is used for giving vector values to the edges of each virtual polygon to obtain edge vectors, calculating the cross multiplication results of adjacent edge vectors in each virtual polygon, and judging whether the edge vectors with the cross multiplication results smaller than a preset value exist or not;
The land parcel determining submodule is used for obtaining a plurality of land parcels with preset shapes if no side vector with the cross multiplication result smaller than a preset value exists, and the virtual polygon corresponding to the side vector is a convex polygon;
and the conversion sub-module is used for carrying out segmentation conversion and concave-convex test on the polygon to be processed by taking the virtual polygon as the polygon to be processed if the edge vector with the cross multiplication result smaller than the preset value exists, so as to obtain a plurality of land parcels with preset shapes.
The conversion submodule includes:
the coordinate conversion unit is used for selecting an edge vector corresponding to a cross multiplication result smaller than a preset value from the polygon to be processed as a segmentation vector, and inputting the polygon to be processed into a two-dimensional coordinate system;
a moving unit for moving one side vector of the polygon to be processed adjacent to the split vector to coincide with the abscissa axis, and moving the origin of the side vector to the origin position of the two-dimensional coordinate system;
the segmentation unit is used for segmenting the polygon to be processed based on the segmentation vector to obtain a first polygon, rotating the first polygon clockwise to enable the segmentation vector to coincide with the abscissa axis, and judging whether the end point of the adjacent next side vector of the segmentation vector is located below the abscissa axis or not;
And the land block determining unit is used for repeatedly carrying out division conversion and concave-convex test on the first polygon if the end point of the adjacent next side vector of the division vector is positioned below the abscissa axis until a plurality of land blocks with preset shapes are obtained, wherein the first polygon is a convex polygon if the end point of the adjacent next side vector of the division vector is not positioned below the abscissa axis, and the first polygon is used as the land block with preset shapes.
The segmentation module 1 further comprises:
the triangle segmentation sub-module is used for inputting a preset triangle into an area land block of the digital background bottom plate, performing triangle cutting on the area land block based on the preset triangle so as to generate a first cutting land block in the area land block and a second cutting land block outside the area land block, discarding the second cutting land block and obtaining a plurality of land blocks with preset shapes based on the first cutting land block.
The iteration module 2 comprises:
the distribution sub-module is used for setting the number of super pixels, distributing a plurality of initial clustering centers to each preset shape land block, calculating gradient values of all pixels in a first preset neighborhood of the initial clustering centers, and selecting the pixel corresponding to the minimum gradient value as a new clustering center;
A pixel distance ion module, configured to calculate a pixel distance between each pixel and the new cluster center in a second preset neighborhood of the new cluster center, select, for each pixel, a new cluster center corresponding to the pixel distance that is the smallest as a pixel cluster center of the pixel, and allocate a class label of the corresponding pixel cluster center to the pixel;
and the iteration sub-module is used for respectively calculating average vectors of all pixels contained in each super pixel for a plurality of super pixels to obtain an iteration clustering center, and replacing the new clustering center with the iteration clustering center and repeatedly iterating until convergence to obtain a plurality of partitioned plots.
The extraction module 3 comprises:
a filtering sub-module for performing Gaussian filtering on the divided land block and usingSobelThe operator calculates a first pixel gradient matrix of the divided land block in the X direction and a second pixel gradient matrix of the divided land block in the Y direction respectively;
the intensity calculation sub-module is used for calculating a gradient intensity matrix according to the first pixel gradient matrix and the second pixel gradient matrix, determining the current pixel gradient intensity based on the gradient intensity matrix, and judging whether the current pixel gradient intensity contrast and the pixel gradient intensity of the adjacent pixels along the positive gradient direction are maximum values or not;
A discarding sub-module, configured to reserve a corresponding pixel edge point if the current pixel gradient intensity contrast and the pixel gradient intensity of the adjacent pixel in the positive and negative gradient directions are maximum values, and discard the corresponding pixel point if the current pixel gradient intensity contrast and the pixel gradient intensity of the adjacent pixel in the positive and negative gradient directions are not maximum values;
the feature edge extraction sub-module is used for eliminating pixel edge points lower than a first preset intensity threshold, taking pixel edge points between the first preset intensity threshold and a second preset intensity threshold as weak edge pixel points, taking pixel edge points higher than the second preset intensity threshold as strong edge pixel points, and determining the feature edges of the partitioned land block based on the strong edge pixel points.
The extraction module 3 further comprises:
the first vertex determining submodule is used for extracting the pixel boundary of the super pixel by using an 8-neighborhood boundary tracking method and taking the point on the pixel boundary as a first grid vertex;
a second vertex determining sub-module, configured to extract, based on the pixel boundary, intersection points of adjacent super pixels as second mesh vertices;
the third vertex determining sub-module is used for extracting a first point set on the characteristic edge of the partitioned land block and a second point set of the 2-neighborhood set of the pixel boundary, calculating a point difference set between the first point set and the second point set, and uniformly sampling the point difference set to obtain a third grid vertex;
And the vertex set determining submodule is used for determining a grid vertex set according to the first grid vertex, the second grid vertex and the third grid vertex, and decomposing the partitioned land block into a plurality of triangle clusters based on points in the grid vertex set so as to obtain a grid model.
In other embodiments of the present application, a computer is provided in the embodiments of the present application, including a memory 102, a processor 101, and a computer program stored in the memory 102 and capable of running on the processor 101, where the processor 101 implements the above-mentioned region resource rendering method when executing the computer program.
In particular, the processor 101 may include a Central Processing Unit (CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, abbreviated as ASIC), or may be configured as one or more integrated circuits that implement embodiments of the present application.
Memory 102 may include, among other things, mass storage for data or instructions. By way of example, and not limitation, memory 102 may comprise a Hard Disk Drive (HDD), floppy Disk Drive, solid state Drive (Solid State Drive, SSD), flash memory, optical Disk, magneto-optical Disk, tape, or universal serial bus (Universal Serial Bus, USB) Drive, or a combination of two or more of the foregoing. Memory 102 may include removable or non-removable (or fixed) media, where appropriate. The memory 102 may be internal or external to the data processing apparatus, where appropriate. In a particular embodiment, the memory 102 is a Non-Volatile (Non-Volatile) memory. In a particular embodiment, the Memory 102 includes Read-Only Memory (ROM) and random access Memory (Random Access Memory, RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, abbreviated PROM), an erasable PROM (Erasable Programmable Read-Only Memory, abbreviated EPROM), an electrically erasable PROM (Electrically Erasable Programmable Read-Only Memory, abbreviated EEPROM), an electrically rewritable ROM (Electrically Alterable Read-Only Memory, abbreviated EAROM), or a FLASH Memory (FLASH), or a combination of two or more of these. The RAM may be Static Random-Access Memory (SRAM) or dynamic Random-Access Memory (Dynamic Random Access Memory DRAM), where the DRAM may be a fast page mode dynamic Random-Access Memory (Fast Page Mode Dynamic Random Access Memory FPMDRAM), extended data output dynamic Random-Access Memory (Extended Date Out Dynamic Random Access Memory EDODRAM), synchronous dynamic Random-Access Memory (Synchronous Dynamic Random-Access Memory SDRAM), or the like, as appropriate.
Memory 102 may be used to store or cache various data files that need to be processed and/or communicated, as well as possible computer program instructions for execution by processor 101.
The processor 101 implements the above-described area resource rendering method by reading and executing computer program instructions stored in the memory 102.
In some of these embodiments, the computer may also include a communication interface 103 and a bus 100. As shown in fig. 8, the processor 101, the memory 102, and the communication interface 103 are connected to each other via the bus 100 and perform communication with each other.
The communication interface 103 is used to implement communications between modules, devices, units, and/or units in embodiments of the application. The communication interface 103 may also enable communication with other components such as: and the external equipment, the image/data acquisition equipment, the database, the external storage, the image/data processing workstation and the like are used for data communication.
Bus 100 includes hardware, software, or both, coupling components of a computer to each other. Bus 100 includes, but is not limited to, at least one of: data Bus (Data Bus), address Bus (Address Bus), control Bus (Control Bus), expansion Bus (Expansion Bus), local Bus (Local Bus). By way of example, and not limitation, bus 100 may include a graphics acceleration interface (Accelerated Graphics Port), abbreviated AGP, or other graphics Bus, an enhanced industry standard architecture (Extended Industry Standard Architecture, abbreviated EISA) Bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an industry standard architecture (Industry Standard Architecture, ISA) Bus, a wireless bandwidth (InfiniBand) interconnect, a Low Pin Count (LPC) Bus, a memory Bus, a micro channel architecture (Micro Channel Architecture, abbreviated MCa) Bus, a peripheral component interconnect (Peripheral Component Interconnect, abbreviated PCI) Bus, a PCI-Express (PCI-X) Bus, a serial advanced technology attachment (Serial Advanced Technology Attachment, abbreviated SATA) Bus, a video electronics standards association local (Video Electronics Standards Association Local Bus, abbreviated VLB) Bus, or other suitable Bus, or a combination of two or more of the foregoing. Bus 100 may include one or more buses, where appropriate. Although embodiments of the application have been described and illustrated with respect to a particular bus, the application contemplates any suitable bus or interconnect.
The computer can execute the regional resource rendering method based on the acquired regional resource rendering system, thereby realizing the rendering of the regional resource.
In still other embodiments of the present application, in combination with the above-described area resource rendering method, embodiments of the present application provide a technical solution, a readable storage medium storing a computer program thereon, where the computer program implements the above-described area resource rendering method when executed by a processor.
Those of skill in the art will appreciate that the logic and/or steps represented in the flow diagrams or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (6)

1. A method for rendering a region resource, the method comprising:
acquiring a digital background bottom plate of an area, and performing first virtual segmentation or second virtual segmentation on the digital background bottom plate to obtain a plurality of land blocks with preset shapes;
performing pixel clustering iterative processing on the digital background bottom plate based on the preset-shape land block to obtain a segmented land block;
Extracting characteristic edges of the partitioned land parcels, determining a grid vertex set according to the characteristic edges, and generating a grid model based on the grid vertex set;
carrying out streaming loading and rendering processing on the grid model to generate a regional resource rendering model;
performing pixel clustering iterative processing on the digital background bottom plate based on the preset shape land block to obtain a segmented land block comprises:
setting the number of super pixels, distributing a plurality of initial clustering centers to each preset shape land block, calculating gradient values of all pixels in a first preset neighborhood of the initial clustering centers, and selecting a pixel corresponding to the minimum gradient value as a new clustering center;
calculating the pixel distance between each pixel and the new clustering center in a second preset adjacent area of the new clustering center, selecting a new clustering center with the smallest pixel distance as the pixel clustering center of the pixel for each pixel, and distributing class labels of the corresponding pixel clustering centers for the pixel;
for a plurality of super pixels, respectively calculating average vectors of all pixels contained in each super pixel to obtain an iterative clustering center, and replacing the new clustering center with the iterative clustering center and repeatedly iterating until convergence to obtain a plurality of partitioned plots;
The step of performing a first virtual segmentation on the digital background bottom plate to obtain a land block with a preset shape comprises the following steps:
based on the digital background bottom plate, buildingFOCUSONA focus polygon dataset;
based on the followingFOCUSONThe focus polygon data set picks up and stores a plurality of polygon points, and performs distance calculation on the polygon points to obtain a plurality of virtual polygons;
assigning vector values to the edges of each virtual polygon to obtain edge vectors, calculating the cross multiplication results of adjacent edge vectors in each virtual polygon, and judging whether the edge vectors with the cross multiplication results smaller than a preset value exist or not;
if no side vector with the cross multiplication result smaller than the preset value exists, the virtual polygon corresponding to the side vector is a convex polygon so as to obtain a plurality of land parcels with preset shapes;
if an edge vector with a cross multiplication result smaller than a preset value exists, the virtual polygon corresponding to the edge vector is a concave polygon, the virtual polygon is used as a polygon to be processed, and segmentation conversion and concave-convex testing are carried out on the polygon to be processed so as to obtain a plurality of land blocks with preset shapes;
the step of performing a second virtual segmentation on the digital background bottom plate to obtain a plurality of land areas with preset shapes comprises the following steps:
Inputting a preset triangle into an area land block of the digital background bottom plate, performing triangle cutting on the area land block based on the preset triangle to generate a first cutting land block in the area land block and a second cutting land block outside the area land block, discarding the second cutting land block, and obtaining a plurality of land blocks with preset shapes based on the first cutting land block;
the step of determining a grid vertex set according to the characteristic edge and generating a grid model based on the grid vertex set comprises the following steps:
extracting the pixel boundary of the super pixel by using an 8-neighborhood boundary tracking method, and taking the point on the pixel boundary as a first grid vertex;
based on the pixel boundary, extracting intersection points of adjacent super pixels as second grid vertexes;
extracting a first point set on the characteristic edge of the partitioned land block and a second point set of the 2-neighborhood set of the pixel boundary, calculating a point difference set between the first point set and the second point set, and uniformly sampling the point difference set to obtain a third grid vertex;
and determining a grid vertex set according to the first grid vertex, the second grid vertex and the third grid vertex, and decomposing the partitioned land block into a plurality of triangle clusters based on points in the grid vertex set to obtain a grid model.
2. The method for rendering area resources according to claim 1, wherein the step of performing segmentation conversion and concave-convex testing on the polygon to be processed to obtain a plurality of blocks with preset shapes comprises:
selecting an edge vector corresponding to a cross multiplication result smaller than a preset value from the polygon to be processed as a segmentation vector, and inputting the polygon to be processed into a two-dimensional coordinate system;
moving an edge vector adjacent to the segmentation vector of the polygon to be processed to coincide with an abscissa axis, and moving a starting point of the edge vector to an origin position of the two-dimensional coordinate system;
dividing the polygon to be processed based on the dividing vector to obtain a first polygon, rotating the first polygon clockwise to enable the dividing vector to coincide with the abscissa axis, and judging whether the end point of the adjacent next side vector of the dividing vector is located below the abscissa axis;
and if the end point of the adjacent next side vector of the split vector is not positioned below the abscissa axis, the first polygon is a convex polygon, and the first polygon is taken as a preset shape land block.
3. The area resource rendering method of claim 1, wherein the step of extracting the feature edges of the partitioned land block includes:
performing Gaussian filtering on the divided land block, and utilizingSobelThe operator calculates a first pixel gradient matrix of the divided land block in the X direction and a second pixel gradient matrix of the divided land block in the Y direction respectively;
calculating a gradient intensity matrix according to the first pixel gradient matrix and the second pixel gradient matrix, determining the current pixel gradient intensity based on the gradient intensity matrix, and judging whether the current pixel gradient intensity contrast and the pixel gradient intensity of the adjacent pixel along the positive and negative gradient directions are maximum values or not;
if the current pixel gradient strength contrast and the pixel gradient strength of the adjacent pixels along the positive and negative gradient directions are the maximum values, the corresponding pixel edge points are reserved, and if the current pixel gradient strength contrast and the pixel gradient strength of the adjacent pixels along the positive and negative gradient directions are not the maximum values, the corresponding pixel points are omitted;
removing pixel edge points lower than a first preset intensity threshold, taking pixel edge points between the first preset intensity threshold and a second preset intensity threshold as weak edge pixel points, taking pixel edge points higher than the second preset intensity threshold as strong edge pixel points, and determining characteristic edges of the partitioned land block based on the strong edge pixel points.
4. A zone resource rendering system, the system comprising:
the segmentation module is used for acquiring a digital background bottom plate of the region, and performing first virtual segmentation or second virtual segmentation on the digital background bottom plate to obtain a plurality of land parcels with preset shapes;
the iteration module is used for carrying out pixel clustering iteration processing on the digital background bottom plate based on the preset-shape land block so as to obtain a segmented land block;
the extraction module is used for extracting characteristic edges of the partitioned land parcels, determining a grid vertex set according to the characteristic edges and generating a grid model based on the grid vertex set;
the rendering module is used for carrying out streaming loading and rendering processing on the grid model so as to generate a regional resource rendering model;
the iteration module comprises:
the distribution sub-module is used for setting the number of super pixels, distributing a plurality of initial clustering centers to each preset shape land block, calculating gradient values of all pixels in a first preset neighborhood of the initial clustering centers, and selecting the pixel corresponding to the minimum gradient value as a new clustering center;
a pixel distance ion module, configured to calculate a pixel distance between each pixel and the new cluster center in a second preset neighborhood of the new cluster center, select, for each pixel, a new cluster center corresponding to the pixel distance that is the smallest as a pixel cluster center of the pixel, and allocate a class label of the corresponding pixel cluster center to the pixel;
The iteration sub-module is used for respectively calculating average vectors of all pixels contained in each super pixel for a plurality of super pixels to obtain an iteration clustering center, and replacing the new clustering center with the iteration clustering center and repeatedly iterating until convergence to obtain a plurality of divided plots;
the segmentation module comprises:
a data set sub-module for establishing based on the digital background base plateFOCUSONA focus polygon dataset;
a distance calculation sub-module for based on theFOCUSONThe focus polygon data set picks up and stores a plurality of polygon points, and performs distance calculation on the polygon points to obtain a plurality of virtual polygons;
the vector giving sub-module is used for giving vector values to the edges of each virtual polygon to obtain edge vectors, calculating the cross multiplication results of adjacent edge vectors in each virtual polygon, and judging whether the edge vectors with the cross multiplication results smaller than a preset value exist or not;
the land parcel determining submodule is used for obtaining a plurality of land parcels with preset shapes if no side vector with the cross multiplication result smaller than a preset value exists, and the virtual polygon corresponding to the side vector is a convex polygon;
the conversion sub-module is used for if an edge vector with a cross multiplication result smaller than a preset value exists, the virtual polygon corresponding to the edge vector is a concave polygon, the virtual polygon is used as a polygon to be processed, and segmentation conversion and concave-convex testing are carried out on the polygon to be processed so as to obtain a plurality of land parcels with preset shapes;
The segmentation module further includes:
the triangle segmentation submodule is used for inputting a preset triangle into an area land block of the digital background bottom plate, performing triangle cutting on the area land block based on the preset triangle so as to generate a first cutting land block in the area land block and a second cutting land block outside the area land block, discarding the second cutting land block and obtaining a plurality of land blocks with preset shapes based on the first cutting land block;
the extraction module comprises:
the first vertex determining submodule is used for extracting the pixel boundary of the super pixel by using an 8-neighborhood boundary tracking method and taking the point on the pixel boundary as a first grid vertex;
a second vertex determining sub-module, configured to extract, based on the pixel boundary, intersection points of adjacent super pixels as second mesh vertices;
the third vertex determining sub-module is used for extracting a first point set on the characteristic edge of the partitioned land block and a second point set of the 2-neighborhood set of the pixel boundary, calculating a point difference set between the first point set and the second point set, and uniformly sampling the point difference set to obtain a third grid vertex;
And the vertex set determining submodule is used for determining a grid vertex set according to the first grid vertex, the second grid vertex and the third grid vertex, and decomposing the partitioned land block into a plurality of triangle clusters based on points in the grid vertex set so as to obtain a grid model.
5. A computer comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the area resource rendering method of any one of claims 1 to 3 when the computer program is executed.
6. A readable storage medium, characterized in that the readable storage medium has stored thereon a computer program which, when executed by a processor, implements the area resource rendering method according to any one of claims 1 to 3.
CN202310692747.7A 2023-06-13 2023-06-13 Regional resource rendering method, system, computer and readable storage medium Active CN116468838B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310692747.7A CN116468838B (en) 2023-06-13 2023-06-13 Regional resource rendering method, system, computer and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310692747.7A CN116468838B (en) 2023-06-13 2023-06-13 Regional resource rendering method, system, computer and readable storage medium

Publications (2)

Publication Number Publication Date
CN116468838A CN116468838A (en) 2023-07-21
CN116468838B true CN116468838B (en) 2023-08-18

Family

ID=87182847

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310692747.7A Active CN116468838B (en) 2023-06-13 2023-06-13 Regional resource rendering method, system, computer and readable storage medium

Country Status (1)

Country Link
CN (1) CN116468838B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117058292B (en) * 2023-07-28 2024-04-26 北京透彻未来科技有限公司 Tone scale map rendering system based on digital pathological image

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101417714B1 (en) * 2014-03-04 2014-07-16 인하대학교 산학협력단 Acceleration method of quad-tree triangulation for realtime terrain rendering using bimodal vertex splitting method
WO2016092588A1 (en) * 2014-12-09 2016-06-16 三菱電機株式会社 Rendering device and rendering method
CN112836694A (en) * 2021-02-05 2021-05-25 广州华多网络科技有限公司 Image character extraction method and device, computer equipment and storage medium
CN113034662A (en) * 2021-03-29 2021-06-25 网易(杭州)网络有限公司 Virtual scene rendering method and device, storage medium and electronic equipment
CN114708414A (en) * 2022-04-19 2022-07-05 中铁二院工程集团有限责任公司 Engineering three-dimensional terrain data cutting and fusing method and system
CN115193034A (en) * 2022-06-29 2022-10-18 网易(杭州)网络有限公司 Rendering method and device for water flow area in virtual scene and computer equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5562075B2 (en) * 2010-03-09 2014-07-30 カルソニックカンセイ株式会社 Method and apparatus for creating surface processing data

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101417714B1 (en) * 2014-03-04 2014-07-16 인하대학교 산학협력단 Acceleration method of quad-tree triangulation for realtime terrain rendering using bimodal vertex splitting method
WO2016092588A1 (en) * 2014-12-09 2016-06-16 三菱電機株式会社 Rendering device and rendering method
CN112836694A (en) * 2021-02-05 2021-05-25 广州华多网络科技有限公司 Image character extraction method and device, computer equipment and storage medium
CN113034662A (en) * 2021-03-29 2021-06-25 网易(杭州)网络有限公司 Virtual scene rendering method and device, storage medium and electronic equipment
CN114708414A (en) * 2022-04-19 2022-07-05 中铁二院工程集团有限责任公司 Engineering three-dimensional terrain data cutting and fusing method and system
CN115193034A (en) * 2022-06-29 2022-10-18 网易(杭州)网络有限公司 Rendering method and device for water flow area in virtual scene and computer equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
A hierarchical tiling algorithm for tile based rendering with Global Scratch Counter under multi core environment;Jun-Seo Kim;《TENCON 2011 - 2011 IEEE Region 10 Conference》;全文 *

Also Published As

Publication number Publication date
CN116468838A (en) 2023-07-21

Similar Documents

Publication Publication Date Title
Jancosek et al. Multi-view reconstruction preserving weakly-supported surfaces
CN111210429B (en) Point cloud data partitioning method and device and obstacle detection method and device
CN109978839B (en) Method for detecting wafer low-texture defects
US20130300735A1 (en) Mesh boundary smoothing
WO2019119567A1 (en) Systems and methods for block based edgel detection with false edge elimination
CN111582054B (en) Point cloud data processing method and device and obstacle detection method and device
CN110349092B (en) Point cloud filtering method and device
CN116468838B (en) Regional resource rendering method, system, computer and readable storage medium
CN110751620B (en) Method for estimating volume and weight, electronic device, and computer-readable storage medium
US20120280996A1 (en) Method and system for rendering three dimensional views of a scene
CN111275633A (en) Point cloud denoising method, system and device based on image segmentation and storage medium
CN108960012B (en) Feature point detection method and device and electronic equipment
CN110046623B (en) Image feature point extraction method and camera
CN109377552B (en) Image occlusion calculating method, device, calculating equipment and storage medium
CN111127622B (en) Three-dimensional point cloud outlier rejection method based on image segmentation
CN104239874B (en) A kind of organ blood vessel recognition methods and device
Mahmoudpour et al. Superpixel-based depth map estimation using defocus blur
CN116012393A (en) Carton point cloud segmentation method, device and processing equipment
CN111932566A (en) Method, device and system for generating model contour map
CN112802175B (en) Large-scale scene shielding and eliminating method, device, equipment and storage medium
CN113593036A (en) Imaging system, method, device and program with reference to grid parameterized model
CN110738719A (en) Web3D model rendering method based on visual range hierarchical optimization
CN112862726B (en) Image processing method, device and computer readable storage medium
CN117455936B (en) Point cloud data processing method and device and electronic equipment
RU2555238C1 (en) Digital image segmentation method (versions)

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant