inspect_shape_model creates a representation of a shape model. The operator is particularly useful in order to determine the parameters NumLevels and Contrast, which are used in create_shape_model, create_scaled_shape_model, or create_aniso_shape_model, quickly and conveniently. The representation of the model is created on multiple image pyramid levels, where the number of levels is determined by NumLevels.
inspect_shape_model创建形状模型的表示形式。该运算符对于快速方便地确定用于create_shape_model、create_scaled_shape_model或create_aniso_shape_model的参数 NumLevels 和 Contrast 特别有用。模型的表示是在多个图像金字塔级别上创建的,其中级别数由 NumLevel 确定。
In contrast to create_shape_model, create_scaled_shape_model, and create_aniso_shape_model, the model is only created for the rotation and scale of the object in the input image, i.e., 0° and 1. As output, inspect_shape_model creates an image object ModelImages containing the images of the individual levels of the image pyramid as well as a region in ModelRegions for each pyramid level that represents the model at the respective pyramid level. The individual objects can be accessed with select_obj. If the input image Image has one channel the representation of the model is created with the method that is used in create_shape_model, create_scaled_shape_model or create_aniso_shape_model for the metrics 'use_polarity', 'ignore_global_polarity', and 'ignore_local_polarity'.
与create_shape_model、create_scaled_shape_model和create_aniso_shape_model相比,模型仅针对输入图像中对象的旋转和比例(即 0° 和 1)创建。作为输出,inspect_shape_model创建一个图像对象 ModelImages,其中包含图像金字塔各个级别的图像,以及每个金字塔级别的 ModelRegions 中的一个区域,该区域表示相应金字塔级别的模型。可以使用select_obj访问单个对象。如果输入图像图像有一个通道,则使用create_shape_model、create_scaled_shape_model或create_aniso_shape_model中用于指标“use_polarity”、“ignore_global_polarity”和“ignore_local_polarity”的方法创建模型的表示。
If the input image has more than one channel the representation is created with the method that is used for the metric 'ignore_color_polarity'. As described for create_shape_model, create_scaled_shape_model, and create_aniso_shape_model, the number of pyramid levels should be chosen as large as possible, while taking into account that the model must be recognizable on the highest pyramid level and must have enough model points. The parameter Contrast should be chosen such that only the significant features of the template object are used for the model. Contrast can also contain a tuple with two values. In this case, the model is segmented using a method similar to the hysteresis threshold method used in edges_image. Here, the first element of the tuple determines the lower threshold, while the second element determines the upper threshold.
如果输入图像具有多个通道,则使用用于度量“ignore_color_polarity”的方法创建表示。如create_shape_model、create_scaled_shape_model和create_aniso_shape_model所述,应选择尽可能大的金字塔级别数,同时考虑到模型必须在最高金字塔级别上可识别,并且必须具有足够的模型点。应选择参数 Contrast,以便仅将模板对象的重要特征用于模型。对比度还可以包含具有两个值的元组。在这种情况下,使用类似于edges_image中使用的滞后阈值方法对模型进行分割。在这里,元组的第一个元素确定下限阈值,而第二个元素确定上限阈值。
For more information about the hysteresis threshold method, see hysteresis_threshold. Optionally, Contrast can contain a third value as the last element of the tuple. This value determines a threshold for the selection of significant model components based on the size of the components, i.e., components that have fewer points than the minimum size thus specified are suppressed. As the minimum size is applied on the extent of the components, the derived model contours can still be smaller than the specified minimum size. This threshold for the minimum size is divided by two for each successive pyramid level.
有关滞后阈值方法的详细信息,请参阅hysteresis_threshold。(可选)Contrast 可以包含第三个值作为元组的最后一个元素。此值确定根据组件大小选择重要模型组件的阈值,即,点数少于指定最小尺寸的组件将被抑制。由于最小尺寸应用于组件范围,因此派生的模型轮廓仍可能小于指定的最小尺寸。对于每个连续的金字塔级别,最小大小的阈值除以 2。
If small model components should be suppressed, but hysteresis thresholding should not be performed, nevertheless three values must be specified in Contrast. In this case, the first two values can simply be set to identical values. In its typical use, inspect_shape_model is called interactively multiple times with different parameters for NumLevels and Contrast, until a satisfactory model is obtained. After this, create_shape_model, create_scaled_shape_model, or create_aniso_shape_model are called with the parameters thus obtained.
如果应抑制小型模型分量,但不应执行滞后阈值,则必须在对比度中指定三个值。在这种情况下,可以简单地将前两个值设置为相同的值。在其典型用法中,inspect_shape_model 会使用 NumLevels 和 Contrast 的不同参数多次交互调用,直到获得令人满意的模型。在此之后,使用由此获得的参数调用create_shape_model、create_scaled_shape_model或create_aniso_shape_model。
标签:aniso,create,inspect,scaled,shape,model,Contrast From: https://www.cnblogs.com/echo-efun/p/18074471