Hi,
When I tried to execute a train and test python file, I am getting the below error,
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm Community Edition with Anaconda plugin 2019.3.1\plugins\python-ce\helpers\pydev\pydevd.py", line 1434, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files\JetBrains\PyCharm Community Edition with Anaconda plugin 2019.3.1\plugins\python-ce\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:/Users/Admin/Documents/Projects/Handwritten text extraction/predict.py", line 169, in
main()
File "C:/Users/Admin/Documents/Projects/Handwritten text extraction/predict.py", line 150, in main
retval, npaResults, neigh_resp, dists = kNearest.findNearest(npaROIResized, k=5)
cv2.error: OpenCV(3.4.2) C:\projects\opencv-python\opencv\modules\ml\src\knearest.cpp:312: error: (-215:Assertion failed) test_samples.type() == 5 && test_samples.cols == samples.cols in function 'cv::ml::BruteForceImpl::findNearest'
Please help me with this...