Merge pull request #3360 from mirab:threshold_triangle

This commit is contained in:
Vadim Pisarevsky
2014-11-06 08:36:23 +00:00
5 changed files with 124 additions and 10 deletions

View File

@@ -109,7 +109,8 @@ enum { THRESH_BINARY = 0, // value = value > threshold ? max_value : 0
THRESH_TOZERO = 3, // value = value > threshold ? value : 0
THRESH_TOZERO_INV = 4, // value = value > threshold ? 0 : value
THRESH_MASK = 7,
THRESH_OTSU = 8 // use Otsu algorithm to choose the optimal threshold value
THRESH_OTSU = 8, // use Otsu algorithm to choose the optimal threshold value
THRESH_TRIANGLE = 16 // use Triangle algorithm to choose the optimal threshold value
};
//! adaptive threshold algorithm

View File

@@ -551,8 +551,11 @@ enum
CV_THRESH_TOZERO =3, /* value = value > threshold ? value : 0 */
CV_THRESH_TOZERO_INV =4, /* value = value > threshold ? 0 : value */
CV_THRESH_MASK =7,
CV_THRESH_OTSU =8 /* use Otsu algorithm to choose the optimal threshold value;
CV_THRESH_OTSU =8, /* use Otsu algorithm to choose the optimal threshold value;
combine the flag with one of the above CV_THRESH_* values */
CV_THRESH_TRIANGLE =16 /* use Triangle algorithm to choose the optimal threshold value;
combine the flag with one of the above CV_THRESH_* values, but not
with CV_THRESH_OTSU */
};
/* Adaptive threshold methods */