CN103559726A - Map color blending method and shader - Google Patents

Map color blending method and shader Download PDF

Info

Publication number
CN103559726A
CN103559726A CN201310596743.5A CN201310596743A CN103559726A CN 103559726 A CN103559726 A CN 103559726A CN 201310596743 A CN201310596743 A CN 201310596743A CN 103559726 A CN103559726 A CN 103559726A
Authority
CN
China
Prior art keywords
texture mapping
map
mapping object
tinter
color matching
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.)
Granted
Application number
CN201310596743.5A
Other languages
Chinese (zh)
Other versions
CN103559726B (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.)
Vtron Group Co Ltd
Original Assignee
Vtron Technologies 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 Vtron Technologies Ltd filed Critical Vtron Technologies Ltd
Priority to CN201310596743.5A priority Critical patent/CN103559726B/en
Publication of CN103559726A publication Critical patent/CN103559726A/en
Application granted granted Critical
Publication of CN103559726B publication Critical patent/CN103559726B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the invention discloses a map color blending method and a shader. The method includes the steps that an operation instruction input by a user is received by the shader, a plurality of corresponding texture mapping objects are generated by the shader according to prestored map slice data, the color value of each texture mapping object is acquired by the shader, whether the texture mapping objects are located in a map color blending region or not is judged by the shader, and if yes, the color values of the texture mapping objects are set to equal the color value of the map color blending region by the shader. The map color blending method and the shader achieve the purpose of map color blending; the user just needs to modify the color value of the corresponding map color blending region so that the colors of map elements displayed on the map color bending region can be changed; the user does not need to draw other pictures, and therefore efficiency is effectively improved.

Description

A kind of map color matching method and tinter
Technical field
The present invention relates to image display technology field, in particular a kind of map color matching method and tinter.
Background technology
Map color matching refers in the process of cartography, to the key element of a certain type, adopts certain specific color to represent.Such as blueness is generally used in river, green for park, road occupation yellow etc.Generally there is a standard code how to match colors.After having completed color matching, often using map slice of data as a kind of raster data, be kept at and in hard disk, become cache map.When needs show, application program is obtained corresponding area map and is shown.Visible, after cartography completes, generally do not revise raw data, and Update Table to spend very large energy and time.
In application, sometimes need the color of revising according to the actual requirements certain Type elements to highlight.While being subject to polluting such as the river in whole region, use redness to represent etc.In order to solve this class problem, traditional method is on this region, to show a red polygon, so just can highlight.But this method need to record the coordinate in this region in advance, this coordinate is configured to a polygon; Be exactly in addition pre-service complete after, when showing, also need some vector graphics of drawing more.
Because user need to record the coordinate in this region in advance, and need to draw accordingly, increased user's operation, and efficiency be not high.
Summary of the invention
The embodiment of the present invention provides a kind of map color matching method and tinter, when user need to be matched colors to map, as long as change color value need not be drawn extra figure, has promoted the efficiency of map color matching.
A color matching method, wherein, comprising:
Tinter receives the operational order of user's input, and described operational order comprises the color value in the described map color matching region that map color matching region that user is selected and user set;
Described tinter generates the texture mapping object of a plurality of correspondences according to pre-stored map slice of data;
For each texture mapping object, described tinter obtains the color value of this texture mapping object;
Described tinter judges whether this texture mapping object is positioned at described map color matching region;
If so, the color value of this texture mapping object of described tinter is set to equate with the color value in described map color matching region, so that the described color value in the described map color matching region that this texture mapping object is set with user shows.
Described map color matching method, wherein,
If this texture mapping object is not positioned at described map color matching region, described tinter is by the direct output display of described texture mapping object, so that the color value of this texture mapping object that this texture mapping object obtains with described tinter shows.
Described map color matching method, wherein, described map color matching method also comprises:
Described tinter basis is positioned at the described texture mapping object in described map color matching region and is not positioned at the described texture mapping object drafting generation texture mapping in described map color matching region;
Described tinter shows described texture mapping texture to display.
Described map color matching method, wherein, the operational order that described tinter receives user's input also comprises afterwards:
Described tinter is transferred pre-stored a plurality of described map slice of data in local hard drive, and a plurality of described map slice of datas are loaded into internal memory;
Described tinter generates the described texture mapping object of a plurality of correspondences according to described map slice of data;
Described tinter travels through all described texture mapping objects, and respectively all described texture mapping objects is sampled, and obtains the color value of texture mapping object described in each.
Described map color matching method, wherein, the operational order that described tinter receives user's input specifically comprises:
The list of described tinter generating run command reception, described operational order receives list for receiving the operational order of user's input; Wherein, described operational order comprises the color value in the described map color matching region that the selected map of user color matching region and user set.
, wherein, comprising:
Operational order receiving element, for receiving the operational order of user input, described operational order comprises the color value in the described map color matching region that map color matching region that user is selected and user set;
Texture mapping object generation unit, for generating the texture mapping object of a plurality of correspondences according to pre-stored map slice of data;
Color value acquiring unit, for for each texture mapping object, obtains the color value of this texture mapping object;
Judging unit, for judging whether this texture mapping object is positioned at described map color matching region;
Color value reset cell, if judge described texture mapping object for described judging unit, be positioned at the described map color matching region that user selectes, the color value of this texture mapping object is set to equate with the color value in described map color matching region, so that the described color value in the described map color matching region that this texture mapping object is set with user shows.
Described tinter, wherein, described tinter also comprises:
Color value display unit, if be not positioned at described map color matching region for this texture mapping object, by the direct output display of described texture mapping object, so that the color value of this texture mapping object that this texture mapping object obtains with described color value acquiring unit shows.
Described tinter, wherein, described tinter also comprises:
Texture mapping generation unit, for drawing and generate texture mapping according to the described texture mapping object that is positioned at the described texture mapping object in described map color matching region and is not positioned at described map color matching region;
Texture map unit, for showing described texture mapping texture to display.
Described tinter, wherein, described texture mapping object generation unit also for, transfer pre-stored a plurality of described map slice of data in local hard drive, and a plurality of described map slice of datas are loaded into internal memory, and according to described map slice of data, generate the described texture mapping object of a plurality of correspondences;
Described color value acquiring unit also for, all described texture mapping objects are traveled through, and respectively all described texture mapping objects are sampled, obtain the color value of texture mapping object described in each.
Described tinter, wherein, described operational order receiving element is also for, generating run command reception list, and described operational order receives list for receiving the operational order of user's input; Wherein, described operational order comprises the color value in the described map color matching region that the selected map of user color matching region and user set.
The embodiment of the present invention provides a kind of map color matching method and tinter, this color matching method is by tinter, to receive the operational order of user's input, and this tinter is the corresponding texture mapping object that generates of slice of data according to the map, and judge whether texture mapping object is positioned at the selected map color matching region of user, and the color value in region equates if the map that color value of tinter texture mapping object is set to set with user is matched colors.Because user in the embodiment of the present invention can be according to the color value that map color matching region and map color matching region need to be set of self, tinter resets the color value that is positioned at the texture mapping object in map color matching region, its map color matching field color value of setting with user is equated, thereby realized the object of map color matching; The color value that user only need to revise corresponding map color matching region just can change the color that this map color matching region shows map elements, without user, draws other figures, has effectively promoted efficiency.
Accompanying drawing explanation
The flow chart of steps of an embodiment of a kind of map color matching method that Fig. 1 provides for the embodiment of the present invention;
The flow chart of steps of another embodiment of a kind of map color matching method that Fig. 2 provides for the embodiment of the present invention;
The flow chart of steps of another embodiment of a kind of map color matching method that Fig. 3 provides for the embodiment of the present invention;
The flow chart of steps of another embodiment of a kind of map color matching method that Fig. 4 provides for the embodiment of the present invention;
An example structure schematic diagram of a kind of tinter that Fig. 5 provides for the embodiment of the present invention;
Another example structure schematic diagram of a kind of tinter that Fig. 6 provides for the embodiment of the present invention;
Another example structure schematic diagram of a kind of tinter that Fig. 7 provides for the embodiment of the present invention;
Another example structure schematic diagram of a kind of tinter that Fig. 8 provides for the embodiment of the present invention.
Embodiment
The embodiment of the present invention provides a kind of map color matching method and tinter, for carrying out map color matching, and needn't user's graphing in the process of carrying out map color matching, promoted efficiency.
A kind of map color matching method embodiment of the present invention being provided below in conjunction with Fig. 1 elaborates:
101, tinter receives the operational order of user's input;
When user need to match colors to map, can enter the operating instructions by tinter.
Wherein, this tinter operates on video card, is for carrying out the independently element of particular conversion or operation.
Concrete, this operational order can comprise: the color value in this map color matching region that the map color matching region that user is selected and user set.
In actual applications, user can according to self need on map, select map color matching region, and the color value of setting this map color matching region, makes this map color matching region show with the selected color value of user, has reached the object of mark.
For example, when user need to carry out contaminated river region mark while showing, it is map color matching region that user can select this river region, and can set the color value of this river region, if be that user wishes that river region is that red-label shows, the color value of setting this river region is the color value corresponding with redness.
102, this tinter generates the texture mapping object of a plurality of correspondences according to pre-stored map slice of data;
Wherein, map slice of data is that computing machine is played up generation by the map of its storage, when user carries out map demonstration, what computing machine was transferred is the map slice of data through playing up, rather than without the map of playing up, thereby do not need to play up in real time, reduced the time of processing.
This tinter generates the texture mapping object of a plurality of correspondences according to the map slice of data getting.
Wherein, the corresponding texture ID of each texture mapping object, and all texture mapping objects that generate are saved in texture container, so that tinter can obtain corresponding texture mapping object according to this texture ID from this texture container.
In the present embodiment, this texture mapping object can refer to the key element on map, such as the river showing on map, park, road and mountains and rivers etc.
103, for each texture mapping object, this tinter obtains the color value of this texture mapping object;
In cartography process, the texture mapping object of same type can be represented with corresponding particular color, different texture mapping objects have different color values, and for example river represents by blueness, and mountains and rivers represent by redness etc.
104, this tinter judges whether this texture mapping object is positioned at this map color matching region;
User has been provided with the map color matching region that need to carry out mark, and tinter carries out judgement one by one to each texture mapping object, judges whether each texture mapping object is positioned at map color matching region.
105, if so, the color value of this texture mapping object of this tinter is set to equate with the color value in this map color matching region, so that the color value in this map color matching region that this texture mapping object is set with user shows.
Tinter obtains the texture mapping object that is positioned at map color matching region, and the color value of this texture mapping object is reset.
Concrete, the color value of this tinter texture mapping object is set to equate with the color value in this map color matching region, thereby this texture mapping object is shown with the color value in this map color matching region of user's setting.
In the present embodiment, user can need to select map color matching region and setting the color value in this map color matching region according to self on map, tinter obtains the texture mapping object that is positioned at this map color matching region, and the color value of this texture mapping object is reset, this color value that makes to be positioned at this map color matching region that the texture mapping object in map color matching region sets with user shows, thereby reached the object that changes texture mapping object color, and in the process changing, without user's graphing, promoted efficiency.And because tinter is to operate in video card, and for large-scale parallel operation, tinter texture mapping object in to tinter is modified and can there is higher processing speed.
Above embodiment has illustrated how to carry out map color matching, below in conjunction with explanation shown in Fig. 2, how to being positioned at the texture mapping object of diverse location, to process:
201, tinter receives the operational order of user's input;
202, this tinter generates the texture mapping object of a plurality of correspondences according to pre-stored map slice of data;
203, for each texture mapping object, this tinter obtains the color value of this texture mapping object;
In the present embodiment, step 201 to step 203 does not repeat them here to step 103 process is identical with the step 101 shown in Fig. 1.
204, this tinter judges whether this texture mapping object is positioned at this map color matching region; If so, carry out step 205; If not, carry out step 206;
Tinter judges all texture mapping objects, and then is two classes by all texture mapping object discrimination: a class is the texture mapping object that is positioned at map color matching region, and another kind of is the texture mapping object that is not positioned at map color matching region.
205, the color value of this texture mapping object of this tinter is set to equate with the color value in this map color matching region, so that the color value in this map color matching region that this texture mapping object is set with user shows;
Be that tinter obtains the texture mapping object that is positioned at map color matching region, and this texture mapping object is shown with the color value in this map color matching region of user's setting, reached the object that particular texture pinup picture object is carried out to mark demonstration.
206, this tinter is by the direct output display of this texture mapping object, so that the color value of this texture mapping object that this texture mapping object obtains with this tinter shows.
If texture mapping object is not positioned at map color matching region, explanation does not need this texture mapping object to carry out mark demonstration.
The direct output display of this texture mapping object, the color value of this texture mapping object that texture mapping object obtains with this tinter shows.
In the present embodiment, tinter judges texture mapping object, thereby gets the texture mapping object that is positioned at map color matching region and the texture mapping object that is not positioned at map color matching region; And according to user's setting in advance, the color value that is positioned at the texture mapping object in map color matching region is reset, and will not be positioned at the direct output display of texture mapping object in map color matching region, thereby make user can change the Show Color of key element on map, and in operating process without graphing, without posting field coordinate, when bringing convenience for user, promoted efficiency.
Embodiment shown in Fig. 2 has illustrated how to being positioned at the texture mapping object of diverse location, to process, and below in conjunction with the embodiment explanation shown in Fig. 3, how the texture mapping object of diverse location is shown on display:
301, tinter receives the operational order of user's input;
302, this tinter generates the texture mapping object of a plurality of correspondences according to pre-stored map slice of data;
303, for each texture mapping object, this tinter obtains the color value of this texture mapping object;
304, this tinter judges whether this texture mapping object is positioned at this map color matching region; If so, carry out step 305; If not, carry out step 306;
305, the color value of this texture mapping object of this tinter is set to equate with the color value in this map color matching region, so that the color value in this map color matching region that this texture mapping object is set with user shows;
306, this tinter is by the direct output display of this texture mapping object, so that the color value of this texture mapping object that this texture mapping object obtains with this tinter shows;
Step 301 in the present embodiment is identical to step 206 process with the step 201 shown in Fig. 2 to step 306, does not repeat them here.
307, this tinter is drawn and is generated texture mapping according to this texture mapping object that is positioned at this texture mapping object in this map color matching region and is not positioned at this map color matching region;
This tinter obtains this texture mapping object that is positioned at this texture mapping object in this map color matching region and is not positioned at this map color matching region, and gets all texture mapping objects drafting texture mapping according to it.
308, this tinter shows this texture mapping texture to display.
Tinter is drawn the texture mapping texture generating and is arrived display, thereby this texture mapping is shown by display.
And this texture mapping is drawn according to texture mapping object, so display can carry out mark demonstration by the texture mapping object that is positioned at map color matching region, the color value of setting with user shows, thereby has realized the object of changing the shown color of map elements.
In the present embodiment, tinter judges texture mapping object, thereby gets the texture mapping object that is positioned at map color matching region and the texture mapping object that is not positioned at map color matching region; This tinter is drawn and is generated texture mapping according to all texture mapping objects, this texture mapping can texture show to display, thereby make user by the match colors color value in region and this map color matching region of setting map, reach the object of key element Show Color on change map, and without the pre-recorded map reference of user, also without graphing, promoted the efficiency of mark.
How embodiment shown in Fig. 3 explanation shows the texture mapping object of diverse location on display, and below in conjunction with the embodiment explanation shown in Fig. 4, when texture tile data have when a plurality of, how tinter carries out map color matching:
401, tinter receives the operational order of user's input;
Preferably, this tinter generating run command reception list, this operational order receives list for receiving the operational order of user's input.
When user shows certain region of map with specific color, user can receive the selected map color matching of list region by this operational order, and the color value of setting this map color matching region.
402, this tinter is transferred pre-stored a plurality of these map slice of datas in local hard drive, and a plurality of these map slice of datas are loaded into internal memory;
Computing machine is played up map, and the map slice of data of playing up rear generation is stored in local hard drive.
When tinter receives after the operational order of user's input, this tinter is loaded into internal memory according to this operational order by the map slice of data being stored in local hard drive.
403, this tinter generates this texture mapping object of a plurality of correspondences according to this map slice of data;
This tinter can get a plurality of map slice of datas, and generates a plurality of texture mapping objects corresponding with each map slice of data respectively.
404, this tinter travels through all these texture mapping objects, and respectively all these texture mapping objects is sampled, and obtains the color value of each this texture mapping object;
This tinter gets after this texture mapping object of a plurality of correspondences, all texture mapping objects is traveled through, and all texture mapping objects after traversal are sampled, and gets the color value of each this texture mapping object according to sampled result.
405, this tinter judges whether this texture mapping object is positioned at this map color matching region; If so, carry out step 406; If not, carry out step 407;
406, the color value of this texture mapping object of this tinter is set to equate with the color value in this map color matching region, so that the color value in this map color matching region that this texture mapping object is set with user shows;
407, this tinter is by the direct output display of this texture mapping object, so that the color value of this texture mapping object that this texture mapping object obtains with this tinter shows;
408, this tinter is drawn and is generated texture mapping according to this texture mapping object that is positioned at this texture mapping object in this map color matching region and is not positioned at this map color matching region;
409, this tinter shows this texture mapping texture to display.
Step 405 in the present embodiment is identical to the process shown in step 308 with the step 304 shown in Fig. 3 to step 409, does not repeat them here.
In the present embodiment, tinter can be transferred pre-stored a plurality of map slice of datas, and the generation texture mapping object corresponding with each map slice of data, and obtain the color value of texture mapping image, and then all color values that are positioned at the texture mapping object in map color matching region are equated with the color value that user sets, thereby make user by the match colors color value in region and this map color matching region of setting map, reach the object of key element Show Color on change map, and without the pre-recorded map reference of user, also without graphing, promoted the efficiency of mark.
For ease of understanding, the map color matching method that below lifting concrete application scenarios provides the embodiment of the present invention elaborates:
The display end of computing machine has shown the map of having matched colors, and on this map, same key element shows by different colors;
Be that river shows by blueness, park shows by green, and road shows by yellow etc.;
Because pollution has occurred the river in the shown region of this map, user wishes represented region, river to carry out mark demonstration, wishes river to carry out mark by redness;
The list of tinter generating run command reception, the river region that user receives on the selected map of list by this operational order is map color matching region, and sets the color value of river region, makes the map color matching region showing by this color value for red;
Tinter receives after the operational order of user's input, and the map slice of data being stored in local hard drive is loaded in internal memory;
Tinter generates corresponding a plurality of texture mapping objects according to this map slice of data, and wherein, each texture mapping object is corresponding with each key element on map;
Tinter travels through respectively a plurality of texture mapping objects, and respectively all texture mapping objects is sampled, and according to sampled result, obtains the color value of each texture mapping object;
Be pre-created a vertex shader and two sheets tinter F1 of unit and F2;
Wherein, the responsible demonstration that is not positioned at the texture mapping object in map color matching region of the tinter F1 of sheet unit;
The tinter F2 of sheet unit is responsible for being positioned at the demonstration of the texture mapping object in map color matching region;
This tinter judges all texture mapping objects respectively, judge each texture mapping to as if be positioned at map color matching region, be not still positioned at map color matching region;
If the texture mapping object of judging is not positioned at map color matching region, this texture mapping object is not in river region shown on map time, this texture mapping object, according to user's operational order for not needing to carry out mark demonstration, shows with himself color value originally;
By calling directly output display of texture mapping object that the tinter F1 of sheet unit makes not to be positioned at map color matching region;
If the texture mapping object of judging is positioned at map color matching region, this texture mapping object is positioned at river region shown on map, this texture mapping object is to carry out mark demonstration according to user's operational order, and the color value of this texture mapping object need to re-start setting;
If texture mapping object is positioned at the map color matching region that user sets, the color value that color value of this texture mapping object of tinter is set to the map color matching region set with user equates,, in this application scene, the tinter F2 of sheet unit controls this texture mapping object and shows with redness;
By calling the tinter F2 of sheet unit, making to be positioned at the color value that the texture mapping object in map color matching region sets with user shows;
Wherein, the sheet tinter F1 of unit and the tinter F2 of sheet unit call accordingly according to the instruction of tinter;
This tinter basis is positioned at this texture mapping object in this map color matching region and is not positioned at this texture mapping object drafting generation texture mapping in this map color matching region;
This tinter shows this texture mapping texture to display;
Making the river region in texture mapping shown on display is that red-label shows.
Above embodiment describes map color matching method in detail, below in conjunction with the embodiment shown in Fig. 5, the concrete structure of tinter is elaborated:
This tinter specifically comprises:
Operational order receiving element 501, for receiving the operational order of user input, this operational order comprises the color value in this map color matching region that map color matching region that user is selected and user set;
Texture mapping object generation unit 502, for generating the texture mapping object of a plurality of correspondences according to pre-stored map slice of data;
Color value acquiring unit 503, for for each texture mapping object, obtains the color value of this texture mapping object;
Judging unit 504, for judging whether this texture mapping object is positioned at this map color matching region;
Color value reset cell 505, if judge this texture mapping object for this judging unit, be positioned at this map color matching region that user selectes, the color value of this texture mapping object is set to equate with the color value in this map color matching region, so that this color value in this map color matching region that this texture mapping object is set with user shows.
In the present embodiment, user can be according to self need to be by operational order receiving element 501 selected map color matching region set the color value in this map color matching region on map, texture mapping object generation unit 502 generates texture mapping object, and color value acquiring unit 503 obtains the color value of each texture mapping object, and color value reset cell 505 is reset the color value that is positioned at the texture mapping object in this map color matching region, this color value that makes to be positioned at this map color matching region that the texture mapping object in map color matching region sets with user shows, thereby reached the object that changes texture mapping object color, and in the process changing, without user's graphing, promoted efficiency.
Above embodiment has illustrated the concrete structure of tinter, can be to not being positioned at the concrete structure of the tinter that the texture mapping object in map color matching region processes below in conjunction with Fig. 6 explanation:
This tinter specifically comprises:
Operational order receiving element 601, for receiving the operational order of user input, this operational order comprises the color value in this map color matching region that map color matching region that user is selected and user set;
Texture mapping object generation unit 602, for generating the texture mapping object of a plurality of correspondences according to pre-stored map slice of data;
Color value acquiring unit 603, for for each texture mapping object, obtains the color value of this texture mapping object;
Judging unit 604, for judging whether this texture mapping object is positioned at this map color matching region;
Color value reset cell 605, if judge this texture mapping object for this judging unit, be positioned at this map color matching region that user selectes, the color value of this texture mapping object is set to equate with the color value in this map color matching region, so that this color value in this map color matching region that this texture mapping object is set with user shows.
This tinter also comprises:
Color value display unit 606, if be not positioned at this map color matching region for this texture mapping object, by the direct output display of this texture mapping object, so that the color value of this texture mapping object that this texture mapping object obtains with this color value acquiring unit 603 shows.
In the present embodiment, 604 pairs of texture mapping objects of judging unit judge, thereby get the texture mapping object that is positioned at map color matching region and the texture mapping object that is not positioned at map color matching region; Color value reset cell 605 is reset according to user's setting in advance the color value that is positioned at the texture mapping object in map color matching region, color value display unit 606 will not be positioned at the direct output display of texture mapping object in map color matching region, thereby make user can change the Show Color of key element on map, and in operating process without graphing, without posting field coordinate, when bringing convenience for user, promoted efficiency.
Above embodiment is illustrated the structure of tinter, describes the structure of the tinter that the texture mapping object of generation can be shown by display below in conjunction with the embodiment shown in Fig. 7 in detail:
This tinter specifically comprises:
Operational order receiving element 701, for receiving the operational order of user input, this operational order comprises the color value in this map color matching region that map color matching region that user is selected and user set;
Texture mapping object generation unit 702, for generating the texture mapping object of a plurality of correspondences according to pre-stored map slice of data;
Color value acquiring unit 703, for for each texture mapping object, obtains the color value of this texture mapping object;
Judging unit 704, for judging whether this texture mapping object is positioned at this map color matching region;
Color value reset cell 705, if judge this texture mapping object for this judging unit, be positioned at this map color matching region that user selectes, the color value of this texture mapping object is set to equate with the color value in this map color matching region, so that this color value in this map color matching region that this texture mapping object is set with user shows;
Color value display unit 706, if be not positioned at this map color matching region for this texture mapping object, by the direct output display of this texture mapping object, so that the color value of this texture mapping object that this texture mapping object obtains with this color value reset cell 705 shows.
This tinter also comprises:
Texture mapping generation unit 707, for drawing and generate texture mapping according to this texture mapping object that is positioned at this texture mapping object in this map color matching region and is not positioned at this map color matching region;
Texture map unit 708, for showing this texture mapping texture to display.
In the present embodiment, 704 pairs of texture mapping objects of judging unit judge, thereby get the texture mapping object that is positioned at map color matching region and the texture mapping object that is not positioned at map color matching region; Texture mapping generation unit 707 is drawn and is generated texture mapping according to all texture mapping objects, texture map unit 708 can texture show this texture mapping to display, thereby make user by the match colors color value in region and this map color matching region of setting map, reach the object of key element Show Color on change map, and without the pre-recorded map reference of user, also without graphing, promoted the efficiency of mark.
Above embodiment is elaborated to the concrete structure of tinter, can receive and carry out according to user's operational order the structure of the corresponding tinter arranging below in conjunction with the embodiment explanation shown in Fig. 8:
This tinter specifically comprises:
Operational order receiving element 801, for receiving the operational order of user input, this operational order comprises the color value in this map color matching region that map color matching region that user is selected and user set;
It is also for, generating run command reception list, and this operational order receives list for receiving the operational order of user's input; Wherein, this operational order comprises the color value in this map color matching region that the selected map of user color matching region and user set;
Texture mapping object generation unit 802, for generating the texture mapping object of a plurality of correspondences according to pre-stored map slice of data;
Its also for, transfer pre-stored a plurality of these map slice of datas in local hard drive, and a plurality of these map slice of datas be loaded into internal memory, and according to this map slice of data, generate this texture mapping object of a plurality of correspondences;
Color value acquiring unit 803, for for each texture mapping object, obtains the color value of this texture mapping object;
Its also for, all these texture mapping objects are traveled through, and respectively all these texture mapping objects are sampled, obtain the color value of each this texture mapping object;
Judging unit 804, for judging whether this texture mapping object is positioned at this map color matching region;
Color value reset cell 805, if judge this texture mapping object for this judging unit, be positioned at this map color matching region that user selectes, the color value of this texture mapping object is set to equate with the color value in this map color matching region, so that this color value in this map color matching region that this texture mapping object is set with user shows;
Color value display unit 806, if be not positioned at this map color matching region for this texture mapping object, by the direct output display of this texture mapping object, so that the color value of this texture mapping object that this texture mapping object obtains with color value acquiring unit 803 shows.
This tinter also comprises:
Texture mapping generation unit 807, for drawing and generate texture mapping according to this texture mapping object that is positioned at this texture mapping object in this map color matching region and is not positioned at this map color matching region;
Texture map unit 808, for showing this texture mapping texture to display.
In the present embodiment, texture mapping object generation unit 802 can be transferred pre-stored a plurality of map slice of datas, and the generation texture mapping object corresponding with each map slice of data, color value acquiring unit 803 obtains the color value of texture mapping image, color value reset cell 805 makes all color values that are positioned at the texture mapping object in map color matching region equate with the color value that user sets, thereby make user by the match colors color value in region and this map color matching region of setting map, reach the object of key element Show Color on change map, and without the pre-recorded map reference of user, also without graphing, promoted the efficiency of mark.
For ease of understanding, the tinter that below lifting concrete application scenarios provides the embodiment of the present invention is elaborated:
The display end of computing machine has shown the map of having matched colors, and on this map, same key element shows by different colors;
Be that river shows by blueness, park shows by green, and road shows by yellow etc.;
Because pollution has occurred the river in the shown region of this map, user wishes represented region, river to carry out mark demonstration, wishes river to carry out mark by redness;
The 801 generating run command reception lists of operational order receiving element, the river region that user receives on the selected map of list by this operational order is map color matching region, and set the color value of river region, make the map color matching region showing by this color value for red;
Operational order receiving element 801 receives after the operational order of user's input, and the map slice of data being stored in local hard drive is loaded in internal memory;
Texture mapping object generation unit 802 generates corresponding a plurality of texture mapping objects according to this map slice of data, and wherein, each texture mapping object is corresponding with each key element on map;
803 pairs of a plurality of texture mapping objects of color value acquiring unit travel through respectively, and respectively all texture mapping objects are sampled, and according to sampled result, obtain the color value of each texture mapping object;
Judging unit 804 judges all texture mapping objects respectively, judge each texture mapping to as if be positioned at map color matching region, be not still positioned at map color matching region;
If the texture mapping object that judging unit 804 is judged is not positioned at map color matching region, this texture mapping object is not in river region shown on map time, this texture mapping object, according to user's operational order for not needing to carry out mark demonstration, shows with himself color value originally;
The texture mapping object that makes not to be positioned at map color matching region by color value display unit 806 is output display directly;
If the texture mapping object that judging unit 804 is judged is positioned at map color matching region, this texture mapping object is positioned at river region shown on map, this texture mapping object is to carry out mark demonstration according to user's operational order, and the color value of this texture mapping object need to re-start setting;
If texture mapping object is positioned at the map color matching region that user sets, the color value that color value of color value reset cell 805 these texture mapping objects is set to the map color matching region set with user equates,, in this application scene, color value reset cell 805 is controlled this texture mapping object and is shown with redness;
By calling color value reset cell 805, making to be positioned at the color value that the texture mapping object in map color matching region sets with user shows;
Texture mapping generation unit 807 bases are positioned at this texture mapping object in this map color matching region and are not positioned at this texture mapping object drafting generation texture mapping in this map color matching region;
This texture map unit 808 shows this texture mapping texture to display;
Making the river region in texture mapping shown on display is that red-label shows.
Those skilled in the art can be well understood to, for convenience and simplicity of description, the system of foregoing description, the specific works process of device and unit, can, with reference to the corresponding process in preceding method embodiment, not repeat them here.
In the several embodiment that provide in the application, should be understood that, disclosed system, apparatus and method, can realize by another way.For example, device embodiment described above is only schematic, for example, the division of this unit, be only that a kind of logic function is divided, during actual realization, can have other dividing mode, for example unit or assembly can in conjunction with or can be integrated into another system, or some features can ignore, or do not carry out.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, indirect coupling or the communication connection of device or unit can be electrically, machinery or other form.
This unit as separating component explanation can or can not be also physically to separate, and the parts that show as unit can be or can not be also physical locations, can be positioned at a place, or also can be distributed in network element.Can select according to the actual needs some or all of unit wherein to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can be also that the independent physics of unit exists, and also can be integrated in a unit two or more unit.Above-mentioned integrated unit both can adopt the form of hardware to realize, and also can adopt the form of SFU software functional unit to realize.
If the form of SFU software functional unit of usining this integrated unit realizes and during as production marketing independently or use, can be stored in a computer read/write memory medium.Understanding based on such, the all or part of of the part that technical scheme of the present invention contributes to prior art in essence in other words or this technical scheme can embody with the form of software product, this computer software product is stored in a storage medium, comprise that some instructions are with so that a computer equipment (can be personal computer, server, or the network equipment etc.) carry out all or part of step of each embodiment the method for the present invention.And aforesaid storage medium comprises: various media that can be program code stored such as USB flash disk, portable hard drive, ROM (read-only memory) (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CDs.
Above embodiment only, in order to technical scheme of the present invention to be described, is not intended to limit; Although the present invention is had been described in detail with reference to previous embodiment, those of ordinary skill in the art is to be understood that: its technical scheme that still can record aforementioned each embodiment is modified, or part technical characterictic is wherein equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution depart from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (10)

1. a map color matching method, is characterized in that, comprising:
Tinter receives the operational order of user's input, and described operational order comprises the color value in the described map color matching region that map color matching region that user is selected and user set;
Described tinter generates the texture mapping object of a plurality of correspondences according to pre-stored map slice of data;
For each texture mapping object, described tinter obtains the color value of this texture mapping object;
Described tinter judges whether this texture mapping object is positioned at described map color matching region;
If so, the color value of this texture mapping object of described tinter is set to equate with the color value in described map color matching region, so that the described color value in the described map color matching region that this texture mapping object is set with user shows.
2. map color matching method according to claim 1, is characterized in that,
If this texture mapping object is not positioned at described map color matching region, described tinter is by the direct output display of described texture mapping object, so that the color value of this texture mapping object that this texture mapping object obtains with described tinter shows.
3. map color matching method according to claim 2, is characterized in that, described map color matching method also comprises:
Described tinter basis is positioned at the described texture mapping object in described map color matching region and is not positioned at the described texture mapping object drafting generation texture mapping in described map color matching region;
Described tinter shows described texture mapping texture to display.
4. map color matching method according to claim 1, is characterized in that, the operational order that described tinter receives user's input also comprises afterwards:
Described tinter is transferred pre-stored a plurality of described map slice of data in local hard drive, and a plurality of described map slice of datas are loaded into internal memory;
Described tinter generates the described texture mapping object of a plurality of correspondences according to described map slice of data;
Described tinter travels through all described texture mapping objects, and respectively all described texture mapping objects is sampled, and obtains the color value of texture mapping object described in each.
5. map color matching method according to claim 1, is characterized in that, the operational order that described tinter receives user's input specifically comprises:
The list of described tinter generating run command reception, described operational order receives list for receiving the operational order of user's input; Wherein, described operational order comprises the color value in the described map color matching region that the selected map of user color matching region and user set.
6. a tinter, is characterized in that, comprising:
Operational order receiving element, for receiving the operational order of user input, described operational order comprises the color value in the described map color matching region that map color matching region that user is selected and user set;
Texture mapping object generation unit, for generating the texture mapping object of a plurality of correspondences according to pre-stored map slice of data;
Color value acquiring unit, for for each texture mapping object, obtains the color value of this texture mapping object;
Judging unit, for judging whether this texture mapping object is positioned at described map color matching region;
Color value reset cell, if judge described texture mapping object for described judging unit, be positioned at the described map color matching region that user selectes, the color value of this texture mapping object is set to equate with the color value in described map color matching region, so that the described color value in the described map color matching region that this texture mapping object is set with user shows.
7. tinter according to claim 6, is characterized in that, described tinter also comprises:
Color value display unit, if be not positioned at described map color matching region for this texture mapping object, by the direct output display of described texture mapping object, so that the color value of this texture mapping object that this texture mapping object obtains with described color value acquiring unit shows.
8. tinter according to claim 7, is characterized in that, described tinter also comprises:
Texture mapping generation unit, for drawing and generate texture mapping according to the described texture mapping object that is positioned at the described texture mapping object in described map color matching region and is not positioned at described map color matching region;
Texture map unit, for showing described texture mapping texture to display.
9. tinter according to claim 6, it is characterized in that, described texture mapping object generation unit also for, transfer pre-stored a plurality of described map slice of data in local hard drive, and a plurality of described map slice of datas are loaded into internal memory, and according to described map slice of data, generate the described texture mapping object of a plurality of correspondences;
Described color value acquiring unit also for, all described texture mapping objects are traveled through, and respectively all described texture mapping objects are sampled, obtain the color value of texture mapping object described in each.
10. tinter according to claim 6, is characterized in that, described operational order receiving element is also for, generating run command reception list, and described operational order receives list for receiving the operational order of user's input; Wherein, described operational order comprises the color value in the described map color matching region that the selected map of user color matching region and user set.
CN201310596743.5A 2013-11-21 2013-11-21 Map color blending method and shader Active CN103559726B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310596743.5A CN103559726B (en) 2013-11-21 2013-11-21 Map color blending method and shader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310596743.5A CN103559726B (en) 2013-11-21 2013-11-21 Map color blending method and shader

Publications (2)

Publication Number Publication Date
CN103559726A true CN103559726A (en) 2014-02-05
CN103559726B CN103559726B (en) 2017-02-15

Family

ID=50013965

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310596743.5A Active CN103559726B (en) 2013-11-21 2013-11-21 Map color blending method and shader

Country Status (1)

Country Link
CN (1) CN103559726B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109635049A (en) * 2018-10-31 2019-04-16 成都四方伟业软件股份有限公司 A kind of slice map pattern method of combination and system based on filter
CN109976600A (en) * 2017-12-28 2019-07-05 上海擎感智能科技有限公司 Map color matching method and intelligent terminal
CN109994037A (en) * 2017-12-29 2019-07-09 杭州海康威视系统技术有限公司 Generate method, apparatus, terminal and the storage medium of electronic map
CN110716682A (en) * 2018-07-13 2020-01-21 上海擎感智能科技有限公司 Map custom color matching method and system, storage medium and terminal
CN110728211A (en) * 2019-09-25 2020-01-24 恒大智慧科技有限公司 Subway security check queuing guide method and device and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1938739A (en) * 2004-03-31 2007-03-28 日本先锋公司 Map information creating device, map information creating method, and map information creating program

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1938739A (en) * 2004-03-31 2007-03-28 日本先锋公司 Map information creating device, map information creating method, and map information creating program

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109976600A (en) * 2017-12-28 2019-07-05 上海擎感智能科技有限公司 Map color matching method and intelligent terminal
CN109976600B (en) * 2017-12-28 2022-04-15 上海擎感智能科技有限公司 Map color matching method and intelligent terminal
CN109994037A (en) * 2017-12-29 2019-07-09 杭州海康威视系统技术有限公司 Generate method, apparatus, terminal and the storage medium of electronic map
CN110716682A (en) * 2018-07-13 2020-01-21 上海擎感智能科技有限公司 Map custom color matching method and system, storage medium and terminal
CN109635049A (en) * 2018-10-31 2019-04-16 成都四方伟业软件股份有限公司 A kind of slice map pattern method of combination and system based on filter
CN110728211A (en) * 2019-09-25 2020-01-24 恒大智慧科技有限公司 Subway security check queuing guide method and device and storage medium

Also Published As

Publication number Publication date
CN103559726B (en) 2017-02-15

Similar Documents

Publication Publication Date Title
CN107358649B (en) Processing method and device of terrain file
CN103559726A (en) Map color blending method and shader
CN103617220B (en) Method and device for implementing mobile terminal 3D (three dimensional) model
CN109949693B (en) Map drawing method and device, computing equipment and storage medium
CN102122502B (en) Method and related device for displaying three-dimensional (3D) font
CN103092585A (en) Image library configuration design system for integrated supervision software
CN101447091A (en) Method and apparatus for processing graphics
CN109933311A (en) A kind of information system creation method and relevant apparatus
CN110139149B (en) Video optimization method and device, and electronic equipment
CN105550247A (en) SVG standard customizable graphic symbol based power system graphic display method
CN105631923A (en) Rendering method and device
AU2018226403B2 (en) Brush stroke generation with deep neural networks
US11157551B2 (en) Method and device for image loading
CN103902294A (en) Browser image display method and terminal
CN113838061A (en) Method and device for image annotation and storage medium
CN108470371A (en) Local processing method, device, processor and the terminal of threedimensional model
CN102479387A (en) Method for generating multimedia animation and playing multimedia animation and apparatus thereof
CN105556570A (en) Generating screen data
CN103488380A (en) Method and device for displaying information
JP2005055573A (en) High-speed display processor
CN110990104B (en) Texture rendering method and device based on Unity3D
CN109189524A (en) Image resource generation method and device
CN105719330A (en) Animation curve generation method and device
CN115904372A (en) Data processing method and device
CN115100387A (en) Three-dimensional scene efficient visual editing method and equipment based on digital twins

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: Kezhu road high tech Industrial Development Zone, Guangzhou city of Guangdong Province, No. 233 510670

Patentee after: Wei Chong group Limited by Share Ltd

Address before: 510663 Guangzhou province high tech Industrial Development Zone, Guangdong, Cai road, No. 6, No.

Patentee before: Guangdong Weichuangshixun Science and Technology Co., Ltd.