2026-08-06 22:56:24 +00:00
<!-- HTML header for doxygen 1.9.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" lang = "en-US" >
< head >
< meta http-equiv = "Content-Type" content = "text/xhtml;charset=UTF-8" />
< meta http-equiv = "X-UA-Compatible" content = "IE=11" />
< meta name = "generator" content = "Doxygen 1.9.8" />
< meta name = "viewport" content = "width=device-width, initial-scale=1" />
< title > RTAB-Map: Random Sampling</ title >
< link href = "tabs.css" rel = "stylesheet" type = "text/css" />
< script type = "text/javascript" src = "jquery.js" ></ script >
< script type = "text/javascript" src = "dynsections.js" ></ script >
< link href = "navtree.css" rel = "stylesheet" type = "text/css" />
< script type = "text/javascript" src = "resize.js" ></ script >
< script type = "text/javascript" src = "navtreedata.js" ></ script >
< script type = "text/javascript" src = "navtree.js" ></ script >
< link href = "search/search.css" rel = "stylesheet" type = "text/css" />
< script type = "text/javascript" src = "search/searchdata.js" ></ script >
< script type = "text/javascript" src = "search/search.js" ></ script >
< link href = "doxygen.css" rel = "stylesheet" type = "text/css" />
< link href = "doxygen-awesome.css" rel = "stylesheet" type = "text/css" />
< link href = "custom.css" rel = "stylesheet" type = "text/css" />
< script type = "text/javascript" > window . RTABMAP_DOC_ROOT = "" ;</ script >
< script type = "text/javascript" src = "../versions.js" ></ script >
< script type = "text/javascript" src = "version-switcher.js" ></ script >
< script type = "text/javascript" src = "doxygen-awesome-darkmode-toggle.js" ></ script >
< script type = "text/javascript" > DoxygenAwesomeDarkModeToggle . init ();</ script >
</ head >
< body >
< div id = "top" > <!-- do not remove this div, it is closed by doxygen! -->
< div id = "titlearea" >
< table cellspacing = "0" cellpadding = "0" >
< tbody >
< tr id = "projectrow" >
< td id = "projectalign" >
2026-09-20 06:51:14 +00:00
< div id = "projectname" > RTAB-Map< span id = "projectnumber" >   0.23.12</ span >
2026-08-06 22:56:24 +00:00
</ div >
< div id = "projectbrief" > Real-Time Appearance-Based Mapping</ div >
</ td >
</ tr >
</ tbody >
</ table >
</ div >
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
var searchBox = new SearchBox ( "searchBox" , "search/" , '.html' );
/* @license-end */
</ script >
< script type = "text/javascript" src = "menudata.js" ></ script >
< script type = "text/javascript" src = "menu.js" ></ script >
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$ ( function () {
initMenu ( '' , true , false , 'search.php' , 'Search' );
$ ( document ). ready ( function () { init_search (); });
});
/* @license-end */
</ script >
< div id = "main-nav" ></ div >
</ div > <!-- top -->
< div id = "side-nav" class = "ui-resizable side-nav-resizable" >
< div id = "nav-tree" >
< div id = "nav-tree-contents" >
< div id = "nav-sync" class = "sync" ></ div >
</ div >
</ div >
< div id = "splitbar" style = "-moz-user-select:none;"
class = "ui-resizable-handle" >
</ div >
</ div >
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$ ( document ). ready ( function (){ initNavTree ( 'group__RandomSampling.html' , '' ); initResizable (); });
/* @license-end */
</ script >
< div id = "doc-content" >
<!-- window showing the filter options -->
< div id = "MSearchSelectWindow"
onmouseover = "return searchBox.OnSearchSelectShow()"
onmouseout = "return searchBox.OnSearchSelectHide()"
onkeydown = "return searchBox.OnSearchSelectKey(event)" >
</ div >
<!-- iframe showing the search results (closed by default) -->
< div id = "MSearchResultsWindow" >
< div id = "MSearchResults" >
< div class = "SRPage" >
< div id = "SRIndex" >
< div id = "SRResults" ></ div >
< div class = "SRStatus" id = "Loading" > Loading...</ div >
< div class = "SRStatus" id = "Searching" > Searching...</ div >
< div class = "SRStatus" id = "NoMatches" > No Matches</ div >
</ div >
</ div >
</ div >
</ div >
< div class = "header" >
< div class = "summary" >
< a href = "#func-members" > Functions</ a > </ div >
< div class = "headertitle" >< div class = "title" > Random Sampling</ div ></ div >
</ div > <!--header-->
< div class = "contents" >
< p > Randomly samples a subset of points from the input point cloud.
< a href = "#details" > More...</ a ></ p >
< table class = "memberdecls" >
< tr class = "heading" >< td colspan = "2" >< h2 class = "groupheader" >< a id = "func-members" name = "func-members" ></ a >
Functions</ h2 ></ td ></ tr >
< tr class = "memitem:ga8dadcd7fb9beedc839b54079c6e84701" id = "r_ga8dadcd7fb9beedc839b54079c6e84701" >< td class = "memItemLeft" align = "right" valign = "top" >< a id = "ga8dadcd7fb9beedc839b54079c6e84701" name = "ga8dadcd7fb9beedc839b54079c6e84701" ></ a >
pcl::PointCloud< pcl::PointXYZ > ::Ptr RTABMAP_CORE_EXPORT  </ td >< td class = "memItemRight" valign = "bottom" >< b > rtabmap::util3d::randomSampling</ b > (const pcl::PointCloud< pcl::PointXYZ > ::Ptr & cloud, int samples)</ td ></ tr >
< tr class = "memdesc:ga8dadcd7fb9beedc839b54079c6e84701" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Performs random sampling on a point cloud of type < code > pcl::PointXYZ</ code > . < br /></ td ></ tr >
< tr class = "separator:ga8dadcd7fb9beedc839b54079c6e84701" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:gaf323d2f6db341f7dd83893297b1f9693" id = "r_gaf323d2f6db341f7dd83893297b1f9693" >< td class = "memItemLeft" align = "right" valign = "top" >< a id = "gaf323d2f6db341f7dd83893297b1f9693" name = "gaf323d2f6db341f7dd83893297b1f9693" ></ a >
pcl::PointCloud< pcl::PointNormal > ::Ptr RTABMAP_CORE_EXPORT  </ td >< td class = "memItemRight" valign = "bottom" >< b > rtabmap::util3d::randomSampling</ b > (const pcl::PointCloud< pcl::PointNormal > ::Ptr & cloud, int samples)</ td ></ tr >
< tr class = "memdesc:gaf323d2f6db341f7dd83893297b1f9693" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Performs random sampling on a point cloud of type < code > pcl::PointNormal</ code > . < br /></ td ></ tr >
< tr class = "separator:gaf323d2f6db341f7dd83893297b1f9693" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:gac4f1ee370a918987a847d5d604601837" id = "r_gac4f1ee370a918987a847d5d604601837" >< td class = "memItemLeft" align = "right" valign = "top" >< a id = "gac4f1ee370a918987a847d5d604601837" name = "gac4f1ee370a918987a847d5d604601837" ></ a >
pcl::PointCloud< pcl::PointXYZRGB > ::Ptr RTABMAP_CORE_EXPORT  </ td >< td class = "memItemRight" valign = "bottom" >< b > rtabmap::util3d::randomSampling</ b > (const pcl::PointCloud< pcl::PointXYZRGB > ::Ptr & cloud, int samples)</ td ></ tr >
< tr class = "memdesc:gac4f1ee370a918987a847d5d604601837" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Performs random sampling on a point cloud of type < code > pcl::PointXYZRGB</ code > . < br /></ td ></ tr >
< tr class = "separator:gac4f1ee370a918987a847d5d604601837" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:ga7738134d7dec8f178a927dfe69fcb15a" id = "r_ga7738134d7dec8f178a927dfe69fcb15a" >< td class = "memItemLeft" align = "right" valign = "top" >< a id = "ga7738134d7dec8f178a927dfe69fcb15a" name = "ga7738134d7dec8f178a927dfe69fcb15a" ></ a >
pcl::PointCloud< pcl::PointXYZRGBNormal > ::Ptr RTABMAP_CORE_EXPORT  </ td >< td class = "memItemRight" valign = "bottom" >< b > rtabmap::util3d::randomSampling</ b > (const pcl::PointCloud< pcl::PointXYZRGBNormal > ::Ptr & cloud, int samples)</ td ></ tr >
< tr class = "memdesc:ga7738134d7dec8f178a927dfe69fcb15a" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Performs random sampling on a point cloud of type < code > pcl::PointXYZRGBNormal</ code > . < br /></ td ></ tr >
< tr class = "separator:ga7738134d7dec8f178a927dfe69fcb15a" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:gad6269088b589b735fd87e07d11bf2547" id = "r_gad6269088b589b735fd87e07d11bf2547" >< td class = "memItemLeft" align = "right" valign = "top" >< a id = "gad6269088b589b735fd87e07d11bf2547" name = "gad6269088b589b735fd87e07d11bf2547" ></ a >
pcl::PointCloud< pcl::PointXYZI > ::Ptr RTABMAP_CORE_EXPORT  </ td >< td class = "memItemRight" valign = "bottom" >< b > rtabmap::util3d::randomSampling</ b > (const pcl::PointCloud< pcl::PointXYZI > ::Ptr & cloud, int samples)</ td ></ tr >
< tr class = "memdesc:gad6269088b589b735fd87e07d11bf2547" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Performs random sampling on a point cloud of type < code > pcl::PointXYZI</ code > . < br /></ td ></ tr >
< tr class = "separator:gad6269088b589b735fd87e07d11bf2547" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:ga5e31a5d57029fddd20e5d57ecdfb1184" id = "r_ga5e31a5d57029fddd20e5d57ecdfb1184" >< td class = "memItemLeft" align = "right" valign = "top" >< a id = "ga5e31a5d57029fddd20e5d57ecdfb1184" name = "ga5e31a5d57029fddd20e5d57ecdfb1184" ></ a >
pcl::PointCloud< pcl::PointXYZINormal > ::Ptr RTABMAP_CORE_EXPORT  </ td >< td class = "memItemRight" valign = "bottom" >< b > rtabmap::util3d::randomSampling</ b > (const pcl::PointCloud< pcl::PointXYZINormal > ::Ptr & cloud, int samples)</ td ></ tr >
< tr class = "memdesc:ga5e31a5d57029fddd20e5d57ecdfb1184" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Performs random sampling on a point cloud of type < code > pcl::PointXYZINormal</ code > . < br /></ td ></ tr >
< tr class = "separator:ga5e31a5d57029fddd20e5d57ecdfb1184" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
</ table >
< a name = "details" id = "details" ></ a >< h2 class = "groupheader" > Detailed Description</ h2 >
< p > Randomly samples a subset of points from the input point cloud. </ p >
< p > This function uses the PCL (Point Cloud Library) < code > RandomSample</ code > filter to randomly select a specified number of points from the input cloud. It ensures the number of samples is greater than zero and returns a new point cloud containing the sampled points.</ p >
< dl class = "params" >< dt > Parameters</ dt >< dd >
< table class = "params" >
< tr >< td class = "paramname" > cloud</ td >< td > A pointer to the input point cloud from which to sample points. </ td ></ tr >
< tr >< td class = "paramname" > samples</ td >< td > The number of points to randomly sample from the input cloud. Must be > 0. </ td ></ tr >
</ table >
</ dd >
</ dl >
< dl class = "section return" >< dt > Returns</ dt >< dd > A pointer to a new point cloud containing the randomly sampled points.</ dd ></ dl >
< dl class = "exception" >< dt > Exceptions</ dt >< dd >
< table class = "exception" >
< tr >< td class = "paramname" > Assertion</ td >< td > failure if < code > samples < = 0</ code > . </ td ></ tr >
</ table >
</ dd >
</ dl >
</ div > <!-- contents -->
</ div > <!-- doc-content -->
<!-- start footer part -->
< div id = "nav-path" class = "navpath" > <!-- id is needed for treeview function! -->
< ul >
< li class = "footer" > Generated by < a href = "https://www.doxygen.org/index.html" >< img class = "footer" src = "doxygen.svg" width = "104" height = "31" alt = "doxygen" /></ a > 1.9.8 </ li >
</ ul >
</ div >
</ body >
</ html >