2017-05-24 22:06:28 -0600 | commented answer | Python SVM Function svm.predict(testData) Returns Tuple instead of Numpy Array |
2017-05-24 21:54:48 -0600 | commented answer | Python SVM Function svm.predict(testData) Returns Tuple instead of Numpy Array I'm not so familiar with the environment. However, very well, I'll try to post there. |
2017-05-19 20:54:11 -0600 | received badge | ● Editor (source) |
2017-05-19 19:49:59 -0600 | asked a question | Python SVM Function svm.predict(testData) Returns Tuple instead of Numpy Array Hi, I have searched through this forum about this problem and I found no result. I wish that this question has never been asked before. I am very sorry if it has. I test machine learning sample code from http://docs.opencv.org/3.2.0/dd/d3b/tutorial_py_svm_opencv.html and it returns an error: I tried to fixed it by changing the response type from float to int, from to However, the outcome of the classification is still not shown properly. After some investigation, I found a solution. This function call does not return an array of result but it returns a tuple instead. I believe this is the output of So, instead of writing the solution that worked for me is I don't know, but maybe the tutorial needs update. My question is, what value is the first element of the tuple which returned by Thank you very much for your kind help. |
2016-08-29 21:16:14 -0600 | received badge | ● Scholar (source) |
2016-08-29 10:03:02 -0600 | asked a question | CV_8UC3 returns grayscale Excuse me, I'm new to opencv. I learned about CV_8UC3 that it defines an image in 8 bit unsigned integers using 3 channels (BGR). When a color image is loaded using this constant as parameter, does that mean that it instructs to load the image as color image? I tried that to load and display using Thank you very much. (I'm sorry if my English is not good) |