title: Connecting to Hikvision Camera using python and open cv
body: <p>i want to Connect Hikvision ip camera with python and open cv using this code :</p>
  
  <pre><code>import numpy as np
  import cv2
  
  cap = cv2.VideoCapture()
  cap.open("rtsp://yourusername:yourpassword@172.16.30.248:555/Streaming/channels/2/")
  
  while(True):
       # Capture frame-by-frame
      ret, frame = cap.read()
  
      # Our operations on the frame come here
      gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
  
      # Display the resulting frame
      cv2.imshow('frame',ret)
  
      if cv2.waitKey(1) &amp; 0xFF == ord('q'):
          break
  
  # When everything done, release the capture
  cap.release()
  cv2.destroyAllWindows()
  </code></pre>
  
  <p>when i run my code i got this Error :</p>
  
  <pre><code>    Traceback (most recent call last):
    File "C:\Users\Amin\Desktop\ip camera in py\csm.py", line 15, in &lt;module&gt;
      cv2.imshow('frame',ret)
  cv2.error: OpenCV(4.0.0) c:\projects\opencv-python\opencv\modules\imgproc\src\color.hpp:261: error: (-2:Unspecified error) in function '__cdecl cv::CvtHelper&lt;struct cv::Set&lt;1,-1,-1&gt;,struct cv::Set&lt;3,4,-1&gt;,struct cv::Set&lt;0,2,5&gt;,2&gt;::CvtHelper(const class cv::_InputArray &amp;,const class cv::_OutputArray &amp;,int)'
  &gt; Unsupported depth of input image:
  &gt;     'VDepth::contains(depth)'
  &gt; where
  &gt;     'depth' is 6 (CV_64F)
  </code></pre>
  
  <p>i test my camera whit VLCPlayer and it work perfectly!</p>
  
  <p>i think the problem refer to opencv4!</p>
  
  <p>how can i fix it? tnx a lot</p>