title: Find and identify single pixel thin contours in OpenCV
body: <p>I'm trying to find the pixel locations for each &quot;boundary&quot; in <a href="https://postimg.cc/8FVvDNJ9" rel="nofollow noreferrer">this image</a> (and similar ones). Unfortunately, <code>cv2.findContours</code> doesn't work, perhaps because the boundaries are quite thin.</p>
  <p>Alternatively, I've tried <code>findContours</code> with <a href="https://postimg.cc/JDF4r5Y0" rel="nofollow noreferrer">this image</a> (the first image is obtained after running an edge algorithm on this), and while it does return the <a href="https://postimg.cc/Jt94SKBd" rel="nofollow noreferrer">contours</a>, I have no idea how to separate the contours and get the pixel values from it. This method also returns an outlining rectangle (closed contours?) that I don't want. I'd be happy with open contours.</p>
  <p>I'd like to be able to separate out the individual lines and assign a label to each of them.</p>
  <p>Is there any way to get open contours for each line and be able to get the pixels for them?</p>
  <p><strong>EDIT:</strong> Here are a couple of examples of the <a href="https://postimg.cc/gallery/MTr6MXj" rel="nofollow noreferrer">original images</a>. I'm trying to create a dataset containing the layer boundaries (approximates work just fine) and labels of each of the &quot;layers&quot; in the images. The dataset is meant to train a deep learning network.</p>
  <p><strong>EDIT 2:</strong> The images posted here are OCT images of the retina. The layers are the retinal layers. I'm trying to add rough automatic labels for the unlabeled data, to augment manual labels that contain the layer boundaries.</p>