Ask Your Question
0

OpenCV 3-beta points_classifier example fails with DTrees

asked 2015-05-25 22:00:48 -0500

heydinge gravatar image

Hi- I'm using precompiled binaries for OpenCV-3.0.0-beta on Windows 7 and trying to run the points_classifier.cpp example in C++. It fails on the DTrees part.

To get the example to run without crashing I have to "turn off" parts of the example as follows:

define _DT_ 0 define _BT_ 0 define _RF_ 0 define _ANN_ 0

I switched to using my own compiled libs so I could step into the code and narrow down the problem. With the four defines above "turned on", I stepped into the StatModel train function in find_decision_boundary_DT().

I could get into DTreesImpl::train() in tree.cpp. Stepping further into addTree(), once in the for() loop subsets[] had size and capacity both = 0. ssize was also 0, but when trying to memcpy(&subsets[],... at line 300 there was a crash:

"Expression: vector subscript out of range" in file c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\vector line 932

Any help would be appreciated.

edit retag flag offensive close merge delete

Comments

1

is it this one ?`it was fixed 24 march

berak gravatar imageberak ( 2015-05-26 00:23:05 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-05-28 09:46:20 -0500

heydinge gravatar image

Looks like berak was right (thanks!!!).

I switched to opencv-3.0.0-rc1 from beta, for both the platform and the example. I.e., points_classifier.cpp changed between the beta and rc1 release, and the example worked.

ANSWER: Abandon opencv-3.0.0-beta and switch to the more robust opencv-3.0.0-rc1.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2015-05-25 22:00:48 -0500

Seen: 144 times

Last updated: May 28 '15