Skip to content

count_objCountObjCountObjcount_objcount_obj🔗

説明🔗

count_objCountObjCountObjcount_objcount_obj — tuple 内のオブジェクト数をカウントする。

書式🔗

count_obj( object Objects, out integer Number )void CountObj( const HObject& Objects, HTuple* Number )static void HOperatorSet.CountObj( HObject objects, out HTuple number )def count_obj( objects: HObject ) -> int

Herror count_obj( const Hobject Objects, Hlong* Number )

Herror T_count_obj( const Hobject Objects, Htuple* Number )

Hlong HObject::CountObj( ) const

int HObject.CountObj( )

説明🔗

オペレーター count_objCountObj は、オブジェクト Objectsobjectsobjects に対して、それが含むオブジェクト数をカウントします。 ここで、オブジェクトは連結要素(connectionConnection を参照してくだ さい)と同じでないことに注意すべきです。 例えば、 連結していない3 つの領域からなる1つのリージョンのオブジェクト数は 1 となります。

HALCON で使用できるアイコンオブジェクトの簡単な説明はObjectの章を参照ください。

実行情報🔗

実行情報
  • 演算デバイス上のオブジェクトをサポート。

  • マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)

  • マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)

  • 並列演算処理には未対応

パラメーター🔗

Objectsobjectsobjects (input_object) object-array → objectHObjectHObjectHObjectHobject

対象となるオブジェクト

Numbernumbernumber (output_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

tuple 内のオブジェクト数Objectsobjectsobjects

複雑性🔗

実行時間: \(O(|\textrm{Objects}|)\).

結果🔗

count_objCountObj は、値 2 (H_MSG_TRUE) を返します。

他のオペレーターとの組み合わせ🔗

組み合わせ

関連項目

copy_objCopyObj, obj_to_integerObjToInteger, connectionConnection, set_systemSetSystem

モジュール🔗

Foundation