Threshold
Sets all image values below the threshold to zero and above the threshold to one.
Examples
C++
#include <iplt/image.hh> #include <iplt/alg/threshold.hh> using namespace iplt; int main() { ImageHandle img_real = LoadImage("..."); img_real.ApplyIP( alg::Threshold(15) ); return 0; }
Python
img = LoadImage("...")
ta=alg.Threshold(15)
img.ApplyIP(ta)
Example images
|
|
| original image | image after thresholding |
Back to Algorithm List
Attachments
- splash.png (30.1 kB) - added by anonymous on 08/02/06 13:54:07.
- splash_th.png (1.7 kB) - added by anonymous on 08/02/06 13:54:14.
