Map correction method and device based on pixel supplement

By determining the partition information and empty pixel information of the target pixel map, and using the principle of maximizing regular graphics to supplement pixels, the problem of missing information caused by obstacles in map modeling is solved, thereby improving the accuracy and completeness of map information.

CN115346007BActive Publication Date: 2026-03-27YUNMI HULIAN TECH (GUANGDONG) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-14
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

In existing technologies, when using sensors to model a target area, obstacles can easily obstruct the view, resulting in missing information in the map, which is difficult to solve effectively.

Method used

By determining the partition information and empty pixel information of the target pixel map, pixel supplementation is performed using the principle of maximizing regular graphics, including determining the direction of pixel supplementation and performing pixel alignment operations, thereby correcting the pixel map.

Benefits of technology

This effectively solves the problem of missing information in maps, making the final map information more accurate and complete.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115346007B_ABST
    Figure CN115346007B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on pixel supplementing map correction method and device, the method comprises: determining the partition information of target pixel map;The partition information is used to indicate the area information corresponding to any pixel in the target pixel map;According to the partition information, the number of spare pixels of the target pixel map in multiple preset directions is determined;According to the number of spare pixels of the target pixel map in multiple preset directions, the pixel supplement direction corresponding to the target pixel map is determined;According to the pixel supplement direction corresponding to the target pixel map, based on the rule pattern maximization principle, pixel supplement operation is carried out to the target pixel map.It can be seen that the present application can effectively utilize the partition information and spare pixel information of target pixel map, and carry out pixel supplement to target pixel map, which can effectively solve the problem of missing information in target pixel map, and is beneficial to make the final map information more accurate and more complete.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of map planning, in particular to a map correction method and device based on pixel supplement. BACKGROUND

[0002] With the development of sensor technology and computer technology, the map planning technology such as map model construction or map processing of a target area is also constantly progressing, among which the technology of using sensors to model the target area is particularly valued. However, in the prior art, when using sensors to model the target area, there may be a situation that the constructed map has missing information due to being blocked by obstacles, but the prior art cannot effectively solve this problem, so the prior art has defects and needs to be solved. SUMMARY

[0003] The technical problem to be solved by the present application is to provide a map correction method and device based on pixel supplement, which can effectively utilize the partition information and spare pixel information of the target pixel map to supplement the pixels of the target pixel map, so as to achieve the effect of correcting the target pixel map, thereby effectively solving the problem of missing information in the target pixel map, and being beneficial to making the final map information more accurate and complete.

[0004] In order to solve the above technical problems, the first aspect of the present application discloses a map correction method based on pixel supplement, which comprises:

[0005] determining the partition information of a target pixel map; the partition information is used to indicate the region information corresponding to any pixel in the target pixel map;

[0006] determining the number of spare pixels of the target pixel map in a plurality of preset directions according to the partition information;

[0007] determining the pixel supplement direction corresponding to the target pixel map according to the number of spare pixels of the target pixel map in a plurality of preset directions;

[0008] performing a pixel supplement operation on the target pixel map based on the rule pattern maximization principle according to the pixel supplement direction corresponding to the target pixel map.

[0009] As an optional implementation manner, in the first aspect of the present application, the target pixel map can be a two-dimensional pixel map or a three-dimensional pixel map; and / or, the region information includes an identified region and / or an unidentified region; the unidentified region is a region in the target pixel map which does not belong to the identified region; and / or, the preset direction is a two-dimensional direction or a three-dimensional direction; and / or, the preset direction includes at least two of the vertical direction, the horizontal direction, the 45-degree direction and the 135-degree direction.

[0010] As an optional implementation, in the first aspect of the present application, the determining the number of free pixels of the target pixel map in a plurality of preset directions according to the partition information comprises:

[0011] For any preset direction, the free pixel in the preset direction of the target pixel map is determined; the free pixel is a region-out pixel having region-in pixels in front and back in the preset direction; the region-in pixel is a pixel belonging to the identified region; the region-out pixel is a pixel belonging to the non-identified region;

[0012] The number of the free pixels in any of the preset directions is calculated to obtain the number of the free pixels in all of the preset directions.

[0013] As an optional implementation, in the first aspect of the present application, the determining the pixel supplement direction corresponding to the target pixel map according to the number of free pixels of the target pixel map in a plurality of preset directions comprises:

[0014] According to the number of free pixels in each of the preset directions, the preset direction with the least number of free pixels is selected from a plurality of the preset directions;

[0015] The selected preset direction is determined as the pixel supplement direction corresponding to the target pixel map.

[0016] As an optional implementation, in the first aspect of the present application, the performing the pixel supplement operation on the target pixel map based on the rule pattern maximization principle according to the pixel supplement direction corresponding to the target pixel map comprises:

[0017] The edge pixels of all pixels belonging to the identified region in the target pixel map in the pixel supplement direction are determined; the edge pixel is a pixel with the maximum or minimum directional coordinate value in the same column of pixels along the pixel supplement direction among all the pixels belonging to the identified region; the directional coordinate value is the coordinate value of the pixel on the directional coordinate axis corresponding to the pixel supplement direction;

[0018] The pixel supplement operation is performed on all the edge pixels based on the rule pattern maximization principle.

[0019] As an optional implementation, in the first aspect of the present application, the performing the pixel supplement operation on all the edge pixels based on the rule pattern maximization principle comprises:

[0020] According to the coordinate values of all the edge pixels on the directional coordinate axis corresponding to the pixel supplement direction, a pixel alignment threshold interval is determined;

[0021] performing pixel alignment operation on all of the edge pixels according to the pixel alignment threshold interval to obtain aligned edge pixels;

[0022] performing pixel supplement operation on the aligned edge pixels based on a rule pattern maximization principle.

[0023] As an optional implementation, in the first aspect of the present application, the performing pixel alignment operation on all of the edge pixels according to the pixel alignment threshold interval to obtain aligned edge pixels comprises:

[0024] judging whether the difference between the directional coordinate values of any two adjacent edge pixels is within the pixel alignment threshold interval;

[0025] if the judging result is yes, performing edge alignment operation on the two adjacent edge pixels;

[0026] if the judging result is no, not performing any operation on the two adjacent edge pixels;

[0027] repeating the above steps until pixel alignment is performed on all of the edge pixels to obtain aligned edge pixels.

[0028] As an optional implementation, in the first aspect of the present application, the performing pixel supplement operation on the aligned edge pixels based on a rule pattern maximization principle comprises:

[0029] grouping any multiple edge pixels with the same directional coordinate value in the aligned edge pixels into a same edge pixel set to obtain multiple edge pixel sets;

[0030] taking the edge pixel set with the maximum or minimum directional coordinate value in the multiple edge pixel sets as a reference edge pixel set, performing pixel supplement on the pixel columns where the other edge pixel sets are located to make the directional coordinate values of the other edge pixel sets the same as the directional coordinate value of the reference edge pixel set.

[0031] The second aspect of the present application discloses a map correction device based on pixel supplement, which comprises:

[0032] a first determining module configured to determine the partition information of a target pixel map; the partition information is used to indicate the area information corresponding to any pixel in the target pixel map;

[0033] a second determining module configured to determine the number of empty pixels of the target pixel map in multiple preset directions according to the partition information;

[0034] a third determining module, configured to determine a pixel supplement direction corresponding to the target pixel map according to the number of free pixels of the target pixel map in a plurality of preset directions;

[0035] an executing module, configured to perform a pixel supplement operation on the target pixel map according to the pixel supplement direction corresponding to the target pixel map based on a rule pattern maximization principle.

[0036] As an optional implementation form, in the second aspect, the target pixel map can be a two-dimensional pixel map or a three-dimensional pixel map; and / or, the region information comprises an identified region and / or an unidentified region; the unidentified region is a region in the target pixel map that does not belong to the identified region; and / or, the preset direction is a two-dimensional direction or a three-dimensional direction; and / or, the preset direction comprises at least two of a vertical direction, a horizontal direction, a 45-degree direction and a 135-degree direction.

[0037] As an optional implementation form, in the second aspect, the second determining module determines the number of free pixels of the target pixel map in a plurality of preset directions according to the partition information, and the specific manner comprises:

[0038] for any preset direction, determining free pixels of the target pixel map in the preset direction; the free pixels are region-outside pixels in the preset direction, which have region-inside pixels in front and behind; the region-inside pixels are pixels belonging to the identified region; and the region-outside pixels are pixels belonging to the unidentified region;

[0039] calculating the number of the free pixels in any preset direction to obtain the number of the free pixels in all preset directions.

[0040] As an optional implementation form, in the second aspect, the third determining module determines the pixel supplement direction corresponding to the target pixel map according to the number of free pixels of the target pixel map in a plurality of preset directions, and the specific manner comprises:

[0041] selecting a preset direction with the least number of free pixels from a plurality of preset directions according to the number of free pixels in each preset direction;

[0042] determining the selected preset direction as the pixel supplement direction corresponding to the target pixel map.

[0043] As an optional implementation form, in the second aspect, the executing module comprises:

[0044] determining unit configured to determine edge pixels of all pixels belonging to the identified region in the target pixel map in the pixel supplement direction; the edge pixels are pixels with maximum or minimum directional coordinate values in the same column of pixels along the pixel supplement direction among all the pixels belonging to the identified region; the directional coordinate value is a coordinate value of the pixel on a directional coordinate axis corresponding to the pixel supplement direction;

[0045] a supplement unit configured to perform pixel supplement operation on all the edge pixels based on a regular pattern maximization principle.

[0046] As an optional implementation form, in the second aspect of the present application, the specific manner in which the supplement unit performs pixel supplement operation on all the edge pixels based on a regular pattern maximization principle comprises:

[0047] determining a pixel alignment threshold interval according to the coordinate values of all the edge pixels on the directional coordinate axis corresponding to the pixel supplement direction;

[0048] performing pixel alignment operation on all the edge pixels according to the pixel alignment threshold interval to obtain aligned edge pixels;

[0049] performing pixel supplement operation on the aligned edge pixels based on a regular pattern maximization principle.

[0050] As an optional implementation form, in the second aspect of the present application, the specific manner in which the supplement unit performs pixel alignment operation on all the edge pixels according to the pixel alignment threshold interval to obtain aligned edge pixels comprises:

[0051] judging whether the difference between the directional coordinate values of any two adjacent edge pixels is within the pixel alignment threshold interval;

[0052] if the result of the judgment is yes, performing edge alignment operation on the two adjacent edge pixels;

[0053] if the result of the judgment is no, not performing any operation on the two adjacent edge pixels;

[0054] repeating the above steps until pixel alignment is performed on all the edge pixels to obtain aligned edge pixels.

[0055] As an optional implementation form, in the second aspect of the present application, the specific manner in which the supplement unit performs pixel supplement operation on the aligned edge pixels based on a regular pattern maximization principle comprises:

[0056] The edge pixels with the same direction coordinate value in the aligned edge pixels are classified into the same edge pixel set to obtain a plurality of edge pixel sets;

[0057] The pixel column where the other edge pixel set is located is supplemented with pixels based on the edge pixel set with the maximum or minimum direction coordinate value in the plurality of edge pixel sets, so that the direction coordinate value of the other edge pixel set is the same as the direction coordinate value of the reference edge pixel set.

[0058] The third aspect of the present application discloses another map correction device based on pixel supplement, the device comprises:

[0059] A memory storing executable program codes;

[0060] A processor coupled with the memory;

[0061] The processor invokes the executable program codes stored in the memory to execute part or all steps of the map correction method based on pixel supplement disclosed in the first aspect of the present application.

[0062] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0063] In the embodiments of the present application, the partition information of the target pixel map is determined; the partition information is used to indicate the area information corresponding to any pixel in the target pixel map; the number of empty pixels of the target pixel map in a plurality of preset directions is determined according to the partition information; the pixel supplement direction corresponding to the target pixel map is determined according to the number of empty pixels of the target pixel map in a plurality of preset directions; and the pixel supplement operation is performed on the target pixel map based on the rule pattern maximization principle according to the pixel supplement direction corresponding to the target pixel map. It can be seen that the partition information and the empty pixel information of the target pixel map can be effectively utilized to perform pixel supplement on the target pixel map to achieve the effect of correcting the target pixel map, so as to effectively solve the problem of missing information in the target pixel map, and it is beneficial to make the final map information more accurate and complete. BRIEF DESCRIPTION OF DRAWINGS

[0064] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0065] Figure 1is a flow diagram of a map correction method based on pixel supplement disclosed by an embodiment of the present application;

[0066] Figure 2 is a flow diagram of another map correction method based on pixel supplement disclosed by an embodiment of the present application;

[0067] Figure 3 is a structural diagram of a map correction device based on pixel supplement disclosed by an embodiment of the present application;

[0068] Figure 4 is a structural diagram of another map correction device based on pixel supplement disclosed by an embodiment of the present application;

[0069] Figure 5 is a structural diagram of still another map correction device based on pixel supplement disclosed by an embodiment of the present application;

[0070] Figure 6 is a diagram of a map supplement process disclosed by an embodiment of the present application;

[0071] Figure 7 is a diagram of a line segment intersection judgment rule disclosed by an embodiment of the present application;

[0072] Figure 8 is a diagram of calculating a pixel supplement direction disclosed by an embodiment of the present application;

[0073] Figure 9 is a diagram of determining an edge pixel and calculating an edge pixel mean value disclosed by an embodiment of the present application;

[0074] Figure 10 is a diagram of performing pixel alignment on an edge pixel disclosed by an embodiment of the present application;

[0075] Figure 11 is a diagram of performing a pixel supplement operation on an aligned edge pixel disclosed by an embodiment of the present application. DETAILED DESCRIPTION

[0076] In order to make the personnel in the technical field better understand the present application scheme, the technical scheme in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by the personnel in the field without creative labor fall within the scope of the present application.

[0077] The terms "first", "second", and the like in the description and in the claims of the present application and above-described drawings are used to distinguish different objects, and are not used to describe a particular order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, device, product, or end including a series of steps or units is not limited to the listed steps or units, but can optionally include steps or units not listed, or can optionally include other steps or units inherent to the process, method, product, or end.

[0078] Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment can be included in at least one embodiment of the application. The appearance of the phrase in various places in the specification does not necessarily all refer to the same embodiment, nor is it necessarily mutually exclusive of other embodiments. It is explicitly and implicitly understood that the embodiments described herein can be combined with other embodiments.

[0079] The application discloses a map correction method and device based on pixel supplement, which can effectively utilize the partition information and spare pixel information of a target pixel map, supplement pixels to the target pixel map, achieve the effect of correcting the target pixel map, and effectively solve the problem of missing information in the target pixel map, so as to make the final map information more accurate and complete.

[0080] Embodiment one

[0081] Please refer to Figure 1 , Figure 1 is a flowchart of a map correction method based on pixel supplement disclosed by the embodiment of the application. Wherein, Figure 1 The method described can be applied to a corresponding map correction terminal, map correction device or map correction server, and the server can be a local server or a cloud server, and the embodiment of the application is not limited. As Figure 1 The map correction method based on pixel supplement can include the following operations:

[0082] 101, determine the partition information of the target pixel map.

[0083] In the embodiment of the application, the partition information is used to indicate the region information corresponding to any pixel in the target pixel map. Optionally, the region information includes identified regions and / or unidentified regions, wherein specifically, the unidentified regions are regions in the target pixel map that do not belong to the identified regions. Optionally, the target pixel map has missing map information, so pixel supplement is needed.

[0084] In the embodiment of the present application, the target pixel map can be a two-dimensional pixel map or a three-dimensional pixel map. Optionally, the target pixel map can be a modeling result of a map of a certain target indoor area. The map modeling can be performed by a cruising home device such as a sweeping robot or a cruising monitoring robot in the target indoor area. The target indoor area can be an indoor area of a commercial entertainment place, an indoor area of a civilian residence, or an indoor area of a military facility. It can be an internal area of any closed or semi-closed place, and the present application does not make any limitation.

[0085] In the embodiment of the present application, the identification area can be a regular two-dimensional or three-dimensional figure, such as a square / cube, a rectangle / rectangular prism, a rhombus / rhombic prism, or a parallelogram, and the present application does not make any limitation.

[0086] 102. Determine the number of free pixels of the target pixel map in a plurality of preset directions according to the partition information.

[0087] In the embodiment of the present application, the preset direction can be a two-dimensional direction or a three-dimensional direction. Optionally, when the preset direction is a two-dimensional direction, the preset direction can include at least two of a vertical direction, a horizontal direction, a 45-degree direction, and a 135-degree direction. In the scenario where the map correction method disclosed in the present application can be applied, any two-dimensional or three-dimensional direction should be considered to be included in the protection scope of the present application.

[0088] 103. Determine the pixel supplement direction corresponding to the target pixel map according to the number of free pixels of the target pixel map in a plurality of preset directions.

[0089] In the embodiment of the present application, the pixel supplement direction is one of the plurality of preset directions. Specifically, the pixel supplement direction is determined from the preset directions in which the number of free pixels satisfies a preset condition.

[0090] 104. Perform a pixel supplement operation on the target pixel map based on the rule figure maximization principle according to the pixel supplement direction corresponding to the target pixel map.

[0091] In the embodiment of the present application, the rule figure maximization principle can be expressed as making the target pixel map as large as possible in the form of a map with a rule figure shape, for example, the target pixel map shown on the left side has a missing part, and its corresponding rule figure is a rectangular room shape. The target pixel map can be supplemented to restore it to the regular rectangular room map shown on the right side. Figure 6 Figure 6

[0092] ​​It can be seen that the method described in the embodiments of the present application can effectively utilize the partition information and the spare pixel information of the target pixel map, and supplement pixels to the target pixel map, so as to achieve the effect of correcting the target pixel map, thereby effectively solving the problem of missing information in the target pixel map, and making the final map information more accurate and complete.

[0093] In an optional embodiment, the determining the partition information of the target pixel map in the step 101 comprises:

[0094] According to the preset line segment intersection judgment rule, the graphic contour line segments in the target pixel map are extended and intersected to obtain a plurality of segmentation regions and an unsegmentable region.

[0095] According to the DBSCAN (Density-Based Spatial Clustering of Applications with Noise) optimization algorithm, the plurality of segmentation regions and the unsegmentable region are optimized to obtain the partition information of the target pixel map.

[0096] In the embodiments of the present application, the preset line segment intersection judgment rule is used to limit the rule of line segment intersection in the rule graphic mode corresponding to the target pixel map, and specifically, the rule can be referred to as Figure 7 , Figure 7 When the rule graphic mode corresponding to the target pixel map is a rectangle, the rule of line segment intersection is shown in Figure 7 (a) in FIG. 6 shows that when the extended virtual line of a certain graphic contour line segment XZ in the target pixel map and a certain graphic contour line segment MN exist a perpendicular intersection point V, the line segment XZ is extended to the intersection point V to form the boundary of a certain segmentation region, Figure 7 (b) in FIG. 6 shows that when the extended virtual lines of two graphic contour line segments are perpendicular, the two image contour line segments can be extended to obtain the boundary of a certain segmentation region, Figure 7 (c) in FIG. 6 shows that when the extended line segments of three graphic contour line segments AB, CD and EF can form a straight line segment, the three graphic contour line segments are extended and connected to form the boundary of a certain segmentation region.

[0097] In the embodiment of the present application, the non-separable region can be a region that cannot form a regular pattern meeting the preset rule after the extension and intersection of the contour line segments in the target pixel map. For example, when the regular pattern corresponding to the target pixel map is a rectangle meeting a certain size, the non-separable region can be a region that cannot form a closed rectangular region or a region that cannot meet the size condition of the rectangular region. At this time, the DBSCAN optimization algorithm can be used to optimize the non-separable region and include the non-separable region into the adjacent separable region to obtain the final partition information.

[0098] It can be seen that the optional embodiment can partition the target pixel map according to the preset line segment intersection judgment rule and the DBSCAN optimization algorithm, so as to more accurately determine the partition information of the target pixel map, provide a data basis for subsequent map correction operations, and be beneficial to improving the accuracy of the subsequent map correction operations, thereby effectively solving the problem of missing information in the target pixel map, and being beneficial to making the final map information more accurate and complete.

[0099] In an optional embodiment, in step 102, determining the number of spare pixels of the target pixel map in a plurality of preset directions according to the partition information comprises:

[0100] For any preset direction, the number of spare pixels of the target pixel map in the preset direction is determined.

[0101] The number of spare pixels in any preset direction is calculated to obtain the number of spare pixels in all preset directions.

[0102] Optionally, the spare pixel is a region-out pixel existing in front and back of the region-in pixel in the preset direction, wherein the region-in pixel is a pixel belonging to the identified region, and the region-out pixel is a pixel belonging to the non-identified region.

[0103] It can be seen that the optional embodiment can calculate the number of spare pixels in any preset direction to obtain the number of spare pixels in all preset directions, so as to more accurately determine the number of spare pixels in all preset directions of the target pixel map, provide a data basis for subsequent map correction operations, and be beneficial to improving the accuracy of the subsequent map correction operations, thereby effectively solving the problem of missing information in the target pixel map, and being beneficial to making the final map information more accurate and complete.

[0104] In an optional embodiment, in step 103, determining the pixel supplement direction corresponding to the target pixel map according to the number of spare pixels of the target pixel map in a plurality of preset directions comprises:

[0105] Based on the number of empty pixels in each preset direction, the preset direction with the fewest empty pixels is selected from multiple preset directions.

[0106] The selected preset directions are determined as the pixel supplementary directions corresponding to the target pixel map.

[0107] Taking a specific implementation plan as an example, refer to Figure 8 The above steps can be used to calculate, for example... Figure 8 The pixel supplementation direction of the target pixel map shown. Figure 8 In the target pixel map, blank pixels are pixels outside the area, and black pixels are pixels within the area. It can be seen that the number of empty pixels in the X-axis (0 degrees) direction is obviously less than the number of empty pixels in the Y-axis (90 degrees) direction. Therefore, the X-axis (0 degrees) direction can be defined as the pixel supplementation direction corresponding to the target pixel map.

[0108] As can be seen, implementing this optional implementation method can filter out the preset direction with the fewest empty pixels from multiple preset directions, and determine the filtered preset direction as the pixel supplementation direction corresponding to the target pixel map. This more accurately determines the pixel supplementation direction of the target pixel map, provides a data basis for subsequent map correction operations, and helps improve the accuracy of subsequent map correction operations. In this way, it can effectively solve the problem of missing information in the target pixel map, and help make the final map information more accurate and complete.

[0109] In an optional implementation, step 104, performing pixel supplementation on the target pixel map based on the principle of regular graphic maximization, according to the pixel supplementation direction corresponding to the target pixel map, includes:

[0110] Determine the edge pixels in the pixel supplementation direction for all pixels belonging to the identified region in the target pixel map;

[0111] Based on the principle of maximizing regular graphics, pixel supplementation is performed on all edge pixels.

[0112] In this embodiment of the invention, the edge pixel is the pixel with the largest or smallest directional coordinate value among all pixels belonging to the identification area and in the same column of pixels along the pixel supplementation direction, wherein the directional coordinate value is the coordinate value of the pixel on the directional coordinate axis corresponding to the pixel supplementation direction.

[0113] Taking a specific implementation plan as an example, refer to Figure 9 The above steps can be used to determine, for example... Figure 9 The edge pixels of the target pixel map shown are... Figure 9The target pixel map is in the Y-axis (90 degrees) direction as the pixel supplement direction, and the gray and black pixels are the pixels belonging to the marked area. Therefore, the edge pixels of the target pixel map are the gray pixels on the upper and lower edges.

[0114] It can be seen that the optional embodiment can determine the edge pixels of all pixels belonging to the marked area in the target pixel map in the pixel supplement direction, and perform the pixel supplement operation on all edge pixels based on the regular pattern maximization principle, which is beneficial to improve the accuracy of the map correction operation, and can effectively solve the problem of missing information in the target pixel map, and is beneficial to make the final map information more accurate and complete.

[0115] In an optional embodiment, the step of performing the pixel supplement operation on all edge pixels based on the regular pattern maximization principle includes:

[0116] According to the coordinate values of all edge pixels on the coordinate axis corresponding to the pixel supplement direction, a pixel alignment threshold interval is determined;

[0117] According to the pixel alignment threshold interval, a pixel alignment operation is performed on all edge pixels to obtain aligned edge pixels;

[0118] Performing a pixel supplement operation on the aligned edge pixels based on the regular pattern maximization principle.

[0119] Optionally, the mean value or variance value or standard deviation of the coordinate values of all edge pixels on the coordinate axis corresponding to the pixel supplement direction is calculated, and the pixel alignment threshold interval is determined according to the mean value or variance value or standard deviation.

[0120] Optionally, the pixel alignment threshold interval can be determined according to the mean value or variance value based on the following formula:

[0121] ;

[0122] wherein, Thres is the pixel alignment threshold interval, σ edge is the variance value, which can also be the mean value or standard deviation, S d is a total area size factor, which is related to the total area of the target pixel map.

[0123] In the specific implementation shown in Figure 9 , the above steps can be used to determine the mean value or variance value of the edge pixels of the target pixel map as shown in Figure 9 , and taking the mean value as an example, Figure 9 Figure 9 ​The edge pixels in the image are gray pixels on the upper and lower edges If the Y axis is the pixel supplement direction, the mean value can be calculated based on the following formula :

[0124]

[0125] Alternatively, the variance or standard deviation can be calculated in a similar manner as above, using the variance formula or standard deviation formula, which will not be repeated here.

[0126] It can be seen that by implementing the optional embodiment, the coordinate values of all edge pixels on the coordinate axis corresponding to the pixel supplement direction can be determined, the pixel alignment threshold interval can be determined, and the pixel alignment operation can be performed on all edge pixels according to the pixel alignment threshold interval to obtain the aligned edge pixels, which is beneficial to improve the accuracy of the map correction operation, and thus can effectively solve the problem of missing information in the target pixel map, and is beneficial to make the final map information more accurate and complete.

[0127] In an optional embodiment, the pixel alignment operation on all edge pixels according to the pixel alignment threshold interval to obtain the aligned edge pixels in the above step includes:

[0128] determining whether the difference between the directional coordinate values of any two adjacent edge pixels is within the pixel alignment threshold interval;

[0129] If the determination result is yes, performing the edge alignment operation on the two adjacent edge pixels;

[0130] If the determination result is no, no operation is performed on the two adjacent edge pixels;

[0131] The above steps are repeated until the pixel alignment is performed on all edge pixels to obtain the aligned edge pixels.

[0132] Alternatively, the edge alignment operation specifically includes:

[0133] determining whether the two adjacent edge pixels are front edge pixels or rear edge pixels; wherein the front edge pixel is the edge pixel with the maximum directional coordinate value among all pixels in the same column along the pixel supplement direction in the identified region, and the rear edge pixel is the edge pixel with the minimum directional coordinate value among all pixels in the same column along the pixel supplement direction in the identified region;

[0134] When it is judged that the two adjacent edge pixels belong to the front edge pixels, the pixel column where the edge pixel with a smaller directional coordinate value among the two adjacent edge pixels is located is supplemented with pixels so that the directional coordinate value of the edge pixel with the smaller directional coordinate value is the same as the directional coordinate value of the other edge pixel.

[0135] When it is judged that the two adjacent edge pixels belong to the rear edge pixels, the pixel column where the edge pixel with a larger directional coordinate value among the two adjacent edge pixels is located is supplemented with pixels so that the directional coordinate value of the edge pixel with the larger directional coordinate value is the same as the directional coordinate value of the other edge pixel.

[0136] In the specific embodiment shown in FIG. 1, the above steps can be performed on the edge pixels of the target pixel map shown in FIG. 2, and the edge pixels of the target pixel map shown in FIG. 2 are aligned with pixels. Figure 10 Referring to FIG. 1, the above steps can be performed on the edge pixels of the target pixel map shown in FIG. 2, and the edge pixels of the target pixel map shown in FIG. 2 are aligned with pixels. Figure 10 The above steps can be performed on the edge pixels of the target pixel map shown in FIG. 2, and the edge pixels of the target pixel map shown in FIG. 2 are aligned with pixels. Figure 10 The above steps can be performed on the edge pixels of the target pixel map shown in FIG. 2, and the edge pixels of the target pixel map shown in FIG. 2 are aligned with pixels. Figure 10 In the left side, the edge pixels p1, p2, p3 and p4 are front edge pixels, the Y axis is the pixel supplement direction, the directional coordinate values of the edge pixels p1, p2, p3 and p4 are 11, 12, 7 and 5 respectively, and it is assumed that the pixel alignment threshold interval at this time is [-2, 2]. The directional coordinate values of p1 and p2 differ by 1, which is within the threshold range, so p1 and p2 are aligned. The directional coordinate values of p2 and p3 differ by 5, which is outside the threshold range, so p2 and p3 are not aligned. The directional coordinate values of p3 and p4 differ by 2, which is within the threshold range, so p3 and p4 are aligned. Finally, the aligned edge pixels on the right side are formed as shown in FIG. 3. Figure 10 In the left side, the edge pixels p1, p2, p3 and p4 are front edge pixels, the Y axis is the pixel supplement direction, the directional coordinate values of the edge pixels p1, p2, p3 and p4 are 11, 12, 7 and 5 respectively, and it is assumed that the pixel alignment threshold interval at this time is [-2, 2]. The directional coordinate values of p1 and p2 differ by 1, which is within the threshold range, so p1 and p2 are aligned. The directional coordinate values of p2 and p3 differ by 5, which is outside the threshold range, so p2 and p3 are not aligned. The directional coordinate values of p3 and p4 differ by 2, which is within the threshold range, so p3 and p4 are aligned. Finally, the aligned edge pixels on the right side are formed as shown in FIG. 3.

[0137] It can be seen that the implementation of the optional embodiment can align all edge pixels with pixels to obtain aligned edge pixels, which is beneficial to improve the accuracy of subsequent map correction operations, thereby effectively solving the problem of missing information in the target pixel map, and is beneficial to making the final map information more accurate and complete.

[0138] In an optional embodiment, the pixel supplement operation on the aligned edge pixels in the above steps based on the rule pattern maximization principle comprises:

[0139] The edge pixels with the same directional coordinate values among the aligned edge pixels are classified into the same edge pixel set to obtain a plurality of edge pixel sets.

[0140] The pixel column where the other edge pixel set is located is supplemented with pixels so that the directional coordinate value of the other edge pixel set is the same as the directional coordinate value of the reference edge pixel set.

[0141] Optionally, the edge pixel set with the maximum or minimum direction coordinate value in the plurality of edge pixel sets can specifically include:

[0142] determining whether the plurality of edge pixel sets belong to front edge pixels or back edge pixels;

[0143] when it is determined that the plurality of edge pixel sets belong to front edge pixels, taking the edge pixel set with the maximum direction coordinate value in the plurality of edge pixel sets as the reference edge pixel set;

[0144] when it is determined that the plurality of edge pixel sets belong to back edge pixels, taking the edge pixel set with the minimum direction coordinate value in the plurality of edge pixel sets as the reference edge pixel set.

[0145] Optionally, after taking the edge pixel set with the maximum or minimum direction coordinate value in the plurality of edge pixel sets as the reference edge pixel set, the method can further include:

[0146] determining, according to the partition information, whether the reference edge pixel set is a region boundary pixel; wherein the region boundary pixel is a pixel on the boundary line of at least two identified regions; for example, referring to Figure 6 the right partition information, region A and region B represent two different identified regions after segmentation, and the other blank is an unidentified region, and the line segment WE therein is the boundary line of the two regions;

[0147] when the determination result is yes, taking the edge pixel set with the second maximum or second minimum direction coordinate value in the plurality of edge pixel sets as the reference edge pixel set; specifically, when the plurality of edge pixel sets belong to front edge pixels, taking the edge pixel set with the second maximum direction coordinate value in the plurality of edge pixel sets as the reference edge pixel set, and when the plurality of edge pixel sets belong to back edge pixels, taking the edge pixel set with the second minimum direction coordinate value in the plurality of edge pixel sets as the reference edge pixel set;

[0148] when the determination result is no, no operation is performed.

[0149] The purpose of the above steps is that the region boundary pixel is a fixed and unchanged region boundary, and when the pixel supplement is performed, the fixed boundary should be avoided to be changed to ensure the accuracy of the partition information of the final map.

[0150] For example, referring to the specific embodiment shown in Figure 11 , the above steps can perform the pixel supplement operation on the aligned edge pixels of the target pixel map as shown in Figure 11 , the above steps can perform the pixel supplement operation on the aligned edge pixels of the target pixel map as shown in Figure 11 , the above steps can perform the pixel supplement operation on the aligned edge pixels of the target pixel map as shown in Figure 11The aligned edge pixels in the left side are front edge pixels, which can be classified into four edge pixel sets C1, C2, C3 and C4. Firstly, the edge pixel set C3 can be determined as the reference edge pixel set according to the above steps. Secondly, if the edge pixel set C3 is determined as the region boundary pixel, the edge pixel set C1 or C4 (both of which are the edge pixel sets with the second largest direction coordinate value) is determined as the reference edge pixel set, and pixel supplement is performed, so as to finally form the supplemented target pixel map shown in the right side. Figure 11

[0151] It can be seen that the optional embodiment can take the edge pixel set with the largest or smallest direction coordinate value in the multiple edge pixel sets as the reference edge pixel set, and perform pixel supplement on the pixel columns where the other edge pixel sets are located, so that the direction coordinate values of the other edge pixel sets are the same as the direction coordinate value of the reference edge pixel set, thereby realizing map supplement based on the rule pattern maximization principle, effectively solving the problem of missing information in the target pixel map, and being beneficial to making the final map information more accurate and complete.

[0152] Embodiment Two

[0153] Please refer to Figure 2 , Figure 2 is a flowchart of another map correction method based on pixel supplement disclosed by the embodiments of the present application. Wherein, Figure 2 The method described is applied to a corresponding map correction terminal, map correction device or map correction server, and the server can be a local server or a cloud server, and the embodiments of the present application do not limit it. As Figure 2 shown, the map correction method based on pixel supplement can include the following operations:

[0154] 201. Determine the partition information of the target pixel map.

[0155] 202. According to the partition information, determine the number of empty pixels of the target pixel map in multiple preset directions.

[0156] 203. According to the number of empty pixels of the target pixel map in multiple preset directions, determine the pixel supplement direction corresponding to the target pixel map.

[0157] 204. According to the pixel supplement direction corresponding to the target pixel map, perform pixel supplement operation on the target pixel map based on the rule pattern maximization principle, to obtain a corrected pixel map.

[0158] In the embodiments of the present application, the specific technical details and technical terms of steps 201-204 can refer to the description of steps 101-104 in Embodiment One, and will not be repeated here.

[0159] ​205、correlate the modified pixel map with the original target pixel map.

[0160] In the embodiment of the present application, the correlation of the modified pixel map and the original target pixel map is used to indicate the corresponding relationship between the two, and further, the modified pixel map can be correspondingly modified when the user's modification instruction for the original target pixel map is received. Optionally, the modification instruction can be the modification of the pixel information, the edge information, and the information of the items in the map, and the modification can be the operation of adding, reducing, changing, or moving, which is not limited in the present application.

[0161] It can be seen that the embodiment of the present application can correlate the modified pixel map with the original target pixel map, so that the modified pixel map can be correspondingly operated when the user's modification instruction for the original map is received, further improving the accuracy and relevance in subsequent operation, and being beneficial to making the final map information more accurate and complete.

[0162] In an optional embodiment, before step 201, the method can further include:

[0163] The target pixel map is preprocessed to reduce the resolution of the target pixel map.

[0164] In the embodiment of the present application, the target pixel map can be processed by using a downsampling algorithm, for example, a downsampling parameter S is selected, S pixels multiplied by S pixels are selected as the downsampling window size, and the target pixel map is downsampled to reduce the resolution of the target pixel map. Optionally, the downsampling parameter S can be the total area size factor described in embodiment one. S d Optionally, when the original pixel has an obstacle or missing information, the corresponding downsampled pixel can be marked as having an obstacle or having missing information.

[0165] It can be seen that by implementing the optional embodiment, the target pixel map can be preprocessed to reduce the resolution of the target pixel map, thereby reducing the operation amount of subsequent map modification, improving the operation efficiency, and reducing the operation cost.

[0166] Embodiment three

[0167] Please refer to Figure 3 , Figure 3 is a structure diagram of a map modification device based on pixel supplement disclosed by the embodiment of the present application. Among them, Figure 3 The device described can be applied to a corresponding map modification terminal, map modification equipment or map modification server, and the server can be a local server or a cloud server, which is not limited in the embodiment of the present application. For example, Figure 3As shown, the apparatus can include:

[0168] The first determining module 301 is configured to determine the partition information of the target pixel map.

[0169] In the embodiment of the present application, the partition information is used to indicate the region information corresponding to any pixel in the target pixel map, and the region information can optionally include the identified region and / or the unidentified region, wherein specifically, the unidentified region is the region in the target pixel map that does not belong to the identified region. Optionally, the target pixel map has missing map information, so pixel supplement needs to be performed.

[0170] In the embodiment of the present application, the target pixel map can be a two-dimensional pixel map or a three-dimensional pixel map, and the target pixel map can be the modeling result of a map of a certain target indoor region, which can be performed by a cruising home device such as a sweeping robot or a cruising monitoring robot. The target indoor region can be the indoor region of a commercial entertainment place, the indoor region of a civil residence, or the indoor region of a military facility, and can be the internal region of any closed or semi-closed place, which is not limited by the present application.

[0171] In the embodiment of the present application, the identified region can be a regular two-dimensional or three-dimensional figure, such as a square / cube, a rectangle / rectangular prism, a rhombus / rhombic prism, or a parallelogram, which is not limited by the present application.

[0172] The second determining module 302 is configured to determine the number of empty pixels of the target pixel map in a plurality of preset directions according to the partition information.

[0173] In the embodiment of the present application, the preset direction can be a two-dimensional direction or a three-dimensional direction, and when the preset direction is a two-dimensional direction, the preset direction can include at least two of the vertical direction, the horizontal direction, the 45-degree direction, and the 135-degree direction. In the scene where the map correction method disclosed in the present application can be applied, any two-dimensional or three-dimensional direction should be considered to be included in the protection scope of the present application.

[0174] The third determining module 303 is configured to determine the pixel supplement direction corresponding to the target pixel map according to the number of empty pixels of the target pixel map in a plurality of preset directions.

[0175] In the embodiment of the present application, the pixel supplement direction is one of the plurality of preset directions, and specifically, the pixel supplement direction is determined from the preset direction in which the number of empty pixels meets the preset condition.

[0176] The execution module 304 is configured to perform a pixel supplement operation on the target pixel map based on the rule figure maximization principle according to the pixel supplement direction corresponding to the target pixel map.

[0177] In the embodiment of the present application, the rule pattern maximization principle can be expressed as: the target pixel map is as much as possible to be supplemented as the largest map form in the case of meeting the rule pattern shape, for example, the target pixel map is as shown in the left side of the figure, which is a map with missing parts, and its corresponding rule pattern is a rectangular room shape, then it can be supplemented to restore it to the regular rectangular room map as shown in the right side of the figure. Figure 6 Figure 6

[0178] It can be seen that the device described in the embodiment of the present application can effectively utilize the partition information and the spare pixel information of the target pixel map to supplement the pixels of the target pixel map, so as to achieve the effect of correcting the target pixel map, thereby effectively solving the problem of missing information in the target pixel map, and being beneficial to making the final map information more accurate and complete.

[0179] As an optional implementation, the specific manner in which the first determination module 301 determines the partition information of the target pixel map comprises:

[0180] According to a preset line segment intersection judgment rule, the contour line segments in the target pixel map are extended to intersect, to obtain a plurality of segmentation regions and an unsegmentable region;

[0181] According to a DBSCAN (Density-Based Spatial Clustering of Applications with Noise, density-based spatial clustering method with noise) optimization algorithm, the plurality of segmentation regions and the unsegmentable region are optimized to obtain the partition information of the target pixel map.

[0182] In the embodiment of the present application, the preset line segment intersection judgment rule is used to limit the rule of line segment intersection in the rule pattern mode corresponding to the target pixel map, and specifically, reference can be made to Figure 7 , Figure 7 which shows the rule of line segment intersection when the rule pattern mode corresponding to the target pixel map is a rectangle, Figure 7 (a) in the figure shows that when the extended virtual line of a contour line segment XZ in the target pixel map and a contour line segment MN exist a perpendicular intersection point V, the contour line segment XZ is extended to the intersection point V to form a boundary of a segmentation region, Figure 7 (b) in the figure shows that when the extended virtual lines of two contour line segments are perpendicular to each other, the two contour line segments can be extended to obtain a boundary of a segmentation region, Figure 7 (c) in the figure shows that when the extended line segments of three contour line segments AB, CD and EF can form a straight line segment, the three contour line segments are extended and connected to form a boundary of a segmentation region.​​

[0183] In the embodiment of the present application, the indivisible region can be a region which cannot form a regular pattern meeting the preset rule after extending and intersecting the contour line segment of the pattern in the target pixel map. For example, when the regular pattern corresponding to the target pixel map is a rectangle meeting a certain size, the indivisible region can be a region which cannot form a closed rectangular region or a region which cannot meet the size condition of the rectangular region. At this time, the DBSCAN optimization algorithm can be used to optimize the indivisible region and include the indivisible region into the adjacent divided region to obtain the final partition information.

[0184] As an optional implementation, the second determining module 302 determines the specific manner of determining the number of spare pixels of the target pixel map in the plurality of preset directions according to the partition information, including:

[0185] For any preset direction, the number of spare pixels of the target pixel map in the preset direction is determined.

[0186] The number of spare pixels in any preset direction is calculated to obtain the number of spare pixels in all preset directions.

[0187] Optionally, the spare pixel is a region-out pixel existing in front and back of the region-in pixel in the preset direction, wherein the region-in pixel is a pixel belonging to the identified region, and the region-out pixel is a pixel belonging to the un-identified region.

[0188] As an optional implementation, the third determining module 303 determines the specific manner of determining the pixel supplement direction corresponding to the target pixel map according to the number of spare pixels of the target pixel map in the plurality of preset directions, including:

[0189] According to the number of spare pixels in each preset direction, the preset direction with the least number of spare pixels is selected from the plurality of preset directions.

[0190] The selected preset direction is determined as the pixel supplement direction corresponding to the target pixel map.

[0191] As an optional implementation, as shown in Figure 4 the execution module 304 includes:

[0192] The determining unit 3041 is configured to determine the edge pixel of all pixels belonging to the identified region in the target pixel map in the pixel supplement direction.

[0193] The supplement unit 3042 is configured to perform a pixel supplement operation on all edge pixels based on the regular pattern maximization principle.

[0194] In the embodiment of the present application, the edge pixel is the pixel with the maximum or minimum directional coordinate value in the same column of pixels along the pixel supplement direction among all the pixels belonging to the marking area, wherein the directional coordinate value is the coordinate value of the pixel on the directional coordinate axis corresponding to the pixel supplement direction.

[0195] As an optional implementation, the supplement unit 3042 performs the pixel supplement operation on all the edge pixels based on the rule pattern maximization principle, and the specific manner includes:

[0196] determining the pixel alignment threshold interval according to the coordinate values of all the edge pixels on the directional coordinate axis corresponding to the pixel supplement direction;

[0197] performing the pixel alignment operation on all the edge pixels according to the pixel alignment threshold interval to obtain the aligned edge pixels;

[0198] performing the pixel supplement operation on the aligned edge pixels based on the rule pattern maximization principle.

[0199] Optionally, the mean value, variance value or standard deviation of the coordinate values of all the edge pixels on the directional coordinate axis corresponding to the pixel supplement direction is calculated, and the pixel alignment threshold interval is determined according to the mean value, variance value or standard deviation.

[0200] Optionally, the pixel alignment threshold interval can be determined according to the mean value or variance value based on the following formula:

[0201] ;

[0202] wherein, Thres is the pixel alignment threshold interval, σ edge is the variance value, which can also be the mean value or standard deviation, S d is the total area size factor, which is related to the total area of the target pixel map.

[0203] As an optional implementation, the supplement unit 3042 performs the pixel alignment operation on all the edge pixels according to the pixel alignment threshold interval to obtain the aligned edge pixels, and the specific manner includes:

[0204] judging whether the difference between the directional coordinate values of any two adjacent edge pixels is within the pixel alignment threshold interval;

[0205] if the judgment result is yes, performing the edge alignment operation on the two adjacent edge pixels;

[0206] if the judgment result is no, not performing any operation on the two adjacent edge pixels;

[0207] The above steps are repeated until all edge pixels are pixel-aligned to obtain the aligned edge pixels.

[0208] Optionally, the edge alignment operation specifically includes:

[0209] determining whether the two adjacent edge pixels belong to a front edge pixel or a back edge pixel; wherein the front edge pixel is an edge pixel with the maximum directional coordinate value among the same column of pixels along the pixel supplement direction among all pixels belonging to the identified region, and the back edge pixel is an edge pixel with the minimum directional coordinate value among the same column of pixels along the pixel supplement direction among all pixels belonging to the identified region;

[0210] when it is determined that the two adjacent edge pixels belong to the front edge pixel, performing pixel supplement on the pixel column in which the edge pixel with the smaller directional coordinate value is located, so that the directional coordinate value of the edge pixel with the smaller directional coordinate value is the same as the directional coordinate value of the other edge pixel;

[0211] when it is determined that the two adjacent edge pixels belong to the back edge pixel, performing pixel supplement on the pixel column in which the edge pixel with the larger directional coordinate value is located, so that the directional coordinate value of the edge pixel with the larger directional coordinate value is the same as the directional coordinate value of the other edge pixel.

[0212] As an optional implementation, the supplement unit 3042 performs pixel supplement operation on the aligned edge pixels based on the rule pattern maximization principle, and the specific manner includes:

[0213] grouping any multiple edge pixels with the same directional coordinate value in the aligned edge pixels into the same edge pixel set to obtain multiple edge pixel sets;

[0214] taking the edge pixel set with the maximum or minimum directional coordinate value in the multiple edge pixel sets as a reference edge pixel set, and performing pixel supplement on the pixel column in which the other edge pixel sets are located, so that the directional coordinate value of the other edge pixel sets is the same as the directional coordinate value of the reference edge pixel set.

[0215] Optionally, taking the edge pixel set with the maximum or minimum directional coordinate value in the multiple edge pixel sets as the reference edge pixel set can specifically include:

[0216] determining whether the multiple edge pixel sets belong to the front edge pixel or the back edge pixel;

[0217] when it is determined that the multiple edge pixel sets belong to the front edge pixel, taking the edge pixel set with the maximum directional coordinate value in the multiple edge pixel sets as the reference edge pixel set;

[0218] When it is judged that the multiple edge pixel sets belong to the back edge pixels, taking the edge pixel set with the minimum direction coordinate value in the multiple edge pixel sets as the reference edge pixel set.

[0219] Optionally, after taking the edge pixel set with the maximum or minimum direction coordinate value in the multiple edge pixel sets as the reference edge pixel set, the method can further include:

[0220] judging whether the reference edge pixel set is a region boundary pixel according to the partition information; wherein the region boundary pixel is a pixel on a boundary line of at least two identified regions;

[0221] When the judgment result is yes, taking the edge pixel set with the second maximum or second minimum direction coordinate value in the multiple edge pixel sets as the reference edge pixel set; specifically, when the multiple edge pixel sets belong to the front edge pixels, taking the edge pixel set with the second maximum direction coordinate value in the multiple edge pixel sets as the reference edge pixel set, and when the multiple edge pixel sets belong to the back edge pixels, taking the edge pixel set with the second minimum direction coordinate value in the multiple edge pixel sets as the reference edge pixel set.

[0222] When the judgment result is no, no operation is performed.

[0223] The purpose of the above setting is that the region boundary pixel is a fixed region boundary, and when the pixel supplement is performed, the fixed boundary should be avoided to be changed to ensure the accuracy of the partition information of the final map.

[0224] As an optional implementation, the device further includes:

[0225] The association module is configured to associate the corrected pixel map with the original target pixel map.

[0226] In the embodiment of the application, the corrected pixel map is a map obtained after performing the pixel supplement operation on the target pixel map, and the association of the corrected pixel map with the original target pixel map is used to indicate the corresponding relationship between the two, and further, when the user's correction instruction for the original target pixel map is received, the corrected pixel map can be subjected to the corresponding correction operation. Optionally, the correction instruction can be the correction of the pixel information, the edge information, and the information of the objects in the map, and the correction can be the addition, reduction, change, or movement, which is not limited in the application.

[0227] As an optional implementation, the device further includes:

[0228] The preprocessing module is configured to pre-process the target pixel map to reduce the resolution of the target pixel map.

[0229] In the embodiment of the present application, a down-sampling algorithm can be used to process the target pixel map. For example, a down-sampling parameter S is selected, S pixels multiplied by S pixels are taken as the down-sampling window size, and the target pixel map is down-sampled to reduce the resolution of the target pixel map. Optionally, the down-sampling parameter S can be the total area size factor described in embodiment one S d Optionally, when the original pixel has an obstacle or missing information, the corresponding down-sampled pixel can be marked as having an obstacle or having missing information.

[0230] Embodiment four

[0231] Please refer to Figure 5 , Figure 5 is another structure diagram of the map correction device based on pixel supplement disclosed by the embodiment of the present application. As shown in Figure 5 , the device can include:

[0232] a memory 401 storing executable program codes;

[0233] a processor 402 coupled with the memory 401;

[0234] The processor 402 invokes the executable program codes stored in the memory 401 to execute part or all of the steps of the map correction method based on pixel supplement disclosed in embodiment one or embodiment two of the present application.

[0235] Embodiment five

[0236] The embodiment of the present application discloses a computer storage medium, which stores computer instructions. When the computer instructions are invoked, part or all of the steps of the map correction method based on pixel supplement disclosed in embodiment one or embodiment two of the present application are executed.

[0237] The device embodiments described above are only schematic, wherein the modules described as separate components can or can not be physically separated, and the components displayed as modules can or can not be physical modules, i.e., they can be located in one place or distributed on multiple network modules. Part or all of the modules can be selected to achieve the purpose of the present embodiment scheme according to actual needs. Those skilled in the art can understand and implement without creative labor.

[0238] Those skilled in the art can clearly understand the implementation of the various embodiments by means of software and necessary general hardware platforms through the above specific description of the embodiments, and of course, the embodiments can also be implemented by hardware. Based on such understanding, the above technical solutions, essentially or in the sense of contribution to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer readable storage medium, which includes a Read-Only Memory (ROM), a Random Access Memory (RAM), a Programmable Read-only Memory (PROM), an Erasable Programmable Read Only Memory (EPROM), a One-time Programmable Read-Only Memory (OTPROM), an Electrically-Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM), or other optical disk storage, a magnetic disk storage, a magnetic tape storage, or any other medium that can be used to carry or store data in a computer readable manner.

[0239] Finally, it should be noted that: the map correction method and device based on pixel supplement disclosed by the embodiments of the present application are only the preferred embodiments of the present application, and are used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: the technical solutions recorded in the foregoing embodiments can still be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A map correction method based on pixel supplementation, characterized in that, The method comprises: determining partition information of a target pixel map; the partition information is used to indicate area information corresponding to any pixel in the target pixel map; determining the number of empty pixels of the target pixel map in multiple preset directions according to the partition information; determining a pixel supplement direction corresponding to the target pixel map according to the number of empty pixels of the target pixel map in multiple preset directions; determining edge pixels of all pixels belonging to a marked area in the target pixel map in the pixel supplement direction; the edge pixels are pixels with the maximum or minimum directional coordinate value in the same column of pixels along the pixel supplement direction among all the pixels belonging to the marked area; the directional coordinate value is the coordinate value of the pixel on the directional coordinate axis corresponding to the pixel supplement direction; determining a pixel alignment threshold interval according to the coordinate values of all the edge pixels on the directional coordinate axis corresponding to the pixel supplement direction; the pixel alignment threshold interval is determined by calculating the mean value, variance value or standard deviation of the coordinate values of all the edge pixels on the directional coordinate axis corresponding to the pixel supplement direction; judging whether the difference between the directional coordinate values of any two adjacent edge pixels is within the pixel alignment threshold interval; if the result of the judgment is yes, performing an edge alignment operation on the two adjacent edge pixels; if the result of the judgment is no, not performing any operation on the two adjacent edge pixels; repeating the step of judging whether the difference between the directional coordinate values of any two adjacent edge pixels is within the pixel alignment threshold interval until all the edge pixels are aligned to obtain aligned edge pixels; performing a pixel supplement operation on the aligned edge pixels based on the rule pattern maximization principle; and the performing an edge alignment operation on the two adjacent edge pixels comprises: judging whether the two adjacent edge pixels belong to a front edge pixel or a rear edge pixel; the front edge pixel is the edge pixel with the maximum directional coordinate value in the same column of pixels along the pixel supplement direction among all the pixels belonging to the marked area; the rear edge pixel is the edge pixel with the minimum directional coordinate value in the same column of pixels along the pixel supplement direction among all the pixels belonging to the marked area; when it is judged that the two adjacent edge pixels belong to the front edge pixel, supplementing the pixel column where the edge pixel with the smaller directional coordinate value is located to make the directional coordinate value of the edge pixel with the smaller directional coordinate value the same as that of the other edge pixel; when it is judged that the two adjacent edge pixels belong to the rear edge pixel, supplementing the pixel column where the edge pixel with the larger directional coordinate value is located to make the directional coordinate value of the edge pixel with the larger directional coordinate value the same as that of the other edge pixel.

2. The pixel-supplement-based map correction method according to claim 1, characterized by, The target pixel map can be a two-dimensional pixel map or a three-dimensional pixel map; and / or, the region information comprises identified regions and / or unidentified regions; the unidentified regions are regions in the target pixel map that do not belong to the identified regions; And / or, the preset directions are two-dimensional directions or three-dimensional directions; and / or, the preset directions comprise at least two of a vertical direction, a horizontal direction, a 45-degree direction, and a 135-degree direction.

3. The pixel-supplement-based map correction method according to claim 2, characterized by, The determining, according to the partition information, of the number of empty pixels of the target pixel map in the preset directions comprises: For any preset direction, determining an empty pixel of the target pixel map in the preset direction; the empty pixel is a region-out pixel having a region-in pixel before and after it in the preset direction; the region-in pixel is a pixel belonging to the identified regions; and the region-out pixel is a pixel belonging to the unidentified regions; Calculating the number of the empty pixels in any preset direction to obtain the number of the empty pixels in all the preset directions.

4. The pixel-supplement-based map correction method according to claim 1, characterized by, The determining, according to the number of the empty pixels of the target pixel map in the preset directions, of the pixel supplement direction corresponding to the target pixel map comprises: According to the number of the empty pixels in each preset direction, screening a preset direction having the least number of empty pixels from the preset directions; Determining the screened preset direction as the pixel supplement direction corresponding to the target pixel map.

5. The pixel-supplement-based map correction method according to claim 1, characterized by, The performing, based on a regular pattern maximization principle, of a pixel supplement operation on the aligned edge pixels comprises: Grouping any multiple edge pixels having the same direction coordinate value in the aligned edge pixels into a same edge pixel set to obtain multiple edge pixel sets; Taking an edge pixel set having the largest or smallest direction coordinate value in the multiple edge pixel sets as a reference edge pixel set, supplementing pixels in pixel columns where other edge pixel sets are located to make the direction coordinate values of the other edge pixel sets the same as the direction coordinate value of the reference edge pixel set.

6. A map correction device based on pixel supplementation, characterized by, The apparatus comprises: A first determining module configured to determine partition information of a target pixel map; the partition information is used to indicate region information corresponding to any pixel in the target pixel map; A second determining module configured to determine, according to the partition information, the number of empty pixels of the target pixel map in preset directions; A third determining module configured to determine, according to the number of the empty pixels of the target pixel map in the preset directions, a pixel supplement direction corresponding to the target pixel map; An executing module configured to perform, according to the pixel supplement direction corresponding to the target pixel map, a pixel supplement operation on the target pixel map based on a regular pattern maximization principle; And, the executing module comprises: determining unit configured to determine edge pixels of all pixels belonging to the identified region in the target pixel map in a pixel supplement direction; the edge pixels are pixels with maximum or minimum directional coordinate values among the same column of pixels in the pixel supplement direction among all pixels belonging to the identified region; the directional coordinate value is a coordinate value of the pixel on a directional coordinate axis corresponding to the pixel supplement direction; a supplement unit configured to perform pixel supplement operation on all the edge pixels based on a regular pattern maximization principle; and the specific manner in which the supplement unit performs pixel supplement operation on all the edge pixels based on the regular pattern maximization principle comprises: determining a pixel alignment threshold interval according to the coordinate values of all the edge pixels on the directional coordinate axis corresponding to the pixel supplement direction; the pixel alignment threshold interval is determined by calculating the mean value, variance value or standard deviation of the coordinate values of all the edge pixels on the directional coordinate axis corresponding to the pixel supplement direction; performing pixel alignment operation on all the edge pixels according to the pixel alignment threshold interval to obtain aligned edge pixels; and performing pixel supplement operation on the aligned edge pixels based on the regular pattern maximization principle; and the specific manner in which the supplement unit performs pixel alignment operation on all the edge pixels according to the pixel alignment threshold interval to obtain aligned edge pixels comprises: judging whether the difference between the directional coordinate values of any two adjacent edge pixels is within the pixel alignment threshold interval; if the result of the judgment is yes, performing edge alignment operation on the two adjacent edge pixels; if the result of the judgment is no, not performing any operation on the two adjacent edge pixels; repeating the step of judging whether the difference between the directional coordinate values of any two adjacent edge pixels is within the pixel alignment threshold interval until pixel alignment is performed on all the edge pixels to obtain aligned edge pixels; and the specific manner in which the supplement unit performs edge alignment operation on the two adjacent edge pixels comprises: judging whether the two adjacent edge pixels belong to a front edge pixel or a rear edge pixel; the front edge pixel is an edge pixel with maximum directional coordinate value among the same column of pixels in the pixel supplement direction among all pixels belonging to the identified region; the rear edge pixel is an edge pixel with minimum directional coordinate value among the same column of pixels in the pixel supplement direction among all pixels belonging to the identified region; when it is judged that the two adjacent edge pixels belong to the front edge pixel, performing pixel supplement on the pixel column in which the edge pixel with smaller directional coordinate value is located among the two adjacent edge pixels to make the directional coordinate value of the edge pixel with smaller directional coordinate value the same as the directional coordinate value of the other edge pixel; When it is judged that the two adjacent edge pixels belong to the rear edge pixel, a pixel column where an edge pixel with a larger direction coordinate value among the two adjacent edge pixels is located is supplemented with a pixel, so that the direction coordinate value of the edge pixel with the larger direction coordinate value is the same as the direction coordinate value of the other edge pixel.

7. A map correction device based on pixel supplementation, characterized by, The apparatus comprises: a memory storing executable program code; a processor coupled with the memory; the processor invokes the executable program code stored in the memory to execute the pixel-supplement-based map correction method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Demosaicing method and system

    CN110246080A