Skip to content

gen_disc_seGenDiscSeGenDiscSegen_disc_segen_disc_seπŸ”—

Short descriptionπŸ”—

gen_disc_seGenDiscSeGenDiscSegen_disc_segen_disc_se β€” Generate ellipsoidal structuring elements for gray morphology.

SignatureπŸ”—

gen_disc_se( out image SE, string Type, integer Width, integer Height, number Smax )void GenDiscSe( HObject* SE, const HTuple& Type, const HTuple& Width, const HTuple& Height, const HTuple& Smax )static void HOperatorSet.GenDiscSe( out HObject SE, HTuple type, HTuple width, HTuple height, HTuple smax )def gen_disc_se( type: str, width: int, height: int, smax: Union[int, float] ) -> HObject

Herror gen_disc_se( Hobject* SE, const char* Type, const Hlong Width, const Hlong Height, double Smax )

Herror T_gen_disc_se( Hobject* SE, const Htuple Type, const Htuple Width, const Htuple Height, const Htuple Smax )

void HImage::GenDiscSe( const HString& Type, Hlong Width, Hlong Height, const HTuple& Smax )

void HImage::GenDiscSe( const HString& Type, Hlong Width, Hlong Height, double Smax )

void HImage::GenDiscSe( const char* Type, Hlong Width, Hlong Height, double Smax )

void HImage::GenDiscSe( const wchar_t* Type, Hlong Width, Hlong Height, double Smax ) (Windows only)

void HImage.GenDiscSe( string type, int width, int height, HTuple smax )

void HImage.GenDiscSe( string type, int width, int height, double smax )

DescriptionπŸ”—

gen_disc_seGenDiscSe generates an ellipsoidal structuring element (SESEse) for gray morphology of images. The parameter Typetypetype determines the image type. It must match the image type of the image to be processed in subsequent operator calls using this structuring element. The parameters Widthwidthwidth and Heightheightheight determine the length of the two major axes of the ellipse. The value of Smaxsmaxsmax determines the maximum gray value of the structuring element. For the generation of arbitrary structuring elements, see read_gray_seReadGraySe. The structuring element can be saved as image with the help of the operator write_imageWriteImage. However, take care to use an image format that supports alpha channels to save the shape of the structuring element such as β€˜tiff’, β€˜jp2’ or β€˜png’. These files can then be loaded again with the operator read_imageReadImage.

Execution informationπŸ”—

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

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

  • Processed without parallelization.

ParametersπŸ”—

SESEse (output_object) image β†’ object (byte / uint2 / real)HObject (byte / uint2 / real)HImage (byte / uint2 / real)HObject (byte / uint2 / real)Hobject * (byte / uint2 / real)

Generated structuring element.

Typetypetype (input_control) string β†’ (string)HTuple (HString)HTuple (string)strHtuple (char*)

Pixel type.

Default: 'byte'"byte"
List of values: 'byte', 'real', 'uint2'"byte", "real", "uint2"

Widthwidthwidth (input_control) integer β†’ (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Width of the structuring element.

Default: 55
Suggested values: 0, 1, 2, 3, 4, 5, 10, 15, 200, 1, 2, 3, 4, 5, 10, 15, 20
Value range: 0 ≀ Width ≀ 511 (lin)
Minimum increment: 1
Recommended increment: 1

Heightheightheight (input_control) integer β†’ (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Height of the structuring element.

Default: 55
Suggested values: 0, 1, 2, 3, 4, 5, 10, 15, 200, 1, 2, 3, 4, 5, 10, 15, 20
Value range: 0 ≀ Height ≀ 511 (lin)
Minimum increment: 1
Recommended increment: 1

Smaxsmaxsmax (input_control) number β†’ (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[int, float]Htuple (double / Hlong)

Maximum gray value of the structuring element.

Default: 00
Suggested values: 0, 1, 2, 5, 10, 20, 30, 400, 1, 2, 5, 10, 20, 30, 40

ResultπŸ”—

gen_disc_seGenDiscSe returns 2 (H_MSG_TRUE) if all parameters are correct. If necessary, an exception is raised.

Combinations with other operatorsπŸ”—

Combinations

Possible successors

gray_erosionGrayErosion, gray_dilationGrayDilation, gray_openingGrayOpening, gray_closingGrayClosing, gray_tophatGrayTophat, gray_bothatGrayBothat, write_imageWriteImage

Alternatives

read_gray_seReadGraySe, read_imageReadImage

See also

paint_regionPaintRegion, paint_grayPaintGray, crop_partCropPart

ModuleπŸ”—

Foundation