concat_objconcat_objConcatObjConcatObjconcat_obj (Operator)

Name

concat_objconcat_objConcatObjConcatObjconcat_obj — 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)

def concat_obj(objects_1: HObject, objects_2: HObject) -> HObject

Description

concat_objconcat_objConcatObjConcatObjConcatObjconcat_obj concatenates the two tuples of iconic objects Objects1Objects1Objects1Objects1objects1objects_1 and Objects2Objects2Objects2Objects2objects2objects_2 into a new tuple of iconic objects ObjectsConcatObjectsConcatObjectsConcatObjectsConcatobjectsConcatobjects_concat. Hence, this tuple contains all the iconic objects of the two input tuples:

ObjectsConcatObjectsConcatObjectsConcatObjectsConcatobjectsConcatobjects_concat = [Objects1Objects1Objects1Objects1objects1objects_1,Objects2Objects2Objects2Objects2objects2objects_2]

In ObjectsConcatObjectsConcatObjectsConcatObjectsConcatobjectsConcatobjects_concat, the objects of Objects1Objects1Objects1Objects1objects1objects_1 are stored first, followed by the objects of Objects2Objects2Objects2Objects2objects2objects_2, i.e., the order of the objects is preserved. Note that only references to the corresponding images and regions are stored in ObjectsConcatObjectsConcatObjectsConcatObjectsConcatobjectsConcatobjects_concat, i.e., no new memory is allocated. Furthermore, this means that modifications of input images, e.g., with set_grayvalset_grayvalSetGrayvalSetGrayvalSetGrayvalset_grayval, overpaint_grayoverpaint_grayOverpaintGrayOverpaintGrayOverpaintGrayoverpaint_gray, or overpaint_regionoverpaint_regionOverpaintRegionOverpaintRegionOverpaintRegionoverpaint_region directly affect the images of the output tuple ObjectsConcatObjectsConcatObjectsConcatObjectsConcatobjectsConcatobjects_concat and vice versa.

concat_objconcat_objConcatObjConcatObjConcatObjconcat_obj should not be confused with union1union1Union1Union1Union1union1 or union2union2Union2Union2Union2union2, in which regions are merged, i.e., in which the number of objects is modified.

concat_objconcat_objConcatObjConcatObjConcatObjconcat_obj 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_objConcatObjConcatObjConcatObjconcat_obj, copy_objcopy_objCopyObjCopyObjCopyObjcopy_obj, select_objselect_objSelectObjSelectObjSelectObjselect_obj, and disp_objdisp_objDispObjDispObjDispObjdisp_obj.

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

Execution Information

Parameters

Objects1Objects1Objects1Objects1objects1objects_1 (input_object)  object(-array) objectHObjectHObjectHObjectHobject

Object tuple 1.

Objects2Objects2Objects2Objects2objects2objects_2 (input_object)  object(-array) objectHObjectHObjectHObjectHobject

Object tuple 2.

ObjectsConcatObjectsConcatObjectsConcatObjectsConcatobjectsConcatobjects_concat (output_object)  object-array objectHObjectHObjectHObjectHobject *

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,&CircleAndRectangle);
disp_region(CircleAndRectangle,WindowHandle);

Complexity

Runtime complexity: O(|Objects1Objects1Objects1Objects1objects1objects_1| + |Objects2Objects2Objects2Objects2objects2objects_2|);

Memory complexity of the result objects: O(|Objects1Objects1Objects1Objects1objects1objects_1| + |Objects2Objects2Objects2Objects2objects2objects_2|)

Result

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

See also

count_objcount_objCountObjCountObjCountObjcount_obj, copy_objcopy_objCopyObjCopyObjCopyObjcopy_obj, select_objselect_objSelectObjSelectObjSelectObjselect_obj, disp_objdisp_objDispObjDispObjDispObjdisp_obj

Module

Foundation