LoginSignup
0
0

ZED SDK を使いこなす object

Last updated at Posted at 2024-02-28

ZED SDK の使い方が覚えきれていないのでメモを残す。
ZED SDK はStereoLabs がZED2やZED Xなどのステレオカメラ用に提供しているSDKである。

Objectに関する公式のドキュメント

ZED SDK で取得できる object のデータ構造

コードの断片

.py
# インスタンスを予め用意しておく必要がある。
objects = sl.Objects()
# 引数のobjectsに値が設定される。
zed.retrieve_objects(objects, obj_runtime_param)
for obj in objects.object_list:
    print(obj)

出力例

obj=<pyzed.sl.ObjectData object at 0xffff91166310>
action_state IDLE
bounding_box [[-0.7521685   0.2714799   0.0135718 ]
 [-0.7505594   0.17110072 -1.1674953 ]
 [ 0.43461442  0.19009982 -1.1674953 ]
 [ 0.43300533  0.290479    0.0135718 ]
 [-0.74268794 -0.31991953  0.0638479 ]
 [-0.74107885 -0.4202987  -1.1172192 ]
 [ 0.4440949  -0.4012996  -1.1172192 ]
 [ 0.4424858  -0.30092043  0.0638479 ]]
bounding_box_2d [[   0.  149.]
 [1133.  149.]
 [1133.  715.]
 [   0.  715.]]
confidence 95.82266235351562
dimensions [1.1853261  0.59360832 1.1853261 ]
head_bounding_box []
head_bounding_box_2d []
head_position [nan nan nan]
id 0
label Person
mask n/a sl::Mat not initialised
position [-0.15359642 -0.0553547  -0.55263519]
position_covariance [3.24492521e-06 7.19377411e-08 7.18192496e-07 3.88015178e-06
 2.58829715e-07 2.58403406e-06]
raw_label 0
sublabel Person
tracking_state OFF
unique_object_id 45987a7d-2b95-430f-99d0-6c23a2286498
velocity [nan nan nan]
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0