zero_crossing1 ( Image : RegionCrossings : MinSize, MinGrey, Threshold : )

Segment a Laplace image.

zero_crossing1 segments the input image into a region with gray values >= Threshold (``positive'' regions) and a region with gray values <= -Threshold (``negative'' regions). ``Positive'' or ``negative'' regions having a size of less than MinSize are suppressed, as well as regions whose maximum gray value is less than MinGrey in absolute value.

The segmentation performed is not complete, i.e., the ``positive'' and ``negative'' regions together do not necessarily cover the entire image: Areas with a gray value between -Threshold and Threshold (and -MinGrey and MinGrey, respectively) are not taken into account.

zero_crossing1 is usually called after applying a Laplace operator (e.g., laplace__ or diff_of_gauss__) to an image. The zero crossings of this type of images correspond to edges in an image, and are the separating regions of the ``positive'' and ``negative'' regions in the Laplace image. They can be determined by calling zero_crossing1 with Threshold = 1. The parameter MinGrey controls the noise invariance, while MinSize controls the resolution of the edge detection.


Parameters

Image (input_object)
image(-array) -> object : int4
Input Laplace image.

RegionCrossings (output_object)
region-array -> object
``Positive'' and ``negative'' regions.

MinSize (input_control)
integer -> integer
Regions smaller than MinSize are suppressed.
Default value: 20
Suggested values: 0, 10, 20, 50, 100, 200, 500, 1000
Range of values: 0 <= MinSize <= 10000 (lin)
Minimum increment: 1
Recommended increment: 10

MinGrey (input_control)
integer -> integer
Regions whose maximum absolute gray value is smaller than MinGray are suppressed.
Default value: 2
Suggested values: 1, 2, 3, 4, 5, 6, 7, 9, 11, 15, 20
Range of values: 1 <= MinGrey <= 10000 (lin)
Minimum increment: 1
Recommended increment: 10

Threshold (input_control)
integer -> integer
Regions which have a gray value larger than Threshold (or smaller than -Threshold) are suppressed.
Default value: 1
Suggested values: 1, 2, 3, 4, 5, 6, 7, 9, 11, 15, 20
Range of values: 1 <= Threshold <= 255 (lin)
Minimum increment: 1
Recommended increment: 1
Restriction: Threshold >= 1


Example
/* Edge detection with the Laplace operator (and edge thinning) */
diff_of_gauss__(Image:Laplace:2.0,1.6:) >
/* finde "`positive"' und "`negative"' Bildbereiche: */
zero_crossing1(Laplace:Region:20,2,1:) >
/*The zero runnings are the complement to these image section: */
complement('full',Region:Nulldurchgaenge::).

/* Simulation of \BefehlRef{zero_crossing1} */
zero_crossing1(Laplace:Result:MinS,MinG,Threshold:):
  threshold__(Laplace:Tmp1:Threshold,999999:) >
  connection(Tmp1:Tmp2::) >
  select_shape(Tmp2:Tmp3:'area','and',MinS,999999:) >
  select_grey__(Laplace,Tmp3:Tmp4:'max','and',MinG,999999:) >
  threshold__(Laplace:Tmp5:-999999,-Threshold:) >
  connection(Tmp5:Tmp6::) >
  select_shape(Tmp6:Tmp7:'area','and',MinS,999999:) >
  select_grey__(Laplace,Tmp7:Tmp8:'min','and',-999999,-MinG:) >
  concat_obj(Tmp4,Tmp8:Result::).

Result

zero_crossing1 returns TRUE if all parameters are correct. The behaviour with respect to the input images and output regions can be determined by setting the values of the flags 'no_object_result', 'empty_region_result', and 'store_empty_region' with set_system. If necessary, an exception is raised.


Possible Predecessors

min_max__, sobel_amp, gauss__, reduce_domain, diff_of_gauss__


Possible Successors

connection, dilation1, erosion1, opening, closing, count, shape_trans, skeleton


Alternatives

threshold__, connection, select_shape, select_grey__


See also

laplace__, diff_of_gauss__, expand



Copyright © 1996-1997 MVTec Software GmbH