this is the error i am getting :
<class ‘cv2.CascadeClassifier’> returned a result with an error set
I have tried the same code with opencv version 3.4.2.16 as well as 4.0.1.23
The cascade files are not working
hey @shreyanarula3 ,
kindly share your code with required files . You can upload it on google drive and share its link . Kindly check once before sending the link that you provided the access to view the code to everyone who have that link.
Same, the cascade is being detected( i have checked by printing the type of the classifier object), but the detectMultiScale method isnt working. I have already attempted using complete directory path pls help
hey @sachdevaps26 and @shreyanarula3 , kindly provide links to your respective code files , so that i can have look at your code and detect why this is error is coming to both of you.
Happy Learning
.
SORRY I PASTED THE PREVIOUS BUILD I HAD RECTIFIED THE ERROR THE SECOND LINK CONTAINS THE PROBLEM
@sachdevaps26 , kindly check once the .xml file path of haarcascade that you have provided is correct and the file also exists at the same path.
Note:
If the path to your cascade file is incorrect ,
it will still output print(type(cascade)) as <class ‘cv2.CascadeClassifier’> . So dont depend on this as your cascade path is correct.
@prashant_ml
https://pastebin.com/0P3iKFJA
I have also printed the files contained at the given file path for your understanding.
The path specified for the classifier is correct as can be seen upon printing the files contained at that path
I have also printed the files contained at the given file path for your understanding.
The path specified for the classifier is correct as can be seen upon printing the files contained at that path
there seems to be an exception raised from within the xml file
@sachdevaps26,
hey can you please upload your code file along with other haarcascade file on drive or github and provide me the access , there is some system error and i need to make test run to understand it.
hey @sachdevaps26 and @shreyanarula3 ,
kindly check the respective files your using for detection , they should contain a valid xml tree structure and must be having some nodes like internalNodes, rects ,etc.
If it isn’t such then just delete those files and download there original files from here.
I hope this will resolve doubt and make your code working.
Happy Learning
.