WO2020024101A1 - 地图数据源处理方法、地图更新方法及设备、存储介质 - Google Patents

地图数据源处理方法、地图更新方法及设备、存储介质 Download PDF

Info

Publication number
WO2020024101A1
WO2020024101A1 PCT/CN2018/097760 CN2018097760W WO2020024101A1 WO 2020024101 A1 WO2020024101 A1 WO 2020024101A1 CN 2018097760 W CN2018097760 W CN 2018097760W WO 2020024101 A1 WO2020024101 A1 WO 2020024101A1
Authority
WO
WIPO (PCT)
Prior art keywords
pixel
expansion
target pixel
target
data source
Prior art date
Application number
PCT/CN2018/097760
Other languages
English (en)
French (fr)
Inventor
吴博
刘昂
张立天
Original Assignee
深圳市大疆创新科技有限公司
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 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to PCT/CN2018/097760 priority Critical patent/WO2020024101A1/zh
Priority to CN201880039233.9A priority patent/CN110770788A/zh
Publication of WO2020024101A1 publication Critical patent/WO2020024101A1/zh
Priority to US17/154,887 priority patent/US20210142444A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/18Image warping, e.g. rearranging pixels individually
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • G06T5/30Erosion or dilatation, e.g. thinning
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/02Control of position or course in two dimensions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • G06Q10/047Optimisation of routes or paths, e.g. travelling salesman problem
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery

Definitions

  • the present invention relates to the field of map technology, and in particular, to a map data source processing method, a map update method and device, and a storage medium.
  • maps are required for autonomous navigation.
  • a map can be used to plan a drivable path. Obstacle information is described in the map.
  • map errors caused by observation and positioning, and control errors of mobile devices. Therefore, a certain safety range of obstacles needs to be considered in path planning.
  • the related expansion to form a safe range is to traverse the entire map and expand the obstacles directly on the map. If the inflation is performed directly on the map, an inflation operation is required after each map update.
  • the invention provides a map data source processing method, a map update method and device, and a storage medium.
  • the map data source is expanded, so that it is not necessary to expand the map after updating the map.
  • a map data source processing method including:
  • an electronic device including: a memory and a processor;
  • the memory is used to store program code
  • the processor is configured to call the program code, and when the program code is executed, is configured to perform the following operations:
  • a computer-readable storage medium stores computer instructions.
  • the map according to the first aspect of the embodiments of the present invention is implemented. Data source processing methods.
  • a fourth aspect of the embodiments of the present invention provides a map update method, including:
  • the generated map is updated with a map data source after expanding the target pixel.
  • an electronic device including: a memory and a processor;
  • the memory is used to store program code
  • the processor is configured to call the program code, and when the program code is executed, implement the map update method according to the fourth aspect of the embodiments of the present invention.
  • a computer-readable storage medium stores computer instructions.
  • the map according to the fourth aspect of the embodiments of the present invention is implemented. Update method.
  • the target pixel is determined on the map data source used to update the map, and the dilation process is completed for the target pixel.
  • the processing complexity is greatly reduced. It also avoids the problem that it is necessary to redo the expansion in the map for each update; after the target pixel is determined, the expansion parameter corresponding to the target pixel is determined, so that each target pixel can perform the expansion and expansion using the appropriate expansion parameter. Better results.
  • FIG. 1 is a schematic flowchart of a map data source processing method according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram when a target pixel of a map data source expands according to an embodiment of the present invention
  • FIG. 3 and FIG. 4 are schematic diagrams of a comparison of the effect of a map updated using a map data source expanded by a target pixel according to an embodiment of the present invention
  • 5 and 6 are comparison diagrams of effects of a map updated by using a map data source expanded by a target pixel according to an embodiment of the present invention
  • FIG. 7 is a structural block diagram of an electronic device according to an embodiment of the present invention.
  • first, second, third, etc. may be used in the present invention to describe various information, these information should not be limited to these terms. These terms are used to distinguish the same type of information from each other.
  • first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information.
  • word “if” can be interpreted as “at”, or “at ", or "in response to a determination”.
  • An embodiment of the present invention provides a method for processing a map data source, which can perform an expansion operation before the map data source is used to update the map, so that after the map is updated with the map data source that completes the expansion operation for pixels that need to be expanded, the updated data is updated.
  • the map has formed a safe range, so there is no need to perform the expansion operation on the map.
  • An embodiment of the present invention also provides a map update method.
  • the map data source processing method of the embodiment of the present invention can be used to obtain a map data source after expanding the target pixel, and the map is updated using the map data source after expanding the target pixel.
  • the map already has the required security range, so there is no need to perform an inflation operation on the map after each update.
  • Performing an inflation operation on a map is much more complicated than performing an inflation operation on a map data source, and because each update of a part of the map requires an inflation operation, it will cause some targets in the map to be inflated excessively.
  • the selected part of the map is expanded. Therefore, in the embodiment of the present invention, performing the expansion operation on the map data source can reduce the complexity of processing.
  • the execution subject of the map data source processing method and the map update method may be an electronic device, of course, it may be the same or different electronic devices.
  • the specific type of the electronic device is not limited, and the electronic device may be an imaging device but is not limited to an imaging device.
  • the electronic device may be, for example, a device electrically connected to the imaging device, and may obtain a map data source of the imaging device, and then execute a corresponding method.
  • the electronic device When the electronic device is an imaging device, it may be a mobile device with an image acquisition function, and specifically may be an unmanned car equipped with a camera, an unmanned aerial vehicle, an autonomous walking robot, and the like. Taking a drone as an example, a drone can acquire a map data source by collecting images during flight, and then execute a map data source processing method.
  • a map data source processing method may include the following steps:
  • the execution subject of the method may be an electronic device, and further may be a processor of the electronic device, wherein the processor may be one or more, and the processor may be a general-purpose processor or a special-purpose processor. .
  • the electronic device may be the imaging device itself or connected to the imaging device.
  • the electronic device is described as an imaging device in the following.
  • the imaging device can acquire images, and the images acquired by the imaging device can be binocular images.
  • the processor can obtain the collected binocular image and process the binocular image to obtain a map data source, so that the pixel characteristics of the pixels in the obtained map data source include depth values or disparity values, and the map data source is not limited to being obtained through binocular
  • the image is obtained after processing, or may be obtained after processing multiple frames of monocular images.
  • the pixel characteristics of the pixels in the map data source do not necessarily include the depth value or the parallax value, which can be determined based on the information required for the specific map update.
  • step S100 the processor determines a target pixel to be expanded from the map data source.
  • map data source needs to be expanded, such as but not limited to pixels with abnormal pixel characteristics or pixels corresponding to objects that are too far away in the actual scene, so the target pixels to be expanded need to be determined from the map data source.
  • the map data source in step S100 can be used to update the map but has not been expanded.
  • the map data source and the map data source that is finally expanded may be the same map data source, or two map data sources with exactly the same pixel characteristics. ,and many more.
  • the expansion operation of the target pixel can be performed directly on the map data source; or, the target pixel can be determined from the map data source first, and then the copy obtained by duplicating the map data source A dilation operation of the target pixel is performed on the map data source. It is even possible to determine target pixels from a map data source, store the coordinates of the target pixels, copy the pixel characteristics of the target pixels on the corresponding coordinates of the data source whose pixel characteristics are preset blank values, and perform expansion on the target pixels After determining the pixel characteristics of all the expanded pixels, the pixel characteristics of the expanded pixels are used to modify the map data source to obtain the map data source after the expansion operation.
  • step S200 the processor determines an expansion parameter required when expanding the target pixel.
  • the expansion parameters required for the target pixel can be the same or different, so that the target pixel can get the most appropriate expansion.
  • the expansion parameters required for the target pixel can be pre-configured or calculated, which is not limited.
  • the radius of the expansion is the same, and the expansion effect is not good enough. For example, performing the same radius expansion on the pixels of close-range objects and pixels of distant objects in the scene will cause the problem of insufficient pixels of close-range objects or excessive expansion of pixels of distant objects. Of course, the above problem is only unable to meet the needs
  • One of the shortcomings of determining the expansion radius is that there may be other problems.
  • an expansion parameter required when expanding the target pixel is determined, so that each target pixel finally obtains a desired expansion effect, which can solve the above problem.
  • step S300 the processor expands the target pixel of the map data source according to the expansion parameter.
  • the expansion operation can be performed after the target pixel and the corresponding expansion parameters are determined.
  • the expansion operation of the target pixel can be performed directly on the map data source used to determine the target pixel, or the expansion operation of the target pixel can be performed on the same map data source as the map data source used to determine the target pixel. As long as it is determined that the map data source used by the target pixel is consistent with the pixel characteristics of at least useful pixels in the map data source used when the expansion is finally performed.
  • Useful pixels are normal pixels relative to abnormal pixels, and the final body acts on the pixels of the map.
  • the abnormal pixel may include, for example, a pixel whose pixel feature is a preset blank value, and / or a pixel whose pixel feature is an abrupt value relative to an adjacent pixel, and the like.
  • the abrupt value is, for example, a pixel in which an absolute value of a difference between a pixel feature and an adjacent pixel feature exceeds an allowable range.
  • steps S100 to S300 may be that, for each target pixel determined in step S100, steps S200 and S300 are performed, and after step S300 performed on the pixel is completed, return to step S100 and continue to execute until The expansion operations for all target pixels are completed; or, after multiple or all target pixels are determined in step S100, steps S200 and S300 are performed. Not specific.
  • the target pixel is determined on the map data source used to update the map, and the expansion process is completed for the target pixel.
  • the processing complexity is greatly reduced, and each time Updates need to do the dilation problem again in the map; after the target pixel is determined, the expansion parameter corresponding to the target pixel is determined, so that each target pixel can perform the expansion using the appropriate expansion parameter, and the expansion effect is better.
  • step S100 determining the target pixel to be expanded from the map data source specifically includes the following steps:
  • S102 Determine whether the pixel characteristics of the traversed pixels satisfy the expansion condition, and if so, determine that the traversed pixels are the target pixels to be expanded.
  • step S101 the processor traverses pixels in the map data source.
  • the traversal process can filter out abnormal pixels and useful pixels that do not require dilation. You can set the corresponding filtering conditions in the dilation conditions.
  • step S102 if the pixel characteristics of the traversed pixel satisfy the expansion condition, the pixel is the target pixel to be expanded, otherwise the pixel may be skipped.
  • the subsequent steps S200 and S300 may be performed, and after the execution, the next pixel may be traversed until all pixels are traversed.
  • the subsequent steps S200 and S300 may be performed to record the information of these target pixels.
  • the order of traversal is not limited, it can be traversed by rows, traversed by columns, or other order, as long as at least useful pixels in the map data source are traversed.
  • the dilation condition can be used, for example, to select pixels of a close object in the scene as target pixels. In specific applications, more attention is usually paid to obstacles at close distances, so it is better to expand the pixels of obstacles at close distances in the scene.
  • the map is inflated directly, the obstacle area in the map needs to be traversed, and then the obstacle points in the short distance are inflated. The operation will be very time-consuming. Since the map is three-dimensional data, the traversal process needs to be calculated for each point in the map. Distance to imaging equipment.
  • expansion is performed on a map data source. Since it is two-dimensional data, by traversing and judging the expansion conditions, it is possible to quickly find the pixels of a close-up object, which is more difficult and time-consuming than the map. In terms of direct expansion, it can be greatly reduced.
  • a pixel characteristic of the pixel may be a parallax value of the pixel.
  • the determining whether the pixel characteristics of the traversed pixels satisfy the expansion condition may include:
  • the parallax value can reflect the distance between the object in the scene and the lens of the imaging device. The closer the distance, the greater the parallax value. Therefore, if the parallax value of the traversed pixel is greater than the preset parallax threshold, it indicates that the relative Said to be a close-range object, the expansion condition is met, and the pixel is used as the target pixel, otherwise the pixel is skipped.
  • a pixel characteristic of the pixel may be a depth value of the pixel.
  • the determining whether the pixel characteristics of the traversed pixels satisfy the expansion condition may include:
  • the depth value can reflect the distance between the object in the scene and the lens of the imaging device. The closer the distance is, the smaller the depth value is. Therefore, if the depth value of the traversed pixel is less than a preset depth threshold, it means that it is relatively For a near object, the expansion condition is met, and the pixel is used as the target pixel, otherwise the pixel is skipped.
  • Parallax values and depth values can be converted to each other, so whether the map data source is a parallax map or a depth map, the above two methods can be used to determine the target pixel, that is, it will be greater than a preset parallax threshold or smaller than a preset
  • the depth threshold is used as a comparison condition, and target pixels that meet the conditions of the disparity value or depth value are selected as the expansion target.
  • a target pixel with a large parallax value or a small depth value can be selected to expand the objects at a short distance in a targeted manner. Expansion can save the time and cost of expansion while ensuring the required expansion effect.
  • step S200 the determining the expansion parameter required when expanding the target pixel specifically includes the following steps:
  • S202 Determine an expansion parameter required when expanding the target pixel according to the pixel characteristics of the target pixel.
  • step S201 since the target pixel has been determined in step S102, the processor can directly obtain the pixel characteristics of the target pixel.
  • step S202 when specifically determining the expansion parameter required when the target pixel is determined, it may be determined according to the pixel characteristics of the target pixel.
  • an expansion parameter that can expand the target pixel in a larger range is determined, and for a target pixel with a smaller parallax value, a determination is possible.
  • An expansion parameter that causes the target pixel to swell in a smaller range for another example, if the pixel feature of a pixel is a depth value, for a target pixel with a smaller depth value, an expansion parameter that allows the target pixel to swell in a larger range is determined, For a target pixel with a larger depth value, an expansion parameter that determines that the target pixel can swell in a smaller range is determined. In this way, the expansion range can be determined according to the distance in the scene, rather than expanding at a constant radius. The expansion is more hierarchical and the expansion effect is better.
  • the expansion parameter is determined according to its pixel characteristics, and the best expansion effect can be obtained.
  • the map data source may be a disparity map, and pixel characteristics of the target pixel are disparity values of the target pixel.
  • the pixel characteristics of the pixels in the disparity map are disparity values.
  • the disparity map can be determined by the binocular image collected by the binocular lens of the imaging device. Parallax exists on the binocular image due to the physical distance of the binocular lens. The distance of the target in the scene can be determined according to the parallax value.
  • determining the expansion parameter required when expanding the target pixel according to the pixel characteristics of the target pixel includes the following steps:
  • S2021 Determine the parallax expansion offset corresponding to the parallax value of the target pixel in the correspondence between the established parallax value and the parallax expansion offset, and determine the expansion according to the determined parallax expansion offset. Expansion parameter required for the target pixel.
  • each record is a table of the parallax value and the corresponding parallax expansion offset, and the corresponding parallax expansion can be determined through the parallax value lookup table. Offset. Then, an expansion parameter required when expanding the target pixel is determined according to the determined parallax expansion offset.
  • the parallax expansion offset can be directly determined as the expansion parameter, or a value obtained by performing a certain operation on the parallax expansion offset is determined as the expansion parameter.
  • the parallax expansion offset includes a left parallax expansion offset and a right parallax expansion offset, both can be used to calculate the average value and use the average as the expansion parameter, or the left parallax expansion offset and the right parallax expansion can be directly used
  • the offset amount is used as the expansion parameter to perform unequal length expansion based on the left parallax expansion offset and the right parallax expansion offset respectively at the time of expansion.
  • the parallax inflation offset is a parallax inflation offset, and it is directly inflated as an inflation parameter.
  • parallax value can also be implemented with other data structures, and is not specifically limited to the form of a table.
  • determining the expansion parameter required when expanding the target pixel according to the pixel characteristics of the target pixel may include the following steps:
  • S2024 Convert the depth expansion offset into a parallax expansion offset, and determine an expansion parameter required when expanding the target pixel according to the parallax expansion offset.
  • disparity focus * baseline / depth (1)
  • focus is the focal length of the imaging device
  • baseline is the baseline length between the binocular lenses of the imaging device used to collect the binocular image corresponding to the disparity map.
  • step S2022 the parallax value of the target pixel can be converted into the depth value of the target pixel by using formula (1).
  • formula (1) it can be seen that the disparity value and the depth value are in a power function relationship, and thus are not linear.
  • S2023 Determine the depth expansion offset corresponding to the depth value of the target pixel in the correspondence between the established depth value and the depth expansion offset.
  • each record is a table of the depth value and the corresponding depth expansion offset, and the corresponding depth expansion offset can be determined by searching the table through the depth value. .
  • the expansion depth values depth_plus and depth_sub can be determined, as shown in the following formula (2):
  • depth_plus depth + plus
  • depth_sub depth-sub (2)
  • step S2024 the depth expansion offset is converted into a parallax expansion offset, and the expansion parameter required when expanding the target pixel is determined according to the parallax expansion offset, and conversion is also completed using formula (1) .
  • Substituting the dilated depth value depth_plus into the formula (1) can obtain the corresponding dilated disparity value disparity_sub, and substituting the dilated depth value depth_sub into the formula (1) can obtain the corresponding dilated disparity value dispersion_plus, so that the parallax dilated offset dis_sub , Dis_plus:
  • determining the expansion parameter required when expanding the target pixel according to the parallax expansion offset includes the following steps: determining the expansion radius according to the parallax expansion offset; and determining the expansion radius as the expansion factor Expansion parameters required when describing the target pixel.
  • the expansion radius radius can be determined according to the parallax expansion offsets dis_sub, dis_plus, for example, the following formula (5):
  • the disparity expansion offsets dis_sub and dis_plus can be weighted to obtain the expansion radius, or the parallax expansion offset can be directly taken.
  • One of the values dis_sub and dis_plus is used as the expansion radius, etc., which is not limited. In this way, corresponding dilation values can be obtained for different parallax values, and the dilation radius is determined as the dilation parameter required when dilating the target pixel.
  • the expansion of the map data source needs to be finally displayed in the map, it can be determined according to the expansion amount required in the map, and the expansion amount required in the map can be directly measured by the depth expansion offset of the depth value, and directly The parallax value is more difficult to measure. Therefore, the depth expansion offset determined after conversion to the depth value is used, and then the expansion parameter corresponding to the parallax value is used to determine the expansion parameter corresponding to the parallax value, which is more in line with the expected expansion effect.
  • the map data source may be a depth map, and the pixel feature of the target pixel is a depth value of the target pixel.
  • the pixel characteristics of the pixels in the depth map are depth values.
  • the depth map can be determined by the binocular image collected by the binocular lens of the imaging device, and the distance of the target in the scene can be determined according to the depth value.
  • determining the expansion parameter required when expanding the target pixel according to the pixel characteristics of the target pixel includes the following steps:
  • S2025 Determine the depth expansion offset corresponding to the depth value of the target pixel in the established correspondence between the depth value and the depth expansion offset, and determine to expand the target pixel according to the determined depth expansion offset. Expansion parameters required.
  • each record is a table of the depth value and the corresponding depth expansion offset, and the corresponding depth expansion offset can be determined by searching the table through the depth value. . Then, an expansion parameter required when expanding the target pixel is determined according to the determined depth expansion offset.
  • the corresponding relationship between the depth value and the depth expansion offset can also be implemented by other data structures, and the specific relationship is not limited to the form of a table.
  • determining the expansion parameter required when expanding the target pixel according to the depth expansion offset includes the following steps: determining the expansion radius according to the depth expansion offset; and determining the expansion radius as expanding the target The expansion parameter required in pixels.
  • the depth expansion offset can be directly used as the expansion radius, and this expansion radius is determined as the expansion parameter required when expanding the target pixel.
  • step S300 the expanding the target pixel of the map data source according to the expanding parameter includes the following steps:
  • the left and right direction on the map data source is the horizontal direction, which is consistent with the left and right direction of the binocular lens used to collect the corresponding image of the map data source. Since the two lenses in the binocular lens are in a left and right relationship, parallax only exists in the horizontal direction. Therefore, on the map data source, it is only necessary to perform left-right expansion with the target pixel as the center, and expand the corresponding range according to the expansion parameter.
  • the expansion parameter is an expansion radius.
  • S3011 Determine a target area centered on the target pixel along the left-right direction of the target pixel and having a radius that is the expansion radius;
  • a target region is first determined according to a dilation parameter with the target pixel as the center, the dilation parameter as the dilation radius, and the target region is determined along the left and right directions of the target pixel with the target pixel as the center.
  • the left and right directions of the target pixel determine a first region with a length of the expansion radius to the left, and the right and left directions of the target pixel determine a second region with a length of the expansion radius to the right, the first region, the target pixel, and the second region.
  • the target area is constituted.
  • step S3012 the target pixel is expanded according to the target region. Because there are many target pixels in the map data source, there may be overlap in the target areas. You can expand the target pixels based on whether there is overlap between the target areas. Of course, you can also expand the target pixels directly in the target area.
  • the expanding the target pixel according to the target region includes:
  • the specified pixel characteristics of the unexpanded pixels in the target area are modified to the specified pixel characteristics of the target pixel, according to the specified pixel characteristics of the expanded pixel and the specified pixel characteristics of the target pixel.
  • a specified pixel characteristic of the expanded pixel is determined.
  • pixel 2 and pixel 5 are target pixels
  • the target area of pixel 2 is pixels 0-4
  • the target area of pixel 5 is pixels 2-8.
  • the pixel characteristics of the pixels 0-4 can be directly modified to the specified pixel characteristics of the pixel 2.
  • the pixel 5 is inflated, 5-8 are unexpanded pixels and can be modified to the specified pixel characteristics of the target pixel; while pixels 2-4 are inflated pixels and need to be from the specified pixel characteristics of the inflated pixel.
  • One of the designated pixel feature of the inflated pixel and the designated pixel feature of pixel 5 that is closer in distance may be selected as its final designated pixel feature.
  • the specified pixel feature is a disparity value
  • the map data source is a disparity map.
  • disparity value of the expanded pixel is greater than or equal to the disparity value of the target pixel, maintaining the disparity value of the expanded pixel;
  • the disparity value of the expanded pixel is smaller than the disparity value of the target pixel, the disparity value of the expanded pixel is modified to the disparity value of the target pixel.
  • pixels 2-4 are expanded pixels, and the larger of the disparity value of the expanded pixel and the disparity value of pixel 5 is selected as its final disparity value, so that Distance objects are preferentially inflated.
  • the specified pixel feature is a depth value
  • the map data source is a disparity map.
  • the depth value of the expanded pixel is less than or equal to the depth value of the target pixel, maintaining the depth value of the expanded pixel;
  • the depth value of the expanded pixel is greater than the depth value of the target pixel, the depth value of the expanded pixel is modified to the depth value of the target pixel.
  • Pixels 2-4 are expanded pixels. The smaller of the depth value of the expanded pixel and the depth value of pixel 5 is selected as its final parallax value, so that objects at close range are given priority. Be inflated.
  • Figure 3 is a schematic diagram of a map updated using an unexpanded map data source.
  • Figure 4 is a schematic diagram of a map updated using an expanded map data source.
  • the human body selected by the dashed frame is a close-range object.
  • the subject is inflated in FIG. 4, and the object to the outside of the dotted frame is a distant object. In FIG. 4, the object is not inflated.
  • Fig. 5 is a three-dimensional rendering of a map updated using an unexpanded map data source
  • Fig. 6 is a three-dimensional rendering of a map updated using an expanded map data source.
  • the human object selected by the solid line is a close-range object
  • the human body object is expanded in FIG. 6, while the solid-frame-to-outside object is a distant object.
  • the object is not expanded or is not significantly expanded.
  • an electronic device 100 includes: a memory 101 and a processor 102 (such as one or more processors).
  • the specific type of the electronic device is not limited, and the electronic device may be an imaging device but is not limited to an imaging device.
  • the electronic device may be, for example, a device electrically connected to the imaging device, and may obtain a map data source of the imaging device, and then execute a corresponding method.
  • the memory is used to store program code;
  • the processor is used to call the program code, and when the program code is executed, is used to perform the following operations:
  • the processor determines a target pixel to be expanded from a map data source
  • the processor is specifically configured to:
  • a pixel characteristic of the pixel is a parallax value of the pixel
  • a pixel characteristic of the pixel is a depth value of the pixel
  • the processor determines whether the pixel characteristics of the traversed pixels satisfy the expansion condition.
  • the processor is specifically configured to:
  • the processor determines an expansion parameter required when expanding the target pixel
  • the processor is specifically configured to:
  • An expansion parameter required when expanding the target pixel is determined according to the pixel characteristics of the target pixel.
  • the map data source is a disparity map
  • the pixel characteristics of the target pixel are disparity values of the target pixel
  • the processor determines an expansion parameter required to expand the target pixel according to the pixel characteristics of the target pixel, the processor is specifically configured to:
  • the processor determines the expansion parameter required for expanding the target pixel according to the pixel characteristics of the target pixel, the processor is specifically configured to:
  • the depth expansion offset is converted into a parallax expansion offset, and an expansion parameter required when expanding the target pixel is determined according to the parallax expansion offset.
  • the processor determines an expansion parameter required for expanding the target pixel according to the parallax expansion offset
  • the processor is specifically configured to:
  • the expansion radius is determined as an expansion parameter required when expanding the target pixel.
  • the map data source is a depth map
  • the pixel characteristic of the target pixel is a depth value of the target pixel
  • the processor is specifically configured to determine an expansion parameter required when expanding the target pixel according to the pixel characteristics of the target pixel:
  • the depth expansion offset corresponding to the depth value of the target pixel is determined from the established relationship between the depth value and the depth expansion offset, and the time required to expand the target pixel is determined according to the determined depth expansion offset. Required expansion parameters.
  • the processor determines an expansion parameter required for expanding the target pixel according to a depth expansion offset
  • the processor is specifically configured to:
  • the expansion radius is determined as an expansion parameter required when expanding the target pixel.
  • the processor expands the target pixel of the map data source according to the expansion parameter, the processor is specifically configured to:
  • the target pixel is expanded on the map data source in the left-right direction of the target pixel according to the expansion parameter with the target pixel as the center.
  • the expansion parameter is an expansion radius
  • the processor is specifically configured to expand the target pixel in the left-right direction of the target pixel according to the expansion parameter on the map data source centering on the target pixel according to the expansion parameter:
  • the processor when the processor expands the target pixel according to the target area, the processor is specifically configured to:
  • the specified pixel characteristics of the unexpanded pixels in the target area are modified to the specified pixel characteristics of the target pixel, according to the specified pixel characteristics of the expanded pixel and the specified pixel characteristics of the target pixel.
  • a specified pixel characteristic of the expanded pixel is determined.
  • the designated pixel feature is a parallax value
  • the processor determines the designated pixel feature of the expanded pixel according to the designated pixel feature of the expanded pixel and the designated pixel feature of the target pixel, the processor is specifically configured to:
  • disparity value of the expanded pixel is greater than or equal to the disparity value of the target pixel, maintaining the disparity value of the expanded pixel;
  • the disparity value of the expanded pixel is smaller than the disparity value of the target pixel, the disparity value of the expanded pixel is modified to the disparity value of the target pixel.
  • the specified pixel feature is a depth value
  • the processor determines the designated pixel feature of the expanded pixel according to the designated pixel feature of the expanded pixel and the designated pixel feature of the target pixel, the processor is specifically configured to:
  • the depth value of the expanded pixel is less than or equal to the depth value of the target pixel, maintaining the depth value of the expanded pixel;
  • the depth value of the expanded pixel is greater than the depth value of the target pixel, the depth value of the expanded pixel is modified to the depth value of the target pixel.
  • a computer-readable storage medium has computer instructions stored thereon, and when the computer instructions are executed, the map data source processing method according to the foregoing embodiment is implemented .
  • An embodiment of the present invention further provides a map update method, including:
  • the generated map is updated with a map data source after expanding the target pixel.
  • an electronic device includes: a memory and a processor (such as one or more processors).
  • the specific type of the electronic device is not limited, and the electronic device may be an imaging device but is not limited to an imaging device.
  • the electronic device may be, for example, a device electrically connected to the imaging device, and may obtain a map data source of the imaging device, and then execute a corresponding method.
  • the electronic device may be the electronic device shown in FIG. 7.
  • the memory is configured to store program code
  • the processor is configured to call the program code, and when the program code is executed, implement the map update method according to the foregoing embodiment.
  • a computer-readable storage medium stores computer instructions on the computer-readable storage medium, and when the computer instructions are executed, the map updating method according to the foregoing embodiment is implemented.
  • the system, device, module, or unit described in the foregoing embodiments may be implemented by a computer chip or entity, or by a product having a certain function.
  • a typical implementation device is a computer, and the specific form of the computer may be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email sending and receiving device, and a game control Desk, tablet computer, wearable device, or a combination of any of these devices.
  • the embodiments of the present invention may be provided as a method, a system, or a computer program product. Therefore, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • these computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured article including the instruction device,
  • the instruction device implements the functions specified in a flowchart or a plurality of processes and / or a block or a block of the block diagram.
  • These computer program instructions can also be loaded into a computer or other programmable data processing device, so that a series of operating steps are performed on the computer or other programmable device to produce a computer-implemented process, and the instructions executed on the computer or other programmable device Provides steps for implementing the functions specified in one or more flowcharts and / or one or more blocks of the block diagrams.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Databases & Information Systems (AREA)
  • Human Resources & Organizations (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • Remote Sensing (AREA)
  • Game Theory and Decision Science (AREA)
  • Development Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Aviation & Aerospace Engineering (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Automation & Control Theory (AREA)
  • Image Processing (AREA)

Abstract

一种地图数据源处理方法、地图更新方法及设备、存储介质,该地图数据源处理方法,包括:从地图数据源中确定待膨胀的目标像素(S100);确定膨胀目标像素时所需的膨胀参数(S200);依据膨胀参数对地图数据源的目标像素进行膨胀(S300)。在地图数据源上进行膨胀,以在更新地图后无需再在地图上膨胀。

Description

地图数据源处理方法、地图更新方法及设备、存储介质 技术领域
本发明涉及地图技术领域,尤其是涉及一种地图数据源处理方法、地图更新方法及设备、存储介质。
背景技术
对于无人机、机器人、无人驾驶汽车等可移动设备,在自主导航方面均需要地图的支持,例如可通过地图规划出可行驶的路径。地图中描述了障碍物的信息,在实际规划应用中需要考虑观测与定位等导致的地图误差以及可移动设备的控制误差,因此在路径规划时需要考虑障碍物的一定安全范围。
相关膨胀以形成安全范围的做法是遍历整个地图,直接在地图上进行障碍物膨胀。如果直接在地图上进行膨胀,则每次地图更新后都需要进行一次膨胀操作。
发明内容
本发明提供一种地图数据源处理方法、地图更新方法及设备、存储介质,在地图数据源上进行膨胀,以在更新地图后无需再在地图上膨胀。
本发明实施例第一方面,提供一种地图数据源处理方法,包括:
从地图数据源中确定待膨胀的目标像素;
确定膨胀所述目标像素时所需的膨胀参数;
依据所述膨胀参数对所述地图数据源的目标像素进行膨胀,
本发明实施例第二方面,提供一种电子设备,包括:存储器和处理器;
所述存储器,用于存储程序代码;
所述处理器,用于调用所述程序代码,当程序代码被执行时,用于执行 以下操作:
从地图数据源中确定待膨胀的目标像素;
确定膨胀所述目标像素时所需的膨胀参数;
依据所述膨胀参数对所述地图数据源的目标像素进行膨胀。
本发明实施例第三方面,提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机指令,所述计算机指令被执行时,实现本发明实施例第一方面所述的地图数据源处理方法。
本发明实施例第四方面,提供一种地图更新方法,包括:
如本发明实施例第一方面所述的地图数据源处理方法;及
利用膨胀所述目标像素后的地图数据源更新已生成的地图。
本发明实施例第五方面,提供一种电子设备,包括:存储器和处理器;
所述存储器,用于存储程序代码;
所述处理器,用于调用所述程序代码,当程序代码被执行时实现如本发明实施例第四方面所述的地图更新方法。
本发明实施例第六方面,提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机指令,所述计算机指令被执行时,实现本发明实施例第四方面所述的地图更新方法。
基于上述技术方案,本发明实施例中,在用于更新地图的地图数据源上确定目标像素,并针对目标像素完成膨胀过程,相对于直接在地图中进行膨胀而言,处理复杂度大大降低,也避免了每次更新都需要在地图中重新做一次膨胀的问题;在确定目标像素后,再确定该目标像素对应的膨胀参数,使得每个目标像素都可利用合适的膨胀参数执行膨胀,膨胀效果更好。
附图说明
为了更加清楚地说明本发明实施例中的技术方案,下面将对本发明实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅 是本发明中记载的一些实施例,对于本领域普通技术人员来讲,还可以根据本发明实施例的这些附图获得其它的附图。
图1是本发明一实施例的地图数据源处理方法的流程示意图;
图2是本发明一实施例的地图数据源的目标像素膨胀时的示意图;
图3和图4是本发明一实施例的利用目标像素膨胀后的地图数据源所更新地图的效果对比示意图;
图5和图6是本发明一实施例的利用目标像素膨胀后的地图数据源所更新地图的效果对比图;
图7是本发明一实施例的电子设备的结构框图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。另外,在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。
本发明使用的术语仅仅是出于描述特定实施例的目的,而非限制本发明。本发明和权利要求书所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其它含义。应当理解的是,本文中使用的术语“和/或”是指包含一个或多个相关联的列出项目的任何或所有可能组合。
尽管在本发明可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语用来将同一类型的信息彼此区分开。例如,在不脱离本发明范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,此外,所使用的词语“如果”可以被解释成为“在……时”,或者,“当……时”,或者,“响应于确定”。
本发明实施例中提出一种地图数据源处理方法,可在地图数据源用于更新地图之前先执行完膨胀操作,使得利用对需膨胀的像素完成膨胀操作的地图数据源更新地图后,更新的地图已形成了安全范围,无需再在地图上执行膨胀操作。
本发明实施例中还提出一种地图更新方法,可利用本发明实施例的地图数据源处理方法得到膨胀目标像素后的地图数据源,利用膨胀目标像素后的地图数据源更新地图,更新后的地图都已具备了所需的安全范围,因而每次更新后无需再在地图上执行膨胀操作。
在地图上执行膨胀操作相对于在地图数据源上执行膨胀操作而言,复杂度会高很多,并且因为每次更新部分地图经都需要进行膨胀会导致地图中部分目标的膨胀过度,因此需要在地图中选择部分进行膨胀,因而本发明实施例中在地图数据源上执行膨胀操作,可降低处理的复杂度。
地图数据源处理方法及地图更新方法的执行主体可以为电子设备,当然可以是同一个或不同个电子设备。电子设备具体类型不限,电子设备可以是成像设备但不限于成像设备。电子设备例如也可以是与成像设备电连接的设备,可获取成像设备的地图数据源,进而执行相应的方法。
电子设备为成像设备时,可以是具有图像采集功能的可移动设备,具体可以是安装有相机的无人驾驶的汽车、自动飞行的无人机、自动行走的机器人等。以无人机为例,无人机在飞行过程中可通过采集图像而获得地图数据源,而后执行地图数据源处理方法。
下面结合具体实施例,对地图数据源处理的过程进行说明,但不作为限制。
在一个实施例中,参看图1,一种地图数据源处理方法可以包括以下步骤:
S100:从地图数据源中确定待膨胀的目标像素;
S200:确定膨胀所述目标像素时所需的膨胀参数;
S300:依据所述膨胀参数对地图数据源的所述目标像素进行膨胀。
具体地,所述方法的执行主体可以为电子设备,进一步地可以为电子设 备的处理器,其中,所述处理器可以为一个或多个,所述处理器可以为通用处理器或者专用处理器。
电子设备可以是成像设备本身,或者和成像设备连接,下面以电子设备为成像设备展开描述。成像设备可以采集图像,成像设备所采集的图像可以是双目图像。处理器可以获取采集的双目图像,对双目图像处理得到地图数据源,使得所得到的地图数据源中的像素的像素特征包括深度值或视差值,地图数据源也不限于通过双目图像经处理得到,也可以是多帧单目图像经处理后得到。当然地图数据源中的像素的像素特征也不一定包括深度值或视差值,可视具体地图更新所需的信息确定。
在步骤S100中,处理器从地图数据源中确定待膨胀的目标像素。
地图数据源中并非每个像素都需要进行膨胀,例如是但不限于像素特征异常的像素或者是对应实际场景中过远物体的像素,因而需要从地图数据源中确定待膨胀的目标像素。
步骤S100中的地图数据源可以用于更新地图但未经膨胀操作,其与最终进行膨胀操作的地图数据源可以是同一份地图数据源,或者是两份像素的像素特征完全一致的地图数据源,等等。
换言之,可以从地图数据源上确定目标像素后,直接在该地图数据源上执行目标像素的膨胀操作;或者,可以先从地图数据源上确定目标像素,而后在复制该地图数据源所得的复制地图数据源上执行目标像素的膨胀操作。甚至可以是,从地图数据源上确定目标像素,存储目标像素的坐标,在像素的像素特征为预设空白值的数据源的对应坐标上复制这些目标像素的像素特征并执行对这些目标像素膨胀,确定所有被膨胀像素的像素特征后,再利用这些被膨胀像素的像素特征修改该地图数据源,得到膨胀操作后的地图数据源。
在步骤S200中,处理器确定膨胀所述目标像素时所需的膨胀参数。目标像素时所需的膨胀参数可以相同或不同,可使得目标像素得到最合适的膨胀。目标像素时所需的膨胀参数可以是预先配置,也可以计算得到,具体不限。
相关的在地图上执行膨胀时,膨胀的半径都是相同的,膨胀效果不够好。例如,对场景中近距离物体的像素和远距离物体的像素执行相同半径的膨胀,会导致近距离物体的像素膨胀不足或者远距离物体的像素膨胀过度的问题,当然上述问题仅是无法视需要确定膨胀半径的其中一个不足,还有可能存在其他的问题。
而本发明实施例中,在对目标像素膨胀之前,先确定膨胀所述目标像素时所需的膨胀参数,使得每个目标像素最终得到所需的膨胀效果,可解决上述问题。
在步骤S300中,处理器依据所述膨胀参数对地图数据源的所述目标像素进行膨胀。在目标像素及对应的膨胀参数确定后即可执行膨胀操作。如前述的,可在确定目标像素所用的地图数据源上直接进行该目标像素的膨胀操作,也可以对与该确定目标像素所用的地图数据源相同的地图数据源上执行该目标像素的膨胀操作,只要确定目标像素所用的地图数据源与最终执行膨胀时用的地图数据源中的至少有用像素的像素特征一致即可。
有用像素是相对异常像素而言的正常像素,最终体作用于地图的像素。异常像素例如可以包括像素特征为预设空白值的像素、和/或像素特征相对相邻像素而言为突兀值的像素等。突兀值例如为像素特征与相邻像素特征的差值绝对值超过允许范围的像素。
可以理解,步骤S100-步骤S300的执行过程可以是,在步骤S100中每确定一个目标像素,便执行步骤S200和步骤S300,待针对该像素所执行的步骤S300完成后返回步骤S100继续执行,直至针对全部目标像素的膨胀操作均完成;或者,在步骤S100中确定多个或全部的目标像素后,再执行步骤S200和步骤S300。具体不限。
本发明实施例中,在用于更新地图的地图数据源上确定目标像素,并针对目标像素完成膨胀过程,相对于直接在地图中进行膨胀而言,处理复杂度大大降低,也避免了每次更新都需要在地图中重新做一次膨胀的问题;在确定目标像素后,再确定该目标像素对应的膨胀参数,使得每个目标像素都可 利用合适的膨胀参数执行膨胀,膨胀效果更好。
在一个实施例中,步骤S100中,从地图数据源中确定待膨胀的目标像素具体包括以下步骤:
S101:遍历所述地图数据源中的像素;
S102:判断遍历到的像素的像素特征是否满足膨胀条件,如果是,则确定遍历到的像素为待膨胀的目标像素。
步骤S101中,处理器遍历所述地图数据源中的像素。遍历过程可以过滤掉异常像素及不需要膨胀的有用像素,可以在膨胀条件中设置相应的过滤条件。
步骤S102中,如果遍历到的像素的像素特征满足膨胀条件,则该像素为待膨胀的目标像素,否则可以跳过该像素。可以每遍历到一个目标像素后便执行后续的步骤S200和S300,执行完之后再继续遍历下一个像素,直至全部像素遍历完。或者,可以遍历完全部像素得到全部的目标像素后,再执行后续的步骤S200和S300,对这些目标像素的信息进行记录即可。
遍历的顺序不限,可以按行遍历,也可以按列遍历,或者其他顺序遍历,只要将地图数据源中的至少有用像素遍历到即可。
膨胀条件例如可以用于选出场景中近距离物体的像素作为目标像素。在具体应用中通常会更加关注近距离的障碍物,因此只对场景中近距离障碍物的像素进行膨胀具有更好的性价比。如果在地图中直接膨胀,需要对地图中障碍物区域进行遍历,然后再对近距离障碍物点进行膨胀,操作会非常耗时,由于地图是三维数据,遍历过程需要对地图中每个点计算到成像设备的距离。
本发明实施例中,在地图数据源上进行膨胀,由于是二维数据,通过遍历并进行膨胀条件的判断,便可快速找到近距离物体的像素,操作难度及耗时相较于在地图上直接膨胀而言都可大大降低。
优选的,所述像素的像素特征可以为所述像素的视差值。步骤S102中,所述判断遍历到的像素的像素特征是否满足膨胀条件可以包括:
判断遍历到的像素的视差值是否大于预设的视差阈值,如果是,确定遍 历到的像素的像素特征满足膨胀条件,如果否,确定遍历到的像素的像素特征不满足膨胀条件。
视差值可以体现场景中物体距离成像设备的镜头之间的距离,距离越近则视差值越大,因而,若遍历到的像素的视差值大于预设的视差阈值,则说明相对来说是近距离的物体,满足膨胀条件,将该像素作为目标像素,否则跳过该像素。
优选的,所述像素的像素特征可以为所述像素的深度值。步骤S102中,所述判断遍历到的像素的像素特征是否满足膨胀条件可以包括:
判断遍历到的像素的深度值是否小于预设的深度阈值,如果是,确定遍历到的像素的像素特征满足膨胀条件,如果否,确定遍历到的像素的像素特征不满足膨胀条件。
深度值可以体现场景中物体距离成像设备的镜头之间的距离,距离越近则深度值越小,因而,若遍历到的像素的深度值是否小于预设的深度阈值,则说明相对来说是近距离的物体,满足膨胀条件,将该像素作为目标像素,否则跳过该像素。
视差值和深度值是可以相互转换的,因而地图数据源无论是视差图还是深度图,均可以采用上述两种方式来确定目标像素,即,将大于预设的视差阈值或小于预设的深度阈值作为比较条件,筛选出视差值或深度值符合条件的目标像素作为膨胀对象。
通过用像素的像素特征与视差阈值或深度阈值进行比较,选出视差值较大或深度值较小的目标像素,可具针对性地对近距离物体进行膨胀,对于一些远距离的物体不用膨胀,可在节省膨胀耗时同时保证需要的膨胀效果。
在一个实施例中,步骤S200中,所述确定膨胀所述目标像素时所需的膨胀参数具体包括以下步骤:
S201:获取所述目标像素的像素特征;
S202:依据所述目标像素的像素特征确定膨胀所述目标像素时所需的膨胀参数。
在步骤S201中,由于步骤S102中已经确定了目标像素,因而处理器可直接获取到该目标像素的像素特征。
在步骤S202中,在具体确定目标像素时所需的膨胀参数时,可以依据目标像素的像素特征确定。
例如,若像素的像素特征为视差值,则对于视差值越大的目标像素则确定可使目标像素在更大范围内膨胀的膨胀参数,对于视差值越小的目标像素则确定可使目标像素在更小范围内膨胀的膨胀参数;又如,若像素的像素特征为深度值,则对于深度值越小的目标像素则确定可使目标像素在更大范围内膨胀的膨胀参数,对于深度值越大的目标像素则确定可使目标像素在更小范围内膨胀的膨胀参数。如此可以依据场景中距离远近来确定膨胀范围,而非是等半径地进行膨胀,膨胀更具层次性,膨胀效果更好。
针对每个目标像素依据其像素特征来确定膨胀参数,可得到最佳的膨胀效果。当然也可以将所有目标像素的膨胀参数设置为相同,最终所有目标像素进行等半径的膨胀,具体不限,同样可实现更新地图后具备膨胀效果而无需在地图上进行膨胀。
在一个实施例中,所述地图数据源可以为视差图,所述目标像素的像素特征为目标像素的视差值。
视差图中像素的像素特征是视差值。视差图可以通过成像设备的双目镜头采集的双目图像确定,由于双目镜头在物理上的间距导致双目图像上会存在视差,根据视差值可以确定场景中目标的距离。
优选的,步骤S202中,所述依据目标像素的像素特征确定膨胀所述目标像素时所需的膨胀参数包括以下步骤:
S2021:在已建立的视差值与视差膨胀偏移量之间的对应关系中确定所述目标像素的视差值对应的视差膨胀偏移量,依据确定的视差膨胀偏移量确定膨胀所述目标像素时所需的膨胀参数。
已建立的视差值与视差膨胀偏移量之间的对应关系例如是,每条记录为视差值与对应视差膨胀偏移量的表格,通过视差值查找表格便可确定对应的 视差膨胀偏移量。而后,依据确定的视差膨胀偏移量确定膨胀所述目标像素时所需的膨胀参数。
可以理解,可以直接将视差膨胀偏移量确定为膨胀参数,或者将对视差膨胀偏移量进行一定运算后的值确定为膨胀参数。例如,在视差膨胀偏移量包括左视差膨胀偏移量和右视差膨胀偏移量时可以利用两者计算均值并将均值作为膨胀参数,或者,直接用左视差膨胀偏移量和右视差膨胀偏移量作为膨胀参数以在膨胀时左右分别依据左视差膨胀偏移量和右视差膨胀偏移量进行不等长膨胀。又如,视差膨胀偏移量即为一个视差膨胀偏移量,直接作为膨胀参数进行膨胀。
当然,视差值与视差膨胀偏移量之间的对应关系也可以用其他的数据结构实现,具体不限于表格的形式。
优选的,步骤S202中,所述依据目标像素的像素特征确定膨胀所述目标像素时所需的膨胀参数可以包括以下步骤:
S2022:将目标像素的视差值转换为目标像素的深度值;
S2023:在已建立的深度值与深度膨胀偏移量之间的对应关系中确定所述目标像素的深度值对应的深度膨胀偏移量;
S2024:将所述深度膨胀偏移量转换为视差膨胀偏移量,依据视差膨胀偏移量确定膨胀所述目标像素时所需的膨胀参数。
视差值disparity与深度值depth之间的换算公式如下:
disparity=focus*baseline/depth  (1)
上式(1)中,focus为成像设备的焦距,baseline为采集视差图对应的双目图像所用的成像设备的双目镜头之间的基线长度。
接着,步骤S2022中,可利用公式(1)将目标像素的视差值转换为目标像素的深度值。根据公式(1)可知,视差值与深度值之间是幂函数的关系,因而并非是线性。
S2023:在已建立的深度值与深度膨胀偏移量之间的对应关系中确定所述目标像素的深度值对应的深度膨胀偏移量。
已建立的深度值与深度膨胀偏移量之间的对应关系例如是,每条记录为深度值与对应深度膨胀偏移量的表格,通过深度值查找表格便可确定对应的深度膨胀偏移量。
具体的,已确定视差值对应的深度值depth,及深度值depth对应的深度膨胀偏移量plus和sub,可以确定膨胀深度值depth_plus和depth_sub,如下公式(2):
depth_plus=depth+plus,depth_sub=depth–sub(2)。
接着,在步骤S2024中,将所述深度膨胀偏移量转换为视差膨胀偏移量,依据视差膨胀偏移量确定膨胀所述目标像素时所需的膨胀参数,同样利用公式(1)完成转换。
将膨胀深度值depth_plus代入公式(1)可以得到对应的膨胀视差值disparity_sub,将膨胀深度值depth_sub代入公式(1)可以得到对应的膨胀视差值disparity_plus,从而可以计算出视差膨胀偏移量dis_sub、dis_plus:
disparity_sub=focus*baseline/depth_plus=disparity+dis_sub,(3)
disparity_plus=focus*baseline/depth_sub=disparity+dis_plus  (4)。
进一步的,步骤S2021或S2024中,依据视差膨胀偏移量确定膨胀所述目标像素时所需的膨胀参数包括以下步骤:依据视差膨胀偏移量确定膨胀半径;将所述膨胀半径确定为膨胀所述目标像素时所需的膨胀参数。
具体的,完成上述公式(3)和(4)的计算之后,可依据视差膨胀偏移量dis_sub、dis_plus可确定膨胀半径radius,例如下述公式(5):
膨胀半径radius=(dis_sub+dis_plus)/2  (5)。
当然,取视差膨胀偏移量dis_sub、dis_plus的均值作为膨胀半径只是一种可选的方式,当然还可以将视差膨胀偏移量dis_sub、dis_plus进行加权运算得到膨胀半径,或者直接取视差膨胀偏移量dis_sub、dis_plus中的一个值作为膨胀半径等,具体不限。如此,对于不同的视差值便可以获得对应的膨胀半径radius,将膨胀半径确定为膨胀目标像素时所需的膨胀参数。
由于地图数据源的膨胀最终需要呈现在地图中,因而可以依据地图中所 需要的膨胀量来确定,而地图中所需要的膨胀量可以用深度值的深度膨胀偏移量来直接衡量,而直接用视差值则较难衡量,因而采用转换为深度值后确定的深度膨胀偏移量,再以此的深度膨胀偏移量确定视差值对应的膨胀参数,更符合预期膨胀效果。
在一个实施例中,所述地图数据源可以为深度图,所述目标像素的像素特征为目标像素的深度值。
深度图中像素的像素特征是深度值。深度图可以通过成像设备的双目镜头采集的双目图像确定,根据深度值可以确定场景中目标的距离。
优选的,步骤S202中,所述依据所述目标像素的像素特征确定膨胀所述目标像素时所需的膨胀参数包括以下步骤:
S2025:在已建立的深度值与深度膨胀偏移量之间的对应关系中确定所述目标像素的深度值对应的深度膨胀偏移量,依据确定的深度膨胀偏移量确定膨胀所述目标像素时所需的膨胀参数。
已建立的深度值与深度膨胀偏移量之间的对应关系例如是,每条记录为深度值与对应深度膨胀偏移量的表格,通过深度值查找表格便可确定对应的深度膨胀偏移量。而后,依据确定的深度膨胀偏移量确定膨胀所述目标像素时所需的膨胀参数。
当然,深度值与深度膨胀偏移量之间的对应关系也可以用其他的数据结构实现,具体不限于表格的形式。
进一步的,步骤S2025中,依据深度膨胀偏移量确定膨胀所述目标像素时所需的膨胀参数包括以下步骤:依据深度膨胀偏移量确定膨胀半径;将所述膨胀半径确定为膨胀所述目标像素时所需的膨胀参数。例如可以直接将深度膨胀偏移量作为膨胀半径,并将此膨胀半径确定为膨胀所述目标像素时所需的膨胀参数。
在一个实施例中,步骤S300中,所述依据所述膨胀参数对地图数据源的所述目标像素进行膨胀包括以下步骤:
S301:在所述地图数据源上以所述目标像素为中心按照所述膨胀参数在 所述目标像素的左右方向膨胀所述目标像素。
地图数据源上的左右方向即为水平方向,与采集地图数据源对应图像所用的双目镜头的左右方向一致,由于双目镜头中两个镜头是左右关系,因而仅会在水平方向存在视差,因而地图数据源上的只需要以目标像素为中心进行左右膨胀即可,按照膨胀参数膨胀相应的范围。
在一个实施例中,所述膨胀参数为膨胀半径。步骤S301中,所述在地图数据源上以所述目标像素为中心按照所述膨胀参数在所述目标像素的左右方向膨胀所述目标像素包括以下步骤:
S3011:确定以所述目标像素为中心沿着所述目标像素的左右方向且半径为所述膨胀半径的目标区域;
S3012:依据所述目标区域膨胀所述目标像素。
在步骤S3011中,先以目标像素为中心按照膨胀参数确定一目标区域,膨胀参数为膨胀半径,以所述目标像素为中心沿着所述目标像素的左右方向确定目标区域,其中,沿着所述目标像素的左右方向往左确定长度为膨胀半径的第一区域,沿着所述目标像素的左右方向的往右确定长度为膨胀半径的第二区域,第一区域、目标像素及第二区域构成所述目标区域。
步骤S3012中,依据所述目标区域膨胀所述目标像素。由于地图数据源中会存在较多目标像素,因而目标区域可能存在重叠,可以依据目标区域之间是否存在重叠来膨胀目标像素,当然,也可以将目标像素在目标区域内直接膨胀。
优选的,步骤S3012中,所述依据所述目标区域膨胀所述目标像素,包括:
当目标区域不存在被膨胀的像素时,将目标区域中各像素的指定像素特征修改为目标像素的指定像素特征;
当目标区域存在被膨胀的像素时,将目标区域中未膨胀的各像素的指定像素特征修改为目标像素的指定像素特征,依据被膨胀的像素的指定像素特征与所述目标像素的指定像素特征确定所述被膨胀的像素的指定像素特征。
针对一个目标像素膨胀时,若目标区域不存在被膨胀的像素则直接膨胀,若存在被膨胀的像素,说明与其他的目标区域存在重叠,对目标区域中未被膨胀的像素修改为目标像素的指定像素特征,而重叠部分像素则进一步被膨胀的像素的指定像素特征与所述目标像素的指定像素特征确定,以得到更佳的膨胀效果。
具体的,参看图2,像素2和像素5为目标像素,像素2的目标区域为像素0-4,像素5的目标区域为像素2-8。在对像素2膨胀时,由于像素0-4中没有被膨胀像素,可直接将像素0-4的像素特征修改为像素2的指定像素特征。在对像素5膨胀时,5-8是未膨胀过的像素,修改为目标像素的指定像素特征即可;而像素2-4是被膨胀过的像素,需要从被膨胀的像素的指定像素特征与像素5的指定像素特征中选择一个作为它最终的指定像素特征。可以选择被膨胀的像素的指定像素特征与像素5的指定像素特征中表示距离更近的一个作为它最终的指定像素特征。
优选的,指定像素特征为视差值,地图数据源相应为视差图。所述依据被膨胀的像素的指定像素特征与所述目标像素的指定像素特征确定所述被膨胀的像素的指定像素特征包括:
比较被膨胀的像素的视差值与所述目标像素的视差值;
若被膨胀的像素的视差值大于或等于所述目标像素的视差值,则维持被膨胀的像素的视差值;
若被膨胀的像素的视差值小于所述目标像素的视差值,则将被膨胀的像素的视差值修改为所述目标像素的视差值。
具体的,继续参看图2,像素2-4是被膨胀过的像素,从被膨胀的像素的视差值与像素5的视差值中选择较大者作为它最终的视差值,使得近距离物体优先被膨胀。
优选的,指定像素特征为深度值,地图数据源相应为视差图。所述依据被膨胀的像素的指定像素特征与所述目标像素的指定像素特征确定所述被膨胀的像素的指定像素特征包括:
比较被膨胀的像素的深度值与所述目标像素的深度值;
若被膨胀的像素的深度值小于或等于所述目标像素的深度值,则维持被膨胀的像素的深度值;
若被膨胀的像素的深度值大于所述目标像素的深度值,则将被膨胀的像素的深度值修改为所述目标像素的深度值。
具体的,继续参看图2,像素2-4是被膨胀过的像素,从被膨胀的像素的深度值与像素5的深度值中选择较小作为它最终的视差值,使得近距离物体优先被膨胀。
图3是利用未膨胀的地图数据源所更新地图的示意图,图4是利用已被膨胀的地图数据源所更新地图的示意图,虚线所框选出的人体对象是近距离物体,对比可见,人体对象在图4中得到了膨胀,而虚线框至外的物体为远距离物体在图4中未得到膨胀。
图5是利用未膨胀的地图数据源所更新地图的三维效果图,图6是利用已被膨胀的地图数据源所更新地图的三维效果图,实线所框选出的人体对象是近距离物体,对比可见,人体对象在图6中得到了膨胀,而实线框至外的物体为远距离物体在图4中未得到膨胀或未得到明显膨胀。
基于与上述地图数据源处理方法同样的构思,参看图7,一种电子设备100,包括:存储器101和处理器102(如一个或多个处理器)。电子设备具体类型不限,电子设备可以是成像设备但不限于成像设备。电子设备例如也可以是与成像设备电连接的设备,可获取成像设备的地图数据源,进而执行相应的方法。
在一个实施例中,所述存储器用于存储程序代码;所述处理器,用于调用所述程序代码,当程序代码被执行时,用于执行以下操作:
从地图数据源中确定待膨胀的目标像素;
确定膨胀所述目标像素时所需的膨胀参数;
依据所述膨胀参数对地图数据源的目标像素进行膨胀。
优选的,所述处理器从地图数据源中确定待膨胀的目标像素时具体用于:
遍历地图数据源中的像素;
判断遍历到的像素的像素特征是否满足膨胀条件,如果是,则确定遍历到的像素为待膨胀的目标像素。
优选的,所述像素的像素特征为所述像素的视差值;
所述判断遍历到的像素的像素特征是否满足膨胀条件包括:
判断遍历到的像素的视差值是否大于预设的视差阈值,如果是,确定遍历到的像素的像素特征满足膨胀条件,如果否,确定遍历到的像素的像素特征不满足膨胀条件。
优选的,所述像素的像素特征为所述像素的深度值;
所述处理器判断遍历到的像素的像素特征是否满足膨胀条件时具体用于:
判断遍历到的像素的深度值是否小于预设的深度阈值,如果是,确定遍历到的像素的像素特征满足膨胀条件,如果否,确定遍历到的像素的像素特征不满足膨胀条件。
优选的,所述处理器确定膨胀所述目标像素时所需的膨胀参数时具体用于:
获取所述目标像素的像素特征;
依据所述目标像素的像素特征确定膨胀所述目标像素时所需的膨胀参数。
优选的,所述地图数据源为视差图,所述目标像素的像素特征为目标像素的视差值。
优选的,所述处理器依据目标像素的像素特征确定膨胀所述目标像素时所需的膨胀参数时具体用于:
在已建立的视差值与视差膨胀偏移量之间的对应关系中确定所述目标像素的视差值对应的视差膨胀偏移量,依据确定的视差膨胀偏移量确定膨胀所述目标像素时所需的膨胀参数。
优选的,所述处理器依据目标像素的像素特征确定膨胀所述目标像素时 所需的膨胀参数时具体用于:
将目标像素的视差值转换为目标像素的深度值;
在已建立的深度值与深度膨胀偏移量之间的对应关系中确定所述目标像素的深度值对应的深度膨胀偏移量;
将所述深度膨胀偏移量转换为视差膨胀偏移量,依据视差膨胀偏移量确定膨胀所述目标像素时所需的膨胀参数。
优选的,所述处理器依据视差膨胀偏移量确定膨胀所述目标像素时所需的膨胀参数时具体用于:
依据视差膨胀偏移量确定膨胀半径;
将所述膨胀半径确定为膨胀所述目标像素时所需的膨胀参数。
优选的,所述地图数据源为深度图,所述目标像素的像素特征为目标像素的深度值。
优选的,所述处理器依据所述目标像素的像素特征确定膨胀所述目标像素时所需的膨胀参数时具体用于:
在已建立的深度值与深度膨胀偏移量之间的对应关系中确定所述目标像素的深度值对应的深度膨胀偏移量,依据确定的深度膨胀偏移量确定膨胀所述目标像素时所需的膨胀参数。
优选的,所述处理器依据深度膨胀偏移量确定膨胀所述目标像素时所需的膨胀参数时具体用于:
依据深度膨胀偏移量确定膨胀半径;
将所述膨胀半径确定为膨胀所述目标像素时所需的膨胀参数。
优选的,所述处理器依据所述膨胀参数对地图数据源的所述目标像素进行膨胀时具体用于:
在所述地图数据源上以所述目标像素为中心按照所述膨胀参数在所述目标像素的左右方向膨胀所述目标像素。
优选的,所述膨胀参数为膨胀半径;
所述处理器在地图数据源上以所述目标像素为中心按照所述膨胀参数在 所述目标像素的左右方向膨胀所述目标像素时具体用于:
确定以所述目标像素为中心沿着所述目标像素的左右方向且半径为所述膨胀半径的目标区域;
依据所述目标区域膨胀所述目标像素。
优选的,所述处理器依据所述目标区域膨胀所述目标像素时具体用于:
当目标区域不存在被膨胀的像素时,将目标区域中各像素的指定像素特征修改为目标像素的指定像素特征;
当目标区域存在被膨胀的像素时,将目标区域中未膨胀的各像素的指定像素特征修改为目标像素的指定像素特征,依据被膨胀的像素的指定像素特征与所述目标像素的指定像素特征确定所述被膨胀的像素的指定像素特征。
优选的,指定像素特征为视差值;
所述处理器依据被膨胀的像素的指定像素特征与所述目标像素的指定像素特征确定所述被膨胀的像素的指定像素特征时具体用于:
比较被膨胀的像素的视差值与所述目标像素的视差值;
若被膨胀的像素的视差值大于或等于所述目标像素的视差值,则维持被膨胀的像素的视差值;
若被膨胀的像素的视差值小于所述目标像素的视差值,则将被膨胀的像素的视差值修改为所述目标像素的视差值。
优选的,指定像素特征为深度值;
所述处理器依据被膨胀的像素的指定像素特征与所述目标像素的指定像素特征确定所述被膨胀的像素的指定像素特征时具体用于:
比较被膨胀的像素的深度值与所述目标像素的深度值;
若被膨胀的像素的深度值小于或等于所述目标像素的深度值,则维持被膨胀的像素的深度值;
若被膨胀的像素的深度值大于所述目标像素的深度值,则将被膨胀的像素的深度值修改为所述目标像素的深度值。
基于与上述方法同样的发明构思,一种计算机可读存储介质,所述计算 机可读存储介质上存储有计算机指令,所述计算机指令被执行时,实现前述实施例所述的地图数据源处理方法。
本发明实施例还提供一种地图更新方法,包括:
如前述实施例中所述的地图数据源处理方法;及
利用膨胀所述目标像素后的地图数据源更新已生成的地图。
基于与上述地图更新方法同样的构思,一种电子设备,包括:存储器和处理器(如一个或多个处理器)。电子设备具体类型不限,电子设备可以是成像设备但不限于成像设备。电子设备例如也可以是与成像设备电连接的设备,可获取成像设备的地图数据源,进而执行相应的方法。该电子设备可为图7示出的电子设备。
在一个实施例中,所述存储器,用于存储程序代码;
所述处理器,用于调用所述程序代码,当程序代码被执行时实现如前述实施例所述的地图更新方法。
基于与上述方法同样的发明构思,一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机指令,所述计算机指令被执行时,实现前述实施例所述的地图更新方法。
上述实施例阐明的***、装置、模块或单元,可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。
为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本发明时可以把各单元的功能在同一个或多个软件和/或硬件中实现。
本领域内的技术人员应明白,本发明实施例可提供为方法、***、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明实施例可采用在一个或 多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(***)、和计算机程序产品的流程图和/或方框图来描述的。应理解可以由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其它可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其它可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
而且,这些计算机程序指令也可以存储在能引导计算机或其它可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或者多个流程和/或方框图一个方框或者多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其它可编程数据处理设备,使得在计算机或者其它可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其它可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
以上所述仅为本发明实施例而已,并不用于限制本发明。对于本领域技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原理之内所作的任何修改、等同替换、改进,均应包含在本发明的权利要求范围之内。

Claims (38)

  1. 一种地图数据源处理方法,其特征在于,包括:
    从地图数据源中确定待膨胀的目标像素;
    确定膨胀所述目标像素时所需的膨胀参数;
    依据所述膨胀参数对地图数据源的所述目标像素进行膨胀。
  2. 如权利要求1所述的地图数据源处理方法,其特征在于,所述从地图数据源中确定待膨胀的目标像素包括:
    遍历地图数据源中的像素;
    判断遍历到的像素的像素特征是否满足膨胀条件,如果是,则确定遍历到的像素为待膨胀的目标像素。
  3. 如权利要求2所述的地图数据源处理方法,其特征在于,所述像素的像素特征为所述像素的视差值;
    所述判断遍历到的像素的像素特征是否满足膨胀条件包括:
    判断遍历到的像素的视差值是否大于预设的视差阈值,如果是,确定遍历到的像素的像素特征满足膨胀条件,如果否,确定遍历到的像素的像素特征不满足膨胀条件。
  4. 如权利要求2所述的地图数据源处理方法,其特征在于,
    所述像素的像素特征为所述像素的深度值;
    所述判断遍历到的像素的像素特征是否满足膨胀条件包括:
    判断遍历到的像素的深度值是否小于预设的深度阈值,如果是,确定遍历到的像素的像素特征满足膨胀条件,如果否,确定遍历到的像素的像素特征不满足膨胀条件。
  5. 如权利要求1所述的地图数据源处理方法,其特征在于,所述确定膨胀所述目标像素时所需的膨胀参数包括:
    获取所述目标像素的像素特征;
    依据所述目标像素的像素特征确定膨胀所述目标像素时所需的膨胀参数。
  6. 如权利要求5所述的地图数据源处理方法,其特征在于,所述地图数据源为视差图,所述目标像素的像素特征为目标像素的视差值。
  7. 如权利要求6所述的地图数据源处理方法,其特征在于,所述依据目标像素的像素特征确定膨胀所述目标像素时所需的膨胀参数包括:
    在已建立的视差值与视差膨胀偏移量之间的对应关系中确定所述目标像素的视差值对应的视差膨胀偏移量,依据确定的视差膨胀偏移量确定膨胀所述目标像素时所需的膨胀参数。
  8. 如权利要求6所述的地图数据源处理方法,其特征在于,所述依据目标像素的像素特征确定膨胀所述目标像素时所需的膨胀参数包括:
    将目标像素的视差值转换为目标像素的深度值;
    在已建立的深度值与深度膨胀偏移量之间的对应关系中确定所述目标像素的深度值对应的深度膨胀偏移量;
    将所述深度膨胀偏移量转换为视差膨胀偏移量,依据视差膨胀偏移量确定膨胀所述目标像素时所需的膨胀参数。
  9. 如权利要求7或8所述的地图数据源处理方法,其特征在于,依据视差膨胀偏移量确定膨胀所述目标像素时所需的膨胀参数包括:
    依据视差膨胀偏移量确定膨胀半径;
    将所述膨胀半径确定为膨胀所述目标像素时所需的膨胀参数。
  10. 如权利要求5所述的地图数据源处理方法,其特征在于,所述地图数据源为深度图,所述目标像素的像素特征为目标像素的深度值。
  11. 如权利要求10所述的地图数据源处理方法,其特征在于,所述依据所述目标像素的像素特征确定膨胀所述目标像素时所需的膨胀参数包括:
    在已建立的深度值与深度膨胀偏移量之间的对应关系中确定所述目标像素的深度值对应的深度膨胀偏移量,依据确定的深度膨胀偏移量确定膨胀所述目标像素时所需的膨胀参数。
  12. 如权利要求11所述的地图数据源处理方法,其特征在于,依据深度膨胀偏移量确定膨胀所述目标像素时所需的膨胀参数包括:
    依据深度膨胀偏移量确定膨胀半径;
    将所述膨胀半径确定为膨胀所述目标像素时所需的膨胀参数。
  13. 如权利要求1至12任一所述的地图数据源处理方法,其特征在于,所述依据所述膨胀参数对地图数据源的所述目标像素进行膨胀包括:
    在地图数据源上以所述目标像素为中心按照所述膨胀参数在所述目标像素的左右方向膨胀所述目标像素。
  14. 如权利要求13所述的地图数据源处理方法,其特征在于,所述膨胀参数为膨胀半径;
    所述在地图数据源上以所述目标像素为中心按照所述膨胀参数在所述目标像素的左右方向膨胀所述目标像素包括:
    确定以所述目标像素为中心沿着所述目标像素的左右方向且半径为所述膨胀半径的目标区域;
    依据所述目标区域膨胀所述目标像素。
  15. 如权利要求14所述的地图数据源处理方法,其特征在于,所述依据所述目标区域膨胀所述目标像素,包括:
    当目标区域不存在被膨胀的像素时,将目标区域中各像素的指定像素特征修改为目标像素的指定像素特征;
    当目标区域存在被膨胀的像素时,将目标区域中未膨胀的各像素的指定像素特征修改为目标像素的指定像素特征,依据被膨胀的像素的指定像素特征与所述目标像素的指定像素特征确定所述被膨胀的像素的指定像素特征。
  16. 如权利要求15所述的地图数据源处理方法,其特征在于,指定像素特征为视差值;
    所述依据被膨胀的像素的指定像素特征与所述目标像素的指定像素特征确定所述被膨胀的像素的指定像素特征包括:
    比较被膨胀的像素的视差值与所述目标像素的视差值;
    若被膨胀的像素的视差值大于或等于所述目标像素的视差值,则维持被膨胀的像素的视差值;
    若被膨胀的像素的视差值小于所述目标像素的视差值,则将被膨胀的像素的视差值修改为所述目标像素的视差值。
  17. 如权利要求15所述的地图数据源处理方法,其特征在于,指定像素特征为深度值;
    所述依据被膨胀的像素的指定像素特征与所述目标像素的指定像素特征确定所述被膨胀的像素的指定像素特征包括:
    比较被膨胀的像素的深度值与所述目标像素的深度值;
    若被膨胀的像素的深度值小于或等于所述目标像素的深度值,则维持被膨胀的像素的深度值;
    若被膨胀的像素的深度值大于所述目标像素的深度值,则将被膨胀的像素的深度值修改为所述目标像素的深度值。
  18. 一种电子设备,其特征在于,包括:存储器和处理器;
    所述存储器,用于存储程序代码;
    所述处理器,用于调用所述程序代码,当程序代码被执行时,用于执行以下操作:
    从地图数据源中确定待膨胀的目标像素;
    确定膨胀所述目标像素时所需的膨胀参数;
    依据所述膨胀参数对地图数据源的目标像素进行膨胀。
  19. 如权利要求18所述的设备,其特征在于,所述处理器从地图数据源中确定待膨胀的目标像素时具体用于:
    遍历地图数据源中的像素;
    判断遍历到的像素的像素特征是否满足膨胀条件,如果是,则确定遍历到的像素为待膨胀的目标像素。
  20. 如权利要求19所述的设备,其特征在于,所述像素的像素特征为所述像素的视差值;
    所述判断遍历到的像素的像素特征是否满足膨胀条件包括:
    判断遍历到的像素的视差值是否大于预设的视差阈值,如果是,确定遍 历到的像素的像素特征满足膨胀条件,如果否,确定遍历到的像素的像素特征不满足膨胀条件。
  21. 如权利要求19所述的地图数据源处理方法,其特征在于,
    所述像素的像素特征为所述像素的深度值;
    所述处理器判断遍历到的像素的像素特征是否满足膨胀条件时具体用于:
    判断遍历到的像素的深度值是否小于预设的深度阈值,如果是,确定遍历到的像素的像素特征满足膨胀条件,如果否,确定遍历到的像素的像素特征不满足膨胀条件。
  22. 如权利要求18所述的设备,其特征在于,所述处理器确定膨胀所述目标像素时所需的膨胀参数时具体用于:
    获取所述目标像素的像素特征;
    依据所述目标像素的像素特征确定膨胀所述目标像素时所需的膨胀参数。
  23. 如权利要求22所述的设备,其特征在于,所述地图数据源为视差图,所述目标像素的像素特征为目标像素的视差值。
  24. 如权利要求23所述的设备,其特征在于,所述处理器依据目标像素的像素特征确定膨胀所述目标像素时所需的膨胀参数时具体用于:
    在已建立的视差值与视差膨胀偏移量之间的对应关系中确定所述目标像素的视差值对应的视差膨胀偏移量,依据确定的视差膨胀偏移量确定膨胀所述目标像素时所需的膨胀参数。
  25. 如权利要求23所述的设备,其特征在于,所述处理器依据目标像素的像素特征确定膨胀所述目标像素时所需的膨胀参数时具体用于:
    将目标像素的视差值转换为目标像素的深度值;
    在已建立的深度值与深度膨胀偏移量之间的对应关系中确定所述目标像素的深度值对应的深度膨胀偏移量;
    将所述深度膨胀偏移量转换为视差膨胀偏移量,依据视差膨胀偏移量确 定膨胀所述目标像素时所需的膨胀参数。
  26. 如权利要求24或25所述的设备,其特征在于,所述处理器依据视差膨胀偏移量确定膨胀所述目标像素时所需的膨胀参数时具体用于:
    依据视差膨胀偏移量确定膨胀半径;
    将所述膨胀半径确定为膨胀所述目标像素时所需的膨胀参数。
  27. 如权利要求22所述的设备,其特征在于,所述地图数据源为深度图,所述目标像素的像素特征为目标像素的深度值。
  28. 如权利要求27所述的设备,其特征在于,所述处理器依据所述目标像素的像素特征确定膨胀所述目标像素时所需的膨胀参数时具体用于:
    在已建立的深度值与深度膨胀偏移量之间的对应关系中确定所述目标像素的深度值对应的深度膨胀偏移量,依据确定的深度膨胀偏移量确定膨胀所述目标像素时所需的膨胀参数。
  29. 如权利要求28所述的设备,其特征在于,所述处理器依据深度膨胀偏移量确定膨胀所述目标像素时所需的膨胀参数时具体用于:
    依据深度膨胀偏移量确定膨胀半径;
    将所述膨胀半径确定为膨胀所述目标像素时所需的膨胀参数。
  30. 如权利要求18至29任一所述的设备,其特征在于,所述处理器依据所述膨胀参数对地图数据源的所述目标像素进行膨胀时具体用于:
    在所述地图数据源上以所述目标像素为中心按照所述膨胀参数在所述目标像素的左右方向膨胀所述目标像素。
  31. 如权利要求30所述的设备,其特征在于,所述膨胀参数为膨胀半径;
    所述处理器在地图数据源上以所述目标像素为中心按照所述膨胀参数在所述目标像素的左右方向膨胀所述目标像素时具体用于:
    确定以所述目标像素为中心沿着所述目标像素的左右方向且半径为所述膨胀半径的目标区域;
    依据所述目标区域膨胀所述目标像素。
  32. 如权利要求31所述的设备,其特征在于,所述处理器依据所述目标 区域膨胀所述目标像素时具体用于:
    当目标区域不存在被膨胀的像素时,将目标区域中各像素的指定像素特征修改为目标像素的指定像素特征;
    当目标区域存在被膨胀的像素时,将目标区域中未膨胀的各像素的指定像素特征修改为目标像素的指定像素特征,依据被膨胀的像素的指定像素特征与所述目标像素的指定像素特征确定所述被膨胀的像素的指定像素特征。
  33. 如权利要求31所述的设备,其特征在于,指定像素特征为视差值;
    所述处理器依据被膨胀的像素的指定像素特征与所述目标像素的指定像素特征确定所述被膨胀的像素的指定像素特征时具体用于:
    比较被膨胀的像素的视差值与所述目标像素的视差值;
    若被膨胀的像素的视差值大于或等于所述目标像素的视差值,则维持被膨胀的像素的视差值;
    若被膨胀的像素的视差值小于所述目标像素的视差值,则将被膨胀的像素的视差值修改为所述目标像素的视差值。
  34. 如权利要求31所述的设备,其特征在于,指定像素特征为深度值;
    所述处理器依据被膨胀的像素的指定像素特征与所述目标像素的指定像素特征确定所述被膨胀的像素的指定像素特征时具体用于:
    比较被膨胀的像素的深度值与所述目标像素的深度值;
    若被膨胀的像素的深度值小于或等于所述目标像素的深度值,则维持被膨胀的像素的深度值;
    若被膨胀的像素的深度值大于所述目标像素的深度值,则将被膨胀的像素的深度值修改为所述目标像素的深度值。
  35. 一种计算机可读存储介质,其特征在于,
    所述计算机可读存储介质上存储有计算机指令,所述计算机指令被执行时,实现权利要求1-17任一项所述的地图数据源处理方法。
  36. 一种地图更新方法,其特征在于,包括:
    如权利要求1-17中任一项所述的地图数据源处理方法;及
    利用膨胀所述目标像素后的地图数据源更新已生成的地图。
  37. 一种电子设备,其特征在于,包括:存储器和处理器;
    所述存储器,用于存储程序代码;
    所述处理器,用于调用所述程序代码,当程序代码被执行时实现如权利要求36所述的地图更新方法。
  38. 一种计算机可读存储介质,其特征在于,
    所述计算机可读存储介质上存储有计算机指令,所述计算机指令被执行时,实现权利要求36所述的地图更新方法。
PCT/CN2018/097760 2018-07-31 2018-07-31 地图数据源处理方法、地图更新方法及设备、存储介质 WO2020024101A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/CN2018/097760 WO2020024101A1 (zh) 2018-07-31 2018-07-31 地图数据源处理方法、地图更新方法及设备、存储介质
CN201880039233.9A CN110770788A (zh) 2018-07-31 2018-07-31 地图数据源处理方法、地图更新方法及设备、存储介质
US17/154,887 US20210142444A1 (en) 2018-07-31 2021-01-21 Map data source processing method, map updating method, device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/097760 WO2020024101A1 (zh) 2018-07-31 2018-07-31 地图数据源处理方法、地图更新方法及设备、存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/154,887 Continuation US20210142444A1 (en) 2018-07-31 2021-01-21 Map data source processing method, map updating method, device, and storage medium

Publications (1)

Publication Number Publication Date
WO2020024101A1 true WO2020024101A1 (zh) 2020-02-06

Family

ID=69230755

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/097760 WO2020024101A1 (zh) 2018-07-31 2018-07-31 地图数据源处理方法、地图更新方法及设备、存储介质

Country Status (3)

Country Link
US (1) US20210142444A1 (zh)
CN (1) CN110770788A (zh)
WO (1) WO2020024101A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5170352A (en) * 1990-05-07 1992-12-08 Fmc Corporation Multi-purpose autonomous vehicle with path plotting
CN101840567A (zh) * 2010-04-23 2010-09-22 清华大学 保持图像拓扑结构的图像缩小方法
CN105607635A (zh) * 2016-01-05 2016-05-25 东莞市松迪智能机器人科技有限公司 自动导引车全景光学视觉导航控制***及全向自动导引车
CN106843282A (zh) * 2017-03-17 2017-06-13 东南大学 基于m100开发平台的区域完全搜索与避障***及方法
CN106821694A (zh) * 2017-01-18 2017-06-13 西南大学 一种基于智能手机的移动导盲***
CN108068817A (zh) * 2017-12-06 2018-05-25 张家港天筑基业仪器设备有限公司 一种无人驾驶汽车自动变道装置及方法

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102307312B (zh) * 2011-08-31 2013-06-05 四川虹微技术有限公司 一种对dibr技术生成的目标图像进行空洞填充的方法
WO2014045739A1 (ja) * 2012-09-19 2014-03-27 富士フイルム株式会社 画像処理装置、撮像装置、画像処理方法及び画像処理プログラム
CN105450946A (zh) * 2014-06-09 2016-03-30 华为技术有限公司 一种图像处理方法、装置及计算装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5170352A (en) * 1990-05-07 1992-12-08 Fmc Corporation Multi-purpose autonomous vehicle with path plotting
CN101840567A (zh) * 2010-04-23 2010-09-22 清华大学 保持图像拓扑结构的图像缩小方法
CN105607635A (zh) * 2016-01-05 2016-05-25 东莞市松迪智能机器人科技有限公司 自动导引车全景光学视觉导航控制***及全向自动导引车
CN106821694A (zh) * 2017-01-18 2017-06-13 西南大学 一种基于智能手机的移动导盲***
CN106843282A (zh) * 2017-03-17 2017-06-13 东南大学 基于m100开发平台的区域完全搜索与避障***及方法
CN108068817A (zh) * 2017-12-06 2018-05-25 张家港天筑基业仪器设备有限公司 一种无人驾驶汽车自动变道装置及方法

Also Published As

Publication number Publication date
CN110770788A (zh) 2020-02-07
US20210142444A1 (en) 2021-05-13

Similar Documents

Publication Publication Date Title
US11145078B2 (en) Depth information determining method and related apparatus
US10789719B2 (en) Method and apparatus for detection of false alarm obstacle
US20220371602A1 (en) Vehicle positioning method, apparatus, and controller, intelligent vehicle, and system
CN107160395B (zh) 地图构建方法及机器人控制***
WO2022121640A1 (zh) 机器人重定位方法、装置、机器人和可读存储介质
EP3886053A1 (en) Slam mapping method and system for vehicle
WO2018120040A1 (zh) 一种障碍物检测方法及装置
WO2019144827A1 (zh) 泊车路径获取方法、装置、计算机设备及存储介质
US10645365B2 (en) Camera parameter set calculation apparatus, camera parameter set calculation method, and recording medium
CN106599108A (zh) 一种三维环境中多模态环境地图构建方法
US20200359867A1 (en) Determining Region Attribute
KR20150144731A (ko) 다이렉트 트래킹을 이용하여 이동 로봇의 위치를 인식하기 위한 장치 및 그 방법
CN111123949A (zh) 机器人的避障方法、装置、机器人及存储介质
KR20150144730A (ko) ADoG 기반 특징점을 이용한 이동 로봇의 위치를 인식하기 위한 장치 및 그 방법
JP2006221603A (ja) 3次元情報復元装置、3次元情報復元方法および3次元情報復元プログラム
JP2020518925A (ja) 車両の運動を制御するシステム及び方法
CN113052907B (zh) 一种动态环境移动机器人的定位方法
WO2021249469A1 (zh) 栅格地图生成方法、装置及计算机可读存储介质
WO2021195939A1 (zh) 一种双目拍摄装置的外参的标定方法、可移动平台及***
CN114255323A (zh) 机器人、地图构建方法、装置和可读存储介质
CN111045433B (zh) 一种机器人的避障方法、机器人及计算机可读存储介质
WO2020024101A1 (zh) 地图数据源处理方法、地图更新方法及设备、存储介质
CN111882494A (zh) 位姿图处理方法、装置、计算机设备和存储介质
JP7278740B2 (ja) 移動体制御装置
WO2020024150A1 (zh) 地图处理方法、设备、计算机可读存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18928257

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18928257

Country of ref document: EP

Kind code of ref document: A1