title: Checking pixel color in OpenCV with Python
body: <p>I am currently working on a project with python and OpenCV. For one part of the project, I would like to check and see if one specific pixel (specifically the pixel with coordinate 100, 100) is not equal to the color black. My code is as follows.</p>
  
  <pre><code>import cv2
  
  img = cv2.imread('/Documents/2016.jpg')
  
  if img[100, 100] != [0, 0, 0]:
      print("the pixel is not black")
  </code></pre>
  
  <p>When I go and fun in the terminal I get this error.</p>
  
  <pre><code>File "/Documents/imCam.py", line 5, in &lt;module&gt;
  if img[100, 100] != [0, 0, 0]:
  ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
  </code></pre>
  
  <p>What am I doing wrong?</p>