title: How can I get the edges of low contrast image in opencv python
body: <p>I'm trying to get the edges of this object from a TEM(microscope) image and the problem is that the contact is low especially in the upper edge, I tried several things thresholding, contrast equalization... but I wasn't able to get the upper edge.</p>
  <p><strong>N.B:</strong> I'm trying to calculate the angle between the droplet and the tube I'm not sure if this is the best way to approach this problem.</p>
  <p>The original image:</p>
  <p><a href="https://i.stack.imgur.com/AxGtb.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AxGtb.jpg" alt="enter image description here" /></a></p>
  <p>The Canny Edge detection I get:</p>
  <p><a href="https://i.stack.imgur.com/qdIiE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qdIiE.png" alt="enter image description here" /></a></p>
  <p>the steps I got to get this result are:</p>
  <ol>
  <li>Contrast enhancement</li>
  <li>Thresholding</li>
  <li>Gauss filter</li>
  <li>Canny Edge detection</li>
  </ol>
  <p>Code:</p>
  <pre><code>clahe = cv2.createCLAHE(clipLimit=clip_limit, tileGridSize=(grid_size, grid_size))
  equ = clahe.apply(img)
  val = filters.threshold_otsu(equ)
  mask = img &lt; val
  # denoising part
  mask = filters.gaussian(mask,sigma=sigmaG)
  # edge detection
  edge = feature.canny(mask,sigma=sigmaC)
  edge = img_as_ubyte(edge)
  </code></pre>