CN111383301A - Grid map node identification method and device and terminal equipment - Google Patents

Grid map node identification method and device and terminal equipment Download PDF

Info

Publication number
CN111383301A
CN111383301A CN201811636511.7A CN201811636511A CN111383301A CN 111383301 A CN111383301 A CN 111383301A CN 201811636511 A CN201811636511 A CN 201811636511A CN 111383301 A CN111383301 A CN 111383301A
Authority
CN
China
Prior art keywords
color
effective
node
nodes
grid map
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811636511.7A
Other languages
Chinese (zh)
Other versions
CN111383301B (en
Inventor
熊友军
赵勇胜
白龙彪
庞建新
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ubtech Robotics Corp
Original Assignee
Ubtech Robotics Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ubtech Robotics Corp filed Critical Ubtech Robotics Corp
Priority to CN201811636511.7A priority Critical patent/CN111383301B/en
Publication of CN111383301A publication Critical patent/CN111383301A/en
Application granted granted Critical
Publication of CN111383301B publication Critical patent/CN111383301B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Instructional Devices (AREA)
  • Navigation (AREA)

Abstract

The invention is suitable for the technical field of computers, and provides a grid map node identification method, a grid map node identification device and terminal equipment, wherein the identification method comprises the following steps: acquiring position information of effective nodes in a grid map; correspondingly filling the colors in the color list into the effective nodes, so that the colors of two adjacent effective nodes with actual path communication are different, and the color pair formed by the two effective nodes is not repeated in the grid map; establishing a corresponding relation between colors filled in the effective nodes and position information of the effective nodes; and acquiring positioning information according to the corresponding relation between the colors filled in the effective nodes and the position information of the effective nodes by identifying the color pairs of the starting point and the end point formed by the adjacent effective nodes. The invention realizes that the least kinds of colors are used for filling the effective nodes in the grid map, and solves the problem that the prior art can not provide effective positioning information for the mobile equipment.

Description

Grid map node identification method and device and terminal equipment
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a grid map node identification method and device and terminal equipment.
Background
With the popularization of intelligent mobile devices and the indoor development of location-based services, the application of intelligent indoor positioning technology is more and more extensive, for example, the technology is applied to positioning and sorting robots in warehouses or intelligent mobile devices such as micro robots, toy vehicles and the like based on grid map mobile positioning.
At present, in a grid map providing a mobile basis for an intelligent mobile device, effective positioning information cannot be provided for the mobile device based on different scenes.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for identifying a grid map node, and a terminal device, so as to solve the problem that effective positioning information cannot be provided for a mobile device.
A first aspect of an embodiment of the present invention provides a method for identifying a grid map node, including:
acquiring position information of effective nodes in a grid map;
correspondingly filling the colors in the color list into the effective nodes, so that the colors of two adjacent effective nodes with actual path communication are different, and the color pair formed by the two effective nodes is not repeated in the grid map;
establishing a corresponding relation between colors filled in the effective nodes and position information of the effective nodes;
and acquiring positioning information according to the corresponding relation between the color filled in the effective node and the position information of the effective node by identifying the initial color pair formed by the adjacent effective nodes.
In one embodiment, obtaining the position information of the effective node in the grid map comprises:
acquiring total pixels of the grid map, the size of each grid and the pixel position at the vertex of the grid map;
calculating the pixel position of each grid node according to the total pixels, the size of each grid and the pixel position at the vertex of the grid map;
and if at least one side of the grid node corresponds to an actual path, judging that the grid node is the effective node, and setting the pixel position of the grid node as the position information of the effective node.
In one embodiment, correspondingly filling the colors in the color list into the effective nodes, so that the colors between two adjacent effective nodes with actual path communication are different, and the color pair formed by the two effective nodes is not repeated in the grid map, including:
traversing the effective nodes to obtain special effective nodes in all the effective nodes;
and selecting a specific color from the color list, and filling the selected specific color into the corresponding special effective node.
In one embodiment, after filling the selected color into the corresponding special valid node, the method includes:
traversing the effective nodes from top to bottom and from left to right, and judging whether an actual path exists on the left side and the upper side of the current effective node aiming at the current effective node;
if the left side and the upper side of the current effective node do not have an actual path, and the right side and the lower side of the current effective node do not have the special effective node, adding the color with the least use times in the color list to the current effective node;
if the left side and the upper side of the current effective node do not have an actual path, and at least one special effective node exists on the right side or the lower side of the current effective node, establishing an adjacent color list aiming at the current effective node;
and if at least one side of the left side and the upper side of the current effective node has an actual path, establishing an adjacent color list aiming at the current effective node.
In one embodiment, the method for identifying grid map nodes further includes:
establishing a color pair list for all colors in the color list, and adding the color of the effective node on at least one side of the upper side or the left side of the current effective node or the color of at least one special effective node on the right side or the lower side of the current effective node to the adjacent color list;
traversing the color list, obtaining a test color, and forming a color pair by the test color and the colors in the adjacent color list;
if the composed color pair exists in the color pair list, the trial color is added to the current active node.
In one embodiment, traversing the list of colors, obtaining a trial color comprises:
if the right side of the current effective node has an actual path and the upper side of the right effective node has an actual path, setting the color of the adjacent upper effective node of the right effective node as an avoidance color;
and traversing the color list, and skipping the current test color if the current test color is the same as the avoidance color.
In one embodiment, the method for identifying grid map nodes further includes:
establishing a color using frequency list according to the using frequency of each color in the color list;
deleting, in the list of color pairs, color pairs consisting of the used test color and each color in the list of neighboring colors;
adding one to the number of uses of the used test color in the color number of uses list.
In one embodiment, the method for identifying grid map nodes further includes:
and traversing the color list, and if the colors suitable for being added into the effective nodes do not exist, increasing the preset number of color types.
A second aspect of the embodiments of the present invention provides an apparatus for identifying a grid map node, including:
the information acquisition unit is used for acquiring the position information of the effective nodes in the grid map;
the identification adding unit is used for correspondingly filling the colors in the color list into the effective nodes, so that the colors of two adjacent effective nodes with actual path communication are different, and the color pair formed by the two effective nodes is not repeated in the grid map;
the matching unit is used for establishing the corresponding relation between the colors filled in the effective nodes and the position information of the effective nodes;
and the positioning unit is used for acquiring positioning information according to the corresponding relation between the color filled in the effective node and the position information of the effective node by identifying the initial color pair formed by the adjacent effective nodes.
A third aspect of the embodiments of the present invention provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the above-mentioned method for identifying a grid map node when executing the computer program.
A fourth aspect of the embodiments of the present invention provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the steps of the above-mentioned grid map node identification method.
Compared with the prior art, the embodiment of the invention has the following beneficial effects: according to the embodiment of the invention, the position information of the effective node in the grid map is obtained; correspondingly filling the colors in the color list into the effective nodes, so that the colors of two adjacent effective nodes with actual path communication are different, and the color pair formed by the two effective nodes is not repeated in the grid map; establishing a corresponding relation between colors filled in the effective nodes and position information of the effective nodes; by identifying the color pairs of the starting point and the end point formed by the adjacent effective nodes and acquiring the positioning information according to the corresponding relation between the color filled in the effective nodes and the position information of the effective nodes, the problem that effective positioning information cannot be provided for mobile equipment in the prior art is solved, and the method has high usability and practicability.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic view of an application scenario of a grid map node identification method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart illustrating an implementation of a grid map node identification method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an effective node location relationship provided by an embodiment of the present invention;
fig. 4 is a schematic diagram of a grid map node identification device according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Example one
Fig. 1 is a schematic view of an application scenario of the grid map node identification method according to the embodiment of the present invention. For convenience of explanation, only the portions related to the present embodiment are shown. The partial grid map shown in the figure can be applied to an indoor or outdoor grid map, and partial nodes in the grid map correspond to different actual positions or actual positioning points in the grid map; and partial borders in the grid map correspond to actual paths in the grid map.
As shown in the figure, the grid map includes a plurality of nodes, wherein at least one side of the node 10 corresponds to the actual path 11, and the node 10 of the grid map is an effective node, for example, a node corresponding to the solid line intersection in the figure. In practical application, a color sensor is arranged at the bottom of a positioning device waiting for a micro robot, a sorting robot or a toy vehicle moving on an actual route corresponding to a grid map, and accurate and effective positioning is realized by identifying colors on a map at nodes on a path. By using the minimum color, correspondingly filling the positioning points of the grid paths in the map according to the rules that the colors of the adjacent nodes communicated by the actual paths are different and the color pairs between the nodes are not repeated; therefore, planning of different paths and accurate positioning of positions are achieved through different node colors.
Example two
Referring to fig. 2, an implementation flow diagram of the grid map node identification method provided in the embodiment of the present invention is shown. The method is used for marking the grid map, and is convenient for accurate positioning and reasonable planning of the shortest path of equipment moving on the grid map, wherein the equipment comprises a micro-robot, a toy vehicle or a sorting robot in a warehouse and the like.
As shown, the method comprises the following steps:
step S201, obtaining the position information of the effective node in the grid map.
In the embodiment, a grid map is formed by vertically crossing multiple rows and multiple columns of straight lines to form grids with equal size, wherein the row spacing between the multiple rows of straight lines is equal, the column spacing between the multiple columns of straight lines is equal, and the row spacing and the column spacing are equal to form grids with equal spacing; the grid map corresponds to an actual path, and the vertical and horizontal cross parts of the path form effective nodes in the grid map; the frame of part of the grid in the grid map corresponds to the actual path, and the part of the node in the grid map corresponds to the actual positioning point on the map.
In this embodiment, the effective node is an intersection, an inflection point or an end point of an actual path in the grid map, and at least one side of the effective node corresponds to the actual path, which includes an upper side, a lower side, a left side and a right side. And a communicated path or non-communication exists between two adjacent effective nodes.
It should be noted that, by identifying the frames connected to the grid nodes in the grid map, if none of the upper, lower, left, and right side frames of the grid node has a corresponding actual path, the node is not an effective node, and if at least one actual path exists at the position of the grid node, the grid node is an effective node.
In one embodiment, obtaining the location information of each grid node in the grid map comprises:
a1, acquiring the total pixels of the grid map, each grid size and the pixel position at the vertex of the grid map.
In the present embodiment, the total pixels of the grid map represent the size of the grid map; the size of each grid comprises the size of a row interval and a column interval, or the size of each grid is the number of pixels; the pixel positions at the vertices of the mesh map are the positions of the corners of the entire mesh map, for example, the entire mesh map is represented by a rectangular image including four corners, and the positions of the four corners are the pixel positions at the vertices.
A2, calculating the pixel position of each grid node according to the total pixels, the size of each grid and the pixel position at the vertex of the grid map.
In this embodiment, the pixel position of each grid node may be calculated according to the total pixels of the grid map, the size of each grid, and the pixel position at the vertex of the grid map; each node is a point where a row straight line and a column straight line are mutually and vertically crossed, and the pixel position of each grid node can be obtained through calculation. Part of the grid nodes correspond to actual positioning points in the grid map.
A3, if at least one side of the grid node corresponds to an actual path, determining that the grid node is the effective node, and the pixel position of the grid node is the position information of the effective node.
In this embodiment, the mesh nodes at different locations have at least one actual path; whether the grid node is an effective node or not can be determined by identifying whether the upper side, the lower side, the left side and the right side of a certain grid node correspond to actual paths or not, the effective node is a node or an inflection point through which the actual paths pass, and the position information of the effective node is further determined according to the calculated pixel position of the grid node.
Step S202, the colors in the color list are correspondingly filled into the effective nodes, so that the colors of two adjacent effective nodes with actual path communication are different, and the color pair formed by the two effective nodes is not repeated in the grid map.
In this embodiment, there are preset kinds of colors in the color list, where the preset kind is the minimum kind used in the grid map. The preset types can be preliminarily set according to the number of specific effective nodes of the grid map; the colors of the adjacent nodes communicated with the actual path are different, and the color pairs respectively formed by the same node and the adjacent nodes communicated with the actual path are not repeated in the effective nodes of the grid map; and through traversing all kinds of colors, judging the colors of the effective nodes and the effective nodes at the adjacent positions of the effective nodes, and adding the colors in the color list to the corresponding effective nodes in sequence in a reasonable distribution manner.
In one embodiment, correspondingly filling the colors in the color list into the effective nodes, so that the colors between two adjacent effective nodes with actual path communication are different, and the color pair formed by the two effective nodes is not repeated in the grid map, including:
b1, traversing the effective nodes to obtain special effective nodes in all the effective nodes;
b2, selecting a specific color from the color list, and filling the selected specific color into the corresponding special effective node.
In this embodiment, a special effective node exists at a special position in the grid map, and the position corresponding to the special effective node has a special meaning, for example, the special effective node includes a path start node located at the vertex of the grid map, or a node located at a gate in a grid map type game. Before traversing the color filling from top to bottom and from left to right on the effective nodes, selecting a specific color from a color list for the special effective nodes, and preferentially filling the specific color into the special effective nodes; a direct confirmation of a particular location of a moving device on the grid map may be made based on the particular color filled in by the particular active node.
In one embodiment, after filling the selected color into the corresponding special valid node, the method includes:
c1, traversing the effective nodes from top to bottom and from left to right, and judging whether actual paths exist on the left side and the upper side of the current effective nodes or not aiming at the current effective nodes.
In one embodiment, for the grid map, the grid nodes of the grid map are traversed from left to right and from top to bottom, and if there is no corresponding actual path at the upper, lower, left and right positions of the grid nodes, the grid map node is not a valid node, and the next node is identified. And if the actual path exists on at least one side of the grid node, the grid node is an effective node. Judging whether an actual path exists on the left side and the upper side of the current effective node or not aiming at the current effective node; if at least one actual path may exist on the upper side and the left side of the current effective node, the upper side or the left side of the current effective node must have an effective node; if there is no actual path on the upper side and left side of the current valid node, there may be a valid node on the upper side or left side of the current valid node and there may not be a valid node.
And C2, if no actual path exists on the left side and the upper side of the current effective node, and the special effective node does not exist on the right side and the lower side of the current effective node, adding the color with the least use times in the color list to the current effective node.
In this embodiment, when there is no actual path on the left side and the upper side of the current node, there may be an effective node on the upper side and the left side of the current node, or there may not be an effective node; and if the effective node exists, the effective node does not belong to the effective node which is adjacent to the current effective node and has actual path communication. When no path exists on the left side and the upper side of the current effective node, at least one side of the right side and the lower side of the current effective node has an effective node; if no special effective node exists on the right side and the lower side of the current effective node, the fact that no color filled effective node exists on the right side and the lower side of the current effective node is shown, and when color filling is conducted on the current node, the color with the least using times in the color list is selected to be filled into the current effective node.
C3, if there is no actual path on the left side and the upper side of the current effective node, and there is at least one special effective node on the right side or the lower side of the current effective node, establishing an adjacent color list for the current effective node.
In this embodiment, if there is no actual path on the left side and the upper side of the current valid node, there is a valid node on at least one of the right side and the lower side of the current valid node; and if at least one special effective node exists on the right side or the lower side of the current effective node, which indicates that at least one color-filled effective node is adjacent to the current effective node, establishing an adjacent color list aiming at the current effective node.
C4, if there is actual path on at least one side of left side and upper side of the current effective node, establishing a neighboring color list for the current effective node.
In this embodiment, if there is an actual path on at least one of the left side and the upper side of the current valid node, no matter whether there is a valid node on the right side or the lower side, or whether there is a special valid node with color filled, there is at least one valid node adjacent to and having an actual path connected to the upper side, the left side, the right side, or the lower side of the current valid node, and then an adjacent color list is established for the current valid node. The adjacent color list is used for adding colors of effective nodes which are adjacent to the current effective node and have actual path communication, and the colors of the effective nodes can comprise the colors of the effective nodes on the upper side, the lower side, the left side and the right side of the current effective node; as shown in fig. 3, the active nodes adjacent to the current active node 30 include an upper active node 31, a lower active node 32, a left active node 33, and a right active node 34. In addition, if a plurality of effective nodes exist in the upper effective node, the lower effective node, the left effective node and the right effective node of the current node at the same time, including the effective node with the color filled in the upper side or the left side or the special effective node with the color filled in the right side or the lower side, the colors of all the adjacent effective nodes of the current node are added into an adjacent color list, a color pair is established between the color in the color list and a test color, and when the color pair list exists for all the formed color pairs, the current effective node is determined to use the test color.
It should be noted that when at least one actual path exists on the left side and the upper side of the current valid node, an actual path may exist on the right side and the left side of the current valid node, or an actual path may not exist, and an effective node may exist or does not exist on the right side and the lower side of the corresponding current valid node.
In one embodiment, after establishing the neighbor list for the currently active node if there is an actual path on at least one of the left side and the upper side of the currently active node, the method further includes:
d1, creating a color pair list for all colors in the color list, and adding the color of the effective node on at least one side of the upper side or the left side of the current effective node or the color of at least one special effective node on the right side or the lower side of the current effective node to the adjacent color list.
In this embodiment, for all colors in the color list, two colors may be optionally combined into one color pair, and the color pair list is created according to the combined color pair, and includes pairwise combinations of all colors in the color list, for example, N colors in the color list may be combined into N × N (N-1)/2 groups of color pairs.
The method comprises the steps of traversing to a current effective node from top to bottom and from left to right, establishing an adjacent color list aiming at the current effective node, wherein the initial state of the adjacent color list is empty, and modifying the state of the adjacent color list according to the color filling condition of the effective node adjacent to the current effective node, namely adding the color of the effective node adjacent to the current effective node and having actual path communication into the adjacent color list.
D2, traversing the color list to obtain a test color, and forming a color pair by the test color and the colors in the adjacent color list.
In this embodiment, the test color is an available color that is sequentially selected and determined to meet a rule in the process of adding the corresponding color to the valid node. And combining the current test color with each color in the adjacent color list to form a color pair, and judging the color pair in the next step.
D3, if the composed color pair exists in the color pair list, adding the test color to the current valid node.
In this embodiment, the combined color pairs are compared with the color pairs in the color pair list established before, and if the color pair list includes the color pairs formed by the test color and the adjacent color, the test color is added to the current valid node.
Traversing the color list to obtain a test color comprises:
if the right side of the current effective node has an actual path and the upper side of the right effective node has an actual path, setting the color of the adjacent upper effective node of the right effective node as an avoidance color;
and traversing the color list, and skipping the current test color if the current test color is the same as the avoidance color.
In this embodiment, if four frames in the same grid all correspond to actual paths, in order to avoid that the colors of two effective nodes at opposite angles in the grid are the same, which causes errors in path planning and positioning information, the color of the effective node at the position corresponding to the current effective node is set as an avoidance color; in order to avoid the repetition of the color selected by the current effective node and the color at the effective node at the diagonal position, when the available color is selected in a traversal manner, if the current test color is the same as the avoidance color in the traversal manner, the current test color is skipped, and the next available color is tested continuously; and if the current test color is tested, skipping the current test color and continuing to test the next available color.
In one embodiment, the method for identifying grid map nodes further includes: establishing a color using frequency list according to the using frequency of each color in the color list; deleting, in the list of color pairs, color pairs consisting of the used test color and each color in the list of neighboring colors; adding one to the number of uses of the used test color in the color number of uses list.
In this embodiment, a color use number list of each color is created for the colors in the color list, the use number of each color is recorded, and the initial state is 0. And modifying the using times of the corresponding colors in the color using time list according to the using times of the colors.
In one embodiment, the color list is traversed and a predetermined number of color classes are added if there are no colors suitable for adding to the active nodes. The increased preset number may be set according to the number of actual effective nodes in the grid map, and is not specifically limited herein.
Step S203, a corresponding relationship between the color filled in the valid node and the position information of the valid node is established.
In this embodiment, after the color is filled in the valid node, a one-to-one correspondence relationship is established between the color of each valid node and the position information of the valid node.
It should be noted that the grid map includes a plurality of valid nodes, each color may be filled with a plurality of valid nodes, and each color corresponds to a plurality of different location information.
Step S204, by identifying the initial color pair formed by the adjacent effective nodes, the positioning information is obtained according to the corresponding relation between the color filled in the effective nodes and the position information of the effective nodes.
In this embodiment, in the process that the mobile device moves from one node to another node, the color of the start valid node and the color of the end valid node may be respectively identified, the color of the start valid node and the color of the end valid node form a color pair, and the current positioning information of the mobile device may be obtained according to the correspondence between the colors and the position information of the valid nodes by identifying the color pair.
According to the embodiment, the effective nodes in the grid map are obtained according to the position information of each node in the grid map, the available colors of the preset types are traversed, and the available colors are added to the corresponding effective nodes according to the preset rules, so that the effective nodes in the grid map can be filled with the least types of colors, and the problem that effective positioning information cannot be provided for the mobile equipment in the prior art is solved; meanwhile, the color filling of the grid map according to a certain rule can be carried out, the path can be planned and navigated, and the shortest and optimal path planning is realized.
It should be noted that, within the technical scope of the present disclosure, other sequencing schemes that can be easily conceived by those skilled in the art should also be within the protection scope of the present disclosure, and detailed description is omitted here.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
EXAMPLE III
Referring to fig. 4, it is a device for identifying a grid map node according to an embodiment of the present invention, and for convenience of description, only a part related to the embodiment of the present invention is shown.
The identification device of the grid map node comprises:
an information acquisition unit 41 for acquiring position information of an effective node in the grid map;
the identification adding unit 42 is used for correspondingly filling the colors in the color list into the effective nodes, so that the colors of two adjacent effective nodes with actual path communication are different, and the color pair formed by the two effective nodes is not repeated in the grid map;
a matching unit 43, configured to establish a correspondence between colors filled in the valid nodes and position information of the valid nodes;
and the positioning unit 44 is configured to obtain positioning information according to a corresponding relationship between colors filled in the effective nodes and position information of the effective nodes by identifying an initial color pair formed by adjacent effective nodes.
According to the embodiment, the effective nodes in the grid map are obtained according to the position information of each node in the grid map, the available colors of the preset types are traversed, the available colors are added to the corresponding effective nodes according to the preset rules, the effective nodes in the grid map are filled with the colors of the minimum types, and the problem that effective positioning information cannot be provided for the mobile equipment in the prior art is solved.
It will be apparent to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely illustrated, and in practical applications, the above function distribution may be performed by different functional units and modules as needed, that is, the internal structure of the mobile terminal is divided into different functional units or modules to perform all or part of the above described functions. Each functional module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional modules are only used for distinguishing one functional module from another, and are not used for limiting the protection scope of the application. The specific working process of the module in the mobile terminal may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
Example four
Fig. 5 is a schematic diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 5, the terminal device 5 of this embodiment includes: a processor 50, a memory 51 and a computer program 52, e.g. a color identification program, stored in said memory 51 and executable on said processor 50. The processor 50, when executing the computer program 52, implements the steps in the above-described embodiments of the method for identifying grid map nodes, such as the steps 201 to 203 shown in fig. 2. Alternatively, the processor 50, when executing the computer program 52, implements the functions of the modules/units in the above-mentioned device embodiments, such as the functions of the modules 41 to 43 shown in fig. 4.
Illustratively, the computer program 52 may be partitioned into one or more modules/units that are stored in the memory 51 and executed by the processor 50 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 52 in the terminal device 5. For example, the computer program 52 may be divided into an information acquisition unit, an identifier adding unit, a matching unit, and a positioning unit, and each unit has the following specific functions:
the information acquisition unit is used for acquiring the position information of the effective nodes in the grid map;
the identification adding unit is used for correspondingly filling the colors in the color list into the effective nodes, so that the colors of two adjacent effective nodes with actual path communication are different, and the color pair formed by the two effective nodes is not repeated in the grid map;
the matching unit is used for establishing the corresponding relation between the colors filled in the effective nodes and the position information of the effective nodes;
and the positioning unit is used for acquiring positioning information according to the corresponding relation between the color filled in the effective node and the position information of the effective node by identifying the initial color pair formed by the adjacent effective nodes.
The terminal device may include, but is not limited to, a processor 50, a memory 51. Those skilled in the art will appreciate that fig. 5 is merely an example of a terminal device 5 and does not constitute a limitation of terminal device 5 and may include more or fewer components than shown, or some components may be combined, or different components, e.g., the terminal device may also include input-output devices, network access devices, buses, etc.
The Processor 50 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 51 may be an internal storage unit of the terminal device 5, such as a hard disk or a memory of the terminal device 5. The memory 51 may also be an external storage device of the terminal device 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 5. Further, the memory 51 may also include both an internal storage unit and an external storage device of the terminal device 5. The memory 51 is used for storing the computer program and other programs and data required by the terminal device. The memory 51 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media which may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (11)

1. A method for identifying grid map nodes is characterized by comprising the following steps:
acquiring position information of effective nodes in a grid map;
correspondingly filling the colors in the color list into the effective nodes, so that the colors of two adjacent effective nodes with actual path communication are different, and the color pair formed by the two effective nodes is not repeated in the grid map;
establishing a corresponding relation between colors filled in the effective nodes and position information of the effective nodes;
and acquiring positioning information according to the corresponding relation between the colors filled in the effective nodes and the position information of the effective nodes by identifying the color pairs of the starting point and the end point formed by the adjacent effective nodes.
2. The method for identifying grid map nodes as claimed in claim 1, wherein obtaining location information of valid nodes in the grid map comprises:
acquiring total pixels of the grid map, the size of each grid and the pixel position at the vertex of the grid map;
calculating the pixel position of each grid node according to the total pixels, the size of each grid and the pixel position at the vertex of the grid map;
and if at least one side of the grid node corresponds to an actual path, judging that the grid node is the effective node, and setting the pixel position of the grid node as the position information of the effective node.
3. The method for identifying nodes in a grid map according to claim 1, wherein the color pairs formed by two adjacent effective nodes with actual path connectivity are not repeated in the grid map by correspondingly filling the effective nodes with colors in the color list, comprising:
traversing the effective nodes to obtain special effective nodes in all the effective nodes;
and selecting a specific color from the color list, and filling the selected specific color into the corresponding special effective node.
4. The method for identifying grid map nodes according to claim 3, wherein after filling the selected specific color into the corresponding special effective node, the method comprises:
traversing the effective nodes from top to bottom and from left to right, and judging whether an actual path exists on the left side and the upper side of the current effective node aiming at the current effective node;
if the left side and the upper side of the current effective node do not have an actual path, and the right side and the lower side of the current effective node do not have the special effective node, adding the color with the least use times in the color list to the current effective node;
if the left side and the upper side of the current effective node do not have an actual path, and at least one special effective node exists on the right side or the lower side of the current effective node, establishing an adjacent color list aiming at the current effective node;
and if at least one side of the left side and the upper side of the current effective node has an actual path, establishing an adjacent color list aiming at the current effective node.
5. The method for identifying grid map nodes as claimed in claim 4, further comprising:
establishing a color pair list for all colors in the color list, and adding the color of the effective node on at least one side of the upper side or the left side of the current effective node or the color of at least one special effective node on the right side or the lower side of the current effective node to the adjacent color list;
traversing the color list, obtaining a test color, and forming a color pair by the test color and the colors in the adjacent color list;
if the composed color pair exists in the color pair list, the trial color is added to the current active node.
6. The method of identifying grid map nodes of claim 5, wherein traversing said list of colors, obtaining a trial color comprises:
if the right side of the current effective node has an actual path and the upper side of the right effective node has an actual path, setting the color of the adjacent upper effective node of the right effective node as an avoidance color;
and traversing the color list, and skipping the current test color if the current test color is the same as the avoidance color.
7. The method for identifying grid map nodes as claimed in claim 5, further comprising:
establishing a color using frequency list according to the using frequency of each color in the color list;
deleting, in the list of color pairs, color pairs consisting of the used test color and each color in the list of neighboring colors;
adding one to the number of uses of the used test color in the color number of uses list.
8. The method for identifying grid map nodes of any of claims 1-7,
and traversing the color list, and if the colors suitable for being added into the effective nodes do not exist, increasing the preset number of color types.
9. An apparatus for identifying a grid map node, comprising:
the information acquisition unit is used for acquiring the position information of the effective nodes in the grid map;
the identification adding unit is used for correspondingly filling the colors in the color list into the effective nodes, so that the colors of two adjacent effective nodes with actual path communication are different, and the color pair formed by the two effective nodes is not repeated in the grid map;
the matching unit is used for establishing the corresponding relation between the colors filled in the effective nodes and the position information of the effective nodes;
and the positioning unit is used for acquiring positioning information according to the corresponding relation between the color filled in the effective node and the position information of the effective node by identifying the initial color pair formed by the adjacent effective nodes.
10. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 8 when executing the computer program.
11. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 8.
CN201811636511.7A 2018-12-29 2018-12-29 Grid map node identification method and device and terminal equipment Active CN111383301B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811636511.7A CN111383301B (en) 2018-12-29 2018-12-29 Grid map node identification method and device and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811636511.7A CN111383301B (en) 2018-12-29 2018-12-29 Grid map node identification method and device and terminal equipment

Publications (2)

Publication Number Publication Date
CN111383301A true CN111383301A (en) 2020-07-07
CN111383301B CN111383301B (en) 2023-04-14

Family

ID=71218178

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811636511.7A Active CN111383301B (en) 2018-12-29 2018-12-29 Grid map node identification method and device and terminal equipment

Country Status (1)

Country Link
CN (1) CN111383301B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101419076A (en) * 2007-10-22 2009-04-29 索尼株式会社 Display route creation method, display route creation apparatus, and display route creation program
CN101437273A (en) * 2008-12-24 2009-05-20 北京科技大学 Routing method for distributed cognition radio network based on layer-striding design
US20170195258A1 (en) * 2015-12-31 2017-07-06 Shanghai Jiao Tong University Method for complex coloring based parallel scheduling for switching network
CN107340768A (en) * 2016-12-29 2017-11-10 珠海市微半导体有限公司 A kind of paths planning method of intelligent robot
US20180204337A1 (en) * 2017-01-16 2018-07-19 Christopher Ming-Yee Iu System and method for rendering smooth color gradients across multiple shapes

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101419076A (en) * 2007-10-22 2009-04-29 索尼株式会社 Display route creation method, display route creation apparatus, and display route creation program
CN101437273A (en) * 2008-12-24 2009-05-20 北京科技大学 Routing method for distributed cognition radio network based on layer-striding design
US20170195258A1 (en) * 2015-12-31 2017-07-06 Shanghai Jiao Tong University Method for complex coloring based parallel scheduling for switching network
CN107340768A (en) * 2016-12-29 2017-11-10 珠海市微半导体有限公司 A kind of paths planning method of intelligent robot
US20180204337A1 (en) * 2017-01-16 2018-07-19 Christopher Ming-Yee Iu System and method for rendering smooth color gradients across multiple shapes

Also Published As

Publication number Publication date
CN111383301B (en) 2023-04-14

Similar Documents

Publication Publication Date Title
CN109947100B (en) Path planning method and system and terminal equipment
CN107610084A (en) A kind of method and apparatus that information fusion is carried out to depth image and laser spots cloud atlas
CN101571954B (en) Subpixel registration
US9743084B2 (en) Image encoding and decoding method and apparatus
CN109974721A (en) A kind of vision winding detection method and device based on high-precision map
CN110967028A (en) Navigation map construction method and device, robot and storage medium
CN110559665A (en) Game map processing method and device, terminal device and storage medium
CN106488313A (en) A kind of TV station symbol recognition method and system
CN109931950B (en) Live-action navigation method, system and terminal equipment
CN111015654A (en) Visual positioning method and device for robot, terminal equipment and storage medium
CN111161331A (en) Registration method of BIM model and GIS model
CN113052761B (en) Laser point cloud map fusion method, device and computer readable storage medium
CN111598076A (en) Method and device for detecting and processing date in label image
CN110838085A (en) Super-resolution reconstruction method and device for image and electronic equipment
CN111383301B (en) Grid map node identification method and device and terminal equipment
CN110968375B (en) Interface control method and device, intelligent terminal and computer readable storage medium
CN114037659A (en) Method, device and equipment for detecting crystal grain array defects and readable storage medium
CN112348917B (en) Road network map implementation method and device and electronic equipment
CN111368860A (en) Relocation method and terminal equipment
CN104322057A (en) Pattern processing apparatus, pattern processing method, and pattern processing program
CN104850621A (en) Road-network model automatic generation method
CN116009581A (en) Unmanned aerial vehicle inspection method for power transmission line, unmanned aerial vehicle control terminal and storage medium
KR101047429B1 (en) A medium storing a program that detects nodes that make up a closed section using the shortest path matrix
CN111340811B (en) Resolution method, device and computer storage medium for violation synthetic graph
CN106777280B (en) Data processing method and device based on super large data set

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant