20.3   Dynamic Threshold

Among other things, the following code is suitable for edge detection, too:

  read_image(&Image,"File_xyz");
  mean_image(Image,&Lp,11,11);
  dyn_threshold(Image,Lp,&Thres,5.0,"light");