mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-05 17:47:49 +08:00
250 lines
37 KiB
HTML
250 lines
37 KiB
HTML
<!-- 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: corelib/include/rtabmap/core/Compression.h Source File</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">
|
|
<div id="projectname">RTAB-Map<span id="projectnumber"> 0.24.0</span>
|
|
</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>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(document).ready(function() { init_codefold(0); });
|
|
/* @license-end */
|
|
</script>
|
|
</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('Compression_8h_source.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="headertitle"><div class="title">Compression.h</div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">/*</span></div>
|
|
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">Copyright (c) 2010-2016, Mathieu Labbe - IntRoLab - Universite de Sherbrooke</span></div>
|
|
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">All rights reserved.</span></div>
|
|
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment"></span> </div>
|
|
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">Redistribution and use in source and binary forms, with or without</span></div>
|
|
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment">modification, are permitted provided that the following conditions are met:</span></div>
|
|
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment"> * Redistributions of source code must retain the above copyright</span></div>
|
|
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment"> notice, this list of conditions and the following disclaimer.</span></div>
|
|
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment"> * Redistributions in binary form must reproduce the above copyright</span></div>
|
|
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment"> notice, this list of conditions and the following disclaimer in the</span></div>
|
|
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment"> documentation and/or other materials provided with the distribution.</span></div>
|
|
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment"> * Neither the name of the Universite de Sherbrooke nor the</span></div>
|
|
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment"> names of its contributors may be used to endorse or promote products</span></div>
|
|
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment"> derived from this software without specific prior written permission.</span></div>
|
|
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment"></span> </div>
|
|
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment">THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND</span></div>
|
|
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment">ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</span></div>
|
|
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</span></div>
|
|
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment">DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY</span></div>
|
|
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="comment">DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES</span></div>
|
|
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment">(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;</span></div>
|
|
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="comment">LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</span></div>
|
|
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="comment">ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span></div>
|
|
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="comment">(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</span></div>
|
|
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="comment">SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></div>
|
|
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment">*/</span></div>
|
|
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div>
|
|
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="preprocessor">#ifndef COMPRESSION_H_</span></div>
|
|
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="preprocessor">#define COMPRESSION_H_</span></div>
|
|
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
|
|
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#include "rtabmap/core/rtabmap_core_export.h"</span> <span class="comment">// DLL export/import defines</span></div>
|
|
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> </div>
|
|
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="preprocessor">#include <rtabmap/core/rvl_codec.h></span></div>
|
|
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="preprocessor">#include <rtabmap/utilite/UThread.h></span></div>
|
|
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="preprocessor">#include <opencv2/opencv.hpp></span></div>
|
|
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div>
|
|
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacertabmap.html">rtabmap</a> {</div>
|
|
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
|
|
<div class="foldopen" id="foldopen00068" data-start="{" data-end="};">
|
|
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"><a class="line" href="classrtabmap_1_1CompressionThread.html"> 68</a></span><span class="keyword">class </span>RTABMAP_CORE_EXPORT <a class="code hl_class" href="classrtabmap_1_1CompressionThread.html">CompressionThread</a> : <span class="keyword">public</span> <a class="code hl_class" href="classUThread.html">UThread</a></div>
|
|
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span>{</div>
|
|
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span><span class="keyword">public</span>:</div>
|
|
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"><a class="line" href="classrtabmap_1_1CompressionThread.html#a6bdec4c44e47774291bc9f98b3b5c146"> 76</a></span> <a class="code hl_function" href="classrtabmap_1_1CompressionThread.html#a6bdec4c44e47774291bc9f98b3b5c146">CompressionThread</a>(<span class="keyword">const</span> cv::Mat & mat, <span class="keyword">const</span> std::string & format = <span class="stringliteral">""</span>);</div>
|
|
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"><a class="line" href="classrtabmap_1_1CompressionThread.html#a8cfe0e3d632c888c143b4e7902145fde"> 82</a></span> <a class="code hl_function" href="classrtabmap_1_1CompressionThread.html#a8cfe0e3d632c888c143b4e7902145fde">CompressionThread</a>(<span class="keyword">const</span> cv::Mat & bytes, <span class="keywordtype">bool</span> isImage);</div>
|
|
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"><a class="line" href="classrtabmap_1_1CompressionThread.html#a6908afb16364f91c7d0744decf6c970d"> 84</a></span> <span class="keyword">const</span> cv::Mat & <a class="code hl_function" href="classrtabmap_1_1CompressionThread.html#a6908afb16364f91c7d0744decf6c970d">getCompressedData</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> compressedData_;}</div>
|
|
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"><a class="line" href="classrtabmap_1_1CompressionThread.html#aafdc57cad744cbe94b30a8abfe7711a4"> 86</a></span> cv::Mat & <a class="code hl_function" href="classrtabmap_1_1CompressionThread.html#aafdc57cad744cbe94b30a8abfe7711a4">getUncompressedData</a>() {<span class="keywordflow">return</span> uncompressedData_;}</div>
|
|
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span><span class="keyword">protected</span>:</div>
|
|
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"><a class="line" href="classrtabmap_1_1CompressionThread.html#a4948c2a9c84ee4e15699f08c2d4bac22"> 88</a></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classrtabmap_1_1CompressionThread.html#a4948c2a9c84ee4e15699f08c2d4bac22">mainLoop</a>();</div>
|
|
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span><span class="keyword">private</span>:</div>
|
|
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> cv::Mat compressedData_;</div>
|
|
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> cv::Mat uncompressedData_;</div>
|
|
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> std::string format_;</div>
|
|
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="keywordtype">bool</span> image_;</div>
|
|
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="keywordtype">bool</span> compressMode_;</div>
|
|
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span>};</div>
|
|
</div>
|
|
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> </div>
|
|
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span><span class="comment">/*</span></div>
|
|
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span><span class="comment"> * Compressed depth image layouts (all values little-endian). They are stable: they are</span></div>
|
|
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span><span class="comment"> * saved in databases, and rtabmap_ros converts them to and from ROS's</span></div>
|
|
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span><span class="comment"> * compressed_depth_image_transport messages without decompressing the images.</span></div>
|
|
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span><span class="comment"> *</span></div>
|
|
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span><span class="comment"> * - ".png": a standard PNG file. 16UC1 depth images are 16 bits grayscale PNGs,</span></div>
|
|
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span><span class="comment"> * 32FC1 depth images (legacy) are 4-channel 8 bits PNGs holding the float bytes.</span></div>
|
|
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span><span class="comment"> * - ".rvl" (16UC1):</span></div>
|
|
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span><span class="comment"> * [0..7] "DEPTHRVL"</span></div>
|
|
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span><span class="comment"> * [8..11] uint32 cols</span></div>
|
|
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span><span class="comment"> * [12..15] uint32 rows</span></div>
|
|
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span><span class="comment"> * [16..] RVL data (see RvlCodec)</span></div>
|
|
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span><span class="comment"> * - ".png:<maxDepth>:<quantization>" or ".rvl:<maxDepth>:<quantization>" (32FC1):</span></div>
|
|
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span><span class="comment"> * [0..7] "DEPTHINV"</span></div>
|
|
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span><span class="comment"> * [8..11] float depthQuantA = quantization*(quantization+1)</span></div>
|
|
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span><span class="comment"> * [12..15] float depthQuantB = 1 - depthQuantA/maxDepth</span></div>
|
|
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span><span class="comment"> * [16..] the 16UC1 inverse depth image in ".png" or ".rvl" layout above, where</span></div>
|
|
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span><span class="comment"> * 0 is invalid and v>0 is the depth depthQuantA/(v-depthQuantB).</span></div>
|
|
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span><span class="comment"> */</span></div>
|
|
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> </div>
|
|
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"><a class="line" href="namespacertabmap.html#af79397e4c11daefaf353d14f943ae479"> 118</a></span><span class="keyword">const</span> <span class="keywordtype">char</span> <a class="code hl_variable" href="namespacertabmap.html#af79397e4c11daefaf353d14f943ae479">kCompressedDepthRvlSignature</a>[8] = {<span class="charliteral">'D'</span>, <span class="charliteral">'E'</span>, <span class="charliteral">'P'</span>, <span class="charliteral">'T'</span>, <span class="charliteral">'H'</span>, <span class="charliteral">'R'</span>, <span class="charliteral">'V'</span>, <span class="charliteral">'L'</span>};</div>
|
|
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"><a class="line" href="namespacertabmap.html#aaad2804128bde2d3e29f7e76ef4ccd9d"> 120</a></span><span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code hl_variable" href="namespacertabmap.html#aaad2804128bde2d3e29f7e76ef4ccd9d">kCompressedDepthRvlHeaderSize</a> = 16;</div>
|
|
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"><a class="line" href="namespacertabmap.html#ae70d840d2253bf8e575122336b51ee9b"> 122</a></span><span class="keyword">const</span> <span class="keywordtype">char</span> <a class="code hl_variable" href="namespacertabmap.html#ae70d840d2253bf8e575122336b51ee9b">kCompressedDepthInvSignature</a>[8] = {<span class="charliteral">'D'</span>, <span class="charliteral">'E'</span>, <span class="charliteral">'P'</span>, <span class="charliteral">'T'</span>, <span class="charliteral">'H'</span>, <span class="charliteral">'I'</span>, <span class="charliteral">'N'</span>, <span class="charliteral">'V'</span>};</div>
|
|
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"><a class="line" href="namespacertabmap.html#a6fe0f42207f43d29b6aa013e1a57fb6c"> 124</a></span><span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code hl_variable" href="namespacertabmap.html#a6fe0f42207f43d29b6aa013e1a57fb6c">kCompressedDepthInvHeaderSize</a> = 16;</div>
|
|
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> </div>
|
|
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"><a class="line" href="namespacertabmap.html#ac1d5a5ac072d725e236431b21946dc98"> 138</a></span><span class="keywordtype">bool</span> RTABMAP_CORE_EXPORT <a class="code hl_function" href="namespacertabmap.html#ac1d5a5ac072d725e236431b21946dc98">parseImageCompressionFormat</a>(<span class="keyword">const</span> std::string & format, std::string & codec, <span class="keywordtype">float</span> & maxDepth, <span class="keywordtype">float</span> & quantization);</div>
|
|
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> </div>
|
|
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"><a class="line" href="namespacertabmap.html#a52beb14eea422420c95fd69bdf3ab9dc"> 154</a></span>std::vector<unsigned char> RTABMAP_CORE_EXPORT <a class="code hl_function" href="namespacertabmap.html#a52beb14eea422420c95fd69bdf3ab9dc">compressImage</a>(<span class="keyword">const</span> cv::Mat & image, <span class="keyword">const</span> std::string & format = <span class="stringliteral">".png"</span>);</div>
|
|
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"><a class="line" href="namespacertabmap.html#abd9d5523210562abd9b5dc8fa9dbeb99"> 156</a></span>cv::Mat RTABMAP_CORE_EXPORT <a class="code hl_function" href="namespacertabmap.html#abd9d5523210562abd9b5dc8fa9dbeb99">compressImage2</a>(<span class="keyword">const</span> cv::Mat & image, <span class="keyword">const</span> std::string & format = <span class="stringliteral">".png"</span>);</div>
|
|
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> </div>
|
|
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"><a class="line" href="namespacertabmap.html#a462f181a147c9f5315f70b0cd89210e5"> 159</a></span>cv::Mat RTABMAP_CORE_EXPORT <a class="code hl_function" href="namespacertabmap.html#a462f181a147c9f5315f70b0cd89210e5">uncompressImage</a>(<span class="keyword">const</span> cv::Mat & bytes);</div>
|
|
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"><a class="line" href="namespacertabmap.html#af56ea8b86f7a873959588d35a7ede187"> 161</a></span>cv::Mat RTABMAP_CORE_EXPORT <a class="code hl_function" href="namespacertabmap.html#a462f181a147c9f5315f70b0cd89210e5">uncompressImage</a>(<span class="keyword">const</span> std::vector<unsigned char> & bytes);</div>
|
|
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"><a class="line" href="namespacertabmap.html#ab82c2ccce0996793c20ace4b13670711"> 163</a></span>cv::Mat RTABMAP_CORE_EXPORT <a class="code hl_function" href="namespacertabmap.html#a462f181a147c9f5315f70b0cd89210e5">uncompressImage</a>(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * bytes, <span class="keywordtype">size_t</span> size);</div>
|
|
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> </div>
|
|
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"><a class="line" href="namespacertabmap.html#a749adef593d09b887926afb6ebdb5834"> 166</a></span>std::vector<unsigned char> RTABMAP_CORE_EXPORT <a class="code hl_function" href="namespacertabmap.html#a749adef593d09b887926afb6ebdb5834">compressData</a>(<span class="keyword">const</span> cv::Mat & data);</div>
|
|
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"><a class="line" href="namespacertabmap.html#aca82ee9efc46461c648c7ab8999e1d5b"> 168</a></span>cv::Mat RTABMAP_CORE_EXPORT <a class="code hl_function" href="namespacertabmap.html#aca82ee9efc46461c648c7ab8999e1d5b">compressData2</a>(<span class="keyword">const</span> cv::Mat & data);</div>
|
|
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> </div>
|
|
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"><a class="line" href="namespacertabmap.html#a696fffaafe542bfb49fc9ab0da2c66b9"> 171</a></span>cv::Mat RTABMAP_CORE_EXPORT <a class="code hl_function" href="namespacertabmap.html#a696fffaafe542bfb49fc9ab0da2c66b9">uncompressData</a>(<span class="keyword">const</span> cv::Mat & bytes);</div>
|
|
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"><a class="line" href="namespacertabmap.html#aa15a9e946d6571254fc3c808b624e6cd"> 173</a></span>cv::Mat RTABMAP_CORE_EXPORT <a class="code hl_function" href="namespacertabmap.html#a696fffaafe542bfb49fc9ab0da2c66b9">uncompressData</a>(<span class="keyword">const</span> std::vector<unsigned char> & bytes);</div>
|
|
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"><a class="line" href="namespacertabmap.html#a5b02b6a5cd3c620aff7e76c05f78b20f"> 175</a></span>cv::Mat RTABMAP_CORE_EXPORT <a class="code hl_function" href="namespacertabmap.html#a696fffaafe542bfb49fc9ab0da2c66b9">uncompressData</a>(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * bytes, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> size);</div>
|
|
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> </div>
|
|
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"><a class="line" href="namespacertabmap.html#a4f0dfae296aa7029e959d573b286285a"> 178</a></span>cv::Mat RTABMAP_CORE_EXPORT <a class="code hl_function" href="namespacertabmap.html#a4f0dfae296aa7029e959d573b286285a">compressString</a>(<span class="keyword">const</span> std::string & str);</div>
|
|
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"><a class="line" href="namespacertabmap.html#a811701fc1452e49e82fcab8d4476832f"> 180</a></span>std::string RTABMAP_CORE_EXPORT <a class="code hl_function" href="namespacertabmap.html#a811701fc1452e49e82fcab8d4476832f">uncompressString</a>(<span class="keyword">const</span> cv::Mat & bytes);</div>
|
|
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> </div>
|
|
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"><a class="line" href="namespacertabmap.html#a67c525e80a7187b3106e5fd76155cabc"> 189</a></span>std::string RTABMAP_CORE_EXPORT <a class="code hl_function" href="namespacertabmap.html#a67c525e80a7187b3106e5fd76155cabc">compressedDepthFormat</a>(<span class="keyword">const</span> cv::Mat & bytes);</div>
|
|
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"><a class="line" href="namespacertabmap.html#ab5cb2dcd6db7fe3bbe25d847177582c2"> 191</a></span>std::string RTABMAP_CORE_EXPORT <a class="code hl_function" href="namespacertabmap.html#a67c525e80a7187b3106e5fd76155cabc">compressedDepthFormat</a>(<span class="keyword">const</span> std::vector<unsigned char> & bytes);</div>
|
|
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"><a class="line" href="namespacertabmap.html#a58b406e413250675abbf0ec2956e3de8"> 193</a></span>std::string RTABMAP_CORE_EXPORT <a class="code hl_function" href="namespacertabmap.html#a67c525e80a7187b3106e5fd76155cabc">compressedDepthFormat</a>(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * bytes, <span class="keywordtype">size_t</span> size);</div>
|
|
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> </div>
|
|
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> </div>
|
|
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span>} <span class="comment">/* namespace rtabmap */</span></div>
|
|
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span><span class="preprocessor">#endif </span><span class="comment">/* COMPRESSION_H_ */</span><span class="preprocessor"></span></div>
|
|
<div class="ttc" id="aclassUThread_html"><div class="ttname"><a href="classUThread.html">UThread</a></div><div class="ttdef"><b>Definition</b> <a href="UThread_8h_source.html#l00086">UThread.h:87</a></div></div>
|
|
<div class="ttc" id="aclassrtabmap_1_1CompressionThread_html"><div class="ttname"><a href="classrtabmap_1_1CompressionThread.html">rtabmap::CompressionThread</a></div><div class="ttdoc">Background thread to compress or uncompress images and generic matrices.</div><div class="ttdef"><b>Definition</b> <a href="Compression_8h_source.html#l00068">Compression.h:69</a></div></div>
|
|
<div class="ttc" id="aclassrtabmap_1_1CompressionThread_html_a4948c2a9c84ee4e15699f08c2d4bac22"><div class="ttname"><a href="classrtabmap_1_1CompressionThread.html#a4948c2a9c84ee4e15699f08c2d4bac22">rtabmap::CompressionThread::mainLoop</a></div><div class="ttdeci">virtual void mainLoop()</div></div>
|
|
<div class="ttc" id="aclassrtabmap_1_1CompressionThread_html_a6908afb16364f91c7d0744decf6c970d"><div class="ttname"><a href="classrtabmap_1_1CompressionThread.html#a6908afb16364f91c7d0744decf6c970d">rtabmap::CompressionThread::getCompressedData</a></div><div class="ttdeci">const cv::Mat & getCompressedData() const</div><div class="ttdef"><b>Definition</b> <a href="Compression_8h_source.html#l00084">Compression.h:84</a></div></div>
|
|
<div class="ttc" id="aclassrtabmap_1_1CompressionThread_html_a6bdec4c44e47774291bc9f98b3b5c146"><div class="ttname"><a href="classrtabmap_1_1CompressionThread.html#a6bdec4c44e47774291bc9f98b3b5c146">rtabmap::CompressionThread::CompressionThread</a></div><div class="ttdeci">CompressionThread(const cv::Mat &mat, const std::string &format="")</div><div class="ttdoc">Constructs a thread in compress mode.</div></div>
|
|
<div class="ttc" id="aclassrtabmap_1_1CompressionThread_html_a8cfe0e3d632c888c143b4e7902145fde"><div class="ttname"><a href="classrtabmap_1_1CompressionThread.html#a8cfe0e3d632c888c143b4e7902145fde">rtabmap::CompressionThread::CompressionThread</a></div><div class="ttdeci">CompressionThread(const cv::Mat &bytes, bool isImage)</div><div class="ttdoc">Constructs a thread in uncompress mode.</div></div>
|
|
<div class="ttc" id="aclassrtabmap_1_1CompressionThread_html_aafdc57cad744cbe94b30a8abfe7711a4"><div class="ttname"><a href="classrtabmap_1_1CompressionThread.html#aafdc57cad744cbe94b30a8abfe7711a4">rtabmap::CompressionThread::getUncompressedData</a></div><div class="ttdeci">cv::Mat & getUncompressedData()</div><div class="ttdef"><b>Definition</b> <a href="Compression_8h_source.html#l00086">Compression.h:86</a></div></div>
|
|
<div class="ttc" id="anamespacertabmap_html"><div class="ttname"><a href="namespacertabmap.html">rtabmap</a></div><div class="ttdef"><b>Definition</b> <a href="BayesFilter_8h_source.html#l00042">BayesFilter.h:42</a></div></div>
|
|
<div class="ttc" id="anamespacertabmap_html_a462f181a147c9f5315f70b0cd89210e5"><div class="ttname"><a href="namespacertabmap.html#a462f181a147c9f5315f70b0cd89210e5">rtabmap::uncompressImage</a></div><div class="ttdeci">cv::Mat RTABMAP_CORE_EXPORT uncompressImage(const cv::Mat &bytes)</div><div class="ttdoc">Decodes compressed image bytes to a @cv::Mat.</div></div>
|
|
<div class="ttc" id="anamespacertabmap_html_a4f0dfae296aa7029e959d573b286285a"><div class="ttname"><a href="namespacertabmap.html#a4f0dfae296aa7029e959d573b286285a">rtabmap::compressString</a></div><div class="ttdeci">cv::Mat RTABMAP_CORE_EXPORT compressString(const std::string &str)</div><div class="ttdoc">Compresses a null-terminated string using compressData2().</div></div>
|
|
<div class="ttc" id="anamespacertabmap_html_a52beb14eea422420c95fd69bdf3ab9dc"><div class="ttname"><a href="namespacertabmap.html#a52beb14eea422420c95fd69bdf3ab9dc">rtabmap::compressImage</a></div><div class="ttdeci">std::vector< unsigned char > RTABMAP_CORE_EXPORT compressImage(const cv::Mat &image, const std::string &format=".png")</div><div class="ttdoc">Encodes image to a byte buffer (OpenCV imencode or RVL for depth).</div></div>
|
|
<div class="ttc" id="anamespacertabmap_html_a67c525e80a7187b3106e5fd76155cabc"><div class="ttname"><a href="namespacertabmap.html#a67c525e80a7187b3106e5fd76155cabc">rtabmap::compressedDepthFormat</a></div><div class="ttdeci">std::string RTABMAP_CORE_EXPORT compressedDepthFormat(const cv::Mat &bytes)</div><div class="ttdoc">Detects the compression format of depth image bytes.</div></div>
|
|
<div class="ttc" id="anamespacertabmap_html_a696fffaafe542bfb49fc9ab0da2c66b9"><div class="ttname"><a href="namespacertabmap.html#a696fffaafe542bfb49fc9ab0da2c66b9">rtabmap::uncompressData</a></div><div class="ttdeci">cv::Mat RTABMAP_CORE_EXPORT uncompressData(const cv::Mat &bytes)</div><div class="ttdoc">Restores a matrix compressed with compressData() or compressData2().</div></div>
|
|
<div class="ttc" id="anamespacertabmap_html_a6fe0f42207f43d29b6aa013e1a57fb6c"><div class="ttname"><a href="namespacertabmap.html#a6fe0f42207f43d29b6aa013e1a57fb6c">rtabmap::kCompressedDepthInvHeaderSize</a></div><div class="ttdeci">const size_t kCompressedDepthInvHeaderSize</div><div class="ttdoc">Size of the inverse depth header: signature, float depthQuantA, float depthQuantB.</div><div class="ttdef"><b>Definition</b> <a href="Compression_8h_source.html#l00124">Compression.h:124</a></div></div>
|
|
<div class="ttc" id="anamespacertabmap_html_a749adef593d09b887926afb6ebdb5834"><div class="ttname"><a href="namespacertabmap.html#a749adef593d09b887926afb6ebdb5834">rtabmap::compressData</a></div><div class="ttdeci">std::vector< unsigned char > RTABMAP_CORE_EXPORT compressData(const cv::Mat &data)</div><div class="ttdoc">Compresses a matrix with zlib; appends rows, cols and type at the end.</div></div>
|
|
<div class="ttc" id="anamespacertabmap_html_a811701fc1452e49e82fcab8d4476832f"><div class="ttname"><a href="namespacertabmap.html#a811701fc1452e49e82fcab8d4476832f">rtabmap::uncompressString</a></div><div class="ttdeci">std::string RTABMAP_CORE_EXPORT uncompressString(const cv::Mat &bytes)</div><div class="ttdoc">Decompresses a string produced by compressString().</div></div>
|
|
<div class="ttc" id="anamespacertabmap_html_aaad2804128bde2d3e29f7e76ef4ccd9d"><div class="ttname"><a href="namespacertabmap.html#aaad2804128bde2d3e29f7e76ef4ccd9d">rtabmap::kCompressedDepthRvlHeaderSize</a></div><div class="ttdeci">const size_t kCompressedDepthRvlHeaderSize</div><div class="ttdoc">Size of the ".rvl" header: signature, uint32 cols, uint32 rows.</div><div class="ttdef"><b>Definition</b> <a href="Compression_8h_source.html#l00120">Compression.h:120</a></div></div>
|
|
<div class="ttc" id="anamespacertabmap_html_abd9d5523210562abd9b5dc8fa9dbeb99"><div class="ttname"><a href="namespacertabmap.html#abd9d5523210562abd9b5dc8fa9dbeb99">rtabmap::compressImage2</a></div><div class="ttdeci">cv::Mat RTABMAP_CORE_EXPORT compressImage2(const cv::Mat &image, const std::string &format=".png")</div><div class="ttdoc">Same as compressImage() but returns a CV_8UC1 row matrix.</div></div>
|
|
<div class="ttc" id="anamespacertabmap_html_ac1d5a5ac072d725e236431b21946dc98"><div class="ttname"><a href="namespacertabmap.html#ac1d5a5ac072d725e236431b21946dc98">rtabmap::parseImageCompressionFormat</a></div><div class="ttdeci">bool RTABMAP_CORE_EXPORT parseImageCompressionFormat(const std::string &format, std::string &codec, float &maxDepth, float &quantization)</div><div class="ttdoc">Parses an image compression format "<codec>[:<maxDepth>[:<quantization>]]".</div></div>
|
|
<div class="ttc" id="anamespacertabmap_html_aca82ee9efc46461c648c7ab8999e1d5b"><div class="ttname"><a href="namespacertabmap.html#aca82ee9efc46461c648c7ab8999e1d5b">rtabmap::compressData2</a></div><div class="ttdeci">cv::Mat RTABMAP_CORE_EXPORT compressData2(const cv::Mat &data)</div><div class="ttdoc">Same as compressData() but returns a CV_8UC1 row matrix.</div></div>
|
|
<div class="ttc" id="anamespacertabmap_html_ae70d840d2253bf8e575122336b51ee9b"><div class="ttname"><a href="namespacertabmap.html#ae70d840d2253bf8e575122336b51ee9b">rtabmap::kCompressedDepthInvSignature</a></div><div class="ttdeci">const char kCompressedDepthInvSignature[8]</div><div class="ttdoc">Signature of the inverse depth layout (8 bytes, not null-terminated).</div><div class="ttdef"><b>Definition</b> <a href="Compression_8h_source.html#l00122">Compression.h:122</a></div></div>
|
|
<div class="ttc" id="anamespacertabmap_html_af79397e4c11daefaf353d14f943ae479"><div class="ttname"><a href="namespacertabmap.html#af79397e4c11daefaf353d14f943ae479">rtabmap::kCompressedDepthRvlSignature</a></div><div class="ttdeci">const char kCompressedDepthRvlSignature[8]</div><div class="ttdoc">Signature of the ".rvl" layout (8 bytes, not null-terminated).</div><div class="ttdef"><b>Definition</b> <a href="Compression_8h_source.html#l00118">Compression.h:118</a></div></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_04d49acea3c42cab2afcd35cb2f2a48f.html">corelib</a></li><li class="navelem"><a class="el" href="dir_e996b11fd4b3a747423759b16a8ba4a6.html">include</a></li><li class="navelem"><a class="el" href="dir_ff01f7bc5399ccf9ff1cc91d1f45726a.html">rtabmap</a></li><li class="navelem"><a class="el" href="dir_884419f21456e80aa47bc1d0c2ab0140.html">core</a></li><li class="navelem"><b>Compression.h</b></li>
|
|
<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>
|