title: OpenCV bitwise not operator returns nan for black pixels
body: <p>I am trying to apply the OpenCV <code>not</code> bitwise operator to binary images.
  I have generated a two-dimensional black image as follows:
  <code>black = np.zeros((400, 400))</code>.
  But when applying <code>cv2.bitwise_not</code> to it, all zeros are replaced with <code>nan</code>. Can someone explain this behaviour and tell me how to fix it?</p>
  <p>I also generated a white image using the below code, but <code>bitwise_not</code> replaces pixels with the value -4:</p>
  <pre><code>white = np.zeros((400, 400))
  white[:, :] = 255
  </code></pre>
  <p>While I was expecting it to replace 255's with 0's.</p>
  <p>Thank you for your help.</p>