Jump to content

Zhang-Suen thinning algorithm: Difference between revisions

Improved D entry
(Better patch for D entry)
(Improved D entry)
Line 115:
Img zhangSuen(Img image1) pure /*nothrow*/
in {
//assert(image1.image.all!(x => x == Img.black || x == Img.white));
assert(image1.image.all!(x => x == 0 || x == 1));
} out(result) {
assert(result.nx == image1.nx && result.ny == image1.ny);
//assert(result.image.all!(x => x == Img.black || x == Img.white));
assert(result.image.all!(x => x == 0 || x == 1));
} body {
/// True if inf <= x <= sup.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.