title: How can piece together Edge Detection Result and Original Picture in Python
body: <p>I'm trying to perform edge detection in a picture using the <code>Canny</code>.</p>
  
  <p>Then, I want to reverse the colors of the detected edges (black edge on white background). </p>
  
  <p>Finally, I need to compose the original picture and edges into one image.</p>
  
  <p>This is my code:</p>
  
  <pre><code>import cv2
  import numpy as np
  picture = cv2.imread("picture.jpg")
  gray = cv2.cvtColor(picture,cv2.COLOR_BGR2GRAY)
  edge = cv2.Canny(gray,100,250,3)
  (thresh, blackEdges) = cv2.threshold(edge, 0, 255, cv2.THRESH_BINARY_INV)
  result = blackEdges + gray   # I tryed this and ,i didn't get what i want.
  cv2.imshow("Result",result)
  cv2.waitKey(0)
  cv2.destroyAllWindows()
  </code></pre>