title: getting error in canny edge detection
body: <p>i am trying to write a code using opencv python that automatically get canny threshold values instead of doing them manually every time.</p>
  
  <pre><code>img= cv2.imread('micro.png',0)
  output = np.zeros(img.shape, img.dtype)
  # Otsu's thresholding
  ret2,highthresh = cv2.threshold(img,0,255,cv2.THRESH_BINARY+cv2.THRESH_OTSU)
  lowthresh=0.1*highthres
  edges = cv2.Canny(img,output,lowthresh,highthresh)
  cv2.imshow('canny',edges)
  </code></pre>
  
  <p>i am getting this error
  "File "test2.py", line 14, in 
      edges = cv2.Canny(img,output,lowthresh,highthresh)
  TypeError: only length-1 arrays can be converted to Python scalars"</p>
  
  <p>can anyone help me to sort out this error.thankx in advance</p>