You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
僕が Visual Studio 2015 でビルドしていて、元々の shimat さんのが Visual Studio 2013 でビルドしていて、その2つが混在すると、std::vector がおかしくなるという不具合でした。僕の勘違いでした。Visual Studio 2013 も入れておかないと駄目ですね。お騒がせしました。
すいません、話がややこしいので、日本語で失礼します。
現状 3.0 ブランチ の 2D feature がバグってます。
cv::Feature2D::compute() は std::vector &keypoints で渡すのですが、
このvectorを参照渡しで渡す所が大事です。
現状の 3.0 ブランチ、キーポイント数が少ない時は正常に動作するのですが、
多い時に、参照渡しをしてないことが問題となって、メモリが破壊されます。
https://github.com/shimat/opencvsharp/blob/3.0/src/OpenCvSharp/modules/features2d/Feature2D.cs#L106
var keypoints = new VectorOfKeyPoint(10000);
のように、あらかじめ大きな数字を入れておくと正常に動作します。
少し格闘してみたのですが、解決策が良く分からなく、
vector の参照渡し、どのように解決すれば良いのでしょうか?
The text was updated successfully, but these errors were encountered: