回答編集履歴
1
自己解決になっていませんでした。
answer
CHANGED
@@ -1,6 +1,13 @@
|
|
1
|
-
InputArray.Create()を用いることで、Cv2.EstimateAffinePartial2Dを用いることが出来た
|
1
|
+
InputArray.Create()を用いることで、Cv2.EstimateAffinePartial2Dを用いることが出来ました。
|
2
|
-
解決しました。
|
3
|
-
```
|
2
|
+
```C#
|
4
3
|
List<Point2f> p1 = new List<Point2f>(), p2 = new List<Point2f>();
|
5
4
|
Mat matHenkan = Cv2.EstimateAffinePartial2D(InputArray.Create(p1), InputArray.Create(p2))
|
6
|
-
```
|
5
|
+
```
|
6
|
+
ただ、変換結果は上手くいきませんでした。
|
7
|
+
|
8
|
+
```Python
|
9
|
+
mtx = cv2.estimateAffinePartial2D(
|
10
|
+
np.float32([kp1[m[0].queryIdx].pt for m in good]).reshape(-1, 1, 2),
|
11
|
+
np.float32([kp2[m[0].trainIdx].pt for m in good]).reshape(-1, 1, 2))[0]
|
12
|
+
```
|
13
|
+
参考元のPythonのソースでは、np.float32().reshape(-1, 1, 2)としているので、その辺りが問題なのでしょうか?
|