title: Relative path for imread in python
body: <p>I cant set the relative path for the DSC_1902.JPG image(in the "Res" directory) in <code>imread</code>. Following is my project structure:</p>
  
  <blockquote>
    <p>BasicAI Server/Res/DSC_1902.JPG </p>
    
    <p>BasicAI Server/Computer_Vision/FD.py</p>
  </blockquote>
  
  <p>The following code is in <code>FD.py</code></p>
  
  <pre><code>import cv2
  def detect():
  
      img = cv2.imread('\BasicAI Server\Res\DSC_1902.JPG')
      gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
  
  detect()
  </code></pre>