Linear data generation method, navigation method, device and related equipment

By determining the outer ring contour and inner ring contour of the planar point of interest image and generating passable area pixel points in combination with pixel values, the problem of difficult to quickly generate internal route data of planar geographic elements in indoor scenes in the prior art is solved, and efficient and accurate internal route generation is achieved.

CN114445517BActive Publication Date: 2025-05-16ALIBABA GROUP HOLDING LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011224303.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-05
Publication Date
2025-05-16
Estimated Expiration
2040-11-05

AI Technical Summary

Technical Problem

The prior art is difficult to quickly generate route data within the surface geographical elements in indoor scenarios, resulting in inefficient and high cost of navigation services.

Method used

By determining the outer ring contour and inner ring contour of the planar point of interest image, combining the pixel values, a passable area pixel points inside the planar point of interest is generated, and linear data is generated based on these pixel points to represent the internal pass route.

Benefits of technology

This greatly improves the efficiency of the production of internal traffic routes of surface-shaped points of interest, reduces labor costs, and generates linear data more accurately reflects the topological structure of the passable area.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114445517B_ABST
    Figure CN114445517B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for generating linear data, a navigation method, an apparatus and related equipment. The method for generating linear data comprises: determining the outer ring contour of a planar point of interest according to the pixel coordinates of a planar point of interest image; determining the inner ring contour of a planar sub-point of interest located inside the planar point of interest according to the pixel coordinates of the planar point of interest image; determining the pixel points of a passable area of ​​the planar point of interest according to the pixel values ​​of the pixel points of the planar point of interest image; and generating linear data for indicating the internal passage route of the planar point of interest based on the pixel points of the passable area. Compared with the method of manual drawing by draftsmen based on the planar point of interest image in the prior art, this method can greatly improve the efficiency and accuracy of linear data production of the internal passage route and reduce labor costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of map data processing, and in particular to a linear data generation method, a navigation method, a device and related equipment. Background Art

[0002] The existing outdoor conventional road network collection is generally divided into two methods: field collection and remote sensing image delineation. Field collection is to record the actual road scene during driving through the image acquisition equipment on the road collection vehicle, rely on positioning technology to record the location information of the collection vehicle, and then form a road network through a series of processing. Field collection can ensure the accuracy and richness of road information; remote sensing image delineation is to use high-precision remote sensing images to extract roads, and then form a road network after manual correction. This method can effectively reduce costs.

[0003] With the development of digital maps and navigation technology, the demand for navigation services has extended from outdoor roads to indoors. For example, many indoor scenes also have the need for internal road navigation. Common indoor scenes include public spaces such as shopping malls, subway stations, museums, libraries, and underground parking lots. How to quickly generate route data within such planar geographic elements (such as shopping malls in indoor scenes or outdoor green spaces, lakes, etc.) is a problem that technicians in this field need to solve. Summary of the invention

[0004] In view of the above problems, the present invention is proposed to provide a linear data generation method, navigation method, apparatus and related equipment that overcome the above problems or at least partially solve the above problems.

[0005] In a first aspect, an embodiment of the present invention provides a method for generating linear data, which may include:

[0006] Determine the outer ring contour of the planar interest point according to the pixel coordinates of the planar interest point image;

[0007] Determining, according to the pixel coordinates of the planar interest point image, an inner ring contour of the planar sub-interest point located inside the planar interest point;

[0008] Determine the pixel points of the passable area of ​​the planar interest point according to the pixel values ​​of the pixel points of the planar interest point image, wherein the pixel points located between the outer ring contour and the inner ring contour belong to the pixel points of the passable area, and the pixel points located within the inner ring contour are marked as the pixel points of the inpassable area;

[0009] Based on the pixel points of the passable area, linear data for indicating a passable route inside the planar point of interest is generated.

[0010] In a second aspect, an embodiment of the present invention provides an indoor road navigation method, which may include:

[0011] Acquire an indoor map; the indoor map includes linear data of internal traffic routes;

[0012] Generate and push a navigation route based on the starting point, the end point and the acquired indoor map;

[0013] The linear data of the internal traffic route is obtained according to the linear data generation method described in the first aspect.

[0014] In a third aspect, an embodiment of the present invention provides a device for generating linear data, which may include:

[0015] An outer ring contour determination module is used to determine the outer ring contour of the planar interest point according to the pixel coordinates of the planar interest point image;

[0016] An inner ring contour determining module, used to determine the inner ring contour of the planar sub-interest point located inside the planar interest point according to the pixel coordinates of the planar interest point image;

[0017] A passable area determination module is used to determine the pixel points of the passable area of ​​the planar interest point according to the pixel values ​​of the pixel points of the planar interest point image, wherein the pixel points located between the outer ring contour and the inner ring contour belong to the pixel points of the passable area, and the pixel points located within the inner ring contour are marked as the pixel points of the inpassable area;

[0018] The linear data generating module is used to generate linear data indicating the internal passage route of the planar point of interest based on the pixel points of the passable area.

[0019] In a fourth aspect, an embodiment of the present invention provides an indoor road navigation device, which may include:

[0020] An acquisition module, used to acquire an indoor map; the indoor map includes linear data of internal traffic routes;

[0021] A navigation module, used to generate and push a navigation route based on a starting point, an end point and the acquired indoor map;

[0022] The linear data of the internal traffic route is obtained according to the linear data generation method described in the first aspect.

[0023] In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the method for generating linear data as described in the first aspect, or implement the indoor road navigation method as described in the second aspect.

[0024] In a sixth aspect, an embodiment of the present invention provides a server, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it is used to implement the method for generating linear data as described in the first aspect, or to implement the indoor road navigation method as described in the second aspect.

[0025] The beneficial effects of the above technical solution provided by the embodiments of the present disclosure include at least:

