CN111062852B - Map rendering method and device, electronic equipment and storage medium - Google Patents

Map rendering method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111062852B
CN111062852B CN201911296347.4A CN201911296347A CN111062852B CN 111062852 B CN111062852 B CN 111062852B CN 201911296347 A CN201911296347 A CN 201911296347A CN 111062852 B CN111062852 B CN 111062852B
Authority
CN
China
Prior art keywords
area
map
target
clipping
rendered
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911296347.4A
Other languages
Chinese (zh)
Other versions
CN111062852A (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.)
Apollo Zhilian Beijing Technology Co Ltd
Original Assignee
Apollo Zhilian Beijing Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Apollo Zhilian Beijing Technology Co Ltd filed Critical Apollo Zhilian Beijing Technology Co Ltd
Priority to CN201911296347.4A priority Critical patent/CN111062852B/en
Publication of CN111062852A publication Critical patent/CN111062852A/en
Application granted granted Critical
Publication of CN111062852B publication Critical patent/CN111062852B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T3/04
    • G06T5/90
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a map rendering method, a map rendering device, electronic equipment and a storage medium, and relates to the field of computer vision. The specific implementation scheme is as follows: acquiring a map to be rendered; determining a cutting area corresponding to the cutting shape in the map to be rendered according to a preset cutting shape; setting a region value of a target region and a region value of a non-target region in the map to be rendered according to the clipping region corresponding to the clipping shape; and rendering the map to be cut according to the area value of the target area and the area value of the non-target area. The embodiment of the application can realize rendering of any shape on the map, thereby optimizing the display effect of the map and improving the use experience of users.

Description

Map rendering method and device, electronic equipment and storage medium
Technical Field
The application relates to the technical field of image processing, in particular to a map rendering method, a map rendering device, electronic equipment and a storage medium.
Background
With the increasing size of mobile terminal screen, the demands of directly performing map rendering processing on mobile terminal devices are gradually expanding, and the specific steps of the existing map rendering mode include: and (3) giving a rectangular cutting frame on the picture editing interface, determining an image area which is expected to be selected by a user, and dragging to enlarge or reduce the rectangular cutting frame to confirm cutting to form a new picture. The prior art has the defects that the shape of the cutting frame is fixed, the cutting frame is generally square, and the shape of the cutting frame cannot be dynamically and flexibly adjusted, so that the map cannot be rendered in any shape.
Disclosure of Invention
In view of this, embodiments of the present application provide a map rendering method, apparatus, electronic device, and storage medium, which can implement rendering of any shape on a map, so as to optimize a map display effect and improve user experience.
In a first aspect, an embodiment of the present application provides a map rendering method, including:
acquiring a map to be rendered;
determining a cutting area corresponding to the cutting shape in the map to be rendered according to a preset cutting shape;
setting a region value of a target region and a region value of a non-target region in the map to be rendered according to the clipping region corresponding to the clipping shape;
and rendering the map to be cut according to the area value of the target area and the area value of the non-target area.
One embodiment of the above application has the following advantages or benefits: the application can set the area value of the target area and the area value of the non-target area in the map to be rendered; and rendering the map to be cut according to the area value of the target area and the area value of the non-target area. That is, the method and the device adopt the operation of setting the area values of the target area and the non-target area in the map to be rendered, so that the map to be cut can be rendered in any shape, and the purposes of optimizing the display effect of the map and improving the use experience of users are achieved.
In the foregoing embodiment, the determining, in the map to be rendered, a clipping area corresponding to the clipping shape includes:
detecting a predetermined target display graph in the map to be rendered;
and determining a target clipping region in the map to be rendered according to the target display graph.
One embodiment of the above application has the following advantages or benefits: the application can detect the target display graph first; and then determining a target clipping region in the map to be rendered according to the target display graph. Therefore, the target clipping region can be determined in the map to be rendered more accurately, and the determined target clipping region is ensured to be centered on the target display graph.
In the above embodiment, the setting, in the map to be rendered, the area value of the target area and the area value of the non-target area according to the clipping area corresponding to the clipping shape includes:
selecting an area in the map to be rendered as a current area, and setting an area value of the current area as a target area value if the current area is inside a clipping area corresponding to the clipping shape or if the current area is above the clipping area corresponding to the clipping shape; and if the current region is outside the clipping region corresponding to the clipping shape, setting the region value of the current region as a non-target region value.
One embodiment of the above application has the following advantages or benefits: the present application can set the area value of the current area located inside or above the clipping area as the target area value; the area value of the current area outside the clipping area is set as a non-target area value, so that rendering of any shape of the map to be clipped can be realized, the map display effect is optimized, and the user experience is improved.
In the above embodiment, the rendering the map to be clipped according to the area value of the target area and the area value of the non-target area includes:
selecting an area from the map to be rendered as the current area, and if the area value of the current area is the target area value, reserving the current area as an effective area; and if the area value of the current area is the non-target area value, deleting the current area as an invalid area.
One embodiment of the above application has the following advantages or benefits: the application can reserve the current region with the region value as the target region value and delete the current region with the region value as the non-target region value, so that the map to be cut can be rendered in any shape, and the purposes of optimizing the map display effect and improving the user experience are achieved.
In a second aspect, the present application also provides a map rendering apparatus, the apparatus comprising: the device comprises an acquisition module, a determination module, a setting module and a rendering module; wherein, the liquid crystal display device comprises a liquid crystal display device,
the acquisition module is used for acquiring a map to be rendered;
the determining module is used for determining a cutting area corresponding to the cutting shape in the map to be rendered according to the preset cutting shape;
the setting module is used for setting the area value of the target area and the area value of the non-target area in the map to be rendered according to the clipping area corresponding to the clipping shape;
and the rendering module is used for rendering the map to be cut according to the area value of the target area and the area value of the non-target area.
In the above embodiment, the determining module includes: a detection submodule and a determination submodule; wherein, the liquid crystal display device comprises a liquid crystal display device,
the detection sub-module is used for detecting a predetermined target display graph in the map to be rendered;
and the determining submodule is used for determining a cutting area corresponding to the target die in the map to be rendered according to the target display graph.
In the foregoing embodiment, the setting module is specifically configured to select an area in the map to be rendered as a current area, and set an area value of the current area as a target area value if the current area is inside a clipping area corresponding to the clipping shape, or if the current area is above a clipping area corresponding to the clipping shape; and if the current region is outside the clipping region corresponding to the clipping shape, setting the region value of the current region as a non-target region value.
In the foregoing embodiment, the rendering module is specifically configured to select an area in the map to be rendered as the current area, and if the area value of the current area is the target area value, reserve the current area as an effective area; and if the area value of the current area is the non-target area value, deleting the current area as an invalid area.
In a third aspect, an embodiment of the present application provides an electronic device, including:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the map rendering method described in any embodiment of the present application.
In a fourth aspect, an embodiment of the present application provides a storage medium having stored thereon a computer program which, when executed by a processor, implements the map rendering method according to any embodiment of the present application.
One embodiment of the above application has the following advantages or benefits: the map rendering method, the map rendering device, the electronic equipment and the storage medium provided by the application are used for firstly acquiring a map to be rendered; then determining a cutting area corresponding to the cutting shape in the map to be rendered according to the preset cutting shape; setting the area value of the target area and the area value of the non-target area in the map to be rendered according to the clipping area corresponding to the clipping shape; and finally, rendering the map to be cut according to the area value of the target area and the area value of the non-target area. That is, the method and the device adopt the operation of setting the area values of the target area and the non-target area in the map to be rendered, so that the map to be cut can be rendered in any shape, the display effect of the map is optimized, and the use experience of a user is improved; in addition, the technical scheme of the embodiment of the application is simple and convenient to realize, convenient to popularize and wider in application range.
Other effects of the above alternative will be described below in connection with specific embodiments.
Drawings
The drawings are included to provide a better understanding of the present application and are not to be construed as limiting the application. Wherein:
fig. 1 is a flowchart of a map rendering method according to an embodiment of the present application;
fig. 2 is a flow chart of a map rendering method according to a second embodiment of the present application;
fig. 3 is a schematic structural diagram of a map rendering device according to a third embodiment of the present application;
fig. 4 is a schematic structural diagram of a determining module according to a third embodiment of the present application;
fig. 5 is a block diagram of an electronic device for implementing a map rendering method of an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present application will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present application are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Example 1
Fig. 1 is a schematic flow chart of a map rendering method according to an embodiment of the present application, where the method may be performed by a map rendering device or an electronic device, and the device or the electronic device may be implemented by software and/or hardware, and the device or the electronic device may be integrated into any intelligent device having a network communication function. As shown in fig. 1, the map rendering method may include the steps of:
s101, acquiring a map to be rendered.
In a specific embodiment of the present application, the electronic device may obtain a map to be rendered. The map to be rendered can be any map in a map database, and the map can be automatically generated after the user inputs the query condition or can be generated according to the position area selection by the user.
S102, determining a clipping region corresponding to the clipping shape in the map to be rendered according to the preset clipping shape.
In a specific embodiment of the present application, the electronic device may determine, according to a preset clipping shape, a clipping area corresponding to the clipping shape in a map to be rendered. Specifically, the electronic device may first detect a predetermined target display graphic in a map to be rendered; and then determining a cutting area corresponding to the target mould in the map to be rendered according to the target display graph.
S103, setting the area value of the target area and the area value of the non-target area in the map to be rendered according to the clipping area corresponding to the clipping shape.
In a specific embodiment of the present application, the electronic device may set, in the map to be rendered, an area value of the target area and an area value of the non-target area according to the clipping area corresponding to the clipping shape. Specifically, the electronic device may select an area as a current area in the map to be rendered, and if the current area is inside the clipping area corresponding to the clipping shape, or if the current area is above the clipping area corresponding to the clipping shape, the electronic device may set an area value of the current area as a target area value; if the current region is outside the clipping region corresponding to the clipping shape, the electronic device may set the region value of the current region to a non-target region value. Specifically, if the current region is inside the clipping region corresponding to the clipping shape, or if the current region is above the clipping region corresponding to the clipping shape, the electronic device may set the region value of the current region to 1; if the current region is outside the clipping region corresponding to the clipping shape, the electronic device may set the region value of the current region to 0.
And S104, rendering the map to be cut according to the area value of the target area and the area value of the non-target area.
In a specific embodiment of the present application, the electronic device may render the map to be clipped according to the area value of the target area and the area value of the non-target area. Specifically, the electronic device may select an area as a current area in the map to be rendered, and if the area value of the current area is a target area value, the electronic device may reserve the current area as an effective area; if the area value of the current area is a non-target area value, the electronic device can delete the current area as an invalid area.
The map rendering method provided by the embodiment of the application comprises the steps of firstly obtaining a map to be rendered; then determining a cutting area corresponding to the cutting shape in the map to be rendered according to the preset cutting shape; setting the area value of the target area and the area value of the non-target area in the map to be rendered according to the clipping area corresponding to the clipping shape; and finally, rendering the map to be cut according to the area value of the target area and the area value of the non-target area. That is, the method and the device adopt the operation of setting the area values of the target area and the non-target area in the map to be rendered, so that the map to be cut can be rendered in any shape, the display effect of the map is optimized, and the use experience of a user is improved; in addition, the technical scheme of the embodiment of the application is simple and convenient to realize, convenient to popularize and wider in application range.
Example two
Fig. 2 is a flow chart of a map rendering method according to a second embodiment of the present application. As shown in fig. 2, the map rendering method may include the steps of:
s201, acquiring a map to be rendered.
In a specific embodiment of the present application, the electronic device may obtain a map to be rendered. The map to be rendered can be any map in a map database, and the map can be automatically generated after the user inputs the query condition or can be generated according to the position area selection by the user.
S202, detecting a predetermined target display graph in a map to be rendered.
In a specific embodiment of the present application, the electronic device may detect a predetermined target display graphic in the map to be rendered. Specifically, the electronic device may perform pixel recognition on each line in the map to be rendered, so as to detect a predetermined target display graphic. The target display pattern may be an image automatically generated after the user inputs the query condition, or may be an image generated by the user according to the position area selection. For example, the target display graphic may be a line segment from a start point to an end point. It is to be noted that the target mold herein may be of any regular shape and irregular shape, for example, a five-pointed star shape, a triangular shape, a heart shape, or the like.
S203, determining a target clipping region in the map to be rendered according to the target display graph.
In a specific embodiment of the present application, the electronic device may determine, in the map to be rendered, a target clipping region according to the target display graphic. Specifically, the electronic device may determine the target clipping region in the map to be rendered with the center point of the target display graphic as the center. For example, assuming that the target display graphic is a line segment, in this step, the electronic device may determine the target clipping region in the map to be rendered with the center point of the line segment as the center.
And S204, rendering the map to be cut according to the area value of the target area and the area value of the non-target area.
In a specific embodiment of the present application, the electronic device may render the map to be clipped according to the area value of the target area and the area value of the non-target area. Specifically, the electronic device may select an area as a current area in the map to be rendered, and if the area value of the current area is a target area value, the electronic device may reserve the current area as an effective area; if the area value of the current area is a non-target area value, the electronic device can delete the current area as an invalid area. For example, if the area value of the current area is 1, the electronic device may reserve the current area as an effective area; if the area value of the current area is 0, the electronic device may delete the current area as an invalid area.
Preferably, the application can realize any shape of the map component by combining with mask test, and specifically comprises the following steps: (1) making mask patterns with arbitrary shapes; (2) Resetting the mask test default to 0, and emptying the COLOR, DEPTH and STENCIL caches; (3) opening a mask test; (4) setting the area value passed by the mask test to be 1; (5) Drawing a mask with mask pattern area of 1 and other areas of 0 by combining the mask pattern manufactured in the step (1); (6) the area with mask 1 is set to pass the test; (7) Drawing a map UI layer with a specific shape according to the mask and the map UI component generated in the step (5); (8) closing the mask test; (9) Returning to the step (1), the next round of map UI component rendering of arbitrary shape is continued. The application solves the problem that the graph with any shape combines with the mask test method to realize any shape of the map component so as to meet the personalized appearance customization of the map component.
The map rendering method provided by the embodiment of the application comprises the steps of firstly obtaining a map to be rendered; then determining a cutting area corresponding to the cutting shape in the map to be rendered according to the preset cutting shape; setting the area value of the target area and the area value of the non-target area in the map to be rendered according to the clipping area corresponding to the clipping shape; and finally, rendering the map to be cut according to the area value of the target area and the area value of the non-target area. That is, the method and the device adopt the operation of setting the area values of the target area and the non-target area in the map to be rendered, so that the map to be cut can be rendered in any shape, the display effect of the map is optimized, and the use experience of a user is improved; in addition, the technical scheme of the embodiment of the application is simple and convenient to realize, convenient to popularize and wider in application range.
Example III
Fig. 3 is a schematic structural diagram of a map rendering device according to a third embodiment of the present application. As shown in fig. 3, the apparatus 300 includes: an acquisition module 301, a determination module 302, a setting module 303, and a rendering module 304; wherein, the liquid crystal display device comprises a liquid crystal display device,
the acquiring module 301 is configured to acquire a map to be rendered;
the determining module 302 is configured to determine, according to a preset clipping shape, a clipping area corresponding to the clipping shape in the map to be rendered;
the setting module 303 is configured to set, in the map to be rendered, a region value of a target region and a region value of a non-target region according to a clipping region corresponding to the clipping shape;
the rendering module 304 is configured to render the map to be clipped according to the area value of the target area and the area value of the non-target area.
Fig. 4 is a schematic structural diagram of a determining module according to a third embodiment of the present application. As shown in fig. 4, the determining module 302 includes: a detection submodule 3021 and a determination submodule 3022; wherein, the liquid crystal display device comprises a liquid crystal display device,
the detection submodule 3021 is configured to detect a predetermined target display graphic in the map to be rendered;
the determining submodule 3022 is configured to determine the target clipping region according to the target display graphic in the map to be rendered.
Further, the setting module 303 is specifically configured to select an area in the map to be rendered as a current area, and set an area value of the current area as a target area value if the current area is inside a clipping area corresponding to the clipping shape or if the current area is above a clipping area corresponding to the clipping shape; and if the current region is outside the clipping region corresponding to the clipping shape, setting the region value of the current region as a non-target region value.
Further, the rendering module 304 is specifically configured to select an area in the map to be rendered as the current area, and if the area value of the current area is the target area value, reserve the current area as an effective area; and if the area value of the current area is the non-target area value, deleting the current area as an invalid area.
The map rendering device can execute the method provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of executing the method. Technical details which are not described in detail in the present embodiment may be referred to the map rendering method provided in any embodiment of the present application.
Example IV
According to an embodiment of the present application, the present application also provides an electronic device and a readable storage medium.
As shown in fig. 5, there is a block diagram of an electronic device of a map rendering method according to an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the applications described and/or claimed herein.
As shown in fig. 5, the electronic device includes: one or more processors 501, memory 502, and interfaces for connecting components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the electronic device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In other embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple electronic devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 501 is illustrated in fig. 5.
Memory 502 is a non-transitory computer readable storage medium provided by the present application. The memory stores instructions executable by the at least one processor to cause the at least one processor to perform the map rendering method provided by the present application. The non-transitory computer-readable storage medium of the present application stores computer instructions for causing a computer to execute the map rendering method provided by the present application.
The memory 502 is used as a non-transitory computer readable storage medium, and may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules (e.g., the acquisition module 301, the determination module 302, the setting module 303, and the rendering module 304 shown in fig. 3) corresponding to the map rendering method in the embodiment of the present application. The processor 501 executes various functional applications of the server and data processing, i.e., implements the map rendering method in the above-described method embodiment, by running non-transitory software programs, instructions, and modules stored in the memory 502.
Memory 502 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created according to the use of the electronic device of the map rendering method, and the like. In addition, memory 502 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 502 may optionally include memory remotely located with respect to the processor 501, which may be connected to the electronic device of the map rendering method via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the map rendering method may further include: an input device 503 and an output device 504. The processor 501, memory 502, input devices 503 and output devices 504 may be connected by a bus or otherwise, for example in fig. 5.
The input device 503 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device of the map rendering method, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointer stick, one or more mouse buttons, a track ball, a joystick, etc. The output devices 504 may include a display device, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device may be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASIC (application specific integrated circuit), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
These computing programs (also referred to as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented in a high-level procedural and/or object-oriented programming language, and/or in assembly/machine language. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), the internet, and blockchain networks.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
According to the technical scheme of the embodiment of the application, a map to be rendered is firstly obtained; then determining a cutting area corresponding to the cutting shape in the map to be rendered according to the preset cutting shape; setting the area value of the target area and the area value of the non-target area in the map to be rendered according to the clipping area corresponding to the clipping shape; and finally, rendering the map to be cut according to the area value of the target area and the area value of the non-target area. That is, the method and the device adopt the operation of setting the area values of the target area and the non-target area in the map to be rendered, so that the map to be cut can be rendered in any shape, the display effect of the map is optimized, and the use experience of a user is improved; in addition, the technical scheme of the embodiment of the application is simple and convenient to realize, convenient to popularize and wider in application range.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present application may be performed in parallel, sequentially, or in a different order, provided that the desired results of the disclosed embodiments are achieved, and are not limited herein.
The above embodiments do not limit the scope of the present application. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the scope of the present application.

Claims (8)

1. A map rendering method, the method comprising:
acquiring a map to be rendered;
determining a clipping region corresponding to the clipping shape in the map to be rendered according to a preset clipping shape, wherein the clipping region comprises:
detecting a predetermined target display graph in the map to be rendered, including: performing pixel identification on each line in the map to be rendered, and detecting a predetermined target display graph;
determining a target clipping region in the map to be rendered according to the target display graph, wherein the method comprises the following steps: taking the center point of the target display graph as the center, and determining a target clipping region in the map to be rendered;
setting a region value of a target region and a region value of a non-target region in the map to be rendered according to the clipping region corresponding to the clipping shape;
and rendering the map to be rendered according to the area value of the target area and the area value of the non-target area.
2. The method according to claim 1, wherein the setting, in the map to be rendered, the area value of the target area and the area value of the non-target area according to the clipping area corresponding to the clipping shape includes:
selecting an area in the map to be rendered as a current area, and setting an area value of the current area as a target area value if the current area is inside a clipping area corresponding to the clipping shape or if the current area is above the clipping area corresponding to the clipping shape; and if the current region is outside the clipping region corresponding to the clipping shape, setting the region value of the current region as a non-target region value.
3. The method of claim 2, wherein the rendering the map to be rendered according to the region values of the target region and the region values of the non-target region comprises:
selecting an area from the map to be rendered as the current area, and if the area value of the current area is the target area value, reserving the current area as an effective area; and if the area value of the current area is the non-target area value, deleting the current area as an invalid area.
4. An apparatus for map rendering, the apparatus comprising: the device comprises an acquisition module, a determination module, a setting module and a rendering module; wherein, the liquid crystal display device comprises a liquid crystal display device,
the acquisition module is used for acquiring a map to be rendered;
the determining module is used for determining a cutting area corresponding to the cutting shape in the map to be rendered according to the preset cutting shape;
the setting module is used for setting the area value of the target area and the area value of the non-target area in the map to be rendered according to the clipping area corresponding to the clipping shape;
the rendering module is used for rendering the map to be rendered according to the area value of the target area and the area value of the non-target area;
the determining module includes: a detection submodule and a determination submodule; wherein, the liquid crystal display device comprises a liquid crystal display device,
the detection sub-module is configured to detect a predetermined target display graphic in the map to be rendered, and includes: performing pixel identification on each line in the map to be rendered, and detecting a predetermined target display graph;
the determining submodule is configured to determine a target clipping region in the map to be rendered according to the target display graph, and includes: and taking the center point of the target display graph as the center, and determining a target clipping region in the map to be rendered.
5. The apparatus according to claim 4, wherein:
the setting module is specifically configured to select an area in the map to be rendered as a current area, and set an area value of the current area as a target area value if the current area is inside a clipping area corresponding to the clipping shape or if the current area is above a clipping area corresponding to the clipping shape; and if the current region is outside the clipping region corresponding to the clipping shape, setting the region value of the current region as a non-target region value.
6. The apparatus according to claim 5, wherein:
the rendering module is specifically configured to select an area in the map to be rendered as the current area, and if the area value of the current area is the target area value, reserve the current area as an effective area; and if the area value of the current area is the non-target area value, deleting the current area as an invalid area.
7. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-3.
8. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-3.
CN201911296347.4A 2019-12-16 2019-12-16 Map rendering method and device, electronic equipment and storage medium Active CN111062852B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911296347.4A CN111062852B (en) 2019-12-16 2019-12-16 Map rendering method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911296347.4A CN111062852B (en) 2019-12-16 2019-12-16 Map rendering method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111062852A CN111062852A (en) 2020-04-24
CN111062852B true CN111062852B (en) 2023-10-17

Family

ID=70301103

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911296347.4A Active CN111062852B (en) 2019-12-16 2019-12-16 Map rendering method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111062852B (en)

Citations (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103136767A (en) * 2011-11-24 2013-06-05 北京图盟科技有限公司 Vector diagram drawing method and device
CN103455978A (en) * 2012-05-31 2013-12-18 索尼电脑娱乐欧洲有限公司 Apparatus and method for augmenting a video image
CN104732568A (en) * 2015-04-16 2015-06-24 成都品果科技有限公司 Method and device for online addition of lyric subtitles to pictures
WO2016114859A1 (en) * 2015-01-15 2016-07-21 Qualcomm Incorporated Text-based image resizing
CN105976698A (en) * 2016-04-29 2016-09-28 百度在线网络技术(北京)有限公司 Method and device for rendering road in electronic map
EP3139341A1 (en) * 2015-09-02 2017-03-08 Thomson Licensing Methods, systems and apparatus for specular highlight reconstruction
CN107063710A (en) * 2017-04-21 2017-08-18 百度在线网络技术(北京)有限公司 Method and apparatus for testing unmanned vehicle
CN107211167A (en) * 2015-02-05 2017-09-26 微软技术许可有限责任公司 Video is decoded
KR101794578B1 (en) * 2017-06-07 2017-11-07 (주)크레아소프트 Method for predicting disease, recording medium and apparatus for performing the method
CN107608733A (en) * 2017-09-19 2018-01-19 广州阿里巴巴文学信息技术有限公司 Image display method, device and terminal device
CN107610131A (en) * 2017-08-25 2018-01-19 百度在线网络技术(北京)有限公司 A kind of image cropping method and image cropping device
CN108122238A (en) * 2018-01-30 2018-06-05 百度在线网络技术(北京)有限公司 Image processing method, device, equipment and computer readable storage medium
CN108182717A (en) * 2017-12-15 2018-06-19 北京金风科创风电设备有限公司 Geographic information image generation method and device
CN108389195A (en) * 2018-02-24 2018-08-10 北京理工大学 Image detecting method and device
CN108776970A (en) * 2018-06-12 2018-11-09 北京字节跳动网络技术有限公司 Image processing method and device
CN109389659A (en) * 2018-09-11 2019-02-26 广州视源电子科技股份有限公司 The rendering method of mathematical formulae, device, storage medium and terminal device in PPT
CN109636868A (en) * 2018-11-28 2019-04-16 中国地质大学(武汉) The online construction method of High-precision image map and equipment based on WebGIS and deep learning
CN109690471A (en) * 2016-11-17 2019-04-26 谷歌有限责任公司 Use the media hype of orientation metadata
CN109816650A (en) * 2019-01-24 2019-05-28 强联智创(北京)科技有限公司 A kind of target area recognition methods and its system based on two-dimentional DSA image
CN110136142A (en) * 2019-04-26 2019-08-16 微梦创科网络科技(中国)有限公司 A kind of image cropping method, apparatus, electronic equipment
CN110389992A (en) * 2018-04-13 2019-10-29 百度在线网络技术(北京)有限公司 Method for visualizing, device, equipment and the storage medium of navigation vector data

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7626591B2 (en) * 2006-01-24 2009-12-01 D & S Consultants, Inc. System and method for asynchronous continuous-level-of-detail texture mapping for large-scale terrain rendering
US7949113B2 (en) * 2006-07-14 2011-05-24 Research In Motion Limited Contact image selection and association method and system for mobile device
US7746352B2 (en) * 2006-11-03 2010-06-29 Nvidia Corporation Deferred page faulting in virtual memory based sparse texture representations
WO2010000057A1 (en) * 2008-07-03 2010-01-07 Research In Motion Limited Method and system for fast clipping of line segments

Patent Citations (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103136767A (en) * 2011-11-24 2013-06-05 北京图盟科技有限公司 Vector diagram drawing method and device
CN103455978A (en) * 2012-05-31 2013-12-18 索尼电脑娱乐欧洲有限公司 Apparatus and method for augmenting a video image
WO2016114859A1 (en) * 2015-01-15 2016-07-21 Qualcomm Incorporated Text-based image resizing
CN107211167A (en) * 2015-02-05 2017-09-26 微软技术许可有限责任公司 Video is decoded
CN104732568A (en) * 2015-04-16 2015-06-24 成都品果科技有限公司 Method and device for online addition of lyric subtitles to pictures
EP3139341A1 (en) * 2015-09-02 2017-03-08 Thomson Licensing Methods, systems and apparatus for specular highlight reconstruction
CN105976698A (en) * 2016-04-29 2016-09-28 百度在线网络技术(北京)有限公司 Method and device for rendering road in electronic map
CN109690471A (en) * 2016-11-17 2019-04-26 谷歌有限责任公司 Use the media hype of orientation metadata
CN107063710A (en) * 2017-04-21 2017-08-18 百度在线网络技术(北京)有限公司 Method and apparatus for testing unmanned vehicle
KR101794578B1 (en) * 2017-06-07 2017-11-07 (주)크레아소프트 Method for predicting disease, recording medium and apparatus for performing the method
CN107610131A (en) * 2017-08-25 2018-01-19 百度在线网络技术(北京)有限公司 A kind of image cropping method and image cropping device
CN107608733A (en) * 2017-09-19 2018-01-19 广州阿里巴巴文学信息技术有限公司 Image display method, device and terminal device
CN108182717A (en) * 2017-12-15 2018-06-19 北京金风科创风电设备有限公司 Geographic information image generation method and device
CN108122238A (en) * 2018-01-30 2018-06-05 百度在线网络技术(北京)有限公司 Image processing method, device, equipment and computer readable storage medium
CN108389195A (en) * 2018-02-24 2018-08-10 北京理工大学 Image detecting method and device
CN110389992A (en) * 2018-04-13 2019-10-29 百度在线网络技术(北京)有限公司 Method for visualizing, device, equipment and the storage medium of navigation vector data
CN108776970A (en) * 2018-06-12 2018-11-09 北京字节跳动网络技术有限公司 Image processing method and device
CN109389659A (en) * 2018-09-11 2019-02-26 广州视源电子科技股份有限公司 The rendering method of mathematical formulae, device, storage medium and terminal device in PPT
CN109636868A (en) * 2018-11-28 2019-04-16 中国地质大学(武汉) The online construction method of High-precision image map and equipment based on WebGIS and deep learning
CN109816650A (en) * 2019-01-24 2019-05-28 强联智创(北京)科技有限公司 A kind of target area recognition methods and its system based on two-dimentional DSA image
CN110136142A (en) * 2019-04-26 2019-08-16 微梦创科网络科技(中国)有限公司 A kind of image cropping method, apparatus, electronic equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于深度学习的交通目标感兴趣区域检测;丁松涛;曲仕茹;;中国公路学报(第09期);全文 *
移动环境下三维场景的实时渲染技术研究;丁晶;秦亮军;;城市勘测(第06期);全文 *

Also Published As

Publication number Publication date
CN111062852A (en) 2020-04-24

Similar Documents

Publication Publication Date Title
US11710215B2 (en) Face super-resolution realization method and apparatus, electronic device and storage medium
CN110806865B (en) Animation generation method, device, equipment and computer readable storage medium
CN110727434B (en) Rendering method, rendering device, electronic equipment and storage medium
CN107479818B (en) Information interaction method and mobile terminal
US9729403B1 (en) Proficiency-based GUI adaptation
CN110688042A (en) Interface display method and device
CN111880704B (en) Application program processing method, device, equipment and medium
CN111191619B (en) Method, device and equipment for detecting virtual line segment of lane line and readable storage medium
CN111275803B (en) 3D model rendering method, device, equipment and storage medium
CN111178137B (en) Method, device, electronic equipment and computer readable storage medium for detecting real face
CN110727383A (en) Touch interaction method and device based on small program, electronic equipment and storage medium
CN111861991A (en) Method and device for calculating image definition
CN112634401B (en) Plane track drawing method, device, equipment and storage medium
EP3805985A1 (en) Method and apparatus for recognizing target object, electronic device and storage medium
CN111737636B (en) Path curve generation method, device, computer equipment and storage medium
CN111062852B (en) Map rendering method and device, electronic equipment and storage medium
CN112581589A (en) View list layout method, device, equipment and storage medium
CN112148196A (en) Display method and device of virtual keyboard
WO2024027134A1 (en) Virtual keyboard presentation method and apparatus, and electronic device, storage medium and product
CN109766530B (en) Method and device for generating chart frame, storage medium and electronic equipment
CN112541934B (en) Image processing method and device
CN111814651B (en) Lane line generation method, device and equipment
CN111858303B (en) Page control method, device, equipment and medium for applet
CN111352685B (en) Display method, device, equipment and storage medium of input method keyboard
CN111177558B (en) Channel service construction method and device

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20211018

Address after: 100176 101, floor 1, building 1, yard 7, Ruihe West 2nd Road, Beijing Economic and Technological Development Zone, Daxing District, Beijing

Applicant after: Apollo Zhilian (Beijing) Technology Co.,Ltd.

Address before: Unit D, Unit 3, 301, Productivity Building No. 5, High-tech Secondary Road, Nanshan District, Shenzhen City, Guangdong Province

Applicant before: BAIDU INTERNATIONAL TECHNOLOGY (SHENZHEN) Co.,Ltd.

GR01 Patent grant
GR01 Patent grant