title: OpenCV's Canny Edge Detection in C++
body: <p>I want to extract the edges of hand but I get the following result. I've tried adjusting the low and high threshold but I still can't get the desired output. I have included below the code and its output. What seems to be the problem?</p>
  
  <p>This is the <a href="http://img29.imageshack.us/img29/5273/cannyj.jpg" rel="noreferrer">output image</a> generated by the code below.</p>
  
  <pre><code>#include &lt;opencv2/core/core.hpp&gt;
  #include &lt;opencv2/highgui/highgui.hpp&gt;
  #include &lt;opencv2/imgproc/imgproc.hpp&gt;
  
  int main(){
  
      cv::Mat image= cv::imread("open_1a.jpg");
      cv::Mat contours;
      cv::Mat gray_image;
  
      cvtColor( image, gray_image, CV_RGB2GRAY );
  
      cv::Canny(image,contours,10,350);
  
      cv::namedWindow("Image");
      cv::imshow("Image",image);
  
      cv::namedWindow("Gray");
      cv::imshow("Gray",gray_image);
  
      cv::namedWindow("Canny");
      cv::imshow("Canny",contours);
      cv::waitKey(0);
  }
  </code></pre>