title: histogram.cpp:3915: error: (-215) _src.type() == CV_8UC1 in function cv::equalizeHist
body: <pre><code>files2 = [f for f in listdir(dstpath) if isfile(join(dstpath,f))]        
  for image in files2:
      img = cv2.imread(os.path.join(dstpath,image))
      equ = cv2.equalizeHist(img)
      dstPath2 = join(dstpath,image)
      cv2.imwrite(dstPath2,equ)
  </code></pre>
  
  <p>I have a folder consisting of grayscale images in jpg format but when I run my above code for Histogram equalization it gives me the above mentioned error. Pls help</p>