PiRSquared17 / pyopencv

Automatically exported from code.google.com/p/pyopencv
0 stars 1 forks source link

Bad argument (the missing data mask must be 8-bit vector of the same size as input sample) in CvBoost::predict #34

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. use method predict() in ml.CvBoost when _missing matrix is null or ommited 
(Mat())
predict( (CvBoost)inst, (Mat)_sample [, (Mat)_missing=Mat() [, 
(Range)slice=Range(start=0, end=1073741823) [, (bool)raw_mode=False [, 
(bool)return_sum=False]]]]) -> tuple :

What is the expected output? What do you see instead?
Expected output -> Tuple
we get -> OpenCV Error: Bad argument (the missing data mask must be 8-bit 
vector of the same size as input sample) in CvBoost::predict, file 
/home/eloi/Escriptori/OpenCV-2.1.0/src/ml/mlboost.cpp, line 1627
Traceback (most recent call last):
RuntimeError: OpenCV-2.1.0/src/ml/mlboost.cpp:1627: error: (-5) the missing 
data mask must be 8-bit vector of the same size as input sample in function 
CvBoost::predict

What version of the product are you using? On what operating system?
 pyopencv-2.1.0.wr1.2.0, UBUNTU 9.10

Please provide any additional information below.
It seems that if _missing is missed then it creates a void Mat() and OpenCV 
fails because the dimensions of the input sample and the void missing matrix 
doesn't match.

Original issue reported on code.google.com by espavi...@gmail.com on 17 Nov 2010 at 10:41

GoogleCodeExporter commented 9 years ago
Thanks. It's actually a bug in OpenCV's C++ function CvBoost::predict() (line 
mlboost.cpp:2146). I'll fix that this weekend anyway.

Cheers,
Minh-Tri

Original comment by pmtri80@gmail.com on 18 Nov 2010 at 6:48