나는 this tutorial을 따르고 있으며, Android 애플리케이션에 사용하고 싶습니다. 코드를 60 행으로 변환했으며 OpenCV Java에서 M = cv2.getPerspectiveTransform(rect, dst)
을 사용하는 방법을 알고 싶습니다. OpenCV python to java
dst
np array
dst = np.array([
[0, 0],
[maxWidth - 1, 0],
[maxWidth - 1, maxHeight - 1],
[0, maxHeight - 1]], dtype = "float32")
내가 내 자바 코드에 무엇을 사용해야 데이터 형식 모른다.
['Mat'] (http://docs.opencv.org/java/2.4.9/org/opencv/imgproc/Imgproc.html#getPerspectiveTransform (org.opencv.core.Mat, % 20org.opencv. 아마도 core.Mat)), 아마도. –
매트의 크기와 유형은 어떻게해야합니까? –
4 개의 행, 2 개의 열, 그 모양으로. 네 모퉁이의 xy 좌표를 나타냅니다. –