A guide line generation method and device, computer equipment and storage medium
By determining the physical distance of the POI position in the screen coordinate system as the width coefficient in the 3D map display mode, guide lines with consistent width are generated, solving the problem of inconsistent guide line width in the prior art and improving the display effect and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ALIBABA (CHINA) CO LTD
- Filing Date
- 2023-01-10
- Publication Date
- 2026-04-24
AI Technical Summary
In 3D map display mode, the existing guide line generation method results in inconsistent guide line widths, leading to poor display effects, obstruction of information in the foreground and difficulty in recognizing information in the background, and may mislead users.
By determining the physical distance per unit length at the POI location to be processed in the screen coordinate system as the width coefficient, guide lines with the same width are generated to eliminate the effect of near objects appearing larger and far objects appearing smaller caused by projection.
It achieves consistency in guide line width in the 3D map display interface, improves display effect, avoids information occlusion and enhances user recognition ability.
Smart Images

Figure CN116051676B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to one or more embodiments in the field of visual technology, and more particularly to a guide line generation method, apparatus, computer device, and storage medium. Background Technology
[0002] Map applications typically have a 3D display mode, which allows them to show 3D models of various buildings. However, in this mode, it's inconvenient for users to determine the location of each Point of Interest (POI). For example, the map might show three POIs—Restaurant 1, Restaurant 2, and Restaurant 3—located very close to each other, but without other labels, users cannot pinpoint their exact locations.
[0003] To help users pinpoint the exact location of each Point of Interest (POI) in 3D display mode, guide lines can be added perpendicularly upwards from the POI location (e.g., ...). Figure 1A (As shown), and add the name of the POI to the other end of the guide line so that users can quickly determine the specific location of each POI based on the guide line.
[0004] The current guide line generation methods produce guide lines of varying widths in the display interface, resulting in poor display quality. Summary of the Invention
[0005] In view of the above, one or more embodiments of this specification provide a guide wire generation method, apparatus, computer device, and storage medium.
[0006] According to a first aspect of one or more embodiments of this specification, a guide line generation method is provided, comprising:
[0007] For a POI to be processed, the physical distance corresponding to a unit length at the location of the POI to be processed in a preset direction is determined in the screen coordinate system, and the determined physical distance is used as a width coefficient; the screen coordinate system is used to represent the coordinate system corresponding to the display interface of the map application's three-dimensional display mode; the physical distance corresponding to a unit length at different locations in the preset direction is the same; the physical distance is used to represent the distance in the three-dimensional world; the width coefficient is used to represent the scaling factor of the initial width of the guide line;
[0008] Based on the product of the width coefficient and the initial width, the guide line width for identifying the POI to be processed is determined, and a guide line with the specified guide line width is generated.
[0009] According to a second aspect of one or more embodiments of this specification, a guide wire generating apparatus is provided, comprising:
[0010] The width coefficient determination module is used to determine, for the POI to be processed, the physical distance corresponding to a unit length at the position of the POI in a preset direction in the screen coordinate system, and use the determined physical distance as the width coefficient; the screen coordinate system is used to represent the coordinate system corresponding to the display interface of the map application's three-dimensional display mode; the physical distance corresponding to a unit length at different positions in the preset direction is the same; the physical distance is used to represent the distance in the three-dimensional world; the width coefficient is used to represent the scaling factor of the initial width of the guide line;
[0011] The guide line generation module is used to determine the guide line width for identifying the POI to be processed based on the product of the width coefficient and the initial width, and to generate a guide line with the guide line width.
[0012] According to a third aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores computer instructions thereon, which, when executed by a processor, implement the above-described guide wire generation method.
[0013] According to a fourth aspect of the embodiments of this specification, a computer device is provided, the computer device comprising:
[0014] processor;
[0015] Memory used to store processor-executable instructions;
[0016] The processor implements the above-described boot line generation method by running the executable instructions.
[0017] This specification provides a guide line generation method. For a Point of Interest (POI) to be processed, the method determines the physical distance corresponding to a unit length at the location of the POI in a preset direction in the screen coordinate system, and uses the determined physical distance as a width coefficient. The screen coordinate system is used to represent the coordinate system corresponding to the display interface of the map application's 3D display mode. The physical distance corresponding to a unit length at different locations in the preset direction is the same. The physical distance is used to represent the distance in the 3D world. The width coefficient is used to represent the scaling factor of the initial width of the guide line. Based on the product of the width coefficient and the initial width, the guide line width for identifying the POI to be processed is determined, and a guide line with the guide line width is generated.
[0018] Using the above method, the distance of each guide line's bottom unit length in the three-dimensional world under the screen coordinate system was determined, and this distance was used as the width coefficient. The corresponding guide lines were generated based on the width coefficient. In this way, the width of the guide lines in the screen coordinate system can be related to the unit length in the screen coordinate system. This allows the guide lines in the screen coordinate system to overcome the effect of near objects appearing larger and farther objects appearing smaller caused by projection. As a result, the width of the guide lines at different locations in the map application display interface (i.e., the interface where the screen coordinate system is located) is the same, improving the display effect of the guide lines.
[0019] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this specification. Attached Figure Description
[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this specification and, together with the description, serve to explain the principles of this specification.
[0021] Figure 1A This is a schematic diagram of a guide line shown in this specification according to an exemplary embodiment.
[0022] Figure 1B This specification is a schematic diagram illustrating a guide line display effect in the related art according to an exemplary embodiment.
[0023] Figure 1C This specification illustrates a schematic diagram of a guide line display effect according to an exemplary embodiment.
[0024] Figure 2 This is a flowchart illustrating a guide line generation method according to an exemplary embodiment of this specification.
[0025] Figure 3 This is a block diagram illustrating a guide line generation apparatus according to an exemplary embodiment of this specification.
[0026] Figure 4 This specification is a hardware structure diagram of a computer device in which a guide wire generation is performed, according to an exemplary embodiment. Detailed Implementation
[0027] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0028] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.
[0029] To facilitate the explanation of the methods shown in this manual, the terms used in this manual will be explained first. A map application can be an application installed on a user's terminal that can display a map. A POI, or Point of Interest, is a point on the map. A map includes several POIs; a POI is a location on the map, such as a tourist attraction, company, shopping mall, etc. Each location on the map can be considered a POI.
[0030] In the 3D display mode of the map application, three-dimensional buildings can be displayed. To make it easier to identify the specific location of each POI, a guide line perpendicular to the map and pointing upwards can be added to the map as shown in Figure 1. The bottom of the guide line is marked with the location of the POI, and the top of the guide line is marked with the name of the POI, so that users can easily identify the location of each POI.
[0031] However, the guide lines generated by the guide line generation methods in related technologies do not yet meet expectations.
[0032] Specifically, one method for generating guide lines in related technologies is to generate guide lines with a consistent physical width (i.e., a width that corresponds to a uniform width in the 3D world). The drawback of this approach is that since the guide lines displayed on the screen are obtained by projecting the 3D model, and projection produces the effect of objects appearing larger when closer and smaller when farther away, generating guide lines with a uniform physical width will make guide lines closer to the viewer appear wider and guide lines farther away appear thinner. For example... Figure 1B As shown,
[0033] Such guide lines, being wider in the foreground, may obscure information behind them, resulting in a poor display effect. Furthermore, with scaling, some distant guide lines, if maintaining the same width throughout, may become very thin and difficult to discern during zooming, also leading to a poor display effect. Additionally, guide lines are not real objects; if they appear larger in the foreground and smaller in the background like other buildings, users might mistakenly believe they are actual objects on the map.
[0034] It is evident that displaying different guide lines with the same physical width does not result in a better display effect.
[0035] To generate guide lines with better display effects, we can first determine the physical distance (i.e., the distance in the three-dimensional world) corresponding to a unit width on the screen at each guide line generation position, and use this distance as a width coefficient to generate guide lines, thereby avoiding the effect of near objects appearing larger and far objects appearing smaller caused by projection.
[0036] In other words, this specification provides a guide line generation method. For a POI to be processed, the method determines the physical distance corresponding to a unit length at the location of the POI in a preset direction in the screen coordinate system, and uses the determined physical distance as a width coefficient. The screen coordinate system is used to characterize the coordinate system corresponding to the display interface of the map application's 3D display mode. The physical distance corresponding to a unit length at different locations in the preset direction is the same. The physical distance is used to characterize the distance in the 3D world. The width coefficient is used to characterize the scaling factor of the initial width of the guide line. Based on the product of the width coefficient and the initial width, the guide line width for identifying the POI to be processed is determined, and a guide line with the guide line width is generated.
[0037] Using the above method, the distance of each guide line's bottom unit length in the three-dimensional world under the screen coordinate system was determined, and this distance was used as the width coefficient. The corresponding guide lines were generated based on the width coefficient. In this way, the width of the guide lines in the screen coordinate system can be related to the unit length in the screen coordinate system. This allows the guide lines in the screen coordinate system to overcome the effect of near objects appearing larger and farther objects appearing smaller caused by projection. As a result, the width of the guide lines at different locations in the map application display interface (i.e., the interface where the screen coordinate system is located) is the same, improving the display effect of the guide lines.
[0038] The following section will describe a method for generating a guide line as shown in this specification.
[0039] like Figure 2 As shown, Figure 2 This specification is a schematic diagram illustrating a guide line generation method according to an exemplary embodiment, comprising:
[0040] Step 201: For the POI to be processed, determine the physical distance per unit length at the position of the POI to be processed in the screen coordinate system in a preset direction, and use the determined physical distance as the width coefficient.
[0041] The screen coordinate system is used to characterize the coordinate system corresponding to the display interface of the map application's three-dimensional display mode; the physical distance corresponding to the unit length at different positions in the preset direction is the same; the physical distance is used to characterize the distance in the three-dimensional world; and the width coefficient is used to characterize the scaling factor of the initial width of the guide line.
[0042] Specifically, since the image displayed on the screen is projected from the world coordinate system, and the projected image has the problem of near objects appearing larger and far objects appearing smaller, in order to eliminate the effect of near objects appearing larger and far objects appearing smaller, it is necessary to know the physical distance corresponding to the unit width at each POI position. In this way, we can know how wide the guide lines at each position should be to make all guide lines have the same width on the screen, and thus eliminate the problem of near objects appearing larger and far objects appearing smaller by using this physical distance.
[0043] The following will explain the terms involved in step 201.
[0044] A POI to be processed can refer to any POI on the map, that is, a POI to which guide lines will be added. For example, it could be a restaurant, a residential area, or a building on the map.
[0045] The screen coordinate system, or the coordinate system corresponding to the map application's display interface in 3D display mode, represents the position of displayed objects on the screen. 3D display mode also refers to the mode that displays buildings on the map in a three-dimensional format.
[0046] The location of the POI to be processed is its position on the screen. Physical distance is the distance in the three-dimensional world, or the distance in the world coordinate system corresponding to the three-dimensional world. The three-dimensional world is the three-dimensional world corresponding to the area represented by the map.
[0047] The physical distance corresponding to a unit length can be understood as a scale. Due to the problem of near objects appearing larger and far objects appearing smaller caused by projection in the screen coordinate system, the scale is different at different locations. Therefore, it is necessary to determine the scale at the location of each POI to be processed.
[0048] Similarly, for the POI to be processed, only lines passing through the POI have a constant scale (i.e., the physical distance per unit length is the same at different positions along the preset direction). For other lines, the scale varies at different positions. Therefore, it is necessary to determine the physical distance per unit length along the preset direction at the POI to accurately calculate the width coefficient.
[0049] In the screen coordinate system, the unit length can be the length of a square corresponding to a pixel, or it can be the length of a coordinate value. This specification does not limit the method for determining the unit length in the screen coordinate system.
[0050] The width factor is a factor used to calculate the width of the guide line in the screen coordinate system, which is also the factor by which the initial width is magnified or reduced.
[0051] For the specific implementation of step 201, the physical distance corresponding to a unit length in the screen coordinate system can be obtained by using the physical width or length of the buildings near the POI to be processed.
[0052] For example, if the location of the POI to be processed is taken as a point on a straight line, and a straight line is drawn along a preset direction (where the physical distance corresponding to a unit length on the screen is the same), the physical distance corresponding to a unit length on the screen coordinate system can be determined based on the dimensions of other buildings on this line. Of course, other objects with definite dimensions can also be used for calculation. For example, if there is a building on this line with a width of 300 pixels on the screen and a physical distance of 30 meters, then using the length of the positive direction corresponding to one pixel as the unit length, the physical distance corresponding to the unit length is 0.1 meters.
[0053] In addition, the projection and back-projection methods can be used to determine the physical distance corresponding to a unit length in the screen coordinate system:
[0054] First, determine the coordinates of the POI to be processed in the screen coordinate system. This coordinate value can be obtained by converting the POI's coordinates in the world coordinate system using a transformation matrix between the screen and world coordinate systems. After obtaining the POI's coordinates in the screen coordinate system, shift these coordinates in a preset direction (with the same meaning as before) by a unit length or a multiple of that unit length, and then obtain the shifted coordinates of the POI. Then, calculate the physical distance between the original and shifted coordinates of the POI to obtain the aforementioned width coefficient. Alternatively, the physical distance between two coordinates can be calculated by back-projecting the shifted coordinates into the world coordinate system, and then calculating the distance between that coordinate in the world coordinate system and the original coordinates of the POI.
[0055] In other words, step 201 specifically includes: converting the first three-dimensional coordinates corresponding to the position of the POI to be processed into first projection plane coordinates; the first three-dimensional coordinates are used to represent the coordinates of the position of the POI to be processed in the world coordinate system; the first projection plane coordinates represent the coordinates of the position of the POI to be processed in the screen coordinate system; the world coordinate system is the coordinate system corresponding to the three-dimensional world; in the screen coordinate system, moving the first projection plane coordinates in a preset direction by a preset distance to obtain second projection plane coordinates; converting the second projection plane coordinates into second three-dimensional coordinates in the world coordinate system, and determining the distance between the first three-dimensional coordinates and the second three-dimensional coordinates, and determining the width coefficient based on the determined distance and the preset length.
[0056] In this process, the coordinates of the first projection plane are moved a preset distance in a preset direction, which means translating the coordinates in the screen coordinate system. Taking the unit length as 1 coordinate value and the preset direction as the x-direction of the screen coordinate system as an example, if the coordinate value of the first projection plane is (1,1), the coordinate value obtained after moving the first projection plane coordinates a preset distance in a preset direction is (2,1) or (0,1).
[0057] The preset distance can be a unit length or N times the unit length, where N can be any positive number.
[0058] Since the scale remains constant in the preset direction, it is not affected by the fact that things appear larger when they are closer and smaller when they are farther away. Therefore, by moving in the preset direction, the physical distance corresponding to a unit length in the screen coordinate system can be obtained. Finally, the physical distance corresponding to a unit length can be obtained by back projection.
[0059] The width coefficient is determined based on a given distance and a preset length. If the preset distance is the same as the unit length, the given distance can be used directly as the width coefficient. If the preset distance is N times the unit length, the given distance can be divided by N to obtain the width coefficient.
[0060] The default orientation is generally the horizontal orientation of the screen, that is, the horizontal orientation of the display interface.
[0061] Furthermore, it should be noted that one method for generating guide lines in related technologies involves directly drawing them in the screen coordinate system. In the original 3D display mode of map applications, the content displayed on the screen is generated by projection transformation of content in the 3D coordinate system. To solve the problem of poor display quality caused by inconsistent guide line widths, guide lines can be drawn directly in the screen coordinate system—that is, guide lines with consistent width and height are drawn at the screen location in the screen coordinate system—instead of being projected from guide lines in world coordinates. While this achieves consistent guide line widths at different locations on the screen, the height and angle of the guide lines in screen coordinates relative to other reference objects on the map will change during map zooming and panning operations. This results in poor guide line display quality. Therefore, this specification requires the physical distance corresponding to a unit length in the screen coordinate system and generates guide lines by projecting them from the world coordinate system to the screen coordinate system; otherwise, a satisfactory display effect cannot be achieved.
[0062] Step 203: Determine the guide line width for identifying the POI to be processed based on the product of the width coefficient and the initial width, and generate a guide line with the specified guide line width.
[0063] Specifically, after determining the width factor, the width of the guide line can be calculated based on the width factor, and a guide line of the corresponding width can be generated. Step 203 then generates guide lines of the same width in the display interface, and the display effect of the guide lines is as follows. Figure 1C As shown.
[0064] In step 203, the initial width refers to the original physical width of the guide line (i.e., the width in the world coordinate system) or the original width of the guide line in the screen coordinate system. It should also be noted that although the guide line is displayed as a dashed line perpendicular to the ground in Figure 1, this specification does not limit the form of the guide line. Besides the guide line example in Figure 1, the guide line can be a solid line, or a line that is not perpendicular to the ground. It can also be a broken line, an arc, etc. This specification does not limit the display form of the guide line.
[0065] In terms of the specific implementation of step 203, it can be:
[0066] First, multiply the initial width (which can be considered as the original physical width of the guide line in the world coordinate system) by the width coefficient to obtain the width of each guide line. Then, build the model of the guide line in the 3D coordinate system and project the guide line onto the screen coordinate system. In this way, since the initial width and the width coefficient are multiplied when generating the model corresponding to the guide line to obtain the width of the guide line in the world coordinate system, the effect of near objects appearing larger and far objects appearing smaller during projection is offset, resulting in a better display effect and making different guide lines in the display interface the same width.
[0067] Considering that the above method requires remodeling, which is quite complex, especially since this method needs to be re-executed every time the map is moved, it can be generated in the following way:
[0068] First, a guide line with its original physical width is generated in the world coordinate system. Then, this guide line is projected onto the screen coordinate system to determine its position. The width of the guide line in the screen coordinate system (i.e., the initial width) is then multiplied by a width coefficient to obtain the guide line width in the screen coordinate system. Finally, a guide line with this width is rendered and displayed in the screen coordinate system. This method only requires one additional step of calculating the guide line width, which is less computationally intensive than remodeling the guide line. It allows for faster rendering of the guide line, improving display quality and generation efficiency.
[0069] In other words, step 203 includes: generating guide lines in the world coordinate system to identify the POI to be processed; the world coordinate system is the coordinate system corresponding to the three-dimensional world; the physical width of the guide lines corresponding to different positions in the world coordinate system is the same; projecting the guide lines in the world coordinate system onto the screen coordinate system, determining the width of the guide lines in the screen coordinate system, and using the determined width as the initial width; determining the guide line width according to the product of the initial width and the width coefficient; the guide line width corresponding to different positions in the screen coordinate system is the same; and rendering the guide lines with the guide line width in the display interface.
[0070] Among the methods for determining the guide line width based on the width factor and the initial width, besides multiplying the initial width by the width factor, it can also be multiplied by a multiple of the width multiplied by the width factor. Any method that ultimately ensures the guide line width is the same at different positions in the screen coordinate system can be used as the method described above for determining the guide line width.
[0071] It should also be noted that other methods that can offset the near-large and far-small effect of projection based on the width factor can be used as specific implementation methods for step 203. This specification does not limit the specific implementation method of step 203.
[0072] Finally, the above steps can be performed under any circumstances. For better display results, it is best to ensure that the guide line width remains the same at different times when the map is manipulated (such as panning, changing the pitch angle, zooming in or out). This method can be executed when the user's above operations are detected, so that the guide line width does not change with the map operation, thus achieving a better display effect.
[0073] In other words, determining the physical distance corresponding to a unit length in a preset direction at the location of the POI to be processed in the screen coordinate system includes: determining the physical distance corresponding to a unit length in a preset direction at the location of the POI to be processed in the screen coordinate system when a preset operation of the user is detected; the preset operation is an operation that can change the location of any POI in the map.
[0074] The preset operations mentioned above can include: panning the map, changing the pitch angle of the 3D display, and zooming in and out of the map.
[0075] The above method ensures that the guide lines at different positions within the viewing angle maintain a consistent width on the screen. This achieves both stable anchoring of the guide lines at the POI to be processed and good visual display effects in 3D display mode, thereby enhancing the user experience in 3D map scenarios.
[0076] The above method determines the width of the guide line by using a width factor, thus eliminating the effect of near objects appearing larger and far objects appearing smaller caused by perspective projection.
[0077] The following specific embodiment will illustrate a method for generating a guide line as described in this specification. The method includes the following steps:
[0078] First, the projection in the screen coordinate system is obtained from the position of the bottom of the vertical guide line.
[0079] The projection coordinates in the screen coordinate system are calculated from the view projection matrix of the current frame camera and the world coordinates of the bottom point of the current numerical guide line.
[0080] The view projection matrix of the current frame camera is a matrix that transforms the world coordinate system into the screen coordinate system. The position of the bottom of the numerical guide line is also the position of the POI.
[0081] Second, the screen coordinates obtained from the projection are offset laterally by one pixel and then projected back.
[0082] Specifically, the obtained screen coordinates are offset horizontally by one pixel, and then their coordinates in the world coordinate system are obtained by inverse calculation of the viewProjection matrix of the current frame camera.
[0083] Third, calculate the distance between the bottom position of the vertical guide line and the coordinate position after reverse projection.
[0084] Specifically, the distance between the world coordinates obtained after the screen coordinate offset and the original bottom position of the vertical guide line is calculated. This distance value approximately represents the physical distance represented by one pixel when the current position is finally projected onto the screen coordinates. This value is used as a width coefficient to eliminate the effect of the vertical guide line appearing larger when near and smaller when far in the width direction after perspective projection.
[0085] Fourth, based on this width coefficient, generate the corresponding guide line.
[0086] The specific implementation method is detailed above and will not be repeated here.
[0087] By using projection and back projection, specific width coefficients are calculated for POI guide lines at different locations. Different guide lines eliminate the effect of perspective projection on the horizontal width direction, which makes things appear larger when they are near and smaller when they are far, based on their respective calculated width coefficients. This ensures that the width of the guide lines is the same at different locations and that the width of the guide lines remains unchanged before and after map operations.
[0088] Corresponding to the embodiments of the foregoing methods, this specification also provides embodiments of the apparatus and the terminal to which it is applied.
[0089] like Figure 3 As shown, Figure 3 This is a block diagram illustrating a guide line generation apparatus according to an exemplary embodiment of this specification, the apparatus comprising:
[0090] The width coefficient determination module 310 is used to determine, for the POI to be processed, the physical distance corresponding to a unit length at the position of the POI to be processed in a preset direction in the screen coordinate system, and use the determined physical distance as the width coefficient; the screen coordinate system is used to characterize the coordinate system corresponding to the display interface of the map application's three-dimensional display mode; the physical distance corresponding to a unit length at different positions in the preset direction is the same; the physical distance is used to characterize the distance in the three-dimensional world; the width coefficient is used to characterize the scaling factor of the initial width of the guide line.
[0091] The guide line generation module 320 is used to determine the guide line width for identifying the POI to be processed based on the product of the width coefficient and the initial width, and to generate a guide line with the guide line width.
[0092] In an optional embodiment, the width coefficient determination module 310 is used to convert the first three-dimensional coordinates corresponding to the position of the POI to be processed into first projection plane coordinates; the first three-dimensional coordinates are used to characterize the coordinates of the position of the POI to be processed in the world coordinate system; the first projection plane coordinates characterize the coordinates of the position of the POI to be processed in the screen coordinate system; the world coordinate system is the coordinate system corresponding to the three-dimensional world; in the screen coordinate system, the first projection plane coordinates are moved a preset distance in a preset direction to obtain second projection plane coordinates; the second projection plane coordinates are converted into second three-dimensional coordinates in the world coordinate system, and the distance between the first three-dimensional coordinates and the second three-dimensional coordinates is determined; the width coefficient is determined based on the determined distance and the preset length.
[0093] In one alternative embodiment, the preset direction is the horizontal direction of the screen.
[0094] In one alternative embodiment, the unit length is the length corresponding to one pixel.
[0095] In an optional embodiment, the guide line generation module 320 is used to generate guide lines in a world coordinate system to identify the POI to be processed; the world coordinate system is a coordinate system corresponding to the three-dimensional world; the physical width of the guide lines corresponding to different positions in the world coordinate system is the same; the guide lines in the world coordinate system are projected onto the screen coordinate system to determine the width of the guide lines in the screen coordinate system, and the width is used as the initial width; the guide line width is determined according to the product of the initial width and the width coefficient; the guide line width is the same corresponding to different positions in the screen coordinate system; and the guide lines with the guide line width are rendered in the display interface.
[0096] In an optional embodiment, the guide line generation module 320 is configured to, upon detecting a user's preset operation, determine the guide line width for identifying the POI to be processed based on the product of the width coefficient and the initial width, and generate a guide line having the guide line width; the preset operation is an operation that can change the location of any POI in the map.
[0097] The specific implementation process of the functions and roles of each module in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0098] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of the solution in this specification according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0099] like Figure 4 As shown, Figure 4 A hardware structure diagram of a computer device containing the guide wire generation apparatus of an embodiment is shown. This device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are internally connected to each other via the bus 1050.
[0100] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification. The processor implements the above-described methods by running executable instructions.
[0101] The memory 1020 for storing processor-executable instructions can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1020.
[0102] The input / output interface 1030 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.
[0103] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0104] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.
[0105] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.
[0106] This specification also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described boot line generation method.
[0107] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0108] This specification provides a computer program that, when executed by a processor, implements the above-described boot line generation method.
[0109] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0110] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
Claims
1. A method for generating a guide line, comprising: For the POI to be processed, determine the physical distance per unit length in the horizontal direction of the screen at the position of the POI to be processed in the screen coordinate system, and use the determined physical distance as the width coefficient; The screen coordinate system is used to characterize the coordinate system corresponding to the display interface of the map application's three-dimensional display mode; The physical distance per unit length is the same at different positions in the horizontal direction of the screen; the physical distance is used to characterize distance in the three-dimensional world; the width coefficient is used to characterize the scaling factor of the initial width of the guide line; Based on the product of the width coefficient and the initial width, the guide line width for identifying the POI to be processed is determined, and a guide line with the specified guide line width is generated.
2. The method according to claim 1, wherein determining the physical distance per unit length in the horizontal direction of the screen at the location of the POI to be processed in the screen coordinate system, and using the determined physical distance as a width coefficient, comprises: The first three-dimensional coordinates corresponding to the location of the POI to be processed are converted into first projection plane coordinates; The first three-dimensional coordinates are used to represent the coordinates of the POI to be processed in the world coordinate system; the first projection plane coordinates represent the coordinates of the POI to be processed in the screen coordinate system; the world coordinate system is the coordinate system corresponding to the three-dimensional world. In the screen coordinate system, the first projection plane coordinates are moved a preset distance in the horizontal direction of the screen to obtain the second projection plane coordinates; The second projection plane coordinates are converted into second three-dimensional coordinates in the world coordinate system, and the distance between the first three-dimensional coordinates and the second three-dimensional coordinates is determined. The width coefficient is determined based on the given distance and preset length.
3. The method according to claim 1, wherein the unit length is the side length of the square corresponding to one pixel.
4. The method according to claim 1, wherein determining the guide line width for identifying the POI to be processed based on the product of the width coefficient and the initial width, and generating a guide line having the guide line width, comprises: Generate guide lines in the world coordinate system to identify the POI to be processed; The world coordinate system is the coordinate system corresponding to the three-dimensional world; The physical width of the guide line is the same at different locations in the world coordinate system; Project the guide line in the world coordinate system onto the screen coordinate system, determine the width of the guide line in the screen coordinate system, and use the determined width as the initial width. The guide line width is determined by the product of the initial width and the width coefficient; the guide line width is the same at different positions in the screen coordinate system. Render a guide line with the specified guide line width in the display interface.
5. The method according to claim 1, wherein determining the physical distance per unit length in the horizontal direction of the POI to be processed in the screen coordinate system includes: If a user's preset operation is detected, determine the physical distance per unit length in the horizontal direction of the POI to be processed in the screen coordinate system. The preset operation is an operation that can change the location of any POI on the map.
6. A guide wire generating apparatus, comprising: The width coefficient determination module is used to determine the physical distance per unit length in the horizontal direction of the screen at the position of the POI to be processed in the screen coordinate system, and use the determined physical distance as the width coefficient. The screen coordinate system is used to characterize the coordinate system corresponding to the display interface of the map application's three-dimensional display mode; The physical distance per unit length is the same at different positions in the horizontal direction of the screen; the physical distance is used to characterize distance in the three-dimensional world; the width coefficient is used to characterize the scaling factor of the initial width of the guide line; The guide line generation module is used to determine the guide line width for identifying the POI to be processed based on the product of the width coefficient and the initial width, and to generate a guide line with the guide line width.
7. A computer device, comprising: processor; Memory used to store processor-executable instructions; The processor implements the method as described in any one of claims 1-5 by executing the executable instructions.
8. A computer-readable storage medium storing computer instructions that, when executed by a processor, implement the method as described in any one of claims 1-5.
9. A computer program product comprising a computer program that, when executed by a processor, implements the method as described in any one of claims 1-5.
Citation Information
Patent Citations
Image-driven view management for annotations
CN104285244A
Line width adjusting method and device, computer equipment and storage medium
CN112669410A