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

[ ymin,xmin, ymax, xmax ]という box1 と box2 があったとき


def isOverlappingBox(box1,box2):
  ymin1=box1[0]
  xmin1=box1[1]
  ymax1=box1[2]
  xmax1=box1[3]

  ymin2=box2[0]
  xmin2=box2[1]
  ymax2=box2[2]
  xmax2=box2[3]

  if xmax1 >= xmin2 and xmax2 >= xmin1 and ymax1 >= ymin2 and ymax2 >= ymin1:
    return True #重なっている
  else:
    return False #重なっていない

🐣


フリーランスエンジニアです。
お仕事のご相談こちらまで
rockyshikoku@gmail.com

Core MLを使ったアプリを作っています。
機械学習関連の情報を発信しています。

Twitter
Medium

1
1
2

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?