8.1   Thresholding an Image

Some of the most common sequences of HALCON operators may look like the following one:

  HImage  Image("file_xyz");
  HRegion Threshold        = Image.Threshold(0,120);
  HRegion ConnectedRegions = Threshold.Connection();
  HRegion ResultingRegions = 
                 ConnectedRegions.SelectShape("area","and",10,100000);

This short program performs the following: