質問するログイン新規登録

質問編集履歴

2

<code>編集

2021/07/21 11:38

投稿

hikari.13
hikari.13

スコア7

title CHANGED
File without changes
body CHANGED
@@ -1,10 +1,7 @@
1
- 質問失礼致します。
2
-
3
1
  現在Pythonを勉強中の初学者になります。
4
2
  足の画像上で2点を結び、その長さを測りたいと思っていたのですが
5
3
  ユークリッド距離を使用したもののこれからどう実寸の距離を出せばよろしいでしょうか?
6
-
4
+ ```
7
-
8
5
  import cv2
9
6
  import numpy as np
10
7
  from matplotlib import pyplot as plt
@@ -87,4 +84,5 @@
87
84
  ptlist = PointList(npoints)
88
85
  cv2.setMouseCallback(wname, onMouse, [wname, img1, ptlist])
89
86
  cv2.waitKey()
90
- cv2.destroyAllWindows()
87
+ cv2.destroyAllWindows()
88
+ ```

1

コメント削除

2021/07/21 11:38

投稿

hikari.13
hikari.13

スコア7

title CHANGED
File without changes
body CHANGED
@@ -53,13 +53,10 @@
53
53
  else:
54
54
  print('All points have selected. Press ESC-key.')
55
55
  if(ptlist.pos == ptlist.npoints):
56
- #print("ptlist",ptlist.pos )
57
- #print("ptlist",ptlist.npoints )
58
56
  print("ptlist.ptlist",ptlist.ptlist)
59
57
  xx=cv2.line(img, (ptlist.ptlist[0][0], ptlist.ptlist[0][1]),
60
58
  (ptlist.ptlist[1][0], ptlist.ptlist[1][1]), (0, 255, 0), 3)
61
- #yy=cv2.line(img, (ptlist.ptlist[1][0], ptlist.ptlist[1][1]),
59
+
62
- # (ptlist.ptlist[1][0], ptlist.ptlist[1][1]), (0, 255, 0), 3)
63
60
 
64
61
  aa=np.array([ptlist.ptlist[0][0]])
65
62
  bb=np.array([ptlist.ptlist[0][1]])