ClassesClasses | | Operators

concat_objconcat_objConcatObjConcatObj (Operator)

Name

concat_objconcat_objConcatObjConcatObj — Concatenate two iconic object tuples.

Signature

concat_obj(Objects1, Objects2 : ObjectsConcat : : )

Herror concat_obj(const Hobject Objects1, const Hobject Objects2, Hobject* ObjectsConcat)

Herror T_concat_obj(const Hobject Objects1, const Hobject Objects2, Hobject* ObjectsConcat)

void ConcatObj(const HObject& Objects1, const HObject& Objects2, HObject* ObjectsConcat)

HObject HObject::ConcatObj(const HObject& Objects2) const

HImage HImage::ConcatObj(const HImage& Objects2) const

HRegion HRegion::ConcatObj(const HRegion& Objects2) const

HXLD HXLD::ConcatObj(const HXLD& Objects2) const

HXLDCont HXLDCont::ConcatObj(const HXLDCont& Objects2) const

HXLDPoly HXLDPoly::ConcatObj(const HXLDPoly& Objects2) const

HXLDPara HXLDPara::ConcatObj(const HXLDPara& Objects2) const

HXLDModPara HXLDModPara::ConcatObj(const HXLDModPara& Objects2) const

HXLDExtPara HXLDExtPara::ConcatObj(const HXLDExtPara& Objects2) const

static void HOperatorSet.ConcatObj(HObject objects1, HObject objects2, out HObject objectsConcat)

HObject HObject.ConcatObj(HObject objects2)

HImage HImage.ConcatObj(HImage objects2)

HRegion HRegion.ConcatObj(HRegion objects2)

HXLD HXLD.ConcatObj(HXLD objects2)

HXLDCont HXLDCont.ConcatObj(HXLDCont objects2)

HXLDPoly HXLDPoly.ConcatObj(HXLDPoly objects2)

HXLDPara HXLDPara.ConcatObj(HXLDPara objects2)

HXLDModPara HXLDModPara.ConcatObj(HXLDModPara objects2)

HXLDExtPara HXLDExtPara.ConcatObj(HXLDExtPara objects2)

Description

concat_objconcat_objConcatObjConcatObjConcatObj concatenates the two tuples of iconic objects Objects1Objects1Objects1Objects1objects1 and Objects2Objects2Objects2Objects2objects2 into a new tuple of iconic objects ObjectsConcatObjectsConcatObjectsConcatObjectsConcatobjectsConcat. Hence, this tuple contains all the iconic objects of the two input tuples:

ObjectsConcatObjectsConcatObjectsConcatObjectsConcatobjectsConcat = [Objects1Objects1Objects1Objects1objects1,Objects2Objects2Objects2Objects2objects2]

In ObjectsConcatObjectsConcatObjectsConcatObjectsConcatobjectsConcat, the objects of Objects1Objects1Objects1Objects1objects1 are stored first, followed by the objects of Objects2Objects2Objects2Objects2objects2, i.e., the order of the objects is preserved. Note that only references to the corresponding images and regions are stored in ObjectsConcatObjectsConcatObjectsConcatObjectsConcatobjectsConcat, i.e., no new memory is allocated. Furthermore, this means that modifications of input images, e.g., with set_grayvalset_grayvalSetGrayvalSetGrayvalSetGrayval, overpaint_grayoverpaint_grayOverpaintGrayOverpaintGrayOverpaintGray, or overpaint_regionoverpaint_regionOverpaintRegionOverpaintRegionOverpaintRegion directly affect the images of the output tuple ObjectsConcatObjectsConcatObjectsConcatObjectsConcatobjectsConcat and vice versa.

concat_objconcat_objConcatObjConcatObjConcatObj should not be confused with union1union1Union1Union1Union1 or union2union2Union2Union2Union2, in which regions are merged, i.e., in which the number of objects is modified.

concat_objconcat_objConcatObjConcatObjConcatObj can be used to concatenate objects of different image object types (e.g., images and XLD contours) into a single object. This is only recommended if it is necessary to accumulate in a single object variable, for example, the results of an image processing sequence. It should be noted that the only operators that can handle such object tuples of mixed type are concat_objconcat_objConcatObjConcatObjConcatObj, copy_objcopy_objCopyObjCopyObjCopyObj, select_objselect_objSelectObjSelectObjSelectObj, and disp_objdisp_objDispObjDispObjDispObj.

For a short description of the iconic objects that are available in HALCON see the introduction of chapter Object.

Execution Information

Parameters

Objects1Objects1Objects1Objects1objects1 (input_object)  object(-array) objectHObjectHObjectHobject

Object tuple 1.

Objects2Objects2Objects2Objects2objects2 (input_object)  object(-array) objectHObjectHObjectHobject

Object tuple 2.

ObjectsConcatObjectsConcatObjectsConcatObjectsConcatobjectsConcat (output_object)  object-array objectHObjectHObjectHobject *

Concatenated objects.

Example (C)

/* generate a tuple of a circle and a rectangle */

gen_circle(&Circle,200.0,400.0,23.0);
gen_rectangle1(&Rectangle,23.0,44.0,203.0,201.0);
concat_obj(Circle,Rectangle,&CirclAndRectangle);
disp_region(CircleAndRectangle,WindowHandle);

Complexity

Runtime complexity: O(|Objects1Objects1Objects1Objects1objects1| + |Objects2Objects2Objects2Objects2objects2|);

Memory complexity of the result objects: O(|Objects1Objects1Objects1Objects1objects1| + |Objects2Objects2Objects2Objects2objects2|)

Result

concat_objconcat_objConcatObjConcatObjConcatObj returns 2 (H_MSG_TRUE) if all objects are contained in the HALCON database. If the input is empty the behavior can be set via set_system(::'no_object_result',<Result>:)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>). If necessary, an exception is raised.

See also

count_objcount_objCountObjCountObjCountObj, copy_objcopy_objCopyObjCopyObjCopyObj, select_objselect_objSelectObjSelectObjSelectObj, disp_objdisp_objDispObjDispObjDispObj

Module

Foundation


ClassesClasses | | Operators