[0026] The disclosed embodiment determines the outer ring contour of the planar interest point and the inner ring contour of the planar sub-interest point located inside the planar interest point based on the pixel coordinates of the planar interest point image, and then determines the pixel points of the passable area of ​​the planar interest point based on the pixel coordinates of the planar interest point image, and then generates linear data for indicating the internal passable route of the planar interest point based on the pixel points of the passable area. Compared with the method of manual drawing by draftsmen based on the planar interest point image in the prior art, the efficiency of making the internal passable route of the planar interest point can be greatly improved, and the labor cost can be reduced. In addition, the disclosed method of obtaining the internal passable route by extracting the skeleton of the passable area, and because the extracted skeleton is consistent with the shape connectivity and topology of the passable area, it can better reflect the topological structure of the passable area, so that the obtained linear data of the internal passable route of the planar interest point is more accurate than the prior art.

[0027] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.

[0028] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0030] Figure 1 A flow chart of a method for generating linear data provided in Embodiment 1 of the present disclosure;

[0031] Figure 2 A flowchart for implementing step S13 provided in the first embodiment of the present disclosure;

[0032] Figure 3A A schematic diagram of an area enclosed by an outer ring outline of a planar point of interest provided in the first embodiment of the present disclosure;

[0033] Figure 3B A schematic diagram of a passable area of ​​a planar point of interest provided in the first embodiment of the present disclosure;

[0034] Figure 4 A flowchart for implementing step S14 provided in the first embodiment of the present disclosure;

[0035] Figure 5A , 5B A schematic diagram of passable pixel points representing a passable route inside a planar point of interest provided in the first embodiment of the present disclosure;

[0036] Figure 6 A flowchart of extracting a passable pixel point set based on the K3M algorithm provided in the first embodiment of the present disclosure;

[0037] Figure 7 A flow chart for connecting passable pixel points of a passable route inside a planar point of interest provided in the first embodiment of the present disclosure;

[0038] Figure 8 A schematic diagram of a passable area of ​​a planar point of interest composed of vector coordinate points provided in the first embodiment of the present disclosure;

[0039] Fig. 9 for Figure 5B A linear data schematic diagram of an internal passage route generated by connecting the passable pixel points in the image;

[0040] Fig.10 A schematic diagram of linear data of an internal passage route in a floor plan of a shopping mall provided in an embodiment of the present disclosure;

[0041] Fig.11 A flowchart of a detailed method for generating linear data provided in Embodiment 1 of the present disclosure;

[0042] Fig.12 A schematic diagram of the structure of a device for generating linear data provided in Embodiment 1 of the present disclosure;

[0043] Fig.13 A flowchart of an indoor road navigation method provided in Embodiment 2 of the present disclosure;

[0044] Fig.14 This is a schematic diagram of the structure of an indoor road navigation device provided in Embodiment 2 of the present disclosure. DETAILED DESCRIPTION

[0045] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0046] The linear data generation method, indoor road navigation method, and related devices and equipment provided by the embodiments of the present disclosure are described in detail below in conjunction with the accompanying drawings.

[0047] Embodiment 1

[0048] The first embodiment of the present disclosure provides a method for generating linear data, referring to Figure 1 As shown, the method may include:

[0049] Step S11, determining the outer ring contour of the planar interest point according to the pixel coordinates of the planar interest point image.

[0050] In the geographic information system, a point of interest (POI) may be an office building, a restaurant, a school, a subway station, a shopping mall or a store, a bus stop, etc. The planar POI image in this embodiment refers to a planar image of the indoor space of these POIs, for example, a shopping mall, a subway station, etc.

[0051] In one embodiment, the planar interest point image in this step may be a raster image, which contains both pixels of various geographic elements in the indoor space and geographic coordinates corresponding to these geographic elements.

[0052] The raster image can be obtained by converting the original vector image. The vector image can be various types of plan views such as JPG images, etc., which include coordinate data of different geographic elements of the indoor space of the point of interest. The present disclosure does not limit the type (absolute coordinates or relative coordinates) and source of these coordinates in the vector image.

[0053] In the process of converting a vector image into a raster image, the image data in the vector image is extracted, for example, through the getExteriorRing (extract outermost ring) function in GEOS (Geometry Engine-Open Source, which is a topological relationship operation utility library for set shapes, used to determine the relationship between two geometric shapes and operate on two geometric shapes to form a new geometric shape library), the vector coordinates of the outer ring contour of the point of interest are extracted, and then the vector coordinates of the extracted outer ring contour are converted to obtain the grid point coordinates corresponding to the outer ring contour in the raster image. Of course, the pixel points in the outer ring contour in the raster image can also be determined by other methods, and the embodiments of the present disclosure are not specifically limited to this.

[0054] Step S12: determining the inner ring contour of the planar sub-interest point located inside the planar interest point according to the pixel coordinates of the planar interest point image.

[0055] The surface sub-interest point in this step can be a geographical element in the interest point, such as a shop, counter, booth, elevator shaft, etc. in a shopping mall. This type of surface sub-interest point is inaccessible. The surface interest point image in this step has the same data format as that in the above step S11, and is also a raster image.

[0056] Similar to the outer ring contour, the inner ring contour of the surface sub-interest point in the raster image can be obtained by extracting the inner ring contour from the vector image and then converting it.

[0057] For example, the vector image data in this step can use the getNumInteriorRing (extract the innermost ring) function in GEOS to first extract the vector coordinates of the inner ring contour of the surface sub-interest point from the vector image, and then determine the grid coordinates of the inner ring contour of the surface sub-interest point in the raster image by converting the vector coordinates into raster coordinates.

[0058] In the embodiment of the present disclosure, the above-mentioned step S11 is to determine the outer ring contour, and step S12 is to determine the inner ring contour. The above-mentioned steps S11 and S12 are two independent steps, and there is no particular order in which they are executed. Step S11 can be executed first and then step S12, or step S12 can be executed first and then step S11, or step S11 and step S12 can be executed at the same time. The embodiment of the present disclosure does not limit this.

[0059] Step S13, according to the pixel values ​​of the pixel points of the planar interest point image, determine the pixel points of the passable area of ​​the planar interest point, wherein the pixel points located between the outer ring contour and the inner ring contour belong to the pixel points of the passable area, and the pixel points located within the inner ring contour are marked as the pixel points of the inpassable area.

[0060] In this step S13, the pixel points of the passable area of ​​the planar interest point can be determined by assigning values ​​to the inner pixel points of the outer ring contour and the inner ring contour respectively.

[0061] Step S14: Based on the pixel points in the passable area, linear data for indicating the internal passage route of the planar point of interest is generated.

[0062] For example, by performing skeleton extraction on the pixel points of the passable area according to a preset skeleton extraction algorithm, the skeleton line of the passable area can be obtained. Because the skeleton line is a thin curve that is consistent with the connectivity and topological structure of the original shape of the image, it can be used as an expression of linear data indicating the internal route of the surface interest point. Therefore, the extracted skeleton line is the linear data of the internal route, which serves as the basis for the final route.

[0063] The disclosed embodiment determines the outer ring contour of the planar point of interest and the inner ring contour of the planar sub-point of interest located inside the planar point of interest based on the pixel coordinates of the planar point of interest image, and then determines the pixel points of the passable area of ​​the planar point of interest based on the pixel coordinates of the planar point of interest image, and then generates linear data indicating the internal passable route of the planar point of interest based on the pixel points of the passable area. Compared with the prior art method in which draftsmen manually draw based on the planar point of interest image, the efficiency of making the internal passable route of the planar point of interest is greatly improved and the labor cost is reduced. Moreover, because the generated linear data of the internal passable route is consistent with the shape connectivity and topology of the passable area, it can better reflect the topological structure of the passable area, so that the obtained linear data of the internal passable route of the planar point of interest is more accurate.

[0064] Preferably, compared with the linear data of internal routes of traditional maps, since the spatial layout and facilities of the planar POI images are more easily changed, the method of automatically generating linear data of internal routes disclosed in the present invention can quickly generate updated linear data of internal routes based on the analysis of the pixel coordinates of the image, which also facilitates the updating of map data.

[0065] In a specific embodiment, in the above steps S11 and S12, the indoor space elements in the planar interest points are called sub-interest points in the planar interest points, and these indoor space elements may include: architectural elements constituting the indoor space, movable or immovable facility elements arranged in the indoor space, etc. Taking a shopping mall, a shopping center or a library as an example, the architectural elements may include walls, columns, elevators, escalators, doors and windows, etc. of the building; the facility elements may be objects with various functions due to different functions of the building. For example, the facility elements in a shopping mall may include shops, counters, exhibition stands, etc., and the facility elements in a library may include bookshelves, information desks, etc.

[0066] For vector images, the coordinate data of these geographic elements can be obtained based on the operation of marking the planar interest points. The specific data format can be various map data formats, such as GeoJson, WKT (Well-known text) format, etc. This embodiment does not make specific limitations on this.

[0067] Among them, GeoJson is a format for encoding various geographic data structures. It is a geographic spatial information data exchange format based on Javascript object representation. GeoJson objects can represent geometry, features, or feature sets. WKT is a text markup language with binary representation, which is used to represent vector geometric objects, spatial reference systems, and conversions between spatial reference systems.

[0068] An example of geographic data of a polygonal point of interest in GeoJson format is as follows:

[0069]

[0070]

[0071] An example of data in WKT format in the embodiment of the present disclosure is as follows:

[0072]

[0073] In an optional embodiment, the implementation of step S13 above may specifically include the following steps: binarizing the pixel points of the surface interest point image, wherein the pixel values ​​of the pixel points of the surface sub-interest point image surrounded by the inner ring contour are assigned a preset first pixel value, and the remaining pixel points are assigned a preset second pixel value, the preset first pixel value indicates that the corresponding pixel point is inaccessible, and the preset second pixel value indicates that the corresponding pixel point is passable; among the pixel points of the surface interest point image, the pixel points assigned the second pixel value constitute the passable area of ​​the surface interest point.

[0074] The above binarization is the process of setting the pixel values ​​(grayscale values) of the image pixels to different values ​​(such as 0 and 255) to make the whole image present an obvious color difference effect (such as black and white effect). In digital image processing, image binarization plays a very important role, which not only greatly reduces the amount of image data, but also highlights the outline of the target.

[0075] In an image of a planar point of interest, such as the indoor spaces of a shopping mall or a shopping center in the above steps, it is necessary to determine the outer contour of the entire indoor space of the planar point of interest, as well as the inaccessible indoor space elements therein, assign values ​​to the pixel points within the outer ring contour, and then assign values ​​to the pixel points of the inaccessible indoor space elements again (the assignment is different from the first time), so that the passable area of ​​the indoor space of the planar point of interest can be obtained.

[0076] The passable and inpassable areas in the planar interest point image can be analyzed in advance according to the functions and properties of the indoor space elements. For example, the indoor space elements such as walls, columns, counters, and bookshelves mentioned above are inpassable indoor space elements, while doors, escalators, etc. are passable indoor space elements. Moreover, after eliminating the above-mentioned inpassable elements in the entire indoor space, it becomes the passable area in the indoor space.

[0077] In a specific embodiment, the implementation of step S13 can refer to Figure 2 As shown, for example, the following steps may be included:

[0078] Step S131, assigning second pixel values ​​to the pixels of the planar interest points enclosed by the outer ring contour.

[0079] For example, the planar interest point image in the embodiment of the present disclosure corresponds to a set of pixel points, and this set of pixel points can be represented by a coordinate point sequence. By determining the pixel points located in the outer ring contour in the coordinate sequence of the outermost spatial elements of the planar interest point space through the relative position relationship between the spatial elements in the planar interest point image, the outer contour of the entire planar interest point can be determined. For example, when making an indoor map of a shopping mall or library, refer to Figure 3A As shown, the coordinate sequences of various indoor space elements can be compared first to find out which indoor space elements are located at the outermost periphery of the indoor space, and the pixel points of the outer ring contour of the planar interest point can be extracted respectively to obtain the outer ring contour of the planar interest point.

[0080] After the outer ring contour of the entire planar interest point is determined, the area enclosed by the outer ring contour of the planar interest point can be determined, that is, Figure 3A For the gray area in , all the pixels in the area are assigned the second pixel value.

[0081] Step S132: in the assigned planar interest point image, reassign the pixel values ​​of the pixel points of the planar sub-interest point image surrounded by the inner ring contour from the second pixel value to the first pixel value, and mark them as pixel points of the inaccessible area.

[0082] Taking the indoor scene of the library as an example, the inaccessible indoor space elements such as walls, columns, counters, and bookshelves can be determined, that is, the surface sub-points of interest. In the indoor space area, the pixel points of such inaccessible indoor elements are excluded, and the remaining area is the passable area. Similar to the determination of the outer ring contour of the entire indoor space area, the area surrounded by the inaccessible indoor space elements can be determined based on the pixel coordinate point sequence of each inaccessible indoor space element, for example Figure 3B Two white rectangles in a medium grey area.

[0083] Step S133: among the pixels of the planar interest point image, determine the pixel points assigned with the second pixel value as the pixel points of the passable area of ​​the planar interest point.

[0084] In specific implementation, for example, a binary method can be used. For example, in a grid coordinate system, the pixel points in the area surrounded by the outer ring contour of the surface interest point are first assigned a value of 1, and the result is Figure 3A The gray area shown in the figure is then determined as the impassable area, and the pixel points in the impassable area are all assigned a value of 0. The area composed of the remaining pixel points assigned a value of 1 is the impassable area in the surface interest point.

[0085] Compared with the prior art in which draftsmen manually draw the planar points of interest (plane map), this embodiment not only improves the accuracy of identifying and judging the traversable area, but also greatly improves the recognition efficiency and reduces labor costs; and the recognition and data processing by computer are more accurate than the results of manual drawing, and the efficiency of generating linear data of the internal passage routes of the planar points of interest is higher.

[0086] In an optional embodiment, the implementation of the above step S14 can refer to Figure 4 As shown, the following steps may be included:

[0087] Step S141: Based on the pixel points in the passable area, a skeleton extraction operation is performed on the pixel points in the passable area to obtain passable pixel points for indicating a passable route inside the planar point of interest.

[0088] When describing objects in an image, the skeleton line is a thin curve that is consistent with the connectivity and topological structure of the original shape of the image. It can be used as an ideal way to express the objects in the image. Therefore, by processing the passable area based on the skeleton extraction algorithm, relatively accurate passable pixel points of the internal passable route can be obtained.

[0089] Step S142: Connect the passable pixel points to obtain linear data of the internal passable route.

[0090] Specifically, the implementation of the above step S141 may include: extracting boundary pixel points from the pixel points of the passable area, and traversing the boundary pixel points, determining whether the boundary pixel points need to be deleted based on the weight value of the pixel points in the preset neighborhood of the boundary pixel points, and if so, deleting the boundary pixel points in the passable area, and iterating the above steps until a skeleton of a pixel width of the passable area is obtained, and the pixel points of the skeleton are the passable pixel points of the internal passable route.

[0091] Reference Figure 5A and Figure 5B As shown, the above-mentioned embodiment of the present disclosure Figure 3B After skeleton extraction is performed on the passable area in the planar interest point, a structural schematic diagram of the passable pixel points representing the internal passable route is obtained. In this embodiment, the above-mentioned pixel points are 1 pixel wide and can accurately represent the set of passable pixel points in the passable area.

[0092] The disclosed embodiment uses an existing skeleton extraction algorithm to perform skeleton extraction on the pixel points contained in the above-mentioned passable area. For example, the existing boundary burning algorithms such as the K3M algorithm and the KMM algorithm in the prior art can be used to extract skeleton lines. Taking the K3M algorithm as an example, the K3M algorithm belongs to a type of algorithm that iteratively erodes the boundary. The idea of ​​this type of algorithm is that, assuming that the burning starts at the boundary of the target object (such as the passable area in the present invention) in the binary image at the same time, the target object will be gradually refined, but during the burning process, it is necessary to ensure that the points that meet certain conditions are retained or "burned" to determine that after the burning is completed, the last image with a width of 1 pixel left is the skeleton of the image.

[0093] Various boundary burning algorithms are used to extract skeletons of the pixels contained in the above passable area, and passable pixels representing the internal passable route can be generated. Because the finer the skeleton, the more it can reflect the shape topological characteristics of the passable area, therefore, preferably, the passable pixel points representing the internal passable route generated in the end are one pixel wide in a grid.

[0094] An example of a boundary burning algorithm in the prior art is briefly described as follows:

[0095] The following reference Figure 6 As shown in FIG. 1 , the process of the burning algorithm includes: first extracting the image boundary pixels, then traversing the boundary pixels, and then judging whether each boundary point satisfies the 3-neighborhood, 3-4-neighborhood, 3-4-5-neighborhood, 3-4-5-neighborhood, 3-4-5-6-neighborhood, and 3-4-5-6-neighborhood, and the boundary points are not zero in 7-neighborhood. If the above conditions are met, the boundary points are deleted in order. After one traversal, the boundary pixels are re-extracted and traversed again until the boundary points are not modified or the number of boundary points is stable, then the traversal is stopped.

[0096] The formula for calculating the weight weight(x,y) of the pixel img(x,y) in the above boundary burning algorithm is as follows:

[0097]

[0098] Where N is the neighborhood matrix,

[0099] In the above steps, each step has different parameter factors, and the parameter factors are used to determine whether the conditions described in each step in the flowchart are met, and further determine whether the current point needs to be deleted.

[0100] Extract boundary parameter factors: A0 = {3, 6, 12, 24, 48, 96, 192, 129, 7, 14, 28, 56, 112, 224, 193, 131, 15, 30, 60, 120, 240, 225, 195, 135, 31, 62, 124, 248, 241, 227, 199, 143, 63, 126, 252, 249, 243, 231, 207, 159, 127, 254, 253, 251, 247, 239, 223, 191};

[0101] Determine 3 neighborhood parameter factors: A1 = {7, 14, 28, 56, 112, 224, 193, 131};

[0102] Determine 3 or 4 neighborhood parameter factors: A2 = {7, 14, 28, 56, 112, 224, 193, 131, 15, 30, 60, 120, 240, 225, 195, 135};

[0103] Determine 3, 4 or 5 neighborhood parameter factors: A3 = {7, 14, 28, 56, 112, 224, 193, 131, 15, 30, 60, 120, 240, 225, 195, 135, 31, 62, 124, 248, 241, 227, 199, 143};

[0104] Determine the 3, 4, 5 or 6 neighborhood parameter factors: A4 = {7, 14, 28, 56, 112, 224, 193, 131, 15, 30, 60, 120, 240, 225, 195, 135, 31, 62, 124, 248, 241, 227, 199, 143, 63, 126, 252, 249, 243, 231, 207, 159};

[0105] Determine the 3, 4, 5, 6 or 7 neighborhood parameter factors: A5 = {7, 14, 28, 56, 112, 224, 193, 131, 15, 30, 60, 120, 240, 225, 195, 135, 31, 62, 124, 248, 241, 227, 199, 143, 63, 126, 252, 249, 243, 231, 207, 159, 127, 254, 253, 251, 247, 239, 223, 191};

[0106] In this embodiment, the traversal is stopped until the boundary pixels are not modified or the number of boundary pixels is stable, and the output result is skeletonized until the skeleton line width is 1 pixel, that is, the extraction is completed, and the obtained passable pixel points can accurately represent the pixel point set of linear data in the passable area.

[0107] In an optional embodiment, the specific implementation method of connecting the passable pixel points in the above step S142 to obtain the linear data of the internal passable route can be referred to Figure 7 As shown, the following steps may be included:

[0108] Step S1421: among the passable pixels, determine the number of other pixels in a preset neighborhood of each pixel, and assign a corresponding weight value to each pixel according to the number.

[0109] This step is to assign weights to passable pixels. Since the processed data is a binary two-dimensional matrix, the value of the grid pixel can be 0 or 1. In the embodiment of the present disclosure, each pixel is assigned a value by the number of other pixels in the neighborhood of each pixel. Figure 5B In the figure, pixel A has only one other pixel in the 8-neighborhood, so the weight value of pixel A is 1; pixel B and pixel C have three other pixels in the 8-neighborhood respectively, so the weight values ​​of pixel B and pixel C are 3 respectively; pixel D has two other pixels in the 8-neighborhood, so the weight value of pixel D is 2. The weight of each pixel can be assigned according to the above assignment rules.

[0110] Step S1422: Determine the starting point, end point and waypoint of at least one internal passable route according to the weight value corresponding to each passable pixel point.

[0111] Each pixel point in the above steps is divided according to the attributes of the starting point, end point and way point in the surface interest point. The pixel point with a weight value of 1 must be located at one end of the passable pixel point set of the internal passable route (the starting point or end point, for example Figure 5B Pixel A in the figure), the pixel with a weight of 2 must be a waypoint (or a passing point, for example Figure 5BIn this embodiment, the pixel points with weights greater than 2 are regarded as intersection points (e.g. Figure 5B ), which can be set as the starting point or end point of the internal route (the same intersection serves as the end point of the previous internal route and the starting point of the next internal route, and extends in more than two directions and sequentially connects the path points in different directions).

[0112] Step S1423, starting from the starting point of at least one internal traffic route, connecting the waypoints to the end point in sequence according to the preset connection rules to obtain the linear data of the internal traffic route.

[0113] In the extracted skeleton, each passable pixel point of the internal passable route is only one pixel wide. This step adopts the method of regional growth, starting from the starting point of the determined road, and traversing all the passable pixel points around in turn according to the preset connection rules, and connecting to the corresponding end point after passing through each passing point, and finally forming an internal passable route. In this embodiment, the preset connection rules can be, for example: the distance between the current passable pixel point and the next passable pixel point to be connected cannot exceed 2 pixel widths (or a preset distance value). In other words, the passable pixels exceeding 2 pixel widths will not be directly connected together to ensure sequential connection; the passable pixels that have been connected cannot be processed again (to prevent incorrect connection); and whether the connected passable pixels exceed the original boundary, if exceeded, they will no longer be connected, etc.

[0114] This embodiment assigns values ​​to passable pixel points according to weight assignment rules, thereby screening out the starting point, end point and waypoints of at least one internal passable route, and then starting from the starting point of at least one internal passable route, sequentially connects the waypoints to the end point according to preset connection rules, thereby ensuring the accuracy of the internal passable route of the planar point of interest.

[0115] It should be noted that the reason why the vector coordinates of the surface interest point image (coordinate points of spatial elements composed of points and lines in a rectangular coordinate system) are converted into grid coordinate points (row and column coordinates, recording data in a matrix manner) in the embodiment of the present disclosure is because raster data is more likely to produce polygons with different color codes, in order to facilitate the subsequent extraction of the passable area of ​​the surface interest point and the implementation of the skeleton extraction algorithm.

[0116] To convert vector data into raster data, it is necessary to convert the spatial features of the vector data into discrete raster cells according to the set raster resolution, that is, to convert the coordinates of the geographic coordinate points into the row and column numbers of the raster cells, and the attributes of the raster cells can be obtained by attribute assignment. The method of converting vector data into corresponding raster coordinate points can be referred to the prior art and will not be repeated here.

[0117] Reference Figure 8 As shown, Figure 8 The figure shows a schematic diagram of the passable area of ​​the surface interest point in the form of vector data, in which the area enclosed by the outer ring contour is eliminated, and the area enclosed by the inner ring contour of the inaccessible surface sub-interest point is the passable area. In order to facilitate the extraction of the skeleton, the vector data can be converted into raster data, that is, after the vector coordinate points of the outer ring contour in the area are mapped to the grid, the area enclosed by the outer ring contour of the surface interest point image can be determined (as shown above). Figure 3A The area formed by the gray pixels shown).

[0118] Similarly, the above steps convert the vector coordinate points enclosed by the inner ring contour of the inaccessible surface sub-interest point into the grid network to obtain the pixel points corresponding to the inaccessible surface sub-interest point.

[0119] In this embodiment, the existing coordinate conversion method is used to convert the pixel coordinates in the vector coordinate system into the grid coordinate system to obtain the pixel points of the outer ring contour and the pixel points of the impassable surface sub-interest points, and then the pixel points of the passable area of ​​the surface interest point are determined according to the pixel values ​​of the pixel points of the surface interest point image. In this embodiment, by converting the vector coordinate points into grid coordinate points, the passable area in the surface interest point composed of the grid coordinate points can be determined. Since the passable area in the surface interest point is composed of a series of grid coordinate points, it is convenient to perform skeleton extraction on this series of grid coordinate points in the later stage to generate linear data of the internal pass route of the surface interest point.

[0120] In an optional embodiment, after obtaining the linear data of the internal route of the planar interest point, the method further includes: performing any one or more of the following processing on the obtained linear data of the internal route of the planar interest point: deburring, thinning and smoothing, etc.

[0121] In this embodiment, different conditions and parameters can be matched for different scenarios. For example, in a shopping mall, the burrs of the linear data of the internal passage route at about 0.3m can be removed. However, in the scenario of a large space and a wide range of indoor spaces, the burrs within 2m can be deleted. After deburring, thinning and smoothing the linear data of the internal passage route, for example, Fig. 9 The structure of the linear data of the route inside the planar point of interest is shown.

[0122] Fig.10 FIG. 1 shows an example of linear data of a shopping mall internal passage route obtained by using the linear data generation method provided in an embodiment of the present disclosure. Fig.10In the interior plan of the shopping mall, the gray-filled area is the passable area, and some white areas (such as white boxes) inside the gray area are inaccessible areas. At the same time, there are interconnected thin black lines in the gray area, and these thin black lines generally constitute the linear data of the meshed internal traffic routes.

[0123] The following is a specific example to illustrate the implementation process of the method for generating linear data disclosed in the present invention.

[0124] Reference Fig.11 As shown in the process, when the geographic data of the acquired planar interest point is vector data, the vector data is first parsed to obtain the data of the spatial elements corresponding to the vector data (including geographic coordinates and attribute information, etc.). If the parsed data is in GeoJson format, it is necessary to convert the GeoJson format data into WKT format data. If the parsed data is in WKT format, the next step of processing can be carried out. If it is other types of data, you can try to convert it into WKT format data first, and then proceed to the next step of processing.

[0125] First, it is necessary to extract the outer contour of the ring of the surface interest point to obtain the outer contour coordinate sequence (S outerBr) of the vector data coordinate sequence S. Of course, before this, the above vector data can be precision converted to obtain MAX PIXEL (outermost pixel point), that is, the vector data is converted into a coordinate system, for example, the original collected longitude and latitude coordinates are converted into plane coordinates, etc.; then the outer ring contour is extracted, that is, the outer ring contour coordinate sequence S outerBr is extracted to obtain the maximum and minimum values ​​(max x, max y, min x, min y) of the outer ring contour coordinate sequence, and the coordinate conversion coefficient is calculated according to the coordinate range, and then the rows and columns (rows, cols) corresponding to the above S outerBr are determined, and the binary matrix matrix[rows][cols]={0} is initialized. The main purpose of this step is to determine the rectangular range on the grid after the geographic data of the surface interest point is projected on the grid, and the pixel points in the background to which the range belongs are assigned to 0, so as to facilitate the rapid reading and processing of the binary matrix.

[0126] Then, traverse S outerBr, convert its coordinates into grid coordinate points (S outePixelBr), update the binary matrix according to the above coordinate conversion coefficient, and assign all the pixels surrounded by the outer ring contour pixel points to 1, that is, determine the area surrounded by the outer ring contour according to the pixel coordinates of the planar interest point image, map the area surrounded by the outer ring contour to the grid network, obtain the grid coordinate points of the outer contour, and binarize the pixel points surrounded by the pixel points of the outer ring contour, and assign all the surrounded pixel points to 1, thus completing Fig.11The steps of extracting the outer ring contour and binarization are shown in . On this basis, all inner rings (the range surrounded by the impassable surface sub-interest points) are extracted and binarized, that is, the geographic coordinate points surrounded by the inner ring contour of the impassable surface sub-interest points are traversed, converted (mapped to the grid) into rasterized pixel points (S innerPixelBrVec), all S innerPixelBrVec are traversed, the matrix matrix is ​​updated, and all the pixel points of the inner ring are assigned to 0. Finally, the pixel points of the passable area are obtained, that is, the area corresponding to the binary two-dimensional matrix matrix[rows][cols]={1}.

[0127] Further, see Fig.11 As shown in the figure, the binary two-dimensional matrix is ​​used to extract the road network point set through the boundary burning algorithm, that is, the skeleton of the pixels contained in the passable area is extracted to obtain the passable pixels; then the passable pixels are connected to generate linear data for indicating the internal passable route of the surface interest point. After obtaining the linear data of the internal passable route, invalidation (deburring), shaping (thinning, smoothing) and other processing can be performed according to needs to further optimize the linear data.

[0128] Based on the same inventive concept, the present disclosure also provides a device for generating linear data, referring to Fig.12 As shown, the device may include: an outer ring contour determining module 11, an inner ring contour determining module 12, a passable area determining module 13 and a linear data generating module 14, and its working principle is as follows:

[0129] The outer ring contour determining module 11 determines the outer ring contour of the planar interest point according to the pixel coordinates of the planar interest point image;

[0130] The inner ring contour determining module 12 determines the inner ring contour of the planar sub-interest point located inside the planar interest point according to the pixel coordinates of the planar interest point image;

[0131] The passable area determination module 13 determines the pixel points of the passable area of ​​the planar interest point according to the pixel values ​​of the pixel points of the planar interest point image, wherein the pixel points located between the outer ring contour and the inner ring contour belong to the pixel points of the passable area, and the pixel points located within the inner ring contour are marked as the pixel points of the inpassable area;

[0132] The linear data generating module 14 generates linear data for indicating a passage route inside the planar point of interest based on the pixel points in the passable area.

[0133] In one embodiment, the passable area determination module 13 binarizes the pixel points of the planar interest point image, wherein the pixel values ​​of the pixel points of the planar sub-interest point image surrounded by the inner ring contour are assigned a preset first pixel value, and the remaining pixel points are assigned a preset second pixel value, wherein the preset first pixel value indicates that the corresponding pixel point is impassable, and the preset second pixel value indicates that the corresponding pixel point is passable;

[0134] Among the pixel points of the planar interest point image, the pixel points assigned with the second pixel value constitute a passable area of ​​the planar interest point.

[0135] Specifically, assigning first pixel values ​​to pixel points of the planar interest point image surrounded by the outer ring contour;

[0136] In the surface interest point image that has been assigned values, pixel values ​​of the pixel points of the surface sub-interest point image surrounded by the inner ring contour are reassigned from the first pixel value to the second pixel value, and marked as pixel points of an inaccessible area;

[0137] Among the pixels of the planar interest point image, the pixel points assigned with the first pixel value are determined as the pixel points of the passable area of ​​the planar interest point.

[0138] In one embodiment, the linear data generation module 14 performs a skeleton extraction operation on the pixel points of the passable area based on the pixel points of the passable area to obtain passable pixel points for indicating the internal passable route of the surface interest point; and connects the passable pixel points to obtain linear data of the internal passable route.

[0139] In one embodiment, the linear data generation module 14 extracts boundary pixel points from the pixel points of the passable area, and traverses the boundary pixel points, and determines whether the boundary pixel points need to be deleted based on the weight values ​​of the pixel points in the preset neighborhood of the boundary pixel points. If so, the boundary pixel points are deleted in the passable area, and the above steps are iteratively performed until a skeleton of a pixel width of the passable area is obtained, and the pixel points of the skeleton are the passable pixel points of the internal passable route.

[0140] In one embodiment, the linear data generation module 14 determines the number of other pixel points in a preset neighborhood of each pixel point among the passable pixel points, and assigns a corresponding weight value to each pixel point according to the number; determines the starting point, end point and way point of at least one internal passable route according to the weight value corresponding to each pixel point; starting from the starting point of the at least one internal passable route, the way points are sequentially connected to the end point according to the preset connection rules to obtain the linear data of the internal passable route.

[0141] In one embodiment, the method further includes: performing coordinate transformation on the vector coordinates of the planar interest point image to obtain pixel coordinates of the planar interest point image.

[0142] The specific description, beneficial effects and related examples of the device described in the embodiment of the present disclosure refer to the above method part and will not be repeated here.

[0143] Based on the same inventive concept, the embodiment of the present disclosure further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the above-mentioned method for generating linear data is implemented. The specific description, beneficial effects and related examples of the computer-readable storage medium described in the embodiment of the present invention refer to the above-mentioned method part, which will not be repeated here.

[0144] Based on the same inventive concept, the embodiment of the present disclosure further provides a server, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for generating linear data is implemented. The specific description, beneficial effects, and related examples of the server described in the embodiment of the present invention refer to the method described above, and will not be repeated here.

[0145] Embodiment 2

[0146] The second embodiment of the present disclosure provides an indoor road navigation method, referring to Fig.13 As shown, the method may include the following steps:

[0147] Step S21, obtaining an indoor map; the indoor map includes linear data of internal traffic routes.

[0148] Step S22: Generate and push a navigation route based on the starting point, the end point and the acquired indoor map.

[0149] The linear data of the internal traffic route is obtained according to the linear data generation method in the first embodiment.

[0150] In the present disclosure, refer to Fig.10 As shown, it only takes 0.7 seconds to generate a 1024-pixel precision road network map, and the effect meets the expected standard. It can be directly used for indoor navigation on the basis of adding the marks of indoor space elements, which greatly saves the cost of indoor map production and improves the mapping efficiency. For other specific descriptions, beneficial effects and related examples of the method described in the embodiment of the present disclosure, please refer to the method part of the above embodiment 1, which will not be repeated here.

[0151] Based on the same inventive concept, the present disclosure also provides an indoor road navigation device, referring to Fig.14 As shown, the device may include: an acquisition module 21 and a navigation module 22; its working principle is as follows:

[0152] The acquisition module 21 acquires an indoor map; the indoor map includes linear data of internal traffic routes;

[0153] The navigation module 22 generates and pushes a navigation route based on the starting point, the end point and the acquired indoor map;

