title: Detecting pixel colour from "dynamic" image scraped online
body: <p>I'm new to python and opencv. I'm trying to learn both at the same time to make things more interesting.</p>
  
  <p>I was trying to detect if certain pixels in an image online are of a certain colour (green). The image online would always be updated so the pixels in question wouldn't always have the same colour, hence the urllib.
  I used a loop to go through all the specific pixels I wanted to check.</p>
  
  <pre><code>import urllib.request
  import cv2
  # import numpy as np
  
  
  def download_status(url):
      urllib.request.urlretrieve(url, "boxes.jpg")
  
  
  # List with representative pixels of each box, total 8 boxes
  box_cords = [[62, 42], [144, 42], [234, 42], [312, 42], [62, 133], [144, 133], [234, 133], [312, 133]]
  
  # List describind box status/colour; 0-gray 1-green
  box_status = [[0], [0], [0], [0], [0], [0], [0], [0]]
  
  
  download_status("https://image.ibb.co/chtUW6/boxes.png")
  
  box_scheme = cv2.imread("boxes.jpg")
  for box in box_cords:
      box_colour = box_scheme[box]
      #  print(box_colour)
      if box_colour == "[51 204 52]":
          box_status[box] = 1
  
  #  print(box_status)
  </code></pre>
  
  <p>Unfortunatly I'm getting a warning: "FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison"</p>
  
  <p>Also while debugging by printing variables that express colour, I always get the same values (255 255 255). And I'm not sure If I'm comparing the colours in the loop correctly in terms of syntax, which is quite probably the reason for the warning.</p>
  
  <p>I treid searching for the warning and of ways to do what I'm trying to achieve but failed to find anything useful..</p>
  
  <p>Thanks in advance!</p>