KlassenKlassenKlassenKlassen | | | | Operatoren

paint_xldpaint_xldPaintXldpaint_xldPaintXldPaintXld (Operator)

Name

paint_xldpaint_xldPaintXldpaint_xldPaintXldPaintXld — Zeichnet XLD-Objekte in ein Bild ein.

Signatur

paint_xld(XLD, Image : ImageResult : Grayval : )

Herror paint_xld(const Hobject XLD, const Hobject Image, Hobject* ImageResult, double Grayval)

Herror T_paint_xld(const Hobject XLD, const Hobject Image, Hobject* ImageResult, const Htuple Grayval)

Herror paint_xld(Hobject XLD, Hobject Image, Hobject* ImageResult, const HTuple& Grayval)

HImage HXLD::PaintXld(const HImage& Image, const HTuple& Grayval) const

HImage HXLDArray::PaintXld(const HImage& Image, const HTuple& Grayval) const

void PaintXld(const HObject& XLD, const HObject& Image, HObject* ImageResult, const HTuple& Grayval)

HImage HImage::PaintXld(const HXLD& XLD, const HTuple& Grayval) const

HImage HImage::PaintXld(const HXLD& XLD, double Grayval) const

HImage HXLD::PaintXld(const HImage& Image, const HTuple& Grayval) const

HImage HXLD::PaintXld(const HImage& Image, double Grayval) const

void HOperatorSetX.PaintXld(
[in] IHUntypedObjectX* XLD, [in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*ImageResult, [in] VARIANT Grayval)

IHImageX* HImageX.PaintXld(
[in] IHXLDX* XLD, [in] VARIANT Grayval)

IHImageX* HXLDX.PaintXld(
[in] IHImageX* Image, [in] VARIANT Grayval)

IHImageX* HXLDContX.PaintXld(
[in] IHImageX* Image, [in] VARIANT Grayval)

IHImageX* HXLDPolyX.PaintXld(
[in] IHImageX* Image, [in] VARIANT Grayval)

IHImageX* HXLDParaX.PaintXld(
[in] IHImageX* Image, [in] VARIANT Grayval)

IHImageX* HXLDModParaX.PaintXld(
[in] IHImageX* Image, [in] VARIANT Grayval)

IHImageX* HXLDExtParaX.PaintXld(
[in] IHImageX* Image, [in] VARIANT Grayval)

static void HOperatorSet.PaintXld(HObject XLD, HObject image, out HObject imageResult, HTuple grayval)

HImage HImage.PaintXld(HXLD XLD, HTuple grayval)

HImage HImage.PaintXld(HXLD XLD, double grayval)

HImage HXLD.PaintXld(HImage image, HTuple grayval)

HImage HXLD.PaintXld(HImage image, double grayval)

Beschreibung

paint_xldpaint_xldPaintXldpaint_xldPaintXldPaintXld zeichnet die XLD-Objekte XLDXLDXLDXLDXLDXLD vom Typ Contour oder Polygon in die einzelnen Bildkanäle des Hintergrundbildes ImageImageImageImageImageimage mit den vorgegebenen Grauwerten GrayvalGrayvalGrayvalGrayvalGrayvalgrayval ein und liefert das Ergebnis in ImageResultImageResultImageResultImageResultImageResultimageResult zurück. Offene XLD-Objekte werden zuvor geschlossen und die eingeschlossene Region gefüllt. Die Ränder der subpixelgenauen XLD-Objekte werden im Anti-Aliasing-Verfahren auf den Hintergrund gezeichnet.

Beachten Sie, dass XLD-Objekte, die sich selbst schneiden oder bei denen Segmente sehr nah beisammen sind (in benachbarten Pixeln liegen), nicht korrekt gefüllt werden können; es entstehen Artefakte. Der set_systemset_systemSetSystemset_systemSetSystemSetSystem Parameter 'neighborhood' definiert, ob auch diagonal oder nur orthogonal benachbarte Pixel gefüllt werden.

GrayvalGrayvalGrayvalGrayvalGrayvalgrayval legt den Grauwert fest, mit welchem jedes XLD-Objekt in den entsprechenden Bildkanal gezeichnet werden soll. Die Grauwerte können entweder einmal für jeden Bildkanal, geltend für alle XLD-Objekte, definiert werden, oder für jedes XLD-Objekt und jeden Bildkanal einzeln. Um Letzteres zu definieren, werden die Kanal-Grauwerte g zu jedem XLD-Objekt gruppiert und zu einem Tupel entsprechend der Reihenfolge der XLD-Objekte verknüpft, z.B. für ein dreikanaliges Bild:

  [g(channel1,xld1), g(channel2,xld1), g(channel3,xld1), g(channel1,xld2), ... ].
Ist das Eingabebild vom Typ 'direction', werden Grauwerte, die nicht innerhalb des für 'direction'-Bilder erlaubten Wertebereichs liegen, auf den Wert 255 gesetzt, um sie als ungültig zu kennzeichnen.

Parallelisierung

Parameter

XLDXLDXLDXLDXLDXLD (input_object)  xld(-array) objectHXLDHXLDHXLDHXLDXHobject

XLD-Objekte, die eingezeichnet werden sollen.

ImageImageImageImageImageimage (input_object)  (multichannel-)image objectHImageHImageHImageHImageXHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex)

Bild, in das die XLD-Objekte eingezeichnet werden.

ImageResultImageResultImageResultImageResultImageResultimageResult (output_object)  image objectHImageHImageHImageHImageXHobject * (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex)

Bild, in das die XLD-Objekte eingezeichnet wurden.

GrayvalGrayvalGrayvalGrayvalGrayvalgrayval (input_control)  number(-array) HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Mit diesen Grauwerten werden die XLD-Objekte in ImageResultImageResultImageResultImageResultImageResultimageResult eingetragen.

Defaultwert: 255.0

Wertevorschläge: 0.0, 1.0, 2.0, 5.0, 10.0, 16.0, 32.0, 64.0, 128.0, 253.0, 254.0, 255.0

Beispiel (HDevelop)

* Paint colored xld objects into a gray image

* read and copy image to generate a three channel image
read_image(Image1,'green-dot')
copy_image(Image1,Image2)
copy_image(Image1,Image3)
compose3(Image1,Image2,Image3,Image)
* extract subpixel border
threshold_sub_pix(Image1,Border,128)
* select the circle and the arrows
select_obj(Border,circle,14)
select_obj(Border,arrows,16)
concat_obj(circle,arrows,green_dot)
* paint a green circle and white arrows (to paint all
* objects e.g. blue, pass [0,0,255] tuple for GrayVal)
paint_xld(green_dot,Image,ImageResult,[0,255,0,255,255,255])

Beispiel (C)

/* Paint colored xld objects into a gray image */

/* read and copy image to generate a three channel image */
read_image(&Image1,"green-dot");
copy_image(Image1,&Image2);
copy_image(Image1,&Image3);
compose3(Image1,Image2,Image3,&Image);
/* extract subpixel border */
threshold_sub_pix(Image1,&Border,128);
/* select the circle and the arrows */
select_obj(Border,&circle,14);
select_obj(Border,&arrows,16);
concat_obj(circle,arrows,&green_dot);
/* paint a green circle and white arrows,
 * therefore define tuple grayval:=[0,255,0,255,255,255].
 * (to paint all objects e.g. blue define grayval:=[0,0,255]) */
T_paint_xld(green_dot,Image,&ImageResult,grayval);

Beispiel (HDevelop)

* Paint colored xld objects into a gray image

* read and copy image to generate a three channel image
read_image(Image1,'green-dot')
copy_image(Image1,Image2)
copy_image(Image1,Image3)
compose3(Image1,Image2,Image3,Image)
* extract subpixel border
threshold_sub_pix(Image1,Border,128)
* select the circle and the arrows
select_obj(Border,circle,14)
select_obj(Border,arrows,16)
concat_obj(circle,arrows,green_dot)
* paint a green circle and white arrows (to paint all
* objects e.g. blue, pass [0,0,255] tuple for GrayVal)
paint_xld(green_dot,Image,ImageResult,[0,255,0,255,255,255])

Beispiel (HDevelop)

* Paint colored xld objects into a gray image

* read and copy image to generate a three channel image
read_image(Image1,'green-dot')
copy_image(Image1,Image2)
copy_image(Image1,Image3)
compose3(Image1,Image2,Image3,Image)
* extract subpixel border
threshold_sub_pix(Image1,Border,128)
* select the circle and the arrows
select_obj(Border,circle,14)
select_obj(Border,arrows,16)
concat_obj(circle,arrows,green_dot)
* paint a green circle and white arrows (to paint all
* objects e.g. blue, pass [0,0,255] tuple for GrayVal)
paint_xld(green_dot,Image,ImageResult,[0,255,0,255,255,255])

Beispiel (HDevelop)

* Paint colored xld objects into a gray image

* read and copy image to generate a three channel image
read_image(Image1,'green-dot')
copy_image(Image1,Image2)
copy_image(Image1,Image3)
compose3(Image1,Image2,Image3,Image)
* extract subpixel border
threshold_sub_pix(Image1,Border,128)
* select the circle and the arrows
select_obj(Border,circle,14)
select_obj(Border,arrows,16)
concat_obj(circle,arrows,green_dot)
* paint a green circle and white arrows (to paint all
* objects e.g. blue, pass [0,0,255] tuple for GrayVal)
paint_xld(green_dot,Image,ImageResult,[0,255,0,255,255,255])

Beispiel (HDevelop)

* Paint colored xld objects into a gray image

* read and copy image to generate a three channel image
read_image(Image1,'green-dot')
copy_image(Image1,Image2)
copy_image(Image1,Image3)
compose3(Image1,Image2,Image3,Image)
* extract subpixel border
threshold_sub_pix(Image1,Border,128)
* select the circle and the arrows
select_obj(Border,circle,14)
select_obj(Border,arrows,16)
concat_obj(circle,arrows,green_dot)
* paint a green circle and white arrows (to paint all
* objects e.g. blue, pass [0,0,255] tuple for GrayVal)
paint_xld(green_dot,Image,ImageResult,[0,255,0,255,255,255])

Ergebnis

Sind die Parameterwerte korrekt, dann liefert paint_xldpaint_xldPaintXldpaint_xldPaintXldPaintXld den Wert 2 (H_MSG_TRUE). Das Verhalten bei leerer Eingabe (keine Eingabe-XLD-Objekte vorhanden) lässt sich mittels set_system(::'no_object_result',<Result>:)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>) festlegen. Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

read_imageread_imageReadImageread_imageReadImageReadImage, gen_image_constgen_image_constGenImageConstgen_image_constGenImageConstGenImageConst, gen_image_protogen_image_protoGenImageProtogen_image_protoGenImageProtoGenImageProto, gen_contour_polygon_xldgen_contour_polygon_xldGenContourPolygonXldgen_contour_polygon_xldGenContourPolygonXldGenContourPolygonXld, threshold_sub_pixthreshold_sub_pixThresholdSubPixthreshold_sub_pixThresholdSubPixThresholdSubPix

Alternativen

set_grayvalset_grayvalSetGrayvalset_grayvalSetGrayvalSetGrayval, paint_graypaint_grayPaintGraypaint_grayPaintGrayPaintGray, paint_regionpaint_regionPaintRegionpaint_regionPaintRegionPaintRegion

Siehe auch

gen_image_constgen_image_constGenImageConstgen_image_constGenImageConstGenImageConst

Modul

Foundation


KlassenKlassenKlassenKlassen | | | | Operatoren