Ask Your Question

DowYuu's profile - activity

2017-09-01 04:16:34 -0600 marked best answer OpenCV Error: Assertion failed ((!varTypesSet && vtypes[i] == rowtypes[i]) ...)& OpenCV Error: Assertion failed (sum > 0)

Hi Everyone

I am using https://github.com/opencv/opencv/blob...

and there is a little part of my data :

normal,0,31,29,78,1,0,0,0,4

normal,0,31,29,82,1,0,0,0,2

anomaly,2,254,0,0,1,0,0,0,0

anomaly,1,254,252,45,1,0.048129,1,1,6

normal,0,31,29,82,1,0,0,0,2

anomaly,1,254,252,45,1,0.046134,0,0,6

anomaly,1,254,252,45,1,0.044321,1,1,6

normal,0,31,29,82,1,0,0,0,2

but when I trying to use " -ts ord "to train ,it happened:

OpenCV Error: Assertion failed ((!varTypesSet && vtypes[i] == rowtypes[i]) || (varTypesSet && (vtypes[i] == rowtypes[i] || rowtypes[i] == VAR_ORDERED))) in cv::ml::TrainDataImpl::loadCSV, file C:\builds\master_PackSlave-win64-vc12-shared\opencv\modules\ml\src\data.cpp, line 593

and then I tried " -ts cat " ,it happened:

OpenCV Error: Assertion failed (sum > 0) in cv::ml::DTreesImpl::findSplitCatClass, file C:\builds\master_PackSlave-win64-vc12-shared\opencv\modules\ml\src\tree.cpp, line 880

I have read the document for opencv ,but still have no idea what the type_spec is.

Waiting for your answer , thanks !

2017-09-01 04:16:33 -0600 received badge  Scholar (source)
2017-09-01 04:09:32 -0600 commented answer OpenCV Error: Assertion failed ((!varTypesSet && vtypes[i] == rowtypes[i]) ...)& OpenCV Error: Assertion failed (sum > 0)

It works!!! Thanks a lot!!!

2017-09-01 03:37:30 -0600 commented answer OpenCV Error: Assertion failed ((!varTypesSet && vtypes[i] == rowtypes[i]) ...)& OpenCV Error: Assertion failed (sum > 0)

Thanks for your answer.I thought i probably understood the difference between cat and ord. Then i tried to type 『rt.exe

2017-08-31 23:37:47 -0600 asked a question OpenCV Error: Assertion failed ((!varTypesSet && vtypes[i] == rowtypes[i]) ...)& OpenCV Error: Assertion failed (sum > 0)

OpenCV Error: Assertion failed ((!varTypesSet && vtypes[i] == rowtypes[i]) ...)& OpenCV Error: Assertion fai