Skip to content

topographic_sketchTopographicSketchTopographicSketchtopographic_sketchtopographic_sketchπŸ”—

Short descriptionπŸ”—

topographic_sketchTopographicSketchTopographicSketchtopographic_sketchtopographic_sketch β€” Compute the topographic primal sketch of an image.

SignatureπŸ”—

topographic_sketch( image Image, out image Sketch )void TopographicSketch( const HObject& Image, HObject* Sketch )static void HOperatorSet.TopographicSketch( HObject image, out HObject sketch )def topographic_sketch( image: HObject ) -> HObject

Herror topographic_sketch( const Hobject Image, Hobject* Sketch )

Herror T_topographic_sketch( const Hobject Image, Hobject* Sketch )

HImage HImage::TopographicSketch( ) const

HImage HImage.TopographicSketch( )

DescriptionπŸ”—

topographic_sketchTopographicSketch computes the topographic primal sketch of the input image Imageimageimage. 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 Sketchsketchsketch 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.

AttentionπŸ”—

Note that filter operators may return unexpected results if an image with a reduced domain is used as input. Please refer to the chapter Filters.

Execution informationπŸ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on tuple level.

  • Automatically parallelized on channel level.

ParametersπŸ”—

Imageimageimage (input_object) (multichannel-)image(-array) β†’ object (byte)HObject (byte)HImage (byte)HObject (byte)Hobject (byte)

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

Sketchsketchsketch (output_object) (multichannel-)image(-array) β†’ object (byte)HObject (byte)HImage (byte)HObject (byte)Hobject * (byte)

Label image containing the 11 classes.

ExampleπŸ”—

(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)\;

ComplexityπŸ”—

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

ResultπŸ”—

topographic_sketchTopographicSketch returns 2 (H_MSG_TRUE) if all parameters are correct. If the input is empty the behavior can be set via set_system('no_object_result',<Result>). If necessary, an exception is raised.

Combinations with other operatorsπŸ”—

Combinations

Possible successors

thresholdThreshold

ReferencesπŸ”—

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

ModuleπŸ”—

Foundation