1
1

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 5 years have passed since last update.

openCV pythonチュートリアルの画像中の注目領域(ROI)において

Posted at

opencv チュートリアル 「画像上の基本的な処理」のチュートリアル内の

画像中の注目領域(ROI)におけるNumpyのインデックス指定で少し戸惑ったので備忘録書きます。

ball = img[280:340, 330:390]
img[273:333, 100:160] = ball

opencvは左上原点らしく、なので
animal_syougarago.png
この画像だとimg[Xa:Ya,Xd:Yd]だと勘違いしました。
実際はimg[Ya:Yd,Xa:Xd]だったみたいです。

チュートリアルで実行してると???となったので書いときます。

以上!

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?