CN112330769A - Method and device for generating dotted line texture and electronic equipment - Google Patents

Method and device for generating dotted line texture and electronic equipment Download PDF

Info

Publication number
CN112330769A
CN112330769A CN202011461946.XA CN202011461946A CN112330769A CN 112330769 A CN112330769 A CN 112330769A CN 202011461946 A CN202011461946 A CN 202011461946A CN 112330769 A CN112330769 A CN 112330769A
Authority
CN
China
Prior art keywords
dotted line
target pixel
marked
pixel points
electronic map
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
CN202011461946.XA
Other languages
Chinese (zh)
Other versions
CN112330769B (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.)
Zhidao Network Technology Beijing Co Ltd
Original Assignee
Zhidao Network Technology Beijing 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 Zhidao Network Technology Beijing Co Ltd filed Critical Zhidao Network Technology Beijing Co Ltd
Priority to CN202011461946.XA priority Critical patent/CN112330769B/en
Publication of CN112330769A publication Critical patent/CN112330769A/en
Application granted granted Critical
Publication of CN112330769B publication Critical patent/CN112330769B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • 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
    • 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

Abstract

The application relates to a method and a device for generating a dotted line texture and electronic equipment. The method comprises the following steps: coloring a target pixel point in a picture to be processed according to a preset color to form a dotted line symbol; acquiring screen position information of a boundary line to be marked on the electronic map, and calculating to acquire the display number of the dotted line symbols; and sequentially splicing each dotted line symbol according to the display quantity of the dotted line symbols and the screen position information of the boundary line to be marked, and then displaying dotted line textures at the corresponding position of the electronic map. With the design, on one hand, the color is easier to configure in the form of pictures; the display position of the dotted line texture on the screen is determined according to the screen position information of the boundary line to be marked in the electronic map displayed on the current screen, the calculation amount is small, the display is fast, and the display efficiency is improved. On the other hand, the dotted line texture is directly displayed on the upper layer of the electronic map in the form of pictures, so that the requirement on hardware is low, and the use requirements of hardware such as vehicle-mounted intelligent equipment or mobile phones are met.

Description

Method and device for generating dotted line texture and electronic equipment
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a method and an apparatus for generating a dotted texture, and an electronic device.
Background
In the related art, the electronic map may express geospatial data through a vector data model. The vector data model generally expresses the location and extent of geospatial entities in the real world by elements such as points, lines and planes. Wherein the lines may include solid lines or dotted lines according to the line type. Different geographical information may be expressed according to different line types, for example, lines may be used to represent roads or boundaries.
In an electronic map, dotted lines are often used to indicate boundaries such as provincial lines or national boundaries. Generally, on the PC side of the computer, the system of the computer itself can support OpenGL (Open Graphics Library, "Open Graphics Library" or "Open Graphics Library") to draw the dotted lines in the electronic map. OpenGL is a cross-language, cross-platform application programming interface for rendering 2D, 3D vector graphics. Efficient implementations of OpenGL (using graphics acceleration hardware) exist for Windows, parts of UNIX platforms, and Mac OS. These implementations are typically provided by the display device vendor and are very dependent on the hardware provided by the vendor. For vehicle-mounted intelligent equipment, the used system is generally an embedded system, cannot support OpenGL to draw a dotted line, and needs manual drawing, so that the workload is increased.
Disclosure of Invention
In order to overcome the problems in the related art, the application provides a method and a device for generating a dotted line texture and electronic equipment.
A first aspect of the present application provides a method for generating a dotted line texture, including:
coloring a target pixel point in a picture to be processed according to a preset color to form a dotted line symbol;
acquiring screen position information of a boundary line to be marked on the electronic map, and calculating to acquire the display number of the dotted line symbols;
and according to the display quantity of the dotted line symbols and the screen position information of the boundary line to be marked, sequentially splicing each dotted line symbol, and then displaying dotted line textures at the corresponding position of the electronic map.
In one embodiment, the coloring a target pixel point in a picture to be processed according to a preset color to form a dotted line symbol includes:
according to the preset color, performing colored coloring on part of the target pixel points in the picture to be processed to form colored target pixel points; performing transparent coloring on the other part of the target pixel points to form transparent target pixel points;
and the colored target pixel points and the transparent target pixel points form dotted line symbols.
In one embodiment, the forming the dotted symbol by the colored target pixel point and the transparent target pixel point includes:
and sequentially forming a dotted line symbol by at least one colored target pixel point and at least one transparent target pixel point according to a preset position.
In one embodiment, the colored target pixel points form any one of a line structure, a dot structure or a line and dot alternating structure.
In one embodiment, the acquiring screen position information of a boundary to be marked on the electronic map includes:
acquiring the vertex geographical coordinates of each vertex of a boundary line to be marked in the electronic map;
and converting the vertex geographic coordinates, and calculating to obtain the screen pixel coordinates corresponding to each vertex.
In one embodiment, the calculating obtains the number of the dotted symbols, including:
calculating and obtaining the interval length between two adjacent vertexes according to the screen pixel coordinates of each vertex;
accumulating the interval lengths between every two adjacent vertexes, and calculating to obtain the total length of the boundary line to be marked;
and calculating and obtaining the number of the dotted line symbols to be displayed according to the total length divided by the number of the target pixel points of the single dotted line symbol.
In one embodiment, the preset color includes at least one color set according to a color value.
A second aspect of the present application provides an apparatus for generating a dotted texture, including:
the coloring module is used for coloring the target pixel points in the picture to be processed according to the preset color to form a dotted line symbol;
the dotted line information acquisition module is used for acquiring screen position information of a boundary line to be marked on the electronic map and calculating the display number of the dotted line symbols acquired by the coloring module;
and the texture display module is used for sequentially splicing the dotted line symbols according to the display quantity of the dotted line symbols and the screen position information of the boundary line to be marked, which are obtained by the dotted line information acquisition module, and then displaying dotted line textures at the corresponding positions of the electronic map.
A third aspect of the present application provides an electronic device comprising:
a processor; and
a memory having executable code stored thereon, which when executed by the processor, causes the processor to perform the method as described above.
A fourth aspect of the present application provides a non-transitory machine-readable storage medium having stored thereon executable code, which when executed by a processor of an electronic device, causes the processor to perform a method as described above.
The technical scheme provided by the application can comprise the following beneficial effects:
according to the technical scheme, the target pixel points in the picture to be processed are colored to form the dotted line symbols, and a certain number of dotted line symbols are displayed on the electronic map according to the screen position information of the boundary line to be marked to form dotted line textures. Due to the design, on one hand, the color is easier to configure in the form of pictures, and the operation is more flexible; meanwhile, the display position of the dotted line texture on the screen is determined directly according to the screen position information of the boundary line to be marked in the electronic map displayed on the current screen, the calculation amount is small, the display speed is high, and the display efficiency is improved. On the other hand, the dotted line texture is directly displayed on the upper layer of the electronic map in the form of pictures without drawing or changing the data point sequence of the electronic map, so that the requirement on hardware is low, and the use requirements of hardware such as vehicle-mounted intelligent equipment or mobile phones are met.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The foregoing and other objects, features and advantages of the application will be apparent from the following more particular descriptions of exemplary embodiments of the application, as illustrated in the accompanying drawings wherein like reference numbers generally represent like parts throughout the exemplary embodiments of the application.
Fig. 1 is a flowchart illustrating a method for generating a dotted texture according to an embodiment of the present application;
fig. 2 is another flow chart of a method for generating a dotted line texture according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a single dashed symbol shown in an embodiment of the present application;
FIG. 4 is a schematic diagram of a dotted texture formed by a plurality of dotted symbols according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a device for generating a dotted texture according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device shown in an embodiment of the present application.
Detailed Description
Preferred embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While the preferred embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms "first," "second," "third," etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present application, "a plurality" means two or more unless specifically limited otherwise.
In the related art, terminals with low hardware configuration, such as vehicle-mounted intelligent devices and mobile phones, cannot automatically draw dotted lines in an electronic map by using OpenGL, and need to manually draw the dotted lines, which increases workload. In view of the above problems, embodiments of the present application provide a method for generating a dotted line texture, which can quickly generate a dotted line texture on an electronic map and improve work efficiency. The technical solutions of the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Example one
Fig. 1 is a flowchart illustrating a method for generating a dotted texture according to an embodiment of the present application.
Referring to fig. 1, the method for generating a dotted texture includes:
step S110, coloring the target pixel points in the picture to be processed according to the preset color to form a dotted line symbol.
It is understood that a picture is composed of at least one target pixel point having a location and a color. The picture to be processed comprises at least one target pixel point. In this embodiment, the to-be-processed picture includes a plurality of target pixel points. In electronic maps, different geographic elements can be generally distinguished by using different colors. For example, a water area in the geographic element is displayed in blue, and a mountain forest is displayed in green. In one embodiment, at least one preset color may be used to color a target pixel point in the picture to be processed, so as to form a dashed symbol. And the target pixel point is a pixel point to be colored. That is, the colored picture to be processed includes at least one color, i.e., the single dotted symbol includes at least one color. In one embodiment, the dotted symbol is any one of a line structure, a dot structure, or an alternating structure of lines and dots. Further, the size of a single dotted symbol may be implemented by coloring target pixel points according to a preset number. For example, for the dashed line symbol of the short line structure, the line width and the line width of a single short line can be adjusted by controlling the number of colored target pixel points.
In other embodiments, the method of the present application is not limited to forming a pattern with a dotted symbol by coloring a target pixel of a to-be-processed picture, and can also form a pattern with any other shape by coloring, so that the method has high flexibility and operability.
Step S120, acquiring screen position information of the boundary line to be marked on the electronic map, and calculating to acquire the display number of the dotted line symbols.
The electronic map is displayed on a display screen of the terminal, and when a dotted line needs to be displayed at a certain position of the current map interface, for example, a provincial boundary line of the current map interface needs to be displayed by the dotted line, and the provincial boundary line is a boundary line to be marked. By acquiring the screen position information of the boundary line to be marked, the number of the dotted line symbols to be displayed can be calculated and obtained, so that a sufficient and proper number of dotted line symbols are continuously displayed at the position of the screen of the boundary line to be marked.
Step S130, sequentially splicing each dotted line symbol according to the display quantity of the dotted line symbols and the screen position information of the boundary line to be marked, and then displaying dotted line textures at the corresponding position of the electronic map.
It can be understood that on the display screen, the position to be displayed of the dotted line texture can be defined through the screen position information of the boundary line to be marked; by calculating the display quantity of the colored dotted line symbols, the dotted line symbols with the corresponding quantity can be spliced one by one in sequence at the position to be displayed to form dotted line textures. According to the method for generating the dotted line texture, the target pixel points in the picture to be processed are colored to form dotted line symbols, and a certain number of dotted line symbols are displayed on the electronic map according to the screen position information of the boundary line to be marked to form the dotted line texture. Due to the design, on one hand, the color is easier to configure in the form of pictures, and the operation is more flexible; meanwhile, the display position of the dotted line texture on the screen is determined directly according to the screen position information of the boundary line to be marked in the electronic map displayed on the current screen, the calculation amount is small, the display speed is high, and the display efficiency is improved. On the other hand, the dotted line texture is directly displayed on the upper layer of the electronic map in the form of pictures without drawing or changing the data point sequence of the electronic map, so that the requirement on hardware is low, and the use requirements of hardware such as vehicle-mounted intelligent equipment or mobile phones are met.
In one embodiment, step S110 and step S120 of the present application may not be in a sequential order, that is, step S110 and step S120 may be performed synchronously or in an arbitrary order.
Example two
Fig. 2 is another flow chart of a method for generating a dotted line texture according to an embodiment of the present application.
Referring to fig. 2, the method for generating a dotted texture includes:
step S210, according to the preset color, performing colored coloring on part of target pixel points in the picture to be processed, and performing transparent coloring on the other part of target pixel points to form a dotted line symbol.
In one embodiment, according to a preset color, performing colored coloring on part of target pixel points in a picture to be processed to form colored target pixel points; performing transparent coloring on the other part of target pixel points to form transparent target pixel points; the colored target pixel points and the transparent target pixel points form dotted line symbols. That is, the dotted line symbol is formed by the colored target pixel and the transparent target pixel according to the preset sequence. Further, the dotted symbol may be any one of a line structure, a dot structure, or an alternating structure of lines and dots. And sequentially forming a dotted line symbol by at least one colored target pixel point and at least one transparent target pixel point according to a preset position. When the dotted line symbol is a line structure, the colored target pixel points are sequentially spliced to form lines, and the transparent target pixel points are sequentially spliced to form intervals between adjacent lines, namely, the dotted line symbol of a single line structure is composed of the colored lines and the transparent intervals. Similarly, for the dotted line symbols of other structures, the colored target pixel points and the transparent target pixel points are spliced in sequence. Further, the size of each dotted line symbol can be set according to the colored target pixel point. For example, for the dotted line symbol of the line structure, the width and length of the line can be controlled by the number of colored target pixel points, and the interval length between adjacent lines can be controlled by the number of transparent target pixel points. For example, as shown in fig. 3, for a required dashed line symbol of a black line structure, in a single dashed line symbol, the line length of a line is 2 target pixel points, and the spacing distance between two adjacent lines is 6 target pixel points. When coloring, 2 adjacent target pixel points in the picture to be processed are colored into black through a coloring device, and the other 6 target pixel points are colored into transparent color, so that a needed dotted line symbol of a black line structure is formed. It should be noted that the edges of the 6 hollow black circles in fig. 3 are actually transparent and colored, and the black edges are only indicated by the number of target pixel points.
In order to provide rich colors, in one embodiment, the preset color is set according to a color value. For example, the color values of red (R), green (G) and blue (B) may be set according to the RGB color mode, and various colors may be designed, so as to meet the requirement of color identification and facilitate distinguishing from the colors of other geographic elements in the electronic map.
Step S220, acquiring the screen pixel coordinates and the display quantity of the dotted line symbols according to the screen position information of the boundary line to be marked on the electronic map.
In the related art, map data is generally hierarchically processed in order to facilitate management and tracking of the data. Specifically, the map data can be divided into a plurality of data levels from top to bottom, one upper layer data can correspond to a plurality of lower layer data, and each layer expresses the communication characteristics of different roads. Different scales may correspond to different data levels. In the present embodiment, the dotted symbol is formed at the uppermost layer of the electronic map, i.e., the dotted symbol is displayed at the data level in the electronic map currently being screen-displayed. Further, a plurality of dotted symbols are displayed at the positions of the corresponding screens of the to-be-marked boundary lines of the current data level. In one embodiment, the information of the screen positions of the boundary lines to be marked is the screen pixel coordinates of the boundary lines to be marked, and the dotted symbols can be displayed at the positions of the screen pixel coordinates according to the screen pixel coordinates of the boundary lines to be marked in the current data hierarchy.
In order to clarify the display position of each dotted line symbol, in one specific embodiment, the vertex geographical coordinates of each vertex of the boundary line to be marked in the electronic map are obtained; and converting the vertex geographic coordinates, and calculating to obtain the screen pixel coordinates corresponding to each vertex. Specifically, a line is typically represented by an ordered set of points (coordinate pairs). And for curved or bent lines, which include a plurality of vertices (also referred to as inflection points). Specifically, the boundary to be marked is the position where the dotted symbol needs to be displayed. The boundary lines are not limited to national boundaries or boundary lines, but may be other ground features or landforms which need to be represented by dotted lines. In one embodiment, the connecting line between every two adjacent vertexes is a straight line, and the vertexes are connected in sequence to form a bent boundary line. When the electronic map is displayed on a screen, the vertex geographical coordinates of each vertex of the boundary to be marked in the current data hierarchy are obtained. The vertex geographical coordinates are longitude and latitude coordinates of the vertexes. According to the data hierarchy displayed by the current electronic map, the screen pixel coordinates of each vertex can be calculated and obtained according to the related art. And determining the position of the connecting line of every two adjacent vertexes according to the screen pixel coordinates of each vertex. The position of the connecting line of every two adjacent vertexes is the display position of the broken line symbol.
In order to clarify the display quantity of each dotted line symbol, in one specific embodiment, the interval length between two adjacent vertexes is calculated and obtained according to the screen pixel coordinate of each vertex; accumulating the interval lengths between every two adjacent vertexes, and calculating to obtain the total length of the boundary line to be marked; and calculating to obtain the number of the dotted line symbols to be displayed according to the total length divided by the number of the target pixel points of the single dotted line symbol. For example, the dotted line symbol of the black line structure in the above embodiment includes 2 colored target pixel points and 6 transparent target pixel points, that is, a single dotted line symbol includes 8 target pixel points. After calculating the total length of the boundary lines to be marked, the total length is divided by 8, that is, the number of the dotted symbols to be displayed on the boundary lines to be displayed is obtained. As shown in fig. 4, when the calculation result shows that 3 dashed line symbols need to be displayed, the three dashed line symbols are connected end to end in sequence to form a dashed line texture of the line structure.
In this step, the positions and the number of the dotted line symbols to be displayed can be determined by obtaining the screen pixel coordinates and the display number of the dotted line symbols.
And step S230, sequentially splicing each dotted line symbol according to the screen pixel coordinates and the display quantity of the dotted line symbols to form a dotted line texture picture and display the dotted line texture picture on a screen.
It can be understood that a picture is composed of target pixel points having positions and colors. In one specific embodiment, target pixel points in the dotted-line texture picture are identified, each target pixel point is colored according to a preset color, and a dotted-line symbol is formed by a plurality of colored target pixel points. And according to the display quantity, splicing the plurality of dotted line symbols according to the coordinate sequence of the screen pixel to form a complete dotted line texture picture.
In the above embodiment, the target pixel point is colored and transparent according to the preset color to form a single dotted line symbol, and the plurality of dotted line symbols form a continuous and complete dotted line texture picture according to the corresponding screen pixel coordinates and the display number. Such a design is, on the one hand, advantageous. The dotted line texture is displayed in the form of a picture, so that the needed dotted line texture is more easily configured and obtained; on the other hand, the required dotted effect can be realized on the electronic map only by changing the picture without changing the map data in the electronic map, and the operation is simple and convenient.
Corresponding to the foregoing embodiment of the application function implementation method, the present application further provides a device for generating a dotted line texture, an electronic device, and a corresponding embodiment. Specifically, the apparatus described in this embodiment of the present application may implement part or all of the processes in the embodiment of the method for generating a dashed texture described in this application in conjunction with fig. 1 to 4.
EXAMPLE III
Fig. 5 is a schematic structural diagram of a device for generating a dotted line texture according to an embodiment of the present application.
Referring to fig. 5, the embodiment provides a generation apparatus of a dotted line texture, which includes a shading module 410, a dotted line information acquisition module 420, and a texture display module 430. Wherein:
and the coloring module 410 is configured to color the target pixel point in the picture to be processed according to a preset color to form a dotted line symbol.
And a dotted line information obtaining module 420, configured to obtain screen position information of a boundary to be marked on the electronic map, and calculate the display number of dotted line symbols obtained by the coloring module 410.
And a texture display module 430, configured to sequentially splice the dashed line symbols according to the display number of the dashed line symbols and the screen position information of the boundary to be marked, which are obtained by the dashed line information obtaining module 420, and then display dashed line textures at corresponding positions of the electronic map.
Further, the coloring module 410 may color the target pixel point according to a preset color. The coloring module 410 performs colored coloring on part of target pixel points in the picture to be processed according to a preset color to form colored target pixel points; performing transparent coloring on the other part of target pixel points to form transparent target pixel points; the colored target pixel points and the transparent target pixel points form a single complete dotted line symbol. The preset color comprises at least one color set according to a color numerical value. Specifically, at least one colored target pixel point and at least one transparent target pixel point form a dotted line symbol in sequence according to a preset position. The colored target pixel points form any one of a line structure, a point structure or a line and point alternating structure, so that a line, point or line and point alternating dotted line texture can be formed.
The dotted line information obtaining module 420 obtains the display position and the display number of the dotted line symbols according to the screen position information of the boundary line to be marked. Specifically, the vertex geographical coordinates of each vertex of the boundary line to be marked in the electronic map are obtained; and converting the vertex geographic coordinates, and calculating to obtain the screen pixel coordinates corresponding to each vertex, so that the display position of the dotted line symbol can be obtained. The display position of the dotted line symbol is the position where every two adjacent vertexes are connected. Further, calculating and obtaining the interval length between two adjacent vertexes according to the screen pixel coordinates of each vertex; accumulating the interval lengths between every two adjacent vertexes, and calculating to obtain the total length of the boundary line to be marked; and dividing the total length by the number of target pixel points of the single dotted line symbol, thereby calculating and obtaining the number of the dotted line symbols to be displayed.
The texture display module 430 displays the plurality of colored dotted symbols at the positions of the screens to be marked with the boundaries. Specifically, according to the screen pixel coordinates and the display number of the dotted line symbols, each dotted line symbol is sequentially spliced to form a dotted line texture picture and the dotted line texture picture is displayed on the screen.
The device for generating the dotted line textures displays the dotted line effect in the form of the picture by the dotted line textures, can flexibly configure colors of pixels in the picture through the coloring module, finally splices dotted line symbols in sequence according to the display quantity and the display position through the dotted line information acquisition module according to the screen position information of a boundary line to be marked, and forms complete continuous dotted line textures to be displayed on the screen. The device is flexible and simple in configuration, and can meet the equipment requirement of insufficient hardware conditions. The device can be applied to equipment with better hardware condition, is also applicable to equipment with poorer hardware condition, and has wide application.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
For a detailed description of the generating apparatus of the dotted line texture, reference may be made to the above description of the generating method of the dotted line texture, and details are not described here. The respective modules in the above-mentioned dashed texture generating device may be wholly or partially implemented by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
Fig. 6 is a schematic structural diagram of an electronic device shown in an embodiment of the present application. The electronic device may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, navigation devices, portable wearable devices, and the like.
Referring to fig. 6, the electronic device 500 includes a memory 510 and a processor 520.
The Processor 520 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 510 may include various types of storage units, such as system memory, Read Only Memory (ROM), and permanent storage systems. Wherein the ROM may store static data or instructions for the processor 520 or other modules of the computer. The persistent storage system may be a readable and writable storage system. The persistent storage system may be a non-volatile storage device that does not lose stored instructions and data even after the computer is powered off. In some embodiments, the persistent storage system employs a mass storage system (e.g., magnetic or optical disk, flash memory) as the persistent storage system. In other embodiments, the persistent storage system may be a removable storage device (e.g., floppy disk, optical drive). The system memory may be a read-write memory device or a volatile read-write memory device, such as a dynamic random access memory. The system memory may store instructions and data that some or all of the processors require at runtime. Further, the memory 510 may include any combination of computer-readable storage media, including various types of semiconductor memory chips (DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), magnetic and/or optical disks, may also be employed. In some embodiments, memory 510 may include a removable storage device that is readable and/or writable, such as a Compact Disc (CD), a digital versatile disc read only (e.g., DVD-ROM, dual layer DVD-ROM), a Blu-ray disc read only, an ultra-dense disc, a flash memory card (e.g., SD card, min SD card, Micro-SD card, etc.), a magnetic floppy disk, or the like. Computer-readable storage media do not contain carrier waves or transitory electronic signals transmitted by wireless or wired means.
The memory 510 has stored thereon executable code that, when processed by the processor 520, may cause the processor 520 to perform some or all of the methods described above.
The aspects of the present application have been described in detail hereinabove with reference to the accompanying drawings. In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments. Those skilled in the art should also appreciate that the acts and modules referred to in the specification are not necessarily required in the present application. In addition, it can be understood that the steps in the method of the embodiment of the present application may be sequentially adjusted, combined, and deleted according to actual needs, and the modules in the system of the embodiment of the present application may be combined, divided, and deleted according to actual needs.
Furthermore, the method according to the present application may also be implemented as a computer program or computer program product comprising computer program code instructions for performing some or all of the steps of the above-described method of the present application.
Alternatively, the present application may also be embodied as a non-transitory machine-readable storage medium (or computer-readable storage medium, or machine-readable storage medium) having stored thereon executable code (or a computer program, or computer instruction code) which, when executed by a processor of an electronic device (or electronic device, server, etc.), causes the processor to perform part or all of the various steps of the above-described method according to the present application.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the applications disclosed herein may be implemented as electronic hardware, computer software, or combinations of both.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems and methods according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Having described embodiments of the present application, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (10)

1. A method for generating a dotted line texture, comprising:
coloring a target pixel point in a picture to be processed according to a preset color to form a dotted line symbol;
acquiring screen position information of a boundary line to be marked on the electronic map, and calculating to acquire the display number of the dotted line symbols;
and according to the display quantity of the dotted line symbols and the screen position information of the boundary line to be marked, sequentially splicing each dotted line symbol, and then displaying dotted line textures at the corresponding position of the electronic map.
2. The method according to claim 1, wherein the coloring the target pixel point in the picture to be processed according to the preset color to form a dotted line symbol comprises:
according to the preset color, performing colored coloring on part of the target pixel points in the picture to be processed to form colored target pixel points; performing transparent coloring on the other part of the target pixel points to form transparent target pixel points;
and the colored target pixel points and the transparent target pixel points form dotted line symbols.
3. The method of claim 2, wherein the colored target pixel points and the transparent target pixel points form a dashed symbol comprising:
and sequentially forming a dotted line symbol by at least one colored target pixel point and at least one transparent target pixel point according to a preset position.
4. The method of claim 2, wherein the colored target pixels form any one of a line structure, a dot structure, or an alternating line and dot structure.
5. The method according to claim 1, wherein the acquiring screen position information of the boundary to be marked on the electronic map comprises:
acquiring the vertex geographical coordinates of each vertex of a boundary line to be marked in the electronic map;
and converting the vertex geographic coordinates, and calculating to obtain the screen pixel coordinates corresponding to each vertex.
6. The method of claim 5, wherein the calculating obtains the number of dashed symbols, comprising:
calculating and obtaining the interval length between two adjacent vertexes according to the screen pixel coordinates of each vertex;
accumulating the interval lengths between every two adjacent vertexes, and calculating to obtain the total length of the boundary line to be marked;
and calculating and obtaining the number of the dotted line symbols to be displayed according to the total length divided by the number of the target pixel points of the single dotted line symbol.
7. The method according to any one of claims 1 to 6, wherein the preset color comprises at least one color set according to a chromatic numerical value.
8. An apparatus for generating a dotted texture, comprising:
the coloring module is used for coloring the target pixel points in the picture to be processed according to the preset color to form a dotted line symbol;
the dotted line information acquisition module is used for acquiring screen position information of a boundary line to be marked on the electronic map and calculating the display number of the dotted line symbols acquired by the coloring module;
and the texture display module is used for sequentially splicing the dotted line symbols according to the display quantity of the dotted line symbols and the screen position information of the boundary line to be marked, which are obtained by the dotted line information acquisition module, and then displaying dotted line textures at the corresponding positions of the electronic map.
9. An electronic device, comprising:
a processor; and
a memory having executable code stored thereon, which when executed by the processor, causes the processor to perform the method of any one of claims 1-7.
10. A non-transitory machine-readable storage medium having stored thereon executable code, which when executed by a processor of an electronic device, causes the processor to perform the method of any one of claims 1-7.
CN202011461946.XA 2020-12-14 2020-12-14 Method and device for generating dotted line texture and electronic equipment Active CN112330769B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011461946.XA CN112330769B (en) 2020-12-14 2020-12-14 Method and device for generating dotted line texture and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011461946.XA CN112330769B (en) 2020-12-14 2020-12-14 Method and device for generating dotted line texture and electronic equipment

Publications (2)

Publication Number Publication Date
CN112330769A true CN112330769A (en) 2021-02-05
CN112330769B CN112330769B (en) 2023-08-22

Family

ID=74301720

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011461946.XA Active CN112330769B (en) 2020-12-14 2020-12-14 Method and device for generating dotted line texture and electronic equipment

Country Status (1)

Country Link
CN (1) CN112330769B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113284215A (en) * 2021-06-09 2021-08-20 智道网联科技(北京)有限公司 Dotted line processing method and device for high-precision map and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101388157A (en) * 2008-09-25 2009-03-18 炬力集成电路设计有限公司 Electronic map display packing, apparatus and equipment
US8274524B1 (en) * 2011-09-28 2012-09-25 Google Inc. Map rendering using interpolation of style parameters across zoom levels
CN103782323A (en) * 2011-08-23 2014-05-07 通腾科技股份有限公司 Methods of and apparatus for displaying map information
CN103971586A (en) * 2013-01-31 2014-08-06 北京四维图新科技股份有限公司 E-map generation method and device
US20160117849A1 (en) * 2014-03-28 2016-04-28 Huawei Device Co., Ltd. Method, apparatus, and terminal device for determining color of interface control

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101388157A (en) * 2008-09-25 2009-03-18 炬力集成电路设计有限公司 Electronic map display packing, apparatus and equipment
CN103782323A (en) * 2011-08-23 2014-05-07 通腾科技股份有限公司 Methods of and apparatus for displaying map information
US8274524B1 (en) * 2011-09-28 2012-09-25 Google Inc. Map rendering using interpolation of style parameters across zoom levels
CN103971586A (en) * 2013-01-31 2014-08-06 北京四维图新科技股份有限公司 E-map generation method and device
US20160117849A1 (en) * 2014-03-28 2016-04-28 Huawei Device Co., Ltd. Method, apparatus, and terminal device for determining color of interface control

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113284215A (en) * 2021-06-09 2021-08-20 智道网联科技(北京)有限公司 Dotted line processing method and device for high-precision map and electronic equipment
CN113284215B (en) * 2021-06-09 2023-08-29 智道网联科技(北京)有限公司 High-precision map dotted line processing method and device and electronic equipment

