I had written few python scripts on Windows using opencv 3.2.0 and python 2.7.13. I, then, installed the same version of opencv on my R-Pi, and tried running the very same scripts on it, but none of themm work. I am posting the simplest of the scripts here
import numpy as np
import cv2
img = cv2.imread('Photos\WIN_20170102_20_34_33_Pro.jpg', 0)
img = cv2.medianBlur(img, 5)
cv2.imshow('Veins', img)
cv2.waitKey(0)
This gives me the following error:
Traceback (most recent call last):
File "/home/pi/Desktop/Basic Project codes/hist.py", line 8, in <module>
cv2.imshow('Veins', img)
error: /home/pi/opencv-3.2.0/modules/highgui/src/window.cpp:304: error: (-215) size.width>0 && size.height>0 in function imshow
Other codes also return various errors. What can be the possible problem?