set_pixelT_set_pixelSetPixelSetPixelset_pixel (算子名称)

名称

set_pixelT_set_pixelSetPixelSetPixelset_pixel — Define a color lookup table index.

警告

set_pixelset_pixelSetPixelSetPixelSetPixelset_pixel is obsolete and is only provided for reasons of backward compatibility.

参数签名

set_pixel( : : WindowHandle, Pixel : )

Herror T_set_pixel(const Htuple WindowHandle, const Htuple Pixel)

void SetPixel(const HTuple& WindowHandle, const HTuple& Pixel)

void HWindow::SetPixel(const HTuple& Pixel) const

void HWindow::SetPixel(Hlong Pixel) const

static void HOperatorSet.SetPixel(HTuple windowHandle, HTuple pixel)

void HWindow.SetPixel(HTuple pixel)

void HWindow.SetPixel(int pixel)

def set_pixel(window_handle: HHandle, pixel: MaybeSequence[int]) -> None

描述

set_pixelset_pixelSetPixelSetPixelSetPixelset_pixel sets pixel values: colors (set_colorset_colorSetColorSetColorSetColorset_color, set_rgbset_rgbSetRgbSetRgbSetRgbset_rgb, etc.) and gray values (set_grayset_graySetGraySetGraySetGrayset_gray) are coded together into a number, called pixel. This 'pixel' is an index in the color lookup table. It ranges from 0 to 1 in b/w images and 0 to 255 color images with 8 bit planes. It is different from the 'pixel' ("picture element") in image processing. Therefore HALCON distinguishes between pixel and image element (or gray value).

The current value can be queried with get_pixelget_pixelGetPixelGetPixelGetPixelget_pixel.

运行信息

参数表

WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle (input_control)  window HWindow, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Window handle.

PixelPixelPixelPixelpixelpixel (input_control)  integer(-array) HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Color lookup table index.

Default: 128

Value range: 0 ≤ Pixel Pixel Pixel Pixel pixel pixel ≤ 255

结果

set_pixelset_pixelSetPixelSetPixelSetPixelset_pixel returns 2 ( H_MSG_TRUE) if the parameter is correct and the window is valid. Otherwise an exception is raised.

可能的前置算子

get_pixelget_pixelGetPixelGetPixelGetPixelget_pixel

可能的后置算子

disp_imagedisp_imageDispImageDispImageDispImagedisp_image, disp_regiondisp_regionDispRegionDispRegionDispRegiondisp_region

可替代算子

set_rgbset_rgbSetRgbSetRgbSetRgbset_rgb, set_colorset_colorSetColorSetColorSetColorset_color, set_hsiset_hsiSetHsiSetHsiSetHsiset_hsi

参考其它

get_pixelget_pixelGetPixelGetPixelGetPixelget_pixel, set_lutset_lutSetLutSetLutSetLutset_lut, disp_regiondisp_regionDispRegionDispRegionDispRegiondisp_region, disp_imagedisp_imageDispImageDispImageDispImagedisp_image, disp_colordisp_colorDispColorDispColorDispColordisp_color

模块

Foundation