Name
gen_image3gen_image3GenImage3gen_image3GenImage3GenImage3 — Erzeugen eines Bildes aus drei Zeigern auf die Pixel (rot/grün/blau).
Herror gen_image3(Hobject* ImageRGB, const char* Type, const Hlong Width, const Hlong Height, const Hlong PixelPointerRed, const Hlong PixelPointerGreen, const Hlong PixelPointerBlue)
Herror T_gen_image3(Hobject* ImageRGB, const Htuple Type, const Htuple Width, const Htuple Height, const Htuple PixelPointerRed, const Htuple PixelPointerGreen, const Htuple PixelPointerBlue)
Herror gen_image3(Hobject* ImageRGB, const HTuple& Type, const HTuple& Width, const HTuple& Height, const HTuple& PixelPointerRed, const HTuple& PixelPointerGreen, const HTuple& PixelPointerBlue)
HImage HImage::GenImage3(const HTuple& Type, const HTuple& Width, const HTuple& Height, const HTuple& PixelPointerRed, const HTuple& PixelPointerGreen, const HTuple& PixelPointerBlue)
void GenImage3(HObject* ImageRGB, const HTuple& Type, const HTuple& Width, const HTuple& Height, const HTuple& PixelPointerRed, const HTuple& PixelPointerGreen, const HTuple& PixelPointerBlue)
void HImage::GenImage3(const HString& Type, Hlong Width, Hlong Height, void* PixelPointerRed, void* PixelPointerGreen, void* PixelPointerBlue)
void HImage::GenImage3(const char* Type, Hlong Width, Hlong Height, void* PixelPointerRed, void* PixelPointerGreen, void* PixelPointerBlue)
void HOperatorSetX.GenImage3(
[out] IHUntypedObjectX** ImageRGB, [in] VARIANT Type, [in] VARIANT Width, [in] VARIANT Height, [in] VARIANT PixelPointerRed, [in] VARIANT PixelPointerGreen, [in] VARIANT PixelPointerBlue)
void HImageX.GenImage3(
[in] BSTR Type, [in] Hlong Width, [in] Hlong Height, [in] Hlong PixelPointerRed, [in] Hlong PixelPointerGreen, [in] Hlong PixelPointerBlue)
static void HOperatorSet.GenImage3(out HObject imageRGB, HTuple type, HTuple width, HTuple height, HTuple pixelPointerRed, HTuple pixelPointerGreen, HTuple pixelPointerBlue)
void HImage.GenImage3(string type, int width, int height, IntPtr pixelPointerRed, IntPtr pixelPointerGreen, IntPtr pixelPointerBlue)
gen_image3gen_image3GenImage3gen_image3GenImage3GenImage3 erzeugt ein dreikanaliges Bild in der Größe
WidthWidthWidthWidthWidthwidth * HeightHeightHeightHeightHeightheight.
Die Pixel in PixelPointerRedPixelPointerRedPixelPointerRedPixelPointerRedPixelPointerRedpixelPointerRed, PixelPointerGreenPixelPointerGreenPixelPointerGreenPixelPointerGreenPixelPointerGreenpixelPointerGreen und
PixelPointerBluePixelPointerBluePixelPointerBluePixelPointerBluePixelPointerBluepixelPointerBlue sind zeilensequentiell abgelegt.
Der Typ der übergebenen Pixel
(PixelPointerRedPixelPointerRedPixelPointerRedPixelPointerRedPixelPointerRedpixelPointerRed etc.) muss mit TypeTypeTypeTypeTypetype übereinstimmen
(siehe gen_image_constgen_image_constGenImageConstgen_image_constGenImageConstGenImageConst für eine detailliertere Beschreibung
der Pixeltypen).
Der Speicher für das neue Bild wird von HALCON neu angelegt.
Er kann also nach dem Aufruf freigegeben werden.
Wie ein Zeigerwert übergeben wird hängt von der benutzten Operatorsignatur
und der Programmierumgebung ab. Es ist sicherzustellen, dass die tatsächliche
Speicheradresse unter der die Bilddaten gespeichert sind übergeben wird und
nicht die Adresse der Zeigervariablen. Es ist darauf zu achten, dass
64-Bit-Zeiger auf 64-Bit-Architekturen nicht beschnitten werden.
- Multithreading-Typ: reentrant (läuft parallel zu nicht-exklusiven Operatoren).
- Multithreading-Bereich: global (kann von jedem Thread aufgerufen werden).
- Wird ohne Parallelisierung verarbeitet.
Erzeugtes Bild mit neuer Bildmatrix.
Pixeltyp.
Defaultwert:
'byte'
"byte"
"byte"
"byte"
"byte"
"byte"
Werteliste: 'byte'"byte""byte""byte""byte""byte", 'cyclic'"cyclic""cyclic""cyclic""cyclic""cyclic", 'direction'"direction""direction""direction""direction""direction", 'int1'"int1""int1""int1""int1""int1", 'int2'"int2""int2""int2""int2""int2", 'int4'"int4""int4""int4""int4""int4", 'real'"real""real""real""real""real", 'uint2'"uint2""uint2""uint2""uint2""uint2"
Breite des Bildes.
Defaultwert: 512
Wertevorschläge: 128, 256, 512, 1024
Typischer Wertebereich: 1
≤
Width
Width
Width
Width
Width
width
≤
512 (lin)
Minimale Schrittweite: 1
Empfohlene Schrittweite: 10
Höhe des Bildes.
Defaultwert: 512
Wertevorschläge: 128, 256, 512, 1024
Typischer Wertebereich: 1
≤
Height
Height
Height
Height
Height
height
≤
512 (lin)
Minimale Schrittweite: 1
Empfohlene Schrittweite: 10
Zeiger auf den ersten Rot-Wert (Kanal 1).
Zeiger auf den ersten Grün-Wert (Kanal 2).
Zeiger auf den ersten Blau-Wert (Kanal 3).
void NewRGBImage(Hobject *new)
{
unsigned char red[768*525];
unsigned char green[768*525];
unsigned char blue[768*525];
int r,c;
for (r=0; r<525; r++)
for (c=0; c<768; c++)
{
red[r*768+c] = c % 255;
green[r*768+c] = (767 - c) % 255;
blue[r*768+c] = r % 255;
}
gen_image3(new,"byte",768,525,(Hlong)red,(long)green,(long)blue);
}
main()
{
Hobject rgb;
open_window(0,0,768,525,0,"","",&WindowHandle);
NewRGBImage(&rgb);
disp_color(rgb,WindowHandle);
clear_obj(rgb);
}
Sind die Parameterwerte korrekt, dann liefert gen_image3gen_image3GenImage3gen_image3GenImage3GenImage3
den Wert 2 (H_MSG_TRUE).
Andernfalls wird eine Fehlerbehandlung durchgeführt.
gen_image_constgen_image_constGenImageConstgen_image_constGenImageConstGenImageConst,
get_image_pointer1get_image_pointer1GetImagePointer1get_image_pointer1GetImagePointer1GetImagePointer1
disp_colordisp_colorDispColordisp_colorDispColorDispColor
gen_image1gen_image1GenImage1gen_image1GenImage1GenImage1,
compose3compose3Compose3compose3Compose3Compose3,
gen_image_constgen_image_constGenImageConstgen_image_constGenImageConstGenImageConst
reduce_domainreduce_domainReduceDomainreduce_domainReduceDomainReduceDomain,
paint_graypaint_grayPaintGraypaint_grayPaintGrayPaintGray,
paint_regionpaint_regionPaintRegionpaint_regionPaintRegionPaintRegion,
set_grayvalset_grayvalSetGrayvalset_grayvalSetGrayvalSetGrayval,
get_image_pointer1get_image_pointer1GetImagePointer1get_image_pointer1GetImagePointer1GetImagePointer1,
decompose3decompose3Decompose3decompose3Decompose3Decompose3
Foundation