dev_set_shape ( : : Shape : )

Define the region output shape.

dev_set_shape defines the shape for region output. The output shape is used by dev_display for regions. The available shapes can be queried with query_shape.

Available modes:

  'original'
               The shape is displayed unchanged. Nevertheless
               modifications via parameters like 
               dev_set_line_width can take place. 
               This is also true for
               all other modes.
  'outer_circle'
               Each region is displayed by the smallest surrounding
               circle. (See smallest_circle.)
  'inner_circle'
               Each region is displayed by the largest included
               circle. (See inner_circle.)
  'ellipse'
               Each region is displayed by an ellipse with the same
               moments and orientation (See elliptic_axis.)
  'rectangle1'
               Each region is displayed by the smallest surrounding
               rectangle parallel to the coordinate axes. (See
               smallest_rectangle1.)
  'rectangle2'
               Each region is displayed by the smallest surrounding
               rectangle. (See smallest_rectangle2.)
  'convex'
               Each region is displayed by its convex hull. (See
               shape_trans.)
  'icon'
               Each region is displayed by the icon set with
               set_icon in the center of gravity.


Attention

If dev_set_shape should be used for exported Code (C++), please note the description of set_shape due to the different semantics in C++.


Parameters

Shape (input_control)
string -> string
Region output mode.
Default value: 'original'
List of values: 'original', 'convex', 'outer_circle', 'inner_circle', 'rectangle1', 'rectangle2', 'ellipse', 'icon'


Example
read_image(Image,'monkey')
threshold(Image,Region,128,255)
connection(Region,Regions)
dev_set_shape('rectangle1')
dev_set_draw('margin')
dev_display(Regions)

Parallelization Information

dev_set_shape is local and processed completely exclusively without parallelization.


Possible Successors

dev_display, dev_set_color


See also

set_shape, dev_set_line_width


Module

Foundation



Copyright © 1996-2008 MVTec Software GmbH