CN111062852A - 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
CN111062852A
CN111062852A CN201911296347.4A CN201911296347A CN111062852A CN 111062852 A CN111062852 A CN 111062852A CN 201911296347 A CN201911296347 A CN 201911296347A CN 111062852 A CN111062852 A CN 111062852A
Authority
CN
China
Prior art keywords
area
map
target
value
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.)
Granted
Application number
CN201911296347.4A
Other languages
Chinese (zh)
Other versions
CN111062852B (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
Baidu International Technology Shenzhen 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 Baidu International Technology Shenzhen Co ltd filed Critical Baidu International Technology Shenzhen 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

Images

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

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

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 the preset cutting shape; setting an area value of a target area and an area value of a non-target area in the map to be rendered according to a cutting area corresponding to the cutting 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. According to the map rendering method and device, the map can be rendered in any shape, so that the map display effect can be optimized, and the user experience is improved.

Description

Map rendering method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of image processing technologies, and further relates to computer vision technologies, and in particular, to a map rendering method and apparatus, an electronic device, and a storage medium.
Background
With the increasing size of the screen of the mobile terminal, the development of the camera and the image processing technology, the demand of directly performing map rendering processing on the mobile terminal equipment is gradually enlarged at present, and the concrete steps of the existing map rendering mode include: and (4) giving a rectangular cutting frame on the picture editing interface, determining the image area expected to be selected by a user, and confirming that the cutting forms a new picture by dragging to enlarge or reduce the rectangular cutting frame. The existing technology has the defects that the shape of the cutting frame is fixed, is usually square, cannot be dynamically and flexibly adjusted, and therefore, the map cannot be rendered in any shape.
Disclosure of Invention
In view of this, embodiments provided in the present application provide a map rendering method, an apparatus, an electronic device, and a storage medium, which can implement rendering of a map in any shape, so that a map display effect can be optimized, and user experience can be improved.
In a first aspect, an embodiment of the present application provides a map rendering method, where the method includes:
acquiring a map to be rendered;
determining a cutting area corresponding to the cutting shape in the map to be rendered according to the preset cutting shape;
setting an area value of a target area and an area value of a non-target area in the map to be rendered according to a cutting area corresponding to the cutting 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 in the above application has the following advantages or benefits: the method and the device 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 to say, this application has adopted in the map of treating the rendering the operation of setting up the region value in target region and non-target area to can realize treating the map of tailorring and carry out the rendering of arbitrary shape, and then reach the optimization map show effect, promote the purpose that the user used and experienced.
In the above embodiment, the determining a cutting area corresponding to the cutting shape in the map to be rendered includes:
detecting a predetermined target display graph in the map to be rendered;
and determining a target cutting area in the map to be rendered according to the target display graph.
One embodiment in the above application has the following advantages or benefits: the method can detect the target display graph firstly; and then determining a target cutting area in the map to be rendered according to the target display graph. Therefore, the target cutting area can be more accurately determined in the map to be rendered, and the determined target cutting area is ensured to be centered on the target display graph.
In the above embodiment, the setting, according to the cutting area corresponding to the cutting shape, the area value of the target area and the area value of the non-target area in the map to be rendered 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 cutting area corresponding to the cutting shape or if the current area is above the cutting area corresponding to the cutting shape; and if the current area is outside the cutting area corresponding to the cutting shape, setting the area value of the current area as a non-target area value.
One embodiment in the above application has the following advantages or benefits: the method and the device can set the area value of the current area inside the cutting area or above the cutting area as the target area value; the area value of the current area outside the cutting area is set to be the non-target area value, so that the map to be cut can be rendered in any shape, the map display effect is optimized, and the user experience is improved.
In the above embodiment, the rendering the map to be cropped according to the area value of the target area and the area value of the non-target area includes:
selecting 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, 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 in the above application has the following advantages or benefits: according to the method and the device, the current region with the region value as the target region value can be reserved, and the current region with the region value as the non-target region value is deleted, so that the map to be cut can be rendered in any shape, the map display effect is optimized, and the user experience is improved.
In a second aspect, the present application also provides a map rendering apparatus, the apparatus including: the device comprises an acquisition module, a determination module, a setting module and a rendering module; wherein the content of the first and second substances,
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 a target area and the area value of a non-target area in the map to be rendered according to the cutting area corresponding to the cutting 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 content of the first and second substances,
the detection submodule 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 mould 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 the clipping area corresponding to the clipping shape; and if the current area is outside the cutting area corresponding to the cutting shape, setting the area value of the current area as a non-target area value.
In the above 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,
when the one or more programs are executed by the one or more processors, the one or more processors implement the map rendering method according to any embodiment of the present application.
In a fourth aspect, the present application provides a storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a map rendering method according to any of the embodiments of the present application.
One embodiment in the above application has the following advantages or benefits: according to the map rendering method, the map rendering device, the electronic equipment and the storage medium, a map to be rendered is obtained firstly; then according to a preset cutting shape, determining a cutting area corresponding to the cutting shape in the map to be rendered; setting a region value of a target region and a region value of a non-target region in a map to be rendered according to a cutting region corresponding to the cutting 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 to say, 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 map display effect is optimized, and the user experience is improved; moreover, the technical scheme of the embodiment of the application is simple and convenient to implement, convenient to popularize and wide in application range.
Other effects of the above-described alternative will be described below with reference to specific embodiments.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
fig. 1 is a schematic flowchart of a map rendering method according to an embodiment of the present application;
fig. 2 is a schematic flowchart 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 apparatus according to a third embodiment of the present application;
fig. 4 is a schematic structural diagram of a determination module provided in the third embodiment of the present application;
fig. 5 is a block diagram of an electronic device for implementing a map rendering method according to an embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. 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 present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Example one
Fig. 1 is a flowchart of a map rendering method according to an embodiment of the present application, where the method may be performed by a map rendering apparatus or an electronic device, where the apparatus or the electronic device may be implemented by software and/or hardware, and the apparatus or the electronic device may be integrated in any intelligent device with a network communication function. As shown in fig. 1, the map rendering method may include the steps of:
and S101, obtaining a map to be rendered.
In a specific embodiment of the present application, an electronic device may obtain a map to be rendered. The map to be rendered may be any map in a map database, and the map may be automatically generated after a user inputs a query condition, or may be generated by the user according to a location area selection.
And S102, determining a cutting area corresponding to the cutting shape in the map to be rendered according to the preset cutting shape.
In a specific embodiment of the application, the electronic device may determine, according to a preset clipping shape, a clipping area corresponding to the clipping shape in the 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, according to the cutting area corresponding to the cutting shape, the area value of the target area and the area value of the non-target area are set in the map to be rendered.
In a specific embodiment of the present application, the electronic device may set, according to a clipping region corresponding to the clipping shape, a region value of the target region and a region value of the non-target region in the map to be rendered. Specifically, the electronic device may select an area in the map to be rendered as a current area, and 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, 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 in the map to be rendered as a current area, and if the area value of the current area is the target area value, the electronic device may reserve the current area as an effective area; if the area value of the current area is the non-target area value, the electronic device may 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 according to a preset cutting shape, determining a cutting area corresponding to the cutting shape in the map to be rendered; setting a region value of a target region and a region value of a non-target region in a map to be rendered according to a cutting region corresponding to the cutting 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 to say, 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 map display effect is optimized, and the user experience is improved; moreover, the technical scheme of the embodiment of the application is simple and convenient to implement, convenient to popularize and wide in application range.
Example two
Fig. 2 is a schematic flowchart 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, obtaining a map to be rendered.
In a specific embodiment of the present application, an electronic device may obtain a map to be rendered. The map to be rendered may be any map in a map database, and the map may be automatically generated after a user inputs a query condition, or may be generated by the user according to a location area selection.
S202, a predetermined target display graph is detected in the map to be rendered.
In particular embodiments of the present application, an electronic device may detect a predetermined target display graphic in a map to be rendered. Specifically, the electronic device may perform pixel recognition on each line in the map to be rendered, thereby detecting a predetermined target display figure. The target display pattern may be an image automatically generated by a user inputting a query condition, or may be an image generated by a user selecting a position area. For example, the target display figure may be a line segment from a start point to an end point. It should be noted that the target mold herein may be any regular shape and irregular shape, for example, a pentagram shape, a triangle shape, a heart shape, etc.
And S203, determining a target cutting area 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 a target clipping area in the map to be rendered according to the target display graph. Specifically, the electronic device may determine the target clipping area in the map to be rendered by centering on a central point of the target display graphic. For example, assuming that the target display graphic is a line segment, in this step, the electronic device may determine the target clipping area 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 in the map to be rendered as a current area, and if the area value of the current area is the target area value, the electronic device may reserve the current area as an effective area; if the area value of the current area is the non-target area value, the electronic device may 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 method can be combined with a mask test to realize any shape of the map component, and specifically comprises the following steps: (1) making a mask pattern in any shape; (2) resetting the mask test default value to 0, and emptying the COLOR, DEPTH and STENCIL caches; (3) starting a mask test; (4) setting the area value of the mask passing the test to be 1; (5) drawing a mask with a mask graph area of 1 and other areas of 0 by combining the mask graph manufactured in the step (1); (6) setting the area with mask 1 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), continuing the next round of arbitrary-shaped map UI component rendering. The method and the device solve the problem that any shape of the map component is realized by combining the graph with any shape with a mask testing method 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 according to a preset cutting shape, determining a cutting area corresponding to the cutting shape in the map to be rendered; setting a region value of a target region and a region value of a non-target region in a map to be rendered according to a cutting region corresponding to the cutting 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 to say, 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 map display effect is optimized, and the user experience is improved; moreover, the technical scheme of the embodiment of the application is simple and convenient to implement, convenient to popularize and wide in application range.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a map rendering apparatus 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 content of the first and second substances,
the obtaining module 301 is configured to obtain 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, according to a clipping area corresponding to the clipping shape, an area value of a target area and an area value of a non-target area in the map to be rendered;
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 determination module provided in the third embodiment of the present application. As shown in fig. 4, the determining module 302 includes: a detection sub-module 3021 and a determination sub-module 3022; wherein the content of the first and second substances,
the detection submodule 3021 is configured to detect a predetermined target display pattern in the map to be rendered;
the determining submodule 3022 is configured to determine the target clipping area in the map to be rendered according to the target display graph.
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 the clipping area corresponding to the clipping shape; and if the current area is outside the cutting area corresponding to the cutting shape, setting the area value of the current area as a non-target area 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 the execution method. For details of the technology that are not described in detail in this embodiment, reference may be made to a map rendering method provided in any embodiment of the present application.
Example four
According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.
Fig. 5 is a block diagram of an electronic device according to a map rendering method of 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 phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 5, the electronic apparatus includes: one or more processors 501, memory 502, and interfaces for connecting the various 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 for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). In fig. 5, one processor 501 is taken as an example.
Memory 502 is a non-transitory computer readable storage medium as provided herein. Wherein the memory stores instructions executable by at least one processor to cause the at least one processor to perform the map rendering method provided herein. A non-transitory computer-readable storage medium of the present application stores computer instructions for causing a computer to perform a map rendering method provided herein.
The memory 502, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the map rendering method in the embodiments of the present application (e.g., the obtaining module 301, the determining module 302, the setting module 303, and the rendering module 304 shown in fig. 3). 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 embodiments, by running non-transitory software programs, instructions, and modules stored in the memory 502.
The memory 502 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the electronic device of the map rendering method, and the like. Further, the 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 located remotely from the processor 501, which may be connected to the map rendering method electronics over 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, the memory 502, the input device 503 and the output device 504 may be connected by a bus or other means, and fig. 5 illustrates the connection by a bus as an example.
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 apparatus of the map rendering method, such as an input device of a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointing stick, one or more mouse buttons, a track ball, a joystick, or the like. The output devices 504 may include a display device, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibrating 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 can be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. 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 a pointing device (e.g., a mouse or a 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 can 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, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end 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 back-end, 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 clients and servers. A client and server are generally 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 obtained firstly; then according to a preset cutting shape, determining a cutting area corresponding to the cutting shape in the map to be rendered; setting a region value of a target region and a region value of a non-target region in a map to be rendered according to a cutting region corresponding to the cutting 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 to say, 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 map display effect is optimized, and the user experience is improved; moreover, the technical scheme of the embodiment of the application is simple and convenient to implement, convenient to popularize and wide in application range.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and the present invention is not limited thereto as long as the desired results of the technical solutions disclosed in the present application can be achieved.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A map rendering method, the method comprising:
acquiring a map to be rendered;
determining a cutting area corresponding to the cutting shape in the map to be rendered according to the preset cutting shape;
setting an area value of a target area and an area value of a non-target area in the map to be rendered according to a cutting area corresponding to the cutting 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.
2. The method according to claim 1, wherein the determining a cropping area corresponding to the cropping shape in the map to be rendered comprises:
detecting a predetermined target display graph in the map to be rendered;
and determining a target cutting area in the map to be rendered according to the target display graph.
3. The method according to claim 1, wherein the setting of 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 comprises:
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 cutting area corresponding to the cutting shape or if the current area is above the cutting area corresponding to the cutting shape; and if the current area is outside the cutting area corresponding to the cutting shape, setting the area value of the current area as a non-target area value.
4. The method according to claim 3, wherein the rendering the map to be cropped according to the region value of the target region and the region value of the non-target region comprises:
selecting 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, 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.
5. 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 content of the first and second substances,
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 a target area and the area value of a non-target area in the map to be rendered according to the cutting area corresponding to the cutting 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.
6. The apparatus of claim 5, wherein the determining module comprises: a detection submodule and a determination submodule; wherein the content of the first and second substances,
the detection submodule 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 mould in the map to be rendered according to the target display graph.
7. The apparatus of claim 5, 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 the clipping area corresponding to the clipping shape; and if the current area is outside the cutting area corresponding to the cutting shape, setting the area value of the current area as a non-target area value.
8. The apparatus of claim 7, 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.
9. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
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-4.
10. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-4.
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 true CN111062852A (en) 2020-04-24
CN111062852B 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 (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070171234A1 (en) * 2006-01-24 2007-07-26 Roger Crawfis System and method for asynchronous continuous-level-of-detail texture mapping for large-scale terrain rendering
US20080014906A1 (en) * 2006-07-14 2008-01-17 Research In Motion Limited Contact image selection and association method and system for mobile device
US20080106552A1 (en) * 2006-11-03 2008-05-08 Nvidia Corporation Deferred page faulting in virtual memory based sparse texture representations
US20100002007A1 (en) * 2008-07-03 2010-01-07 Research In Motion Limited Method and system for fast clipping of line segments
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

Patent Citations (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070171234A1 (en) * 2006-01-24 2007-07-26 Roger Crawfis System and method for asynchronous continuous-level-of-detail texture mapping for large-scale terrain rendering
US20080014906A1 (en) * 2006-07-14 2008-01-17 Research In Motion Limited Contact image selection and association method and system for mobile device
US20080106552A1 (en) * 2006-11-03 2008-05-08 Nvidia Corporation Deferred page faulting in virtual memory based sparse texture representations
US20100002007A1 (en) * 2008-07-03 2010-01-07 Research In Motion Limited Method and system for fast clipping of line segments
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
丁晶;秦亮军;: "移动环境下三维场景的实时渲染技术研究", 城市勘测, no. 06 *
丁松涛;曲仕茹;: "基于深度学习的交通目标感兴趣区域检测", 中国公路学报, no. 09 *

Also Published As

Publication number Publication date
CN111062852B (en) 2023-10-17

Similar Documents

Publication Publication Date Title
EP3843031A2 (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
CN111880704B (en) Application program processing method, device, equipment and medium
KR102648760B1 (en) Method and apparatus for generating images
US11169652B2 (en) GUI configuration
CN111191619B (en) Method, device and equipment for detecting virtual line segment of lane line and readable storage medium
CN111861991A (en) Method and device for calculating image definition
CN110727383A (en) Touch interaction method and device based on small program, electronic equipment and storage medium
CN111814651B (en) Lane line generation method, device and equipment
CN110703964A (en) Page cursor position setting method and device, mobile terminal and server
EP3805985A1 (en) Method and apparatus for recognizing target object, electronic device and storage medium
CN112581589A (en) View list layout method, device, equipment and storage medium
CN112148196A (en) Display method and device of virtual keyboard
CN111062852B (en) Map rendering method and device, electronic equipment and storage medium
CN112035210B (en) Method, apparatus, device and medium for outputting color information
CN112541934B (en) Image processing method and device
CN113012555B (en) Map display method, map display device, electronic equipment and storage medium
CN111352685B (en) Display method, device, equipment and storage medium of input method keyboard
CN114564268A (en) Equipment management method and device, electronic equipment and storage medium
CN110688041B (en) Mobile client focus adjusting method and device, mobile terminal and readable storage medium
CN112150380A (en) Method and device for correcting image, electronic equipment and readable storage medium
CN111966432A (en) Verification code processing method and device, electronic equipment and storage medium
CN112445983A (en) Search result processing method, device and equipment and computer readable storage medium
CN111858303A (en) Method, device, equipment and medium for controlling page of applet
CN114296609B (en) Interface processing method and device, electronic equipment and storage 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
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