, while <span style="color:#1a8effff;"><strong>inner</strong></span> contours are extracted in a clockwise direction.</p>
<h2 id="define-contour"><a class="header" href="#define-contour">Define Contour</a></h2>
<p><img src="overlay/extract/define_contour.svg" alt="Define Contour" /></p>
<p>To define a contour, the algorithm begins by identifying the leftmost and topmost segment in the contour. The classification of the contour is determined as follows:</p>
<ul>
<li>If the left-top side of the segment is cla