2014-04-30 13:12:38 -0600 | commented question | SVM train doesn't accept my data It doesn't order it properly when pushed. It just puts them next to eachother instead of in the same colomn. In other words it stays a one dimensional array. |
2014-04-30 12:37:36 -0600 | commented question | SVM train doesn't accept my data So it automatically resets to the next colomn once 6 have been pushed? |
2014-04-30 11:03:05 -0600 | commented question | SVM train doesn't accept my data So your saying i should use the Mat to store my data from the start and then just put it into the train function at the end? If so, i don't think it will work because i don't think Mat's support dynamic sizes. In the code Mat trainingData(amount, 6, CV_64FC1, &allData); , amount is dynamic so the size of the matrix always changes. If Mat's support dynamic sizing then this would be great. But that is why I'm using vectors because the support dynamic sizes. |
2014-04-30 09:59:50 -0600 | commented question | SVM train doesn't accept my data I changed it and still got an exception. |
2014-04-29 12:27:12 -0600 | received badge | ● Editor (source) |
2014-04-29 12:24:56 -0600 | asked a question | SVM train doesn't accept my data I've been trying to figure out how to use the svm train function. From what i understand from some online sources, you have to have an array of your data followed by another array that labels the positions to be either good or bad data. What i have is code that finds contours in the picture, extracts the properties, puts them in a vector and then the vector is put into a Mat which is them passed into the train function. But everytime i get to the train function it crashes with an exception at memory location. I believe that vectors aren't accepted by the Mat constructor and this could possibly be the source of the problem. I would like to know what the problem is if it is not that. And if it is, would there be a way to get it to work with the vectors? The function for the detection and training: http://pastebin.com/GgN6k3Pb All the code: http://pastebin.com/ZvN8eukr void contourDetection(){ (more) |
2014-03-18 13:46:38 -0600 | received badge | ● Scholar (source) |
2014-03-11 13:29:37 -0600 | asked a question | Using machine learning with contours? I'm working on a program that uses the cvFindContours function and i'm looking to implement machine learning for the contour detection. Can this be done? From what i understand training data has to be passed in to the train function as a vector or number. How would i convert the contour data into a vector or number? Thanks in advance. |