1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【YOLOv8】特定の領域への侵入検知 自動で領域を設定

Posted at

前書き

現在はプログラムに座標を直接与えて領域を設定しているが、物体認識でコーンを検出しその座標を元に領域を自動で設定する方法について記述する。

手法

  1. modelの検出結果のlen()をとる。
  2. result[i]の中のbox座標をもとにBBoxの中心座標を計算。
  3. 結果をリストに格納
  4. counter.set_args()に領域の座標をwhile文の中で再代入する。

以上を行うことでコーンを移動するたびに座標が変更されると考える。

1
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?