CN116893871A - Dynamic color matching method for online map tiles - Google Patents

Dynamic color matching method for online map tiles Download PDF

Info

Publication number
CN116893871A
CN116893871A CN202310917362.6A CN202310917362A CN116893871A CN 116893871 A CN116893871 A CN 116893871A CN 202310917362 A CN202310917362 A CN 202310917362A CN 116893871 A CN116893871 A CN 116893871A
Authority
CN
China
Prior art keywords
map
color
map tile
tile
tiles
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.)
Pending
Application number
CN202310917362.6A
Other languages
Chinese (zh)
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.)
Jiangsu Urban Planning And Design Institute Co ltd
Original Assignee
Jiangsu Urban Planning And Design Institute 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 Jiangsu Urban Planning And Design Institute Co ltd filed Critical Jiangsu Urban Planning And Design Institute Co ltd
Priority to CN202310917362.6A priority Critical patent/CN116893871A/en
Publication of CN116893871A publication Critical patent/CN116893871A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/26Visual data mining; Browsing structured data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/40Filling a planar surface by adding surface attributes, e.g. colour or texture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • 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
    • 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/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5018Thread allocation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/62Semi-transparency

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Remote Sensing (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a dynamic color matching method of online map tiles, which relates to the technical field of smart cities, city planning and geographic information systems. Secondly, for each downloaded map tile, the base map is subjected to color homogenizing and transparentizing treatment. Further, for each downloaded map tile, buffer and color change processing is performed on map tile pixels within a specified color gamut range, and other element information is not displayed, so that the result is stored as a new map tile. And finally, performing overlapping and splicing processing of the tile map to obtain new tile data. The invention can dynamically draw map tiles at the client and dynamically adjust the colors of the map tiles.

Description

Dynamic color matching method for online map tiles
Technical Field
The invention relates to the technical fields of online internet map release, client access, geographic information systems, city planning and travel planning, in particular to a dynamic color matching method of online map tiles.
Background
Currently, online map tiles of third parties are often applied as reference base graphs to various production practices in current society. Of these, the most common map tiles are still in grid format. The map tile in grid format is composed of innumerable grid images, and when the client uses, the client accesses a picture which is already colored. Mathematically, the client downloads corresponding map tiles according to the geographic extent and projected coordinate system of the study area, and then draws from the geographic coordinate system location of each downloaded map tile. It follows that the client will implement already color-coded map tile rendering at the appropriate geospatial location.
However, in many application scenarios, the color matching of the map tile needs to be readjusted, or key elements in the map tile are extracted. We know that elements of a certain class in a generic map tile are relatively uniform in color. Therefore, key elements in map tiles can be extracted and redrawn according to different types of color features, and the effect of dynamically matching the color map tiles is achieved.
Disclosure of Invention
The invention aims to solve the technical problem of overcoming the defects of the prior art and providing a dynamic color matching method of an online map tile.
The invention adopts the following technical scheme for solving the technical problems:
the invention provides a dynamic color matching method of an online map tile, which comprises the following steps:
step 1, aiming at a research area, calculating the number and address of the map tiles to be downloaded on line, and downloading the map tiles;
step 2, carrying out color homogenizing and transparentizing treatment on the base map of the map tiles aiming at each downloaded map tile by adopting a multithreading treatment calculation mode;
step 3, adopting a multithreading processing calculation mode to further perform buffer area and color change processing on map tile pixels in a designated color gamut range aiming at the map tiles subjected to color homogenization and transparency processing in the step 2, and displaying only element information of the map tiles in the designated color gamut range so as to obtain new map tiles;
step 4, directly performing map tile superposition display processing on the client, and placing the new map tile obtained in the step 3 on the map tile processed in the step 2 to form a mode of displaying the map tiles of 2 layers;
and (3) carrying out map tile splicing processing on the client, placing the new map tile obtained in the step (3) on the map tile processed in the step (2), and overlapping and splicing the map tiles respectively formed in the step (2) and the step (3) into an integral map tile.
As a further optimization scheme of the dynamic color matching method of the online map tile, the step 1 is specifically as follows:
step 1.1, calculating the number and the download address information of map tiles to be downloaded according to the geographic space range coordinates and the map display level of a research area;
step 1.2, downloading each map tile according to the serial number and the download address information, and storing the map tile in a local disk file.
As a further optimization scheme of the dynamic color matching method of the online map tile, the step 2 specifically comprises the following steps:
step 2.1, classifying the color values of the base map of the map tile;
step 2.2, aiming at each map tile downloaded and stored in a local disk file, performing color value and transparency conversion processing on the color gamut value range of the base map of the determined map tile;
step 2.3, selecting a certain number of processed map tiles, and calculating the main color value duty ratio of the map tiles in an LAB color space mode; if the main color value ratio is larger than the preset proportion, the dynamic color matching is considered reasonable; otherwise, the method is considered unreasonable;
and (3) if the judging result of the step 2.4 and the step 2.3 is unreasonable, executing again from the step 2.1.
As a further optimization scheme of the dynamic color matching method of the online map tile, the step 3 is specifically as follows:
step 3.1, determining map tile pixels in a designated color gamut range according to an RGB color space;
and 3.2, further performing buffer and color change processing on the map tile pixels determined in the step 3.1, and displaying only element information of map tiles in a designated color gamut range.
As a further optimization scheme of the dynamic color matching method of the online map tiles, the number of each map tile in the step 1.1 is unique.
As a further optimization scheme of the dynamic color matching method of the on-line map tiles, the method for classifying the color values of the base map of the map tiles in the step 2.1 is divided into 2 types: firstly, taking an average value of each pixel in a map tile in an RGB color space mode, and then clustering the obtained average value; the second is to convert the pixel values in the map tile from RGB color space mode to LAB color space mode, and then cluster the pixel values converted to LAB color space mode.
As a further optimization scheme of the dynamic color matching method of the online map tile, the method for converting the color value in the step 2.2 comprises the following steps: the pixels of the different types of colors in step 2.1 are transformed into specified RGB color values.
As a further optimization scheme of the dynamic color matching method of the online map tile, when buffer area processing is carried out in the step 3.2, only the adjacent pixels of the determined map tile pixels are assigned, and meanwhile, the color of the buffer area cannot cover the color value of the determined map tile pixels.
Compared with the prior art, the technical scheme provided by the invention has the following technical effects:
(1) The invention provides a dynamic color matching method of an online map tile, which can dynamically draw the map tile at a client and dynamically adjust the color of the map tile;
(2) The invention provides a dynamic color matching method of an on-line map tile based on a construction principle of the map tile through a set of corresponding color processing technical scheme design of raster images.
Drawings
Fig. 1 is a schematic overall flow diagram of the present invention.
FIG. 2 is a schematic diagram of a map tile download process.
Fig. 3 is a schematic diagram of a process of color clustering and transformation.
Fig. 4 is a schematic diagram of the preprocessing operation before RGB color space mode color value conversion.
FIG. 5 is a schematic diagram of a buffer processing of map tile pixels.
FIG. 6 is a schematic diagram of neighboring element processing rules during buffer processing of map tile pixels.
FIG. 7 is a schematic diagram of an original map tile.
Fig. 8 is a schematic diagram of a dynamic color matching adjustment result of a part of elements in a map tile.
FIG. 9 is a diagram of the dynamic color matching process results for map tiles.
Description of the embodiments
The technical scheme of the invention is further described in detail below with reference to the accompanying drawings:
map data released by map tile services are always important data service resources in geographic information systems, map navigation and urban and rural planning and design, and play an important role in practice. But where the map tiles are in raster image format, the data pattern accessed by the client is fixed because it is image in nature. In this case, how to dynamically adjust the color matching of map tiles becomes an important study.
Step 1) referring to fig. 1, the overall flow of the invention is as follows:
first, referring to fig. 2, for the study area, the number and address of tiles of the online map to be downloaded are calculated and the download is completed. Step 1.1), calculating the number of map tiles and the information of a downloading address to be downloaded according to the coordinate of the geographical space range where the research area is and the display level of the map; wherein each map tile number is unique.
It is ensured here that each map tile number is unique in order that each map tile can still be accurately mapped to the correct geographical location after dynamic color matching.
Step 1.2) downloading the map tiles according to the serial numbers and the downloading address information of the map tiles, and storing the map tiles in a local disk file. The key point of the step is that map tile data is downloaded to a local computer in advance, dynamic color matching processing can be carried out on the basis, namely, offline processing of the data is realized, and then the offline data is continuously processed and analyzed without being influenced by a network server section, so that the running speed of a client section is also ensured to a certain extent.
Step 2) for each downloaded map tile, carrying out color homogenizing and transparentizing treatment on the base map;
step 2.1) referring to fig. 3, classifying the color values of the map tile map;
if the color matching process of the map tiles is to be dynamically and automatically performed, the colors of the map tiles need to be clustered, so that the colors can be purposefully changed according to the colors of the map tiles of different types. To this end, the present study provides 2 calculation methods to implement color clustering of map tiles. The first method is fast and easy to operate, and performs color clustering processing directly according to the average value of the color values of three channels (namely, R, G, B three color channels) of the map tile image, so that the color homogenizing processing of the map tile image can be realized on the whole.
Referring to fig. 4, the first method is to firstly take the average value of each pixel of the map tile image in the RGB color space mode, and then cluster the obtained average value;
the second is to convert the pixel values in the map tile image from RGB color space mode to LAB color space mode, and then cluster the pixel values converted to LAB color space mode. LAB is designed based on human perception of color, more specifically it is perceptually uniform (perceptual uniform). LABs have very good properties-device-independent.
Step 2.2) for each map tile downloaded and already saved to the local disk, performing color value and transparency conversion processing on the determined color gamut value range of the map tile base map. The color value conversion processing method comprises the following steps: the pixels of the different types of colors in step 2.1 are transformed into specified RGB color values.
Step 2.3) selecting a certain number of processed tile maps, and calculating the primary color value duty ratio of the map tiles in the LAB color space mode. If the main color value ratio is larger than the appointed proportion, the dynamic color matching is considered reasonable. Otherwise, it is considered unreasonable.
Step 3) further carrying out buffer area and color change processing on map tile pixels in the designated color gamut range for each downloaded map tile, and not displaying other element information, so that the result is stored as a new map tile.
Step 3.1) determining map tile pixels in a designated color gamut range according to the RGB color space;
step 3.2) further carrying out buffer area and color change treatment on the map tile pixels determined in the step 3.1, and not displaying other element information; referring to fig. 5, when a map tile image is subjected to buffer processing, the portion marked 0 in fig. 5 is a map tile pixel determined to be subjected to buffer processing, the portion marked 2 in fig. 5 is a buffer portion of the determined map tile pixel, and the portion marked 1 in fig. 5 is a portion where no other element information is displayed, i.e., the color is set to be transparent.
In this step, the buffer is processed by assigning only the adjacent pixels of the determined map tile pixel, while the buffer color cannot cover the determined color value of the map tile pixel. Referring to fig. 6, the three portions A, B, C of the figure represent determined map tile pixels to be buffered, which are not affected by the buffer processing.
Step 4) aiming at the results of the step 2 and the step 3, adopting a multithreading processing calculation mode, and when a client directly carries out map tile superposition display processing, placing the map tile processed in the step 3 on the map tile processed in the step 2 to form a mode of 2-layer map tile display;
and 5) aiming at the results of the step 2 and the step 3, adopting a multithreading processing calculation mode, and when the client performs map tile splicing processing, placing the map tile processed in the step 3 on the map tile processed in the step 2, and overlapping and splicing the map tiles formed in the step 2 and the step 3 into an integral map tile.
Referring to fig. 7, an original map tile image data is a pre-generated image of a map tile server side. Referring to fig. 8, a specific portion of the map tile image data is subjected to a color conversion process. Referring to fig. 9, the final result of the overlay stitching process is that the map tile image changes the existing color scheme, which on one hand can highlight certain map elements and also can modify the image style of the whole tile map.
The foregoing is a further detailed description of the invention in connection with the preferred embodiments, and it is not intended that the invention be limited to the specific embodiments described. It will be apparent to those skilled in the art that several simple deductions or substitutions may be made without departing from the spirit of the invention, and these should be considered to be within the scope of the invention.