Also Published As

Publication number Publication date
CN112330769B (en) 2023-08-22

Similar Documents

Publication Publication Date Title
JP4769984B2 (en) Tile-based graphic rendering
EP3170151B1 (en) Blending between street view and earth view
US8237745B1 (en) Label positioning technique to reduce crawling during zoom activities
US9134886B2 (en) Providing indoor facility information on a digital map
CN110738722B (en) Thermodynamic diagram texture generation method, device and equipment
US20150332487A1 (en) Encoding polygon data for fast retrieval and rendering
CN110163831B (en) Method and device for dynamically displaying object of three-dimensional virtual sand table and terminal equipment
WO2014151487A1 (en) System and method for indicating user location and facing direction on a digital map
US8976169B1 (en) Rendering terrain patches
CN108159693B (en) Game scene construction method and device
US20150332481A1 (en) Indexed uniform styles for stroke rendering
WO2023207963A1 (en) Image processing method and apparatus, electronic device, and storage medium
CN112233062A (en) Surface feature change detection method, electronic device, and storage medium
CN112330769B (en) Method and device for generating dotted line texture and electronic equipment
CN109712225B (en) Rendering method, device, equipment and storage medium of surface object
CN110458954A (en) A kind of contour lines creation method, device and equipment
KR102527827B1 (en) Dynamic restyling of digital maps
CN116263984A (en) Three-dimensional map visualization method and device, electronic equipment and storage medium
CN115880127A (en) Rendering format selection method and related equipment thereof
JP5738442B2 (en) Map drawing device, navigation device, and map drawing method
KR101557703B1 (en) Method for real time rendering of variation of day and night on graphic processed earth floor plan and graphic processing apparatus using thereof
CN113157835B (en) Image processing method, device and platform based on GIS platform and storage medium
US11580649B1 (en) Graphical element rooftop reconstruction in digital map
CN116193050A (en) Image processing method, device, equipment and storage medium
CN112527926A (en) Electronic map rendering method, terminal and medium

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