select_objSelectObjSelectObjselect_objselect_obj
説明
select_objSelectObjSelectObjselect_objselect_obj — あるオブジェクト 配列からオブジェクトを選択する。
書式
select_obj( object Objects, out object ObjectSelected, integer Index )void SelectObj( const HObject& Objects, HObject* ObjectSelected, const HTuple& Index )static void HOperatorSet.SelectObj( HObject objects, out HObject objectSelected, HTuple index )def select_obj( objects: HObject, index: MaybeSequence[int] ) -> HObject
Herror select_obj( const Hobject Objects, Hobject* ObjectSelected, const Hlong Index )
Herror T_select_obj( const Hobject Objects, Hobject* ObjectSelected, const Htuple Index )
HObject HObject::SelectObj( const HTuple& Index ) const
HObject HObject::SelectObj( Hlong Index ) const
HImage HImage::SelectObj( const HTuple& Index ) const
HImage HImage::SelectObj( Hlong Index ) const
HRegion HRegion::SelectObj( const HTuple& Index ) const
HRegion HRegion::SelectObj( Hlong Index ) const
HXLD HXLD::SelectObj( const HTuple& Index ) const
HXLD HXLD::SelectObj( Hlong Index ) const
HXLDCont HXLDCont::SelectObj( const HTuple& Index ) const
HXLDCont HXLDCont::SelectObj( Hlong Index ) const
HXLDPoly HXLDPoly::SelectObj( const HTuple& Index ) const
HXLDPoly HXLDPoly::SelectObj( Hlong Index ) const
HXLDPara HXLDPara::SelectObj( const HTuple& Index ) const
HXLDPara HXLDPara::SelectObj( Hlong Index ) const
HXLDModPara HXLDModPara::SelectObj( const HTuple& Index ) const
HXLDModPara HXLDModPara::SelectObj( Hlong Index ) const
HXLDExtPara HXLDExtPara::SelectObj( const HTuple& Index ) const
HXLDExtPara HXLDExtPara::SelectObj( Hlong Index ) const
HObject HObject.SelectObj( HTuple index )
HObject HObject.SelectObj( int index )
HImage HImage.SelectObj( HTuple index )
HImage HImage.SelectObj( int index )
HRegion HRegion.SelectObj( HTuple index )
HRegion HRegion.SelectObj( int index )
HXLD HXLD.SelectObj( HTuple index )
HXLD HXLD.SelectObj( int index )
HXLDCont HXLDCont.SelectObj( HTuple index )
HXLDCont HXLDCont.SelectObj( int index )
HXLDPoly HXLDPoly.SelectObj( HTuple index )
HXLDPoly HXLDPoly.SelectObj( int index )
HXLDPara HXLDPara.SelectObj( HTuple index )
HXLDPara HXLDPara.SelectObj( int index )
HXLDModPara HXLDModPara.SelectObj( HTuple index )
HXLDModPara HXLDModPara.SelectObj( int index )
HXLDExtPara HXLDExtPara.SelectObj( HTuple index )
HXLDExtPara HXLDExtPara.SelectObj( int index )
説明
select_objSelectObj は、オブジェクト 配列
Objectsobjectsobjects からインデックス Indexindexindex (1 から開始) にあたる画像オブジェクトを選択出力オブジェクト ObjectSelectedobjectSelectedobject_selected にコ
ピーします。
選択された領域や画像に対して新しいメモリは割り当てられません。その代わり、既
存のオブジェクトに対するアドレス参照を含む新しいオブジェクトが生成されま
す。オブジェクト 配列 内のオブジェクト数はオペレーター
count_objCountObj を利用して問い合わせることができます。
HALCON で使用できるアイコンオブジェクトの簡単な説明はObjectの章を参照してください。
実行情報
実行情報
パラメーター
Objectsobjectsobjects (input_object) object(-array) → objectHObjectHObjectHObjectHobject
入力オブジェクト
ObjectSelectedobjectSelectedobject_selected (output_object) object(-array) → objectHObjectHObjectHObjectHobject *
選択されたオブジェクト
Indexindexindex (input_control) integer(-array) → (integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)
選択するオブジェクトのインデックス
初期値: 11
推奨値: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 50, 100, 200, 500, 1000, 2000, 50001, 2, 3, 4, 5, 6, 7, 8, 9, 10, 50, 100, 200, 500, 1000, 2000, 5000
制限: Index >= 1
例
(C)
/* Access to all Regions */
count_obj(Regions,&Num)\;
for (i=1\; i<=Num\; i++)
{
select_obj(Regions,&Single,i)\;
T_get_region_polygon(Single,5.0,&Row,&Column)\;
T_disp_polygon(WindowHandleTuple,Row,Column)\;
destroy_tuple(Row)\;
destroy_tuple(Column)\;
}
複雑性
実行時間の複雑性: \(O(|\textrm{Objects}|)\)
結果
すべてのオブジェクトが HALCON データベース内に含まれ、すべてのパラ
メーターが正しい場合、select_objSelectObj は、値 2 (H_MSG_TRUE) を返します。
入力が空の場合、動作は
set_system(::'no_object_result',<Result>:) を通じて設定で
きます。
必要に応じて、例外が発生します。
他のオペレーターとの組み合わせ
組み合わせ
前処理の候補
count_objCountObj
他の選択候補
copy_objCopyObj
関連項目
count_objCountObj, concat_objConcatObj, obj_to_integerObjToInteger
モジュール
Foundation