<trclass="memdesc:a179e07ca5bc9581ff4782ae8f9d33521"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Computes the Sum of Squared Differences (SSD) between two image patches. <br/></td></tr>
<trclass="memdesc:a4cd865b8edc489f950b0c1b5e1a0c992"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Computes the Sum of Absolute Differences (SAD) between two image patches. <br/></td></tr>
<trclass="memdesc:a53e2ae078c4c5c997fda9f1b6d1dda33"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Computes stereo correspondences between left and right images using a pyramidal window-based matching approach. <br/></td></tr>
<trclass="memdesc:a3d01284751a6b46770a28a7f63576600"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Computes sparse optical flow using a pyramidal Lucas-Kanade method constrained to the x-axis. <br/></td></tr>
<trclass="memdesc:ad7ea8d1905c7143d376c57c9e22dcea5"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Computes the disparity map from a pair of stereo images. <br/></td></tr>
<trclass="memdesc:a110359c4884579e1c7b68d8baa7acb6c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Converts a disparity map to a depth map using stereo camera parameters. <br/></td></tr>
<trclass="memitem:aacf89454b054d86b53a8038c8a404b50"id="r_aacf89454b054d86b53a8038c8a404b50"><tdclass="memItemLeft"align="right"valign="top">cv::Mat RTABMAP_CORE_EXPORT </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="namespacertabmap_1_1util2d.html#aacf89454b054d86b53a8038c8a404b50">depthFromStereoImages</a> (const cv::Mat &leftImage, const cv::Mat &rightImage, const std::vector< cv::Point2f >&leftCorners, float fx, float baseline, int flowWinSize=9, int flowMaxLevel=4, int flowIterations=20, double flowEps=0.02)</td></tr>
<trclass="memdesc:aacf89454b054d86b53a8038c8a404b50"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Computes a depth map from stereo image pairs using optical flow tracking. <br/></td></tr>
<trclass="memdesc:a4f10f8038c62a97d3a79bd2dc5bf2c58"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Computes a disparity map from stereo correspondences between two images. <br/></td></tr>
<trclass="memdesc:a6740b13198a2c437ab51d8e0503f2d33"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Converts a 32-bit float depth image (in meters) to a 16-bit unsigned depth image (in millimeters). <br/></td></tr>
<trclass="memdesc:a0e4631bed561b3a694a1a65853221f75"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Converts a 16-bit unsigned depth image (in millimeters) to a 32-bit float depth image (in meters). <br/></td></tr>
<trclass="memdesc:a48b07b02efba21a914db10e832589aba"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves a depth value from a depth image at a subpixel coordinate. <br/></td></tr>
<trclass="memdesc:ga79d3f93673fb236980f0be532695f478"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Computes a region of interest (ROI) in the image using string-defined ratios. <br/></td></tr>
<trclass="memdesc:ga2f0ffb8f6882e28709b03446d50250bb"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Computes a region of interest (ROI) from an image size and a string of ratios. <br/></td></tr>
<trclass="memdesc:ga81d9f49d117d02494c7ff57f5d426b15"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Computes a region of interest (ROI) in the image using float vector-defined ratios. <br/></td></tr>
<trclass="memdesc:ga56fed8ce688e8e9eb3b1f74ad0febcef"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Computes a region of interest (ROI) using float ratios and the image size. <br/></td></tr>
<trclass="memitem:a0b545a9f852684afb0a6d8f835f9eaf2"id="r_a0b545a9f852684afb0a6d8f835f9eaf2"><tdclass="memItemLeft"align="right"valign="top">cv::Mat RTABMAP_CORE_EXPORT </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="namespacertabmap_1_1util2d.html#a0b545a9f852684afb0a6d8f835f9eaf2">decimate</a> (const cv::Mat &image, int d)</td></tr>
<trclass="memdesc:a0b545a9f852684afb0a6d8f835f9eaf2"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Downsamples an image by a given decimation factor. <br/></td></tr>
<trclass="memitem:afc241016af8396edf5228dbe9e80ee8d"id="r_afc241016af8396edf5228dbe9e80ee8d"><tdclass="memItemLeft"align="right"valign="top">cv::Mat RTABMAP_CORE_EXPORT </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="namespacertabmap_1_1util2d.html#afc241016af8396edf5228dbe9e80ee8d">interpolate</a> (const cv::Mat &image, int factor, float depthErrorRatio=0.02f)</td></tr>
<trclass="memdesc:afc241016af8396edf5228dbe9e80ee8d"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Upsamples a depth image using bilinear interpolation with depth consistency check. <br/></td></tr>
<trclass="memdesc:a48a7e15282f392e77561dd96ed3320f9"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Registers a depth image to a different camera frame (typically RGB). <br/></td></tr>
<trclass="memitem:aeb3dee2cf6484f0b224d4687899cb004"id="r_aeb3dee2cf6484f0b224d4687899cb004"><tdclass="memItemLeft"align="right"valign="top">cv::Mat RTABMAP_CORE_EXPORT </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="namespacertabmap_1_1util2d.html#aeb3dee2cf6484f0b224d4687899cb004">fillDepthHoles</a> (const cv::Mat &depth, int maximumHoleSize=1, float errorRatio=0.02f)</td></tr>
<trclass="memdesc:aeb3dee2cf6484f0b224d4687899cb004"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Fills holes in the depth image using linear interpolation. <br/></td></tr>
<trclass="memdesc:afc6c9b3442c64ef2061365ead3923228"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Fill holes in a registered depth image using linear interpolation. <br/></td></tr>
<trclass="memdesc:a076914fde23d1323fccf71a794b9bc51"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Applies a 2D fast bilateral filter to a depth image. <br/></td></tr>
<trclass="memdesc:a7788d4dabf084959aa69162d5dbb2d2e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Filters out depth bleeding artifacts in a depth image. <br/></td></tr>
<trclass="memdesc:a89ec90b2659c764ba22b5c36d729c8f8"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Automatic brightness and contrast optimization with optional histogram clipping. <br/></td></tr>
<trclass="memdesc:ac38e8ed586d24c4b9fe72d64afeb9583"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Performs exposure fusion on a set of input images. <br/></td></tr>
<trclass="memdesc:ac29ac5b8bed26a5299d378708170dd11"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Converts a color from HSV (Hue, Saturation, Value) to RGB. <br/></td></tr>
<trclass="memitem:aafa9a426c8e7dd0359adf40e1b45ee1c"id="r_aafa9a426c8e7dd0359adf40e1b45ee1c"><tdclass="memItemLeft"align="right"valign="top">void RTABMAP_CORE_EXPORT </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="namespacertabmap_1_1util2d.html#aafa9a426c8e7dd0359adf40e1b45ee1c">NMS</a> (const std::vector< cv::KeyPoint >&ptsIn, const cv::Mat &descriptorsIn, std::vector< cv::KeyPoint >&ptsOut, cv::Mat &descriptorsOut, int dist_thresh, int img_width, int img_height)</td></tr>
<trclass="memdesc:aafa9a426c8e7dd0359adf40e1b45ee1c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Applies Non-Maximum Suppression (NMS) to a set of keypoints. <br/></td></tr>
<trclass="memitem:aa6957971e17f27bb066efe036d80fd46"id="r_aa6957971e17f27bb066efe036d80fd46"><tdclass="memItemLeft"align="right"valign="top">std::vector< int > RTABMAP_CORE_EXPORT </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="namespacertabmap_1_1util2d.html#aa6957971e17f27bb066efe036d80fd46">SSC</a> (const std::vector< cv::KeyPoint >&keypoints, int maxKeypoints, float tolerance, int cols, int rows, const std::vector< int >&indx={})</td></tr>
<trclass="memdesc:aa6957971e17f27bb066efe036d80fd46"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Applies the SSC (Suppression via Square Covering) algorithm to spatially select keypoints. <br/></td></tr>
<trclass="memdesc:a1577494ad9730181d5b768ca8237d5dd"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Rotates the input RGB and depth images to make them appear upright based on the camera's roll angle. <br/></td></tr>
<p>Computes the Sum of Squared Differences (SSD) between two image patches. </p>
<p>This function calculates the pixel-wise squared differences between corresponding elements in two input windows and accumulates the result into a single score. It supports grayscale 8-bit, 32-bit float, and 16-bit 2-channel short images (e.g., optical flow or stereo blocks).</p>
<p>Computes the Sum of Absolute Differences (SAD) between two image patches. </p>
<p>This function calculates the absolute pixel intensity difference between two windows and accumulates the result. It supports grayscale 8-bit, 32-bit float, and 16-bit 2-channel short images.</p>
<p>Computes stereo correspondences between left and right images using a pyramidal window-based matching approach. </p>
<p>This function estimates the right image positions of a set of corners detected in the left image using block matching. It supports both Sum of Absolute Differences (SAD) and Sum of Squared Differences (SSD) as the matching criteria, and uses a coarse-to-fine strategy over an image pyramid for robustness and subpixel accuracy.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir"></td><tdclass="paramname">leftImage</td><td>The left image (grayscale 8 bits or CV_8UC1). </td></tr>
<tr><tdclass="paramdir"></td><tdclass="paramname">rightImage</td><td>The right image (same type and size as <code>leftImage</code>). </td></tr>
<tr><tdclass="paramdir"></td><tdclass="paramname">leftCorners</td><td>The list of 2D points in the left image for which correspondences are to be found. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">status</td><td>Output status vector indicating the success of correspondence for each point. (1: valid correspondence found, 0: no valid match) </td></tr>
<tr><tdclass="paramdir"></td><tdclass="paramname">winSize</td><td>The size of the search window (should be odd). Will be made odd internally if not. Minimum size is 3. </td></tr>
<tr><tdclass="paramdir"></td><tdclass="paramname">maxLevel</td><td>The maximum level of the image pyramid to use for coarse-to-fine search. </td></tr>
<tr><tdclass="paramdir"></td><tdclass="paramname">iterations</td><td>Number of iterations for subpixel refinement (gradient descent-like search). </td></tr>
<tr><tdclass="paramdir"></td><tdclass="paramname">ssdApproach</td><td>If true, uses SSD (Sum of Squared Differences) as matching cost. If false, uses SAD (Sum of Absolute Differences).</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>A vector of 2D points corresponding to <code>leftCorners</code> but in the right image. The size of the output matches the input <code>leftCorners</code>. Invalid or rejected points are flagged in <code>status</code>.</dd></dl>
<dlclass="section note"><dt>Note</dt><dd>- Both input images must be rectified (i.e., correspondences lie along epipolar lines).<ul>
<li>This function modifies the search window to ensure it is odd-sized (required for accurate matching).</li>
<li>Subpixel accuracy is achieved using iterative matching and local refinement.</li>
<li>The disparity range is adaptive and refined at each pyramid level.</li>
<li>For accurate results, ensure good quality corner detection and well-rectified input images.</li>
<p>Computes sparse optical flow using a pyramidal Lucas-Kanade method constrained to the x-axis. </p>
<p>This function is a customized version of OpenCV's <code>cv::calcOpticalFlowPyrLK</code>, modified specifically for stereo matching scenarios. It assumes that the <code>prevImg</code> is the left stereo image and <code>nextImg</code> is the right stereo image. The optical flow is computed only along the x-axis (i.e., horizontal direction), which is typically valid in rectified stereo image pairs.</p>
<dlclass="section note"><dt>Note</dt><dd>The key modification to the original Lucas-Kanade implementation is the following: Instead of computing the flow in both x and y directions, the y-displacement is <b>forced to zero</b>: <divclass="fragment"><divclass="line"><spanclass="comment">// Original:</span></div>
</div><!-- fragment --> This ensures that flow estimation is constrained along the epipolar lines (x-direction only).</dd></dl>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">_prevImg</td><td>Input image from the previous frame (or left stereo image). Supports pyramid or raw image. </td></tr>
<tr><tdclass="paramname">_nextImg</td><td>Input image from the next frame (or right stereo image). Supports pyramid or raw image. </td></tr>
<tr><tdclass="paramname">_prevPts</td><td>Vector of 2D points for which the flow needs to be found (in <code>prevImg</code>). </td></tr>
<tr><tdclass="paramname">_nextPts</td><td>Output vector of 2D points containing the calculated new positions (in <code>nextImg</code>). If <code>OPTFLOW_USE_INITIAL_FLOW</code> is passed, it should contain initial guesses. </td></tr>
<tr><tdclass="paramname">_status</td><td>Output status vector. Each element is set to 1 if flow for the corresponding features has been found, 0 otherwise. </td></tr>
<tr><tdclass="paramname">_err</td><td>Optional output vector. Contains error or min eigenvalue values (depending on flags). </td></tr>
<tr><tdclass="paramname">winSize</td><td>Size of the search window at each pyramid level. </td></tr>
<tr><tdclass="paramname">maxLevel</td><td>0-based maximal pyramid level number. If set to 0, pyramids are not used (single level). </td></tr>
<tr><tdclass="paramname">criteria</td><td>Termination criteria for iterative search algorithm (maxCount and/or epsilon). </td></tr>
<p>Computes the disparity map from a pair of stereo images. </p>
<p>This function calculates a dense disparity map from the provided left and right stereo images. It assumes that the stereo pair is rectified and of the same size. The left image can be either grayscale (CV_8UC1) or color (CV_8UC3), while the right image must be grayscale (CV_8UC1).</p>
<p>If the left image is in color, it is first converted to grayscale before disparity computation. The actual disparity computation is delegated to a <code><aclass="el"href="classrtabmap_1_1StereoDense.html"title="Abstract base class for dense stereo matching algorithms.">StereoDense</a></code> object created using the provided parameters.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">leftImage</td><td>The left image of the stereo pair. Can be grayscale or BGR color. </td></tr>
<tr><tdclass="paramname">rightImage</td><td>The right image of the stereo pair. Must be grayscale. </td></tr>
<tr><tdclass="paramname">parameters</td><td>A map of parameters used to configure the stereo matching algorithm.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>A <code>cv::Mat</code> representing the computed disparity map. Some algorithms, like <aclass="el"href="classrtabmap_1_1StereoBM.html"title="Block Matching algorithm for dense stereo matching.">StereoBM</a> or <aclass="el"href="classrtabmap_1_1StereoSGBM.html"title="Semi-Global Block Matching algorithm for dense stereo matching.">StereoSGBM</a> compute 16-bit fixed-point disparity map (CV_16SC1) (where each disparity value has 4 fractional bits), whereas other algorithms output 32-bit floating-point (CV_32FC1) disparity map.</dd></dl>
<dlclass="section note"><dt>Note</dt><dd>The returned disparity map contains disparity values for each pixel in the left image. Pixels with no match may be set to 0 or a negative value depending on the stereo algorithm.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="classrtabmap_1_1StereoDense.html"title="Abstract base class for dense stereo matching algorithms.">rtabmap::StereoDense</a></dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>A depth image of the same resolution as the input disparity map.</dd></dl>
<dlclass="section warning"><dt>Warning</dt><dd>Logs a warning if any computed depth values exceed the maximum allowed by the CV_16UC1 format (65535 mm).</dd></dl>
<dlclass="exception"><dt>Exceptions</dt><dd>
<tableclass="exception">
<tr><tdclass="paramname">Assertion</td><td>failure if the disparity map is empty, has unsupported type, or output type is invalid. </td></tr>
<p>Computes a depth map from stereo image pairs using optical flow tracking. </p>
<p>This function estimates the depth of features tracked between the left and right rectified stereo images by computing sparse optical flow (via Lucas-Kanade) between provided feature points in the left image. It uses stereo triangulation based on the tracked correspondences and known camera intrinsics.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">leftImage</td><td>Grayscale rectified left image (CV_8UC1). </td></tr>
<tr><tdclass="paramname">rightImage</td><td>Grayscale rectified right image (CV_8UC1), must be same size as leftImage. </td></tr>
<tr><tdclass="paramname">leftCorners</td><td>Feature points (e.g., corners) detected in the left image. </td></tr>
<tr><tdclass="paramname">fx</td><td>Focal length of the camera in pixels (must be > 0). </td></tr>
<tr><tdclass="paramname">baseline</td><td>Distance between the left and right camera centers in meters (must be > 0). </td></tr>
<tr><tdclass="paramname">flowWinSize</td><td>Window size used for optical flow (e.g., 15 for 15x15). </td></tr>
<tr><tdclass="paramname">flowMaxLevel</td><td>Maximum pyramid level for optical flow. </td></tr>
<tr><tdclass="paramname">flowIterations</td><td>Maximum number of iterations for the iterative search algorithm in optical flow. </td></tr>
<tr><tdclass="paramname">flowEps</td><td>Desired accuracy for optical flow termination criteria.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>A depth map (CV_32FC1) with the same size as the input images. Pixels corresponding to successfully tracked features have valid depth values, while others are zero.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd>cv::calcOpticalFlowPyrLK, <aclass="el"href="namespacertabmap_1_1util2d.html#ae6548e6246eceaff5dcc9ee30514eac5"title="Computes a sparse depth map from corresponding stereo feature points.">rtabmap::util2d::depthFromStereoCorrespondences</a></dd></dl>
<p>Computes a disparity map from stereo correspondences between two images. </p>
<p>This function calculates the disparity map based on the given stereo correspondences (the left and right corners of features) and stores the resulting disparity values in a matrix. The disparity for each point is computed as the horizontal difference between the corresponding points in the left and right images. The function also accepts a mask to specify which points to include in the disparity computation.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">disparitySize</td><td>The size of the output disparity map. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">leftCorners</td><td>The list of points in the left image where features are detected. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">rightCorners</td><td>The list of points in the right image corresponding to the points in <code>leftCorners</code>. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">mask</td><td>A vector of flags indicating which correspondences to use for the disparity computation. An empty vector means all correspondences are included.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>A <code>cv::Mat</code> of type <code>CV_32FC1</code> representing the computed disparity map. Each pixel value corresponds to the disparity (horizontal difference between left and right image points) at that location.</dd></dl>
<dlclass="section note"><dt>Note</dt><dd>The disparity is computed as the horizontal difference between corresponding points in the left and right images, specifically the difference in the x-coordinates of the points. </dd>
<dd>
The disparity map is returned in floating point format, where the value represents the disparity in pixels.</dd></dl>
<dlclass="section warning"><dt>Warning</dt><dd>The function checks that all points are within the bounds of the disparity map. </dd></dl>
<p>Computes a sparse depth map from corresponding stereo feature points. </p>
<p>This function uses known corresponding 2D feature points from rectified stereo images to estimate depth via triangulation, using the disparity between matched points. The computed depth values are placed into a depth map at the locations of the left image points.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">leftImage</td><td>The left rectified grayscale image (used for image size reference). </td></tr>
<tr><tdclass="paramname">leftCorners</td><td>Feature points detected in the left image. </td></tr>
<tr><tdclass="paramname">rightCorners</td><td>Corresponding feature points in the right image (same size as leftCorners). </td></tr>
<tr><tdclass="paramname">mask</td><td>Optional binary mask indicating which correspondences are valid (1 = valid). If empty, all correspondences are considered valid. </td></tr>
<tr><tdclass="paramname">fx</td><td>Focal length of the camera in pixels (must be > 0). </td></tr>
<tr><tdclass="paramname">baseline</td><td>Distance between the stereo cameras in meters (must be > 0).</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>A sparse depth map (CV_32FC1) of the same size as the input image. Pixels corresponding to valid matches will contain depth values (in meters), while all others remain zero.</dd></dl>
<dlclass="section note"><dt>Note</dt><dd>It assumes stereo images are rectified and only x-axis disparity is present. </dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="namespacertabmap_1_1util2d.html#aacf89454b054d86b53a8038c8a404b50"title="Computes a depth map from stereo image pairs using optical flow tracking.">rtabmap::util2d::depthFromStereoImages</a></dd></dl>
<p>Converts a 32-bit float depth image (in meters) to a 16-bit unsigned depth image (in millimeters). </p>
<p>This function converts each valid depth value from meters to millimeters (by multiplying by 1000.0) and stores it as an unsigned 16-bit integer. Depth values outside the valid range (greater than 65535 mm) are clipped to zero and counted. A warning is printed if such values are found.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">depth32F</td><td>Input depth image of type CV_32FC1, where depth is in meters. May be empty.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>A 16-bit unsigned depth image (CV_16UC1) in millimeters. Returns an empty matrix if input is empty.</dd></dl>
<dlclass="section warning"><dt>Warning</dt><dd>If depth values exceed 65535 mm, they are ignored and a warning is issued.</dd></dl>
<dlclass="section note"><dt>Note</dt><dd>It's assumed that the input image is in meters (commonly used format for 32-bit depth maps). If it’s already in millimeters, do not use this function.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="namespacertabmap_1_1util2d.html#a0e4631bed561b3a694a1a65853221f75"title="Converts a 16-bit unsigned depth image (in millimeters) to a 32-bit float depth image (in meters).">rtabmap::util2d::cvtDepthToFloat()</a></dd></dl>
<p>Converts a 16-bit unsigned depth image (in millimeters) to a 32-bit float depth image (in meters). </p>
<p>This function converts each depth value from millimeters to meters by dividing by 1000.0. Useful when working with floating point depth operations or to standardize depth formats for computation or storage.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">depth16U</td><td>Input depth image of type CV_16UC1, where depth is in millimeters. May be empty.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>A 32-bit float depth image (CV_32FC1) with depth values in meters. Returns an empty matrix if input is empty.</dd></dl>
<dlclass="section note"><dt>Note</dt><dd>Use this function when you want to convert from 16-bit mm format to floating point meter format.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="namespacertabmap_1_1util2d.html#a6740b13198a2c437ab51d8e0503f2d33"title="Converts a 32-bit float depth image (in meters) to a 16-bit unsigned depth image (in millimeters).">rtabmap::util2d::cvtDepthFromFloat()</a></dd></dl>
<p>Retrieves a depth value from a depth image at a subpixel coordinate. </p>
<p>This function samples the depth value from a depth image (either in 16-bit unsigned integers representing millimeters or 32-bit floats representing meters) at a floating-point (x, y) coordinate. The value can be optionally smoothed using a weighted neighborhood, and fallback estimation from neighbors is possible if the depth at the target pixel is invalid or zero.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">depthImage</td><td>Input depth image. Must be of type CV_16UC1 (depth in mm) or CV_32FC1 (depth in meters). </td></tr>
<tr><tdclass="paramname">x</td><td>The subpixel X-coordinate in the image. </td></tr>
<tr><tdclass="paramname">y</td><td>The subpixel Y-coordinate in the image. </td></tr>
<tr><tdclass="paramname">smoothing</td><td>If true, apply a weighted 3x3 smoothing around the pixel. </td></tr>
<tr><tdclass="paramname">depthErrorRatio</td><td>Maximum acceptable depth difference ratio used during smoothing and fallback estimation. </td></tr>
<tr><tdclass="paramname">estWithNeighborsIfNull</td><td>If true, and the target pixel has an invalid depth, estimate it from valid neighboring pixels.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The depth value at the given (x, y) location (in meters), or 0 if it cannot be determined.</dd></dl>
<dlclass="section note"><dt>Note</dt><dd><ul>
<li>The function applies bounds checking on the input coordinates.</li>
<li>If <code>smoothing</code> is enabled, a weighted average using a 3x3 kernel is computed.</li>
<li>If <code>estWithNeighborsIfNull</code> is enabled and the pixel has no valid depth, the value is estimated from 4-connected neighbors using consistency constraints based on <code>depthErrorRatio</code>.</li>
<li>Pixels with zero or invalid (NaN/Inf) depth are ignored in estimation and smoothing. </li>
<p>Downsamples an image by a given decimation factor. </p>
<p>If the image is a depth image (CV_32FC1 or CV_16UC1), it ensures that decimation is done precisely without interpolation. For other types, OpenCV's <code>resize</code> with <code>INTER_AREA</code> is used.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">image</td><td>The input image to decimate. </td></tr>
<tr><tdclass="paramname">decimation</td><td>The downsampling factor (must be >= 1). </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The decimated image. If the decimation factor is 1 or the image is empty, the original image is returned.</dd></dl>
<dlclass="section note"><dt>Note</dt><dd>For depth images, the image size must be divisible by the decimation factor. </dd></dl>
<dlclass="exception"><dt>Exceptions</dt><dd>
<tableclass="exception">
<tr><tdclass="paramname">Assertion</td><td>failure if decimation is < 1 or size mismatch for depth images. </td></tr>
<p>Upsamples a depth image using bilinear interpolation with depth consistency check. </p>
<p>Performs a depth-aware interpolation for CV_32FC1 or CV_16UC1 types. It checks whether the surrounding four corner values are consistent within a <code>depthErrorRatio</code>, and if so, performs bilinear interpolation. For other image types, OpenCV's <code>resize</code> is used.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">image</td><td>The input image to interpolate. </td></tr>
<tr><tdclass="paramname">factor</td><td>The interpolation factor (must be >= 1). </td></tr>
<tr><tdclass="paramname">depthErrorRatio</td><td>Acceptable ratio of depth difference to allow interpolation. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The interpolated image. If the factor is 1 or the image is empty, the original image is returned.</dd></dl>
<dlclass="section note"><dt>Note</dt><dd>This function is intended for depth images. If corners have invalid or inconsistent depth values, interpolation is skipped at that patch. </dd></dl>
<dlclass="exception"><dt>Exceptions</dt><dd>
<tableclass="exception">
<tr><tdclass="paramname">Assertion</td><td>failure if factor < 1 or invalid parameters. </td></tr>
<p>Registers a depth image to a different camera frame (typically RGB). </p>
<p>This function aligns the given depth image to the coordinate frame of an RGB camera using the intrinsic parameters of both cameras and the extrinsic transformation between them. The output is a depth image aligned to the RGB image dimensions and field of view.</p>
<p>The function assumes the depth is either in meters (<code>CV_32FC1</code>) or in millimeters (<code>CV_16UC1</code>), and it returns a registered depth image in the same format.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">depth</td><td>The input depth image (type <code>CV_16UC1</code> in mm or <code>CV_32FC1</code> in meters). </td></tr>
<tr><tdclass="paramname">depthK</td><td>Intrinsic matrix of the depth camera (3x3, type <code>CV_64FC1</code>). </td></tr>
<tr><tdclass="paramname">colorSize</td><td>Size of the target RGB image (the output will match this size). </td></tr>
<tr><tdclass="paramname">colorK</td><td>Intrinsic matrix of the RGB camera (3x3, type <code>CV_64FC1</code>). </td></tr>
<tr><tdclass="paramname">transform</td><td><aclass="el"href="classrtabmap_1_1Transform.html"title="Represents a 3D rigid body transformation (rotation + translation).">Transform</a> from the RGB camera frame to depth camera frame.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>A depth image registered to the RGB image space, with the same type as the input depth.</dd></dl>
<dlclass="exception"><dt>Exceptions</dt><dd>
<tableclass="exception">
<tr><tdclass="paramname">Assertion</td><td>failure if input validation fails (e.g., empty image, incorrect types or sizes).</td></tr>
</table>
</dd>
</dl>
<dlclass="section note"><dt>Note</dt><dd>If multiple depth points project to the same RGB pixel, the closest one is kept. This helps with occlusion handling when registering sparse/depth data. </dd></dl>
<p>Fills holes in the depth image using linear interpolation. </p>
<p>This function iterates through the depth image and fills in holes (missing depth values) by interpolating from surrounding valid depth values. It considers both horizontal and vertical neighbors to interpolate missing data. The maximum hole size and the error ratio are used to control the filling process. The function works with both 16-bit (mm) and 32-bit (meters) depth images.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">depth</td><td>The input depth image (CV_16UC1 or CV_32FC1). </td></tr>
<tr><tdclass="paramname">maximumHoleSize</td><td>The maximum size of a hole to be filled, in pixels. </td></tr>
<tr><tdclass="paramname">errorRatio</td><td>The ratio used to calculate the allowed depth error for interpolation.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>A new depth image with holes filled.</dd></dl>
<dlclass="section note"><dt>Note</dt><dd>The input depth image must be of type CV_16UC1 (depth in millimeters) or CV_32FC1 (depth in meters). The filled output is of the same type as the input. </dd></dl>
<p>Fill holes in a registered depth image using linear interpolation. </p>
<p>This function attempts to fill invalid (zero-valued) pixels in a registered depth image by looking at neighboring pixels in vertical and/or horizontal directions. Optionally, it can also fill "double holes" (gaps of two consecutive pixels) if <code>fillDoubleHoles</code> is enabled.</p>
<p>The interpolation is only performed if the depth difference between the neighbors is within 1% of their average, to avoid introducing invalid depth values.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in,out]</td><tdclass="paramname">registeredDepth</td><td>The input/output registered depth image (CV_16UC1). Modified in-place to fill in missing depth values. </td></tr>
<tr><tdclass="paramdir"></td><tdclass="paramname">vertical</td><td>If true, the function tries to fill holes in vertical direction. </td></tr>
<tr><tdclass="paramdir"></td><tdclass="paramname">horizontal</td><td>If true, the function tries to fill holes in horizontal direction. </td></tr>
<tr><tdclass="paramdir"></td><tdclass="paramname">fillDoubleHoles</td><td>If true, the function also attempts to fill two-pixel wide holes by linearly interpolating between values spaced by two pixels.</td></tr>
</table>
</dd>
</dl>
<dlclass="section note"><dt>Note</dt><dd>This function assumes that the depth image contains unsigned 16-bit values, where a value of 0 represents an invalid or missing depth value. Pixels on the contour are not interpolated.</dd></dl>
<dlclass="section warning"><dt>Warning</dt><dd>The input matrix must be of type CV_16UC1, or the function will trigger an assertion failure.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="namespacertabmap_1_1util2d.html#a48a7e15282f392e77561dd96ed3320f9"title="Registers a depth image to a different camera frame (typically RGB).">rtabmap::util2d::registerDepth()</a>, <aclass="el"href="namespacertabmap_1_1util2d.html#aeb3dee2cf6484f0b224d4687899cb004"title="Fills holes in the depth image using linear interpolation.">rtabmap::util2d::fillDepthHoles()</a></dd></dl>
<p>Applies a 2D fast bilateral filter to a depth image. </p>
<p>This function is a 2D adaptation of the pcl::FastBilateralFiltering algorithm. It processes a depth image (either CV_32FC1 or CV_16UC1) using a bilateral filter with spatial and range standard deviations <code>sigmaS</code> and <code>sigmaR</code>. The method includes optimizations such as early division and efficient 3D grid accumulation with smoothing.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">depth</td><td>Input depth image. Must be of type CV_32FC1 (meters) or CV_16UC1 (millimeters). </td></tr>
<tr><tdclass="paramname">sigmaS</td><td>Spatial standard deviation. Controls the amount of smoothing in the image plane. </td></tr>
<tr><tdclass="paramname">sigmaR</td><td>Range standard deviation. Controls the amount of smoothing in the depth (z) dimension. </td></tr>
<tr><tdclass="paramname">earlyDivision</td><td>If true, applies early normalization to improve performance.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>Filtered depth image as a CV_32FC1 Mat. If the input image is empty or contains no valid depth, an empty Mat is returned.</dd></dl>
<dlclass="section note"><dt>Note</dt><dd>This implementation relies on an auxiliary 3D data structure and uses trilinear interpolation for reconstructing smoothed values. Pixels with non-finite or invalid depths are ignored.</dd></dl>
<dlclass="section warning"><dt>Warning</dt><dd>The result is always a CV_32FC1 image, even if the input is CV_16UC1. If input depth's valid pixels have all exact same value, the result will be retruned with all zeros (issue from the original implementation). </dd></dl>
<p>Filters out depth bleeding artifacts in a depth image. </p>
<p>This function sets depth values to zero (invalid) if their value significantly differs from both neighboring pixels in either horizontal or vertical direction. It works on depth images of type <code>CV_32FC1</code> (32-bit float, in meters) or <code>CV_16UC1</code> (16-bit unsigned int, in millimeters).</p>
<p>The function also ignores the image border by setting the first and last rows and columns to zero.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">depth</td><td>Input/output depth image. Must be of type <code>CV_32FC1</code> or <code>CV_16UC1</code>. The filtering is done in-place. </td></tr>
<tr><tdclass="paramname">maxDepthError</td><td>Maximum allowed depth difference between a pixel and its neighbors before it is considered invalid and filtered out. For <code>CV_32FC1</code>, this value is in meters; for <code>CV_16UC1</code>, it's converted to millimeters. </td></tr>
<p>Automatic brightness and contrast optimization with optional histogram clipping. </p>
<p>This function automatically adjusts the brightness and contrast of the input image based on its histogram. It optionally clips a percentage of the darkest and brightest parts of the histogram to reduce the influence of outliers (similar to "auto levels" in photo editors).</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">src</td><td>Input image. Must be of type CV_8UC1 (grayscale), CV_8UC3 (BGR), or CV_8UC4 (BGRA). </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">mask</td><td>Optional mask. Only non-zero mask pixels are considered in histogram computation. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">clipLowHistPercent</td><td>Percentage of the lowest histogram range to clip. Use 0 to disable. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">clipHighHistPercent</td><td>Percentage of the highest histogram range to clip. Use 0 to disable. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">alphaOut</td><td>Optional pointer to store the computed alpha (contrast scale factor). </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">betaOut</td><td>Optional pointer to store the computed beta (brightness shift factor).</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>A new image with automatically adjusted brightness and contrast. The image will have the same size and number of channels as the input.</dd></dl>
<dlclass="section note"><dt>Note</dt><dd>For BGRA input images, the alpha (transparency) channel is preserved and not modified.</dd></dl>
<p>Performs exposure fusion on a set of input images. </p>
<p>This function blends multiple images with different exposures into a single well-exposed image using the Mertens exposure fusion algorithm. It leverages OpenCV's <code>createMergeMertens()</code> method (available in OpenCV 3 and above).</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">images</td><td>A vector of input images (typically CV_8UC3) to be fused. All images should have the same size and type.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>A fused color image (CV_8UC3) with enhanced exposure. If OpenCV version is below 3, the function returns a clone of the first image in the input vector.</dd></dl>
<dlclass="section note"><dt>Note</dt><dd>The output image is normalized to 8-bit color (0–255). Exposure fusion requires OpenCV 3.0 or later.</dd></dl>
<dlclass="section warning"><dt>Warning</dt><dd>If OpenCV version is lower than 3, exposure fusion is not performed and a warning is issued. </dd></dl>
<p>Converts a color from HSV (Hue, Saturation, Value) to RGB. </p>
<p>This function takes HSV color values and converts them to their corresponding RGB representation using standard sector-based color conversion.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">r</td><td>Pointer to a float where the resulting red component (0.0–1.0) will be stored. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">g</td><td>Pointer to a float where the resulting green component (0.0–1.0) will be stored. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">b</td><td>Pointer to a float where the resulting blue component (0.0–1.0) will be stored. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">h</td><td>Hue angle in degrees (0–360). Defines the color type. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">s</td><td>Saturation (0.0–1.0). 0 is grayscale, 1 is full color. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">v</td><td>Value (brightness) (0.0–1.0). 0 is black, 1 is full brightness.</td></tr>
</table>
</dd>
</dl>
<dlclass="section note"><dt>Note</dt><dd>This function assumes <code>h</code> is in degrees. If <code>s</code> is 0, the resulting color is grayscale, with R=G=B=V.</dd></dl>
<dlclass="section warning"><dt>Warning</dt><dd>The output RGB values are in the 0.0 to 1.0 range, not 0–255. </dd></dl>
<p>Applies Non-Maximum Suppression (NMS) to a set of keypoints. </p>
<p>This function filters a set of input keypoints by applying a grid-based non-maximum suppression (NMS) algorithm. It retains only the strongest keypoints (based on response value) while ensuring that no two retained points are within a certain distance from each other.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">ptsIn</td><td>Input vector of keypoints. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">descriptorsIn</td><td>Corresponding descriptors for the input keypoints. Can be empty. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">ptsOut</td><td>Output vector of keypoints after NMS filtering. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">descriptorsOut</td><td>Output descriptors corresponding to the filtered keypoints. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">dist_thresh</td><td>Minimum allowed distance between retained keypoints (suppression radius). </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">img_width</td><td>Width of the image on which the keypoints are based. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">img_height</td><td>Height of the image on which the keypoints are based.</td></tr>
</table>
</dd>
</dl>
<dlclass="section note"><dt>Note</dt><dd>Keypoints are suppressed if they are within <code>dist_thresh</code> pixels of a stronger keypoint. </dd>
<dd>
If <code>descriptorsIn</code> is empty, descriptor output will remain empty. </dd>
<dd>
Assumes all keypoints lie within the image dimensions provided. </dd></dl>
<p>Applies the SSC (Suppression via Square Covering) algorithm to spatially select keypoints. </p>
<p>This function selects a subset of keypoints that are uniformly distributed across the image using a square covering method and binary search optimization to achieve a desired number of keypoints.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">keypoints</td><td>Input vector of keypoints to select from. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">maxKeypoints</td><td>Desired upper bound on the number of output keypoints. The internal target is first reduced by <code>round(maxKeypoints * tolerance)</code> so the result is always less than or equal to this value. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">tolerance</td><td>Relative tolerance applied to the reduced target (e.g., 0.1 allows ±10% of the reduced target, not of <code>maxKeypoints</code>). </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">cols</td><td>Width of the image in pixels. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">rows</td><td>Height of the image in pixels. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">indx</td><td>Optional vector of indices to use instead of the original keypoints ordering. If provided, should be the same size as <code>keypoints</code>. This allows for applying SSC to a pre-sorted subset (e.g., top-N keypoints).</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>A vector of indices corresponding to the selected keypoints in the input <code>keypoints</code> vector.</dd></dl>
<dlclass="section note"><dt>Note</dt><dd>The algorithm operates by covering the image with a grid of cells and retaining the most confident keypoint in each uncovered cell while suppressing nearby keypoints within a computed square radius. </dd>
<dd>
Uses binary search to find the optimal suppression radius so the number of selected keypoints is within [effectiveMax * (1 - tolerance), effectiveMax * (1 + tolerance)], where effectiveMax = maxKeypoints - round(maxKeypoints * tolerance). </dd>
<dd>
Works best when <code>keypoints</code> are pre-sorted by response strength (e.g., strongest first). </dd>
<dd>
If the <code>indx</code> vector is provided, the returned indices refer to the original list, not just <code>indx</code>. </dd></dl>
<p>Rotates the input RGB and depth images to make them appear upright based on the camera's roll angle. </p>
<p>This function uses the camera's extrinsic parameters to determine if the captured image is rotated (e.g., sideways or upside-down), and rotates it appropriately (by 90°, 180°, or 270°) to correct orientation. It also updates the associated camera model to reflect the new transformation and adjusted image size.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in,out]</td><tdclass="paramname">model</td><td>The camera model associated with the images. It will be updated to reflect the new orientation. </td></tr>
<tr><tdclass="paramdir">[in,out]</td><tdclass="paramname">rgb</td><td>The RGB image to be rotated if necessary. </td></tr>
<tr><tdclass="paramdir">[in,out]</td><tdclass="paramname">depth</td><td>The depth image to be rotated if necessary.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>True if the images were rotated, false if no rotation was needed or the pitch angle is too large for a reliable decision.</dd></dl>
<li>Ignores rotation if pitch > π/4 (too ambiguous to determine "up").</li>
<li>Assumes roll is responsible for rotation (i.e., sideways capture).</li>
<li>Applies necessary rotation and updates the camera intrinsics accordingly.</li>
<li>Supports image types: RGB and depth must be valid OpenCV <code>cv::Mat</code>.</li>
<li>Respects image transparency and depth values during rotation.</li>
</ul>
</dd></dl>
<dlclass="section warning"><dt>Warning</dt><dd>This function assumes that the camera's local transform includes the standard optical rotation.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="classrtabmap_1_1CameraModel.html"title="Represents a pinhole camera model containing intrinsic and extrinsic parameters, used for projection,...">rtabmap::CameraModel</a>, cv::transpose, cv::flip </dd></dl>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<divid="nav-path"class="navpath"><!-- id is needed for treeview function! -->
<liclass="footer">Generated by <ahref="https://www.doxygen.org/index.html"><imgclass="footer"src="doxygen.svg"width="104"height="31"alt="doxygen"/></a> 1.9.8 </li>