title: contour line edge detection in MATLAB
body: <p>I have a project to detect the contour lines in  <a href="https://i.stack.imgur.com/ca5Sc.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ca5Sc.jpg" alt="this"></a> image , but when I run my code with the canny edge detection algorithm , one line in the image transforms to two lines, because of two times the change in grey values of the line before and after that .</p>
  
  <pre><code>i= imread('path');
  imgG= rgb2gray(i);
  
  PSF = fspecial('gaussian',7,7);
  Blurred = imfilter(imgG,PSF,'symmetric','conv');
  figure ,imshow(Blurred)
  
  edgeimg = edge(Blurred , 'canny');
  figure ,imshow(edgeimg)
  </code></pre>
  
  <p>I have no idea to solve this, please help me.</p>