HALCON Reference Manual 10.0.2
Table of Contents / Image / Manipulation ClassesClassesClasses | | | Operators

set_grayvalset_grayvalset_grayvalSetGrayvalSetGrayval (Operator)

Name

set_grayvalset_grayvalset_grayvalSetGrayvalSetGrayval — Set single gray values in an image.

Signature

set_grayval(Image : : Row, Column, Grayval : )

Herror set_grayval(const Hobject Image, const Hlong Row, const Hlong Column, double Grayval)

Herror T_set_grayval(const Hobject Image, const Htuple Row, const Htuple Column, const Htuple Grayval)

Herror set_grayval(Hobject Image, const HTuple& Row, const HTuple& Column, const HTuple& Grayval)

void HImage::SetGrayval(const HTuple& Row, const HTuple& Column, const HTuple& Grayval) const

void HOperatorSetX.SetGrayval(
[in] IHUntypedObjectX* Image, [in] VARIANT Row, [in] VARIANT Column, [in] VARIANT Grayval)

void HImageX.SetGrayval(
[in] VARIANT Row, [in] VARIANT Column, [in] VARIANT Grayval)

static void HOperatorSet.SetGrayval(HObject image, HTuple row, HTuple column, HTuple grayval)

void HImage.SetGrayval(HTuple row, HTuple column, HTuple grayval)

void HImage.SetGrayval(int row, int column, double grayval)

Description

set_grayvalset_grayvalset_grayvalSetGrayvalSetGrayval sets the gray values of the input image ImageImageImageImageimage at the positions (RowRowRowRowrow,ColumnColumnColumnColumncolumn) to the values specified by GrayvalGrayvalGrayvalGrayvalgrayval. The number of values in GrayvalGrayvalGrayvalGrayvalgrayval must match the number of points passed to the operator.

Attention

The operator set_grayvalset_grayvalset_grayvalSetGrayvalSetGrayval produces quite some overhead. Typically, it is used to set single gray values of an image. It is not suitable for programming image processing operations such as filters. In this case it is more useful to use the operator get_image_pointer1get_image_pointer1get_image_pointer1GetImagePointer1GetImagePointer1 and to directly use the C or C++ interface for integrating own procedures.

Parallelization

Parameters

ImageImageImageImageimage (input_object)  image objectHImageHImageHImageXHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real)

Image to be modified.

RowRowRowRowrow (input_control)  point.y(-array) HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Row coordinates of the pixels to be modified.

Default value: 0

Suggested values: 0, 10, 50, 127, 255, 511

Typical range of values: 0 ≤ Row Row Row Row row

Restriction: (0 <= Row) && (Row < height(Image))

ColumnColumnColumnColumncolumn (input_control)  point.x(-array) HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Column coordinates of the pixels to be modified.

Default value: 0

Suggested values: 0, 10, 50, 127, 255, 511

Typical range of values: 0 ≤ Column Column Column Column column

Restriction: (0 <= Column) && (Column < width(Image))

GrayvalGrayvalGrayvalGrayvalgrayval (input_control)  grayval(-array) HTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong)

Gray values to be used.

Default value: 255.0

Suggested values: 0.0, 1.0, 10.0, 128.0, 255.0

Result

set_grayvalset_grayvalset_grayvalSetGrayvalSetGrayval 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>:)set_system("no_object_result",<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>). If necessary, an exception is raised.

Possible Predecessors

read_imageread_imageread_imageReadImageReadImage, get_image_pointer1get_image_pointer1get_image_pointer1GetImagePointer1GetImagePointer1, gen_image_protogen_image_protogen_image_protoGenImageProtoGenImageProto, gen_image1gen_image1gen_image1GenImage1GenImage1

Alternatives

get_image_pointer1get_image_pointer1get_image_pointer1GetImagePointer1GetImagePointer1, paint_graypaint_graypaint_grayPaintGrayPaintGray, paint_regionpaint_regionpaint_regionPaintRegionPaintRegion

See also

get_grayvalget_grayvalget_grayvalGetGrayvalGetGrayval, gen_image_constgen_image_constgen_image_constGenImageConstGenImageConst, gen_image1gen_image1gen_image1GenImage1GenImage1, gen_image_protogen_image_protogen_image_protoGenImageProtoGenImageProto

Module

Foundation


Table of Contents / Image / Manipulation ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH