anchor.diff:  
   == Python code step by step
   
  -Our application will have input parameter provided from console. We will require:
  +Parameter are provided from console. Script requires:
   
   - path to the image file
   - integer indicating minimum size in pixels for a shape
   - float value between 0 and 1 as a threshold
   
  -In the following block of code we check if user provided all the required parameters and whether they have valid values:
  +In the following block of code script checks if user provided all the parameters and checks their validity. The code itself is self-explanatory.
   
   [source,python]
   ----
  
positive.code: ----
  
  Variable *gray_image* stores now grayscale image, each pixel has value in range from 0 to 1.
  After this step we can treshold the image using provided treshold value:
  
  [source,python]
  ----
  
negative.code: image:shapes_thresholded.jpg[Shapes thresholded,300]
  
  
  [source,python]
  ----
  segmented, num_segments = label(binary)
  ----
  
  link:http://docs.scipy.org/doc/scipy/reference/generated/scipy.ndimage.measurements.label.html[label] is a function from *scipy.ndimage.measurements* package. 
  
  It assignes unique integer values to continuous patches of non-zero pixels. 
  Number of segments found is stored in *num_segments* variable. 
  