title: convert rgb image from numpy array to HSV (opencv)
body: <p>When I'm converting an image from RGB to HSV, if the image come straight from opencv, everything is alright:</p>
  
  <pre><code>img = cv2.imread(path)
  img = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
  </code></pre>
  
  <p>However, if this image come from a numpy array of shape (nb_of_images, 224, 224, 3) there is some complications.</p>
  
  <p>Here is my import function:</p>
  
  <pre><code>def import_images(path_list):
      path_len = len(path_list)
      images = numpy.zeros((path_len, 224, 224, 3), dtype = numpy.float64)
  
      for pos in range(path_len):
          testimg = cv2.imread(path_list[pos])
  
          if(testimg is not None):
              testimg = cv2.cvtColor(testimg, cv2.COLOR_BGR2RGB)
              testimg = cv2.resize(testimg, (224, 224))
              images[pos, :, :, :] = testimg
      return images
  </code></pre>
  
  <p>And now, here is my trouble:</p>
  
  <pre><code>images = import_images(["./test/dog.jpg"])
  img = images[0, :, :, :]
  img = cv2.cvtColor(img, cv2.COLOR_RGB2HSV)
  </code></pre>
  
  <p>The console give the following error:</p>
  
  <p><code>cv2.error: /io/opencv/modules/imgproc/src/color.cpp:11073: error: (-215) depth == 0 || depth == 2 || depth == 5 in function cvtColor</code></p>
  
  <p>I tried to change the image type:</p>
  
  <pre><code>img.astype(numpy.float32)
  </code></pre>
  
  <p>but the console give the same error</p>
  
  <p>What am I missing ?</p>
  
  <p>--edit--</p>
  
  <p>I'm using
  python 3.5</p>
  
  <p>numpy (1.14.2)</p>
  
  <p>opencv-python (3.4.0.12)</p>