Claims (8)

1. The dynamic color matching method of the online map tile is characterized by comprising the following steps of:
step 1, aiming at a research area, calculating the number and address of the map tiles to be downloaded on line, and downloading the map tiles;
step 2, carrying out color homogenizing and transparentizing treatment on the base map of the map tiles aiming at each downloaded map tile by adopting a multithreading treatment calculation mode;
step 3, adopting a multithreading processing calculation mode to further perform buffer area and color change processing on map tile pixels in a designated color gamut range aiming at the map tiles subjected to color homogenization and transparency processing in the step 2, and displaying only element information of the map tiles in the designated color gamut range so as to obtain new map tiles;
step 4, directly performing map tile superposition display processing on the client, and placing the new map tile obtained in the step 3 on the map tile processed in the step 2 to form a mode of displaying the map tiles of 2 layers;
and (3) carrying out map tile splicing processing on the client, placing the new map tile obtained in the step (3) on the map tile processed in the step (2), and overlapping and splicing the map tiles respectively formed in the step (2) and the step (3) into an integral map tile.
2. The dynamic color matching method of an online map tile according to claim 1, wherein step 1 is specifically as follows:
step 1.1, calculating the number and the download address information of map tiles to be downloaded according to the geographic space range coordinates and the map display level of a research area;
step 1.2, downloading each map tile according to the serial number and the download address information, and storing the map tile in a local disk file.
3. The dynamic color matching method of an online map tile according to claim 2, wherein step 2 is specifically as follows:
step 2.1, classifying the color values of the base map of the map tile;
step 2.2, aiming at each map tile downloaded and stored in a local disk file, performing color value and transparency conversion processing on the color gamut value range of the base map of the determined map tile;
step 2.3, selecting a certain number of processed map tiles, and calculating the main color value duty ratio of the map tiles in an LAB color space mode; if the main color value ratio is larger than the preset proportion, the dynamic color matching is considered reasonable; otherwise, the method is considered unreasonable;
and (3) if the judging result of the step 2.4 and the step 2.3 is unreasonable, executing again from the step 2.1.
4. A method of dynamic color matching of an online map tile according to claim 3, wherein step 3 is specifically as follows:
step 3.1, determining map tile pixels in a designated color gamut range according to an RGB color space;
and 3.2, further performing buffer and color change processing on the map tile pixels determined in the step 3.1, and displaying only element information of map tiles in a designated color gamut range.
5. The method of dynamic color matching of online map tiles of claim 2, wherein each map tile number in step 1.1 is unique.
6. A method for dynamically matching colors of map tiles on line according to claim 3, wherein the method for classifying the color values of the base map of the map tiles in step 2.1 is divided into 2 types: firstly, taking an average value of each pixel in a map tile in an RGB color space mode, and then clustering the obtained average value; the second is to convert the pixel values in the map tile from RGB color space mode to LAB color space mode, and then cluster the pixel values converted to LAB color space mode.
7. A method for dynamically matching colors of tiles on an online map according to claim 3, wherein the method for converting color values in step 2.2 is as follows: the pixels of the different types of colors in step 2.1 are transformed into specified RGB color values.
8. The method of on-line map tile dynamic color matching according to claim 4, wherein the buffer processing in step 3.2 is performed by assigning only adjacent pixels of the determined map tile pixels, and wherein the buffer color does not cover the determined map tile pixel color value.
CN202310917362.6A 2023-07-25 2023-07-25 Dynamic color matching method for online map tiles Pending CN116893871A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310917362.6A CN116893871A (en) 2023-07-25 2023-07-25 Dynamic color matching method for online map tiles

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310917362.6A CN116893871A (en) 2023-07-25 2023-07-25 Dynamic color matching method for online map tiles

Publications (1)

Publication Number Publication Date
CN116893871A true CN116893871A (en) 2023-10-17

Family

ID=88314767

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310917362.6A Pending CN116893871A (en) 2023-07-25 2023-07-25 Dynamic color matching method for online map tiles

Country Status (1)

Country Link
CN (1) CN116893871A (en)

Similar Documents

Publication Publication Date Title
CN101536078B (en) Improving image masks
CN109446281B (en) ArcGIS-based online intelligent mapping system construction method, system and mapping method
CN105393282A (en) Efficient composition and rendering of graphical elements
CN101782925A (en) Method, device and storage medium for displaying a map
Touya et al. Clutter and map legibility in automated cartography: A research agenda
CN115812221A (en) Image generation and coloring method and device
CN112700528B (en) Virtual object shadow rendering method for head-mounted augmented reality device
CN102609517A (en) Method and system for online vector map comprehensive services
CN109086286A (en) A kind of production of Pictorial Map and dissemination method
CN114241326B (en) Progressive intelligent production method and system for ground feature elements of remote sensing images
CN102096831A (en) Method for identifying graph dynamic relationship
CN105809721A (en) Application icon generation method, device and mobile device
KR100723422B1 (en) Apparatus and method for rendering image data using sphere splating and computer readable media for storing computer program
CN110110028B (en) Method and system for displaying map according to user-defined area and oriented to OGC standard
CN101477559B (en) Geographic information perception method based on area coloring
Schlegel Empirical study for a deployment of a methodology for improving the comparability between historical and current maps
CN116893871A (en) Dynamic color matching method for online map tiles
CN117611703A (en) Barrage character rendering method, barrage character rendering device, barrage character rendering equipment, storage medium and program product
JP2021157404A (en) Learning data generation method, learning data generation device, and program
JPH08293021A (en) Image coordinate conversion method
WO2012033715A1 (en) Methods and systems for stylized map generation
CN102938156B (en) Planar note configuration method based on integral images
Hardy et al. Portrayal and cartography
Strumiłło-Rembowska et al. Data generation of vector maps using a hybrid method of analysis and selection of geodata necessary to optimize the process of spatial planning
CN111626610B (en) Order scheduling method, system and electronic equipment

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