CN118097085B - Method and system for automatically migrating topographic patterns and styles - Google Patents

Method and system for automatically migrating topographic patterns and styles Download PDF

Info

Publication number
CN118097085B
CN118097085B CN202410487020.XA CN202410487020A CN118097085B CN 118097085 B CN118097085 B CN 118097085B CN 202410487020 A CN202410487020 A CN 202410487020A CN 118097085 B CN118097085 B CN 118097085B
Authority
CN
China
Prior art keywords
color
colors
map
rule
image
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
CN202410487020.XA
Other languages
Chinese (zh)
Other versions
CN118097085A (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.)
Nanjing Normal University
Original Assignee
Nanjing Normal University
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 Nanjing Normal University filed Critical Nanjing Normal University
Priority to CN202410487020.XA priority Critical patent/CN118097085B/en
Publication of CN118097085A publication Critical patent/CN118097085A/en
Application granted granted Critical
Publication of CN118097085B publication Critical patent/CN118097085B/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
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/04Texture mapping
    • 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
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/762Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
    • G06V10/7625Hierarchical techniques, i.e. dividing or merging patterns to obtain a tree-like representation; Dendograms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/762Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
    • G06V10/763Non-hierarchical techniques, e.g. based on statistics of modelling distributions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2219/00Indexing scheme for manipulating 3D models or images for computer graphics
    • G06T2219/20Indexing scheme for editing of 3D models
    • G06T2219/2012Colour editing, changing, or manipulating; Use of colour codes

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Graphics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Multimedia (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Geometry (AREA)
  • Probability & Statistics with Applications (AREA)
  • Remote Sensing (AREA)
  • Architecture (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a method and a system for automatically migrating a topographic map style, wherein the method comprises the following steps: extracting the salient colors of the image for a given reference map, and organizing the extracted colors into a hierarchical color grid; obtaining the dominant color of the color grid by using a hierarchical clustering algorithm; constructing a topography mapping rule of quantitative expression, including elevation continuity, atmospheric perspective and custom color rule, and determining a scoring model F s (C) of a topography attention point; determining a scoring model F a (C) of the aesthetic point of interest according to the consistency of the layered color arrangement and matching and the main color of the image and considering the ratio of the colors; and defining the color migration problem as a double-target optimization problem, solving the problem by adopting a heuristic search method, and carrying out color replacement on the input map according to the solving result to obtain the final relief-shading map. The method can support style migration of continuous and graded color bands and has good adaptability to different scales, subjects and areas.

Description

Method and system for automatically migrating topographic patterns and styles
Technical Field
The invention relates to the fields of geographic information systems (Geographic Information System, GIS), computer-aided mapping (Computer-aided Cartography, CAC) and Computer graphics (Computer Graphics, CG), in particular to a method and a system for automatically migrating a topographic map style.
Background
The topography visualization is required to express not only morphological characteristics of topography but also feelings of a diagrammer on places. But creating a terrain visualization that reflects both the scientificity and artistic expressiveness of the terrain is extremely challenging for both specialists and non-specialists. For centuries, drafters have innovated continuously and designed various methods to express topography, such as section lines, contour lines, relief, layering, etc. Wherein layered color setting is critical to making an effective and vivid terrain visualization. The layering color setting can distinguish elevation zones by establishing the corresponding relation between colors and elevations, and the stereoscopic effect is generated by utilizing the advancing/retreating sense of the colors; can also be combined with contour lines, relief shading and the like to enhance the three-dimensional sense of the topography.
In order to achieve expressive terrain visualization, the diversity of terrain and observers should be considered. Currently, topography visualization is no longer limited to specialized atlases, and is beginning to be popular to the public to describe a unique environmental experience, e.g., creating a story map of a wonderful canyon road trip, requiring expression of not only local elevation and topography features (e.g., grade and slope), but also emotional and aesthetic experiences of the person's surroundings. Furthermore, it is very difficult to design a powerful grading set of terrain completely from scratch, and a common approach is to find a suitable source of inspiration, such as a master drawing or impressive photograph. In the field of computer graphics, researchers have done a great deal of work on color migration from image to image, such as neural network-based color migration methods. At the same time, color migration has attracted attention from many diagrammers. An adaptive method for transferring colors from an image to a map is proposed, but the method is oriented to a common vector map, and a color transfer method for visualizing from the image to the topography is not realized.
To solve the above-mentioned problems, a new calculation method is needed that can automatically migrate the color from an arbitrary image to the topography visualization. The Chinese patent with the name of CN202211127356.2 and the publication number of CN115439366A discloses a method for automatically migrating the vector map style, which quantifies the information transmission and aesthetic quality of map colors, converts the information transmission and aesthetic quality into a double-target optimization problem, and utilizes the pareto front to sample and generate a series of high-quality color schemes so as to adaptively migrate the colors from any image to a vector map. The invention can realize the color migration from any image to the vector map, and has better adaptability to different scales, subjects and areas; four modes are provided to transfer style from image to map for novice and expert needs. The patent with the name of 'a method for automatically transferring the style of the thematic map', the application number of which is CN202211127200.4, and the publication number of which is CN115564667A, discloses a method for automatically transferring the style of the thematic map, which comprises the following steps: performing image space feature evaluation by using image entropy, completing image classification, generating an image color gamut, and taking the color gamut as a source of a thematic map color setting scheme; establishing a measurement model of the scientificity of the thematic map according to main rules related to the measurement of the scientificity of the thematic map, and taking the scientificity score of the thematic map as a first optimization target; according to main rules related to the artistry of the thematic map, including map color emotion expression, color preference and color harmony, constructing a measurement model reflecting the artistic beauty of the thematic map, and taking the score of the artistic beauty of the thematic map as a second optimization target; and (3) automatically transferring and organizing the thematic map style into a double-target optimization problem, searching a solution set by adopting a heuristic algorithm, and thus obtaining a series of thematic map style transferring results. The method can realize the rapid generation of the color schemes of the thematic maps of different types. Although the patent named as a method for automatically migrating the style of the vector map proposes a reference image color organization mode similar to the dotted line and the plane of the map, the method does not consider the color organization characteristics of the topographic map, such as grading and stretching, and cannot generate a color scheme for grading and setting colors of the topographic map. The patent named 'a method for automatically transferring a thematic map style' can adapt to different map themes, but the method does not consider the drawing rule of a topographic map and is not applicable to the style transfer of the topographic map.
Disclosure of Invention
The invention aims to: in order to overcome the defects of the prior art, the invention provides a topographic map style automatic migration method, which realizes the color migration from an image to topographic visualization, supports the style migration of continuous and graded color bands, and has good adaptability to different scales, subjects and areas.
It is another object of the present invention to provide a topography style automatic migration system, a computer device and a computer readable storage medium.
The technical scheme is as follows: according to a first aspect of the present invention, a method for automatic topographic style migration comprises the steps of:
For a given reference graph, extracting W significant colors by using a K-means clustering algorithm, and organizing the extracted colors into a layered color grid according to a self-organizing map (SOM) algorithm;
Dividing the color grids identified by the dominant colors by using a hierarchical clustering algorithm to obtain the dominant colors of the color grids, wherein the color distribution of one image is quantized into N dominant colors;
Constructing a topography drawing rule of quantitative expression, wherein the topography drawing rule comprises an elevation continuity rule, an atmospheric perspective rule and a custom color rule, the elevation continuity rule measures the continuous variability of layering coloring and color matching through the fitting degree of brightness and saturation, the atmospheric perspective rule is defined as monotonicity of chromatic aberration according to the fact that the color contrast is reduced along with the increase of distance, the custom color rule is quantized to the deviation degree of standard colors from a specified elevation band, and a scoring model F s (C) of a topography concern point is determined according to the scoring product of the three rules;
according to the consistency of the layered color arrangement and matching and the main color of the image, simultaneously taking the duty ratio of the color into consideration, obtaining the color similarity between the image and the topography visualization, and determining a scoring model F a (C) of the aesthetic feeling attention point according to the color similarity and the color harmony degree;
According to the scoring model F s (C) of the terrain attention point and the scoring model F a (C) of the aesthetic attention point, defining a color migration problem as a double-target optimization problem, wherein the problem aims at maximizing both F s (C) and F a (C), solving the problem by adopting a heuristic search method, and carrying out color replacement on an input map according to a solving result to obtain a final relief and holly-shaded map.
Further, organizing the extracted colors into a hierarchical color grid according to a self-organizing map neural network SOM algorithm includes:
The SOM algorithm initializes a color grid with w×w nodes, w×w=w, then sequentially traverses the salient colors of the image, continuously iteratively adjusts the node weights according to the color distance between the nodes and the salient colors in the CIELab color space, and updates the weights by adopting a winner general eating strategy, i.e. the weight of a node is distributed to the color value closest to the input color, thus obtaining a regularized w×w color grid, wherein all the color node weights of each grid unit come from the salient colors.
Further, using a hierarchical clustering algorithm to segment the color grid of the dominant color identification, obtaining the dominant color of the color grid includes:
And performing bottom-up hierarchical clustering based on a given JNCD threshold by adopting JNCD color distances, determining the number of required color categories according to hue categories of the required colors of the topographic map, and if the number of clusters according to the hierarchical clustering is more than the number of required color categories to reach a specified amplitude, performing secondary clustering on the region by using a JNCD threshold which is 2 times, and continuing to perform clustering through the cluster threshold which is continuously increased until the main colors of the target number are obtained.
Further, in the elevation continuity rule, the continuous variability of the color matching of the layered color setting is defined as:
wherein f g (C) represents the continuous variability of the layered color set color matching C, c= (C 1, c2, ..., cn),ci is the color of the i-th elevation band, n is the number of colors in C, Is the degree of fit of the k-degree polynomial,Is a coefficient of polynomial fitting, f L (t) is a correction function of luminance variation, t is a correction coefficient, all color calculations are performed in the CIELab color space, L is a luminance component in the CIELab color space,The color density in CIELab color space, which is C, is 1,2 or 3, and represents mono-, bi-and polychromatic, respectively, f L (t) represents the principle of "Gao Chengyue high, darker color" when t=1, whereas "Gao Chengyue high, brighter color" when t= -1.
Further, in the atmospheric perspective rule, monotonicity of chromatic aberration is defined as:
Wherein f ap (C) represents monotonicity of the chromatic aberration, Is the euclidean distance between two colors in CIELab space, c= (C 1, c2, ..., cn),ci is the color of the ith elevation band, n is the number of colors in C.
Further, in the custom color rule, the degree of shift is defined as:
The scores of all layered colors C following the custom color are expressed as:
Wherein c= (C 1, c2, ..., cn),ci is the color of the i-th elevation band, Is the custom color of the ith elevation band, gamma is the color distance threshold following the custom color principle,Is the euclidean distance between two colors in the CIELab space.
Further, the color similarity between the image and the terrain visualization is defined as:
Wherein the method comprises the steps of Is the scale of the ith dominant color in the reference diagram,Is the weighted proportion of the ith main color in layered color arrangement and matching; j is the j-th color belonging to the i-th main color in the reference diagram,Is the proportion thereof; alpha is the color distance threshold value and,Is the ith dominant color on the reference graph,The j color belonging to the i-th main color on the resulting topography;
The calculation formula of the scoring model F a (C) of the aesthetic point of interest is as follows:
scoring the color harmony measures of the hierarchical set colors.
According to a second aspect of the present invention, a topography style automatic migration system comprises:
The color grid construction module is used for extracting W significant colors from a given reference image by using a K-means clustering algorithm, and organizing the extracted colors into a layered color grid according to a self-organizing mapping neural network (SOM) algorithm;
The main color recognition module is used for dividing the color grids recognized by the main colors by using a hierarchical clustering algorithm to obtain the main colors of the color grids, and the color distribution of one image is quantized into N main colors;
The map quality model construction module is used for constructing a quantized and expressed topography drawing rule comprising elevation continuity, atmospheric perspective and conventional color rules, wherein the elevation continuity rule is used for measuring the continuous variability of layered color matching through the fitting degree of brightness and saturation, the atmospheric perspective rule is defined as monotonicity of chromatic aberration according to the fact that the color contrast is reduced along with the increase of distance, the conventional color rule is quantized to be offset degree with standard colors of a specified elevation band, and a scoring model F s (C) of a topography focus point is determined according to the scoring product of the three rules;
The map aesthetic model construction module is used for obtaining the color similarity between the image and the topography visualization according to the consistency of the layered color arrangement and matching and the main color of the image and considering the ratio of the colors, and determining a scoring model F a (C) of the aesthetic points of interest according to the color similarity and the color harmony;
And the migration problem establishing and solving module is used for defining the color migration problem as a double-target optimization problem according to the scoring model F s (C) of the terrain attention point and the scoring model F a (C) of the aesthetic feeling attention point, solving the problem by adopting a heuristic searching method, and carrying out color replacement on the input map according to the solving result to obtain the final relief shading map.
According to a third aspect of the present invention, there is provided a computer device comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs when executed by the processors implement the steps of the method of topographic style auto migration as set forth in the first aspect of the present invention.
According to a fourth aspect of the present invention there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of a method of topographic style auto migration according to the first aspect of the present invention.
The beneficial effects are that: compared with the prior art, the invention has the following remarkable advantages: aiming at the characteristic of continuous topography, the remarkable colors of the reference map are extracted, and the discrete and irregular image colors are organized into a continuous regular color grid, so that local or global color search, class tone selection and sequential tone interpolation can be supported, the method can support style migration of continuous and graded color bands, and the method has good adaptability to different scales, subjects and areas. Secondly, considering the drawing rules of the topographic map, such as atmospheric perspective, elevation continuity and the like, internalizing the rules in migration problem modeling ensures the quality of the resulting topographic map, and combining aesthetic considerations ensures stronger visual similarity before and after migration. The invention provides a portable and flexible style migration method for topographic map making.
Drawings
FIG. 1 is a flow chart of the method of the present invention;
FIG. 2 is a flow chart of color organization;
FIG. 3 is a schematic diagram of a staged ribbon generation scheme;
FIG. 4 is a graph of results with and without atmospheric perspective;
Fig. 5 is an example of migration results of the method of the present invention.
Detailed Description
The technical scheme of the invention is further described below with reference to the accompanying drawings.
Referring to the flow shown in fig. 1, the method of topographic style auto-migration includes the following steps.
Step1, for a given reference graph, extracting significant colors, and organizing the extracted colors into a hierarchical color grid.
The invention considers two layering coloring schemes: one is a class tone consisting of different colors with distinct color intervals, and the other is a smoothly transitioned sequential tone. The second scheme may be regarded as a derivative of the first scheme, since the sequential tone scale scheme may be obtained by color interpolation of the class tone scale scheme. Therefore, the present invention uses a K-means clustering algorithm to extract W significant colors, which are then interpolated as needed.
It is a challenge to conduct either an exhaustive or heuristic search for the extracted salient colors. The present invention organizes the extracted colors into a two-dimensional space (hereinafter referred to as a color grid) using a self-organizing map neural network (SOM) algorithm. The SOM algorithm is a two-layer unsupervised neural network algorithm that uses competitive learning to produce a non-linear mapping of the grid of weight nodes from D-dimensional space to F-dimensions (D is typically lower than F). In contrast to the general dimension reduction method, the SOM algorithm can preserve the topology of the input samples.
The SOM algorithm initializes a color grid with w×w (w×w=w) nodes, sequentially traverses the salient colors of the image, iteratively adjusts node weights based on the color distance between the nodes and the salient colors in the CIELab color space, trains the SOM network, and updates the weights with a winner general-purpose strategy, i.e., the weight of a node is assigned to the color value closest to the input color. A regularized w x w color grid may then be obtained, wherein all color node weights for each grid cell are from the distinguishable dominant colors described above. In this way, the discrete, distinguishable colors in the three-dimensional CIELab are organized into a continuous two-dimensional grid. The SOM algorithm can well preserve the topology (e.g., adjacency) between distinguishable colors.
And 2, dividing the color grids identified by the dominant colors by using a hierarchical clustering algorithm to obtain the dominant colors of the color grids, wherein the color distribution of one image is quantized into N dominant colors.
The present invention uses hierarchical clustering algorithms to segment the color grid of dominant color recognition. The number of desired color categories may be determined based on the hue categories of the desired colors of the topography. To avoid parameter sensitivity due to directly specifying the number of clusters, just Noticeable Color Distance (JNCD) color distances are used for bottom-up hierarchical clustering. If the number of clusters according to hierarchical clustering is far greater than the number of desired color categories, e.g., by a specified magnitude greater than the number of desired color categories, then the present invention continues to re-cluster regions using a JNCD threshold of 2 times. Clustering may continue with increasing cluster thresholds until a target number of dominant colors are obtained. The flow of color organization is shown in fig. 2, and after two clusters, the example image obtains three dominant colors in the color grid.
The image color organization method of the invention can effectively support the exhaustive and heuristic color search operation. Local color adjustment typically occurs in one region of the color grid. For example, in fig. 3, if color c1 is designated as the color representing low ground, then c1 complies with the custom color principle (e.g., green represents low ground, blue represents sea), but if the principle of "Gao Chengyue low, brighter color" is also required, the brightness of c1 is relatively too dark. At this time, a color c2 having a uniform hue but a bright brightness can be searched around c 1. Conversely, if c1 is designated to represent the ocean, the custom color principle will be broken. At this time, the local adjustment of colors cannot meet the demand because all colors around c1 are green. Therefore, there is a need to search for colors on the global color grid, i.e. jump out of the local area, to a relatively remote color area, and re-search for colors. When jumping to another candidate color, e.g. c4, c4 follows the principle of conventional color. In this way the color grid facilitates both local and global color searches. The searched colors can be directly obtained into category colors or can be interpolated into sequential colors.
And 3, constructing a quantitative expression topographic map drawing rule, wherein the quantitative expression topographic map drawing rule comprises an elevation continuity rule, an atmospheric perspective rule and a conventional color rule, and determining a score model F s (C) of the topographic attention point according to the scores of the three rules.
(1) Elevation continuity.
Brightness and saturation are effective cues for perceived depth in the human visual system. The continuous variability of the layered color setting and matching C is measured by the fitting degree of the brightness and the saturation, and is expressed as f g (C), and the calculation formula is as follows:
where c= (C 1, c2, ..., cn),ci is the color of the i-th elevation band, n is the number of colors in C. Is the fit of the k degree polynomial.Is a coefficient of polynomial fitting, i.e. in the calculation formulaF L (t) is a correction function of the luminance change, and t is a correction coefficient. All color calculations were performed in the CIELab color space. L is the luminance component in the CIELab color space,Is the color concentration in the CIELab color space of C. k may be 1,2 or 3, representing mono-, bi-and polychromatic respectively. When t=1, f L (t) represents the principle of "higher darker", whereas when t= -1 is the principle of "higher brighter".
(2) And (5) atmospheric perspective.
According to the atmospheric perspective effect, the contrast of the color decreases with increasing distance, which can be understood as the monotonicity of the chromatic aberration, denoted f ap (C), defined as follows:
Wherein the method comprises the steps of Is the euclidean distance between two colors in the CIELab space. As shown in fig. 4, a) is a migration result without taking into consideration atmospheric perspective, and b) is a migration result with taking into consideration atmospheric perspective.
(3) Conventional colors are used.
The custom color is quantized to a degree of deviation from a standard color for a certain elevation band i, specifically as follows:
Wherein the method comprises the steps of Is the custom color of the ith elevation band, γ is the color distance threshold following the custom color principle, and m is the number of colors with custom colors. The score of all layered colors C following the custom color can be expressed as:
As described above, the scores of the three objective points of interest are quantified by F g,、fg and F c (C), i.e., then multiplied to obtain F s (C). Since all three scores were normalized, F s (C) ranged from 0 to 1.
And 4, according to the consistency of the layered color arrangement and matching and the main color of the image, simultaneously taking the duty ratio of the colors into consideration, obtaining the color similarity between the image and the topography visualization, and determining a scoring model F a (C) of the aesthetic sense attention point according to the color similarity.
The present invention treats color similarity between the reference map and the topography visualization as color consistency of the dominant color between the reference map and the resulting map. Histograms are commonly used to quantify color similarity between images. Because the color scale of the terrain may vary greatly from that of the reference map, histogram matching them can result in unavoidable overfitting. Because the main heights Cheng Yanse are all from the reference picture, the invention quantifies the color similarity into the consistency of the color matching of the layered color setting and the main color of the image, and simultaneously considers the duty ratio of the colors. The color distribution of an image is quantized to N dominant colors, the proportion of which is accumulated for each dominant color over all colors sharing the same area in the color grid. On the other hand, the invention anchors all colors in the layered color setting and matching with the main color; the proportion of dominant colors is calculated by the duty cycle of all discrete colors in a class tone scale scheme or the duty cycle of all interpolated colors in a sequential tone scale scheme. Since the colors in the layered set may not be dominant, the present invention calculates their ratio based on their inverse distance from the dominant color. In this way, all colors of the layered set are aligned with the dominant color in a weighted proportion. The overall color similarity between the reference map and the layered set can be measured in terms of their degree of alignment as follows:
Wherein the method comprises the steps of Is the scale of the ith dominant color in the reference figure.Is the weighted proportion of the ith main color in layered color arrangement and matching; j is the j-th color belonging to the i-th dominant color on the reference map.Is the proportion thereof; alpha is the color distance threshold.Is the i-th dominant color on the reference map, and as a result the topography colors are all derived from the reference image,Is the j-th color belonging to the i-th dominant color on the resulting topography.
The similarity of colors has a dual effect on the model. First, the present invention contemplates using similar colors to evoke similar emotional responses. Second, the present invention assumes that the input reference map is favored by the reader, and that the color of the reference map conforms to the reader's color preference.
In addition to color preferences, color blending is another major aspect of aesthetics. The present invention does not require perfect reference to the drawings, but it is desirable to derive a hierarchical coloring scheme for color blending. Thus, the present invention explicitly scores color harmony. Some studies have been made by the former to summarize rules of color reconciliation, such as color similarity principles and color contrast principles. The present invention uses Kita and Miyata methods (https:// doi.org/10.1111/cgf.13010) to score the color Harmony of the layered set, denoted Harmony (C). The method adopts a regression model, utilizes high-dimensional color features in a large dataset to evaluate color harmony, including color proximity and contrast features, and is not limited by the number of colors. The overall similarity to aesthetics F a is calculated as follows:
the score for the color harmony measures is normalized. Since the similarity of colors is also normalized, the overall similarity to aesthetics is also between 0 and 1.
The input parameters of the model are elevation and area, and support various terrain models, such as grids DEM, TIN and contour: the elevation may be derived from a grid, triangle or contour; the area may then be calculated based on the number of grids or triangulars, or the coverage of contours that fall within the elevation band.
And 5, defining a color migration problem as a double-target optimization problem according to the scoring model F s (C) of the terrain attention point and the scoring model F a (C) of the aesthetic attention point, solving the problem by adopting a heuristic search method, and setting the color according to the solution to obtain a final relief shading map.
The present invention defines the color migration problem as a two-objective optimization problem, including objective concerns and aesthetic goals, even though both F s (C) and F a (C) are maximized. In addition to the two optimization goals described above, constraints can be optionally added. For example, hierarchical coloring of class levels should add a constraint on color variability to ensure that all colors are distinguishable from each other.
Color migration from image to terrain visualization is defined as a MAX-MAX problem, with normalization for F s (C) and F a (C). Existing dual objective optimization methods can be used to solve this problem, such as Artificial Bee Colony (ABC) or evolutionary algorithms. The dual objective optimization problem typically has a set of solutions, any of which is not superior to the other, which are mathematically called pareto fronts. The present invention treats the midpoint of the pareto front as a solution that balances the objective concern and aesthetic similarity. The pareto front can be sampled to produce a series of satisfactory solutions. The output color results can be obtained by replacing the colors of the input map, so that different migration results can be obtained, and other professional GIS software can be input for color matching of the topographic map. As shown in fig. 5, for two given reference pictures, the method can give relief-effect maps with visual expressive force on different terrains, and is flexible and practical.
Based on the same technical conception as the method embodiment, the invention also provides a topographic map style automatic migration system, which comprises:
The color grid construction module is used for extracting W significant colors from a given reference image by using a K-means clustering algorithm, and organizing the extracted colors into a layered color grid according to a self-organizing mapping neural network (SOM) algorithm;
The main color recognition module is used for dividing the color grids recognized by the main colors by using a hierarchical clustering algorithm to obtain the main colors of the color grids, and the color distribution of one image is quantized into N main colors;
The map quality model construction module is used for constructing a quantized and expressed topography drawing rule comprising elevation continuity, atmospheric perspective and conventional color rules, wherein the elevation continuity rule is used for measuring the continuous variability of layered color matching through the fitting degree of brightness and saturation, the atmospheric perspective rule is defined as monotonicity of chromatic aberration according to the fact that the color contrast is reduced along with the increase of distance, the conventional color rule is quantized to be offset degree with standard colors of a specified elevation band, and a scoring model F s (C) of a topography focus point is determined according to the scoring product of the three rules;
The map aesthetic model construction module is used for obtaining the color similarity between the image and the topography visualization according to the consistency of the layered color arrangement and matching and the main color of the image and considering the ratio of the colors, and determining a scoring model F a (C) of the aesthetic points of interest according to the color similarity and the color harmony;
And the migration problem establishing and solving module is used for defining the color migration problem as a double-target optimization problem according to the scoring model F s (C) of the terrain attention point and the scoring model F a (C) of the aesthetic feeling attention point, solving the problem by adopting a heuristic searching method, and carrying out color replacement on the input map according to the solving result to obtain the final relief shading map.
It should be understood that the topography style automatic migration system in the embodiment of the present invention may implement all the technical solutions in the above method embodiments, and the functions of each functional module may be specifically implemented according to the methods in the above method embodiments, and the specific implementation process may refer to the relevant descriptions in the above embodiments, which are not repeated herein.
The present invention also provides a computer device comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs when executed by the processors implement the steps of the method of topographic style auto migration as described above.
The present invention also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of a method of topographic style auto migration as described above.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations of methods, systems, and computer program products according to embodiments of the invention. It will be understood that each flow in the flowchart, and combinations of flows in the flowchart, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows.

Claims (10)

1. A method for automatically migrating a topographic style, comprising the steps of:
For a given reference graph, extracting W significant colors by using a K-means clustering algorithm, and organizing the extracted colors into a layered color grid according to a self-organizing map (SOM) algorithm;
Dividing the color grids identified by the dominant colors by using a hierarchical clustering algorithm to obtain the dominant colors of the color grids, wherein the color distribution of one image is quantized into N dominant colors;
Constructing a topography drawing rule of quantitative expression, wherein the topography drawing rule comprises an elevation continuity rule, an atmospheric perspective rule and a custom color rule, the elevation continuity rule measures the continuous variability of layering coloring and color matching through the fitting degree of brightness and saturation, the atmospheric perspective rule is defined as monotonicity of chromatic aberration according to the fact that the color contrast is reduced along with the increase of distance, the custom color rule is quantized to the deviation degree of standard colors from a specified elevation band, and a scoring model F s (C) of a topography concern point is determined according to the scoring product of the three rules;
according to the consistency of the layered color arrangement and matching and the main color of the image, simultaneously taking the duty ratio of the color into consideration, obtaining the color similarity between the image and the topography visualization, and determining a scoring model F a (C) of the aesthetic feeling attention point according to the color similarity and the color harmony degree;
According to the scoring model F s (C) of the terrain attention point and the scoring model F a (C) of the aesthetic attention point, defining a color migration problem as a double-target optimization problem, wherein the problem aims at maximizing both F s (C) and F a (C), solving the problem by adopting a heuristic search method, and carrying out color replacement on an input map according to a solving result to obtain a final relief and holly-shaded map.
2. The method of claim 1, wherein organizing the extracted colors into a hierarchical color grid according to a self-organizing map neural network SOM algorithm comprises:
The SOM algorithm initializes a color grid with w×w nodes, w×w=w, then sequentially traverses the salient colors of the image, continuously iteratively adjusts the node weights according to the color distance between the nodes and the salient colors in the CIELab color space, and updates the weights by adopting a winner general eating strategy, i.e. the weight of a node is distributed to the color value closest to the input color, thus obtaining a regularized w×w color grid, wherein all the color node weights of each grid unit come from the salient colors.
3. The method of claim 1, wherein using a hierarchical clustering algorithm to segment the color grid for dominant color identification, obtaining the dominant color of the color grid comprises:
And performing bottom-up hierarchical clustering based on a given JNCD threshold by adopting JNCD color distances, determining the number of required color categories according to hue categories of the required colors of the topographic map, and if the number of clusters according to the hierarchical clustering is more than the number of required color categories to reach a specified amplitude, performing secondary clustering on the region by using a JNCD threshold which is 2 times, and continuing to perform clustering through the cluster threshold which is continuously increased until the main colors of the target number are obtained.
4. The method of claim 1, wherein in the elevation continuity rule, the continuous variability of the layered color scheme is defined as:
wherein f g (C) represents the continuous variability of the layered color set color matching C, c= (C 1 , c2 , ..., cn),ci is the color of the i-th elevation band, n is the number of colors in C, Is the degree of fit of the k-degree polynomial,Is a coefficient of polynomial fitting, f L (t) is a correction function of luminance variation, t is a correction coefficient, all color calculations are performed in the CIELab color space, L is a luminance component in the CIELab color space,The color density in CIELab color space, which is C, is 1,2 or 3, and represents mono-, bi-and polychromatic, respectively, f L (t) represents the principle of "Gao Chengyue high, darker color" when t=1, whereas "Gao Chengyue high, brighter color" when t= -1.
5. The method according to claim 1, wherein in the atmospheric perspective rule, monotonicity of chromatic aberration is defined as:
Wherein f ap (C) represents monotonicity of the chromatic aberration, Is the euclidean distance between two colors in CIELab space, c= (C 1 , c2 , ..., cn),ci is the color of the ith elevation band, n is the number of colors in C.
6. The method of claim 1, wherein in the habit color rule, the degree of shift is defined as:
The scores of all layered colors C following the custom color are expressed as:
Wherein c= (C 1 , c2 , ..., cn),ci is the color of the i-th elevation band, Is the custom color of the ith elevation band, gamma is the color distance threshold following the custom color principle,Is the euclidean distance between two colors in the CIELab space.
7. The method of claim 1, wherein the color similarity between the image and the terrain visualization is defined as:
Wherein the method comprises the steps of Is the scale of the ith dominant color in the reference diagram,Is the weighted proportion of the ith main color in layered color arrangement and matching; j is the j-th color belonging to the i-th main color in the reference diagram,Is the proportion thereof; alpha is the color distance threshold value and,Is the ith dominant color on the reference graph,The j color belonging to the i-th main color on the resulting topography;
The calculation formula of the scoring model F a (C) of the aesthetic point of interest is as follows:
scoring the color harmony measures of the hierarchical set colors.
8. A topography style automatic migration system, comprising:
The color grid construction module is used for extracting W significant colors from a given reference image by using a K-means clustering algorithm, and organizing the extracted colors into a layered color grid according to a self-organizing mapping neural network (SOM) algorithm;
The main color recognition module is used for dividing the color grids recognized by the main colors by using a hierarchical clustering algorithm to obtain the main colors of the color grids, and the color distribution of one image is quantized into N main colors;
The map quality model construction module is used for constructing a quantized and expressed topography drawing rule comprising elevation continuity, atmospheric perspective and conventional color rules, wherein the elevation continuity rule is used for measuring the continuous variability of layered color matching through the fitting degree of brightness and saturation, the atmospheric perspective rule is defined as monotonicity of chromatic aberration according to the fact that the color contrast is reduced along with the increase of distance, the conventional color rule is quantized to be offset degree with standard colors of a specified elevation band, and a scoring model F s (C) of a topography focus point is determined according to the scoring product of the three rules;
The map aesthetic model construction module is used for obtaining the color similarity between the image and the topography visualization according to the consistency of the layered color arrangement and matching and the main color of the image and considering the ratio of the colors, and determining a scoring model F a (C) of the aesthetic points of interest according to the color similarity and the color harmony;
And the migration problem establishing and solving module is used for defining the color migration problem as a double-target optimization problem according to the scoring model F s (C) of the terrain attention point and the scoring model F a (C) of the aesthetic feeling attention point, solving the problem by adopting a heuristic searching method, and carrying out color replacement on the input map according to the solving result to obtain the final relief shading map.
9. A computer device, comprising:
One or more processors;
a memory; and
One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, which when executed by the processors implement the steps of the method of topographic style auto-migration as set forth in any one of claims 1-7.
10. A computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor performs the steps of the method of topographic style automatic migration according to any of claims 1 to 7.
CN202410487020.XA 2024-04-23 2024-04-23 Method and system for automatically migrating topographic patterns and styles Active CN118097085B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410487020.XA CN118097085B (en) 2024-04-23 2024-04-23 Method and system for automatically migrating topographic patterns and styles

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410487020.XA CN118097085B (en) 2024-04-23 2024-04-23 Method and system for automatically migrating topographic patterns and styles

Publications (2)

Publication Number Publication Date
CN118097085A CN118097085A (en) 2024-05-28
CN118097085B true CN118097085B (en) 2024-06-28

Family

ID=91150459

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410487020.XA Active CN118097085B (en) 2024-04-23 2024-04-23 Method and system for automatically migrating topographic patterns and styles

Country Status (1)

Country Link
CN (1) CN118097085B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109214394A (en) * 2018-08-02 2019-01-15 中国科学院信息工程研究所 It is a kind of that image detecting method and device are forged based on the Style Transfer of color and texture features
CN109766895A (en) * 2019-01-03 2019-05-17 京东方科技集团股份有限公司 The training method and image Style Transfer method of convolutional neural networks for image Style Transfer

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9594977B2 (en) * 2015-06-10 2017-03-14 Adobe Systems Incorporated Automatically selecting example stylized images for image stylization operations based on semantic content
US10049297B1 (en) * 2017-03-20 2018-08-14 Beihang University Data driven method for transferring indoor scene layout and color style

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109214394A (en) * 2018-08-02 2019-01-15 中国科学院信息工程研究所 It is a kind of that image detecting method and device are forged based on the Style Transfer of color and texture features
CN109766895A (en) * 2019-01-03 2019-05-17 京东方科技集团股份有限公司 The training method and image Style Transfer method of convolutional neural networks for image Style Transfer

Also Published As

Publication number Publication date
CN118097085A (en) 2024-05-28

Similar Documents

Publication Publication Date Title
CN108629338B (en) Face beauty prediction method based on LBP and convolutional neural network
CN112614077B (en) Unsupervised low-illumination image enhancement method based on generation countermeasure network
Phan et al. Color orchestra: Ordering color palettes for interpolation and prediction
CN107016415B (en) A kind of color image Color Semantic classification method based on full convolutional network
EP4184414A1 (en) Product recommendation device and method based on image database analysis
CN102576461B (en) The aesthetic quality of assessment digital picture
CN106296695A (en) Adaptive threshold natural target image based on significance segmentation extraction algorithm
McCormack et al. Deep learning of individual aesthetics
CN110782448A (en) Rendered image evaluation method and device
Murray et al. Toward automatic and flexible concept transfer
CN109035223A (en) A kind of intelligent evaluation method for satellite remote sensing images availability
Li et al. A low-light image enhancement method with brightness balance and detail preservation
Wu et al. Adaptive color transfer from images to terrain visualizations
Liu et al. Image-driven harmonious color palette generation for diverse information visualization
CN112541856B (en) Medical image style migration method combining Markov field and Graham matrix characteristics
CN116933141B (en) Multispectral laser radar point cloud classification method based on multicore graph learning
CN117033688B (en) Character image scene generation system based on AI interaction
CN118097085B (en) Method and system for automatically migrating topographic patterns and styles
CN115018729B (en) Content-oriented white box image enhancement method
CN113869960B (en) Poster generation method and device, storage medium and computer equipment
CN115147259A (en) Image color migration method, system and computer medium
JPWO2018203551A1 (en) Signal search device, method, and program
Hu Visual Health Analysis of Print Advertising Graphic Design Based on Image Segmentation and Few‐Shot Learning
CN108122271A (en) A kind of description photo automatic generation method and device
CN110738249B (en) Aurora image clustering method based on deep neural network

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