[0154] The linear data of the internal traffic route is obtained based on the linear data generation method provided in the first embodiment.

[0155] The specific description, beneficial effects and related examples of the device described in the embodiment of the present disclosure refer to the above method part and will not be repeated here.

[0156] Based on the same inventive concept, the embodiment of the present disclosure further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the above-mentioned indoor road navigation method can be implemented. The specific description, beneficial effects and related examples of the computer-readable storage medium described in the embodiment of the present invention refer to the above-mentioned method part, which will not be repeated here.

[0157] Based on the same inventive concept, an embodiment of the present disclosure further provides a server, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements an indoor road navigation method when executing the program;

[0158] The indoor road navigation method comprises:

[0159] Acquire an indoor map; the indoor map includes linear data of internal traffic routes;

[0160] Generate and push a navigation route based on the starting point, the end point and the acquired indoor map;

[0161] The linear data of the internal traffic route is obtained according to the linear data generation method in the first embodiment.

[0162] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.

[0163] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0164] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0165] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0166] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for generating linear data, comprising: Determine the outer ring contour of the planar interest point according to the pixel coordinates of the planar interest point image; Determining, according to the pixel coordinates of the planar interest point image, an inner ring contour of the planar sub-interest point located inside the planar interest point; Determine the pixel points of the passable area of ​​the planar interest point according to the pixel values ​​of the pixel points of the planar interest point image, wherein the pixel points located between the outer ring contour and the inner ring contour belong to the pixel points of the passable area, and the pixel points located within the inner ring contour are marked as the pixel points of the inpassable area; Based on the pixel points of the passable area, linear data for indicating a passable route inside the planar point of interest is generated.

2. The method according to claim 1, wherein: According to the pixel values ​​of the pixels of the planar interest point image, the pixel points of the passable area of ​​the planar interest point are determined, the pixel points located between the outer ring contour and the inner ring contour belong to the pixel points of the passable area, and the pixel points located within the inner ring contour are marked as the pixel points of the inpassable area, including: Binarizing the pixel points of the planar interest point image, wherein the pixel values ​​of the pixel points of the planar sub-interest point image surrounded by the inner ring contour are assigned to a preset first pixel value, and the remaining pixel points are assigned to a preset second pixel value, wherein the preset first pixel value indicates that the corresponding pixel point is inaccessible, and the preset second pixel value indicates that the corresponding pixel point is accessible; Among the pixel points of the planar interest point image, the pixel points assigned with the second pixel value constitute a passable area of ​​the planar interest point.

3. The method according to claim 1, wherein: The generating, based on the pixel points of the passable area, linear data for indicating the internal passage route of the planar point of interest comprises: Based on the pixel points of the passable area, a skeleton extraction operation is performed on the pixel points of the passable area to obtain passable pixel points for indicating a passable route inside the planar point of interest; The passable pixel points are connected to obtain linear data of the internal passable route.

4. The method according to claim 3, wherein: Based on the pixel points of the passable area, a skeleton extraction operation is performed on the pixel points of the passable area to obtain passable pixel points for indicating a passable route inside the planar point of interest, including: Boundary pixels are extracted from the pixels of the passable area, and the boundary pixels are traversed. According to the weight value of the pixels in the preset neighborhood of the boundary pixels, it is determined whether the boundary pixels need to be deleted. If so, the boundary pixels are deleted in the passable area. The above steps are iteratively performed until a skeleton of a pixel width of the passable area is obtained, and the pixels of the skeleton are the passable pixels of the internal passable route.

5. The method according to claim 3, wherein: The connecting the passable pixel points to obtain the linear data of the internal passable route includes: Among the passable pixels, determine the number of other pixels in a preset neighborhood of each pixel, and assign a corresponding weight value to each pixel according to the number; According to the weight value corresponding to each pixel point, the starting point, the end point and the waypoint of at least one internal passage route are determined respectively; Starting from the starting point of the at least one internal traffic route, the waypoints are sequentially connected to the end point according to a preset connection rule to obtain linear data of the internal traffic route.

6. An indoor road navigation method, comprising: Get indoor maps; The indoor map includes linear data of internal traffic routes; Generate and push a navigation route based on the starting point, the end point and the acquired indoor map; The linear data of the internal traffic route is obtained according to the linear data generation method according to any one of claims 1 to 5.

7. A linear data generating device, comprising: An outer ring contour determination module is used to determine the outer ring contour of the planar interest point according to the pixel coordinates of the planar interest point image; An inner ring contour determining module, used to determine the inner ring contour of the planar sub-interest point located inside the planar interest point according to the pixel coordinates of the planar interest point image; A passable area determination module is used to determine the pixel points of the passable area of ​​the planar interest point according to the pixel values ​​of the pixel points of the planar interest point image, wherein the pixel points located between the outer ring contour and the inner ring contour belong to the pixel points of the passable area, and the pixel points located within the inner ring contour are marked as the pixel points of the inpassable area; The linear data generating module is used to generate linear data indicating the internal passage route of the planar point of interest based on the pixel points of the passable area.

8. An indoor road navigation device, comprising: An acquisition module is used to obtain indoor maps; The indoor map includes linear data of internal traffic routes; A navigation module, used to generate and push a navigation route based on a starting point, an end point and the acquired indoor map; The linear data of the internal traffic route is obtained according to the linear data generation method according to any one of claims 1 to 5.

9. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the method for generating linear data as described in any one of claims 1 to 5, or implement the indoor road navigation method as described in claim 6.

10. A server comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the server is used to implement the method for generating linear data as claimed in any one of claims 1 to 5, or to implement the indoor road navigation method as claimed in claim 6.

Citation Information

Patent Citations

  • Image boundary detection method and device

    CN107967689A

  • Map present situation detection method and device based on navigation data, and storage medium

    CN110530381A