topographic_sketchtopographic_sketchTopographicSketchTopographicSketchtopographic_sketch (算子)

名称

topographic_sketchtopographic_sketchTopographicSketchTopographicSketchtopographic_sketch — 计算图像的地形原始草图。

签名

topographic_sketch(Image : Sketch : : )

Herror topographic_sketch(const Hobject Image, Hobject* Sketch)

Herror T_topographic_sketch(const Hobject Image, Hobject* Sketch)

void TopographicSketch(const HObject& Image, HObject* Sketch)

HImage HImage::TopographicSketch() const

static void HOperatorSet.TopographicSketch(HObject image, out HObject sketch)

HImage HImage.TopographicSketch()

def topographic_sketch(image: HObject) -> HObject

描述

topographic_sketchtopographic_sketchTopographicSketchTopographicSketchTopographicSketchtopographic_sketch computes the topographic primal sketch of the input image ImageImageImageImageimageimage. This is done by approximating the image locally by a bicubic polynomial (“facet model”). It serves to calculate the first and second partial derivatives of the image, and thus to classify the image into 11 classes. These classes are coded in the output image SketchSketchSketchSketchsketchsketch as numbers from 1 to 11. The classes are as follows:
Peak 1
Pit 2
Ridge 3
Ravine 4
Saddle 5
Flat 6
Hillside Slope 7
Hillside Convex 8
Hillside Concave 9
Hillside Saddle 10
Hillside Inflection 11
In order to obtain the separate classes as regions, a threshold operation has to be applied to the result image with the appropriate thresholds.

注意

请注意,若使用域缩减后的图像作为输入,滤波器算子可能会返回意外结果。请参阅 滤波器 一章

执行信息

参数

ImageImageImageImageimageimage (输入对象)  (multichannel-)image(-array) objectHImageHObjectHImageHobject (byte)

Image for which the topographic primal sketch is to be computed.

SketchSketchSketchSketchsketchsketch (输出对象)  (multichannel-)image(-array) objectHImageHObjectHImageHobject * (byte)

Label image containing the 11 classes.

示例(HDevelop)

* To extract the Ridges from a Image
read_image(Image,'sinus')
topographic_sketch(Image,Sketch)
threshold(Sketch,Ridges,3,3)

示例(C)

/* To extract the Ridges from a Image */
read_image(&Image,"sinus");
topographic_sketch(Image,&Sketch);
threshold(Sketch,&Ridges,3.0,3.0);

示例(HDevelop)

* To extract the Ridges from a Image
read_image(Image,'sinus')
topographic_sketch(Image,Sketch)
threshold(Sketch,Ridges,3,3)

示例(HDevelop)

* To extract the Ridges from a Image
read_image(Image,'sinus')
topographic_sketch(Image,Sketch)
threshold(Sketch,Ridges,3,3)

示例(HDevelop)

* To extract the Ridges from a Image
read_image(Image,'sinus')
topographic_sketch(Image,Sketch)
threshold(Sketch,Ridges,3,3)

复杂度

Let n be the number of pixels in the image. Then O(n) operations are performed.

结果

topographic_sketchtopographic_sketchTopographicSketchTopographicSketchTopographicSketchtopographic_sketch 在所有参数正确时返回 2 ( H_MSG_TRUE )。 如果输入为空则可设置行为通过 set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)。如有必要,则抛出异常。

可能的后继

thresholdthresholdThresholdThresholdThresholdthreshold

参考文献

R. Haralick, L. Shapiro: “Computer and Robot Vision, Volume I”; Reading, Massachusetts, Addison-Wesley; 1992; Kapitel 8.13.

模块

基础