Skip to content

Conversation

KojiKobayashi
Copy link
Contributor

#208 を修正しました。

Niblack と Sauvola も同じバグがあったので修正しています。
sampleもつけました。

@shimat

int borderSize = kernelSize / 2;
int width = src.Width;
int height = src.Height;
dst.Create(src.Size(), src.Type());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここで``Createするならtype`のエラーチェックは要らないですね。

@KojiKobayashi
Copy link
Contributor Author

@shimat
iplimage版と一致させたいかもしれないので、意見を聞いておきたいのが二点ほど。

  • NiblackFastNiblackにして、今のNiblackを廃止するのはどうか(sauvolaも)
  • 戻り値をMatにしてはどうか

@shimat
Copy link
Owner

shimat commented Mar 22, 2016

1番目は賛成です 👍

2番目は、Mat Niblack(Mat src, int kernelSize, double k) のような定義にするということですか? それも構わないと思います。

@KojiKobayashi
Copy link
Contributor Author

2番目は、Mat Niblack(Mat src, int kernelSize, double k) のような定義にするということですか?

そうです。他と整合性があるので。
void Niblack(Mat src, Mat dst, int kernelSize, double k) も口を残しときますか?

@shimat
Copy link
Owner

shimat commented Mar 25, 2016

「整合性」の意図次第ですが、C++のcv::foobar の流儀に従うと、今の状態が整合性あるとも言えますね(これらの二値化に対応するネイティブ関数は無いとはいえ)。

C#一般には戻り値のほうがもちろん普通なのですが、このOpenCvSharpはあえてそれを捻じ曲げてでもC++仕様に極力近づけるようにしてきたプロジェクトではあります。(逆を行くのがEmguCV)

@KojiKobayashi
Copy link
Contributor Author

では1番目の案だけやることにします。

@KojiKobayashi
Copy link
Contributor Author

伝え忘れてましたが、予定していた変更は終了しています。

@shimat
Copy link
Owner

shimat commented Mar 28, 2016

💯
ありがとうございました!マージします。
2.xでは再現しないようなので、3系のみ適用を考えています。

@shimat shimat merged commit 0d9749d into shimat:master Mar 28, 2016
shimat added a commit that referenced this pull request Feb 17, 2017
shimat added a commit that referenced this pull request Feb 17, 2017
shimat added a commit that referenced this pull request Feb 18, 2017
shimat added a commit that referenced this pull request Feb 19, 2017
shimat added a commit that referenced this pull request Feb 19, 2017
shimat added a commit that referenced this pull request Feb 19, 2017
shimat added a commit that referenced this pull request Feb 19, 2017
shimat added a commit that referenced this pull request Feb 20, 2017
shimat added a commit that referenced this pull request Feb 20, 2017
shimat added a commit that referenced this pull request Feb 20, 2017
shimat added a commit that referenced this pull request Feb 20, 2017
shimat added a commit that referenced this pull request Feb 20, 2017
shimat added a commit that referenced this pull request Feb 20, 2017
shimat added a commit that referenced this pull request Feb 20, 2017
shimat added a commit that referenced this pull request Feb 20, 2017
shimat added a commit that referenced this pull request Feb 21, 2017
@KojiKobayashi KojiKobayashi deleted the Fix-Binalizer branch June 21, 2017 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants