I는 sourceImage 추출 네 모서리가 : 그런 destinationImage에변형 된 이미지에서 취해진 화소의 원래의 좌표를 가져
src_vertices[0] = corners[upperLeft];
src_vertices[1] = corners[upperRight];
src_vertices[2] = corners[downLeft];
src_vertices[3] = corners[downRight];
이 네 모퉁이 휜 :
dst_vertices[0] = Point(0,0);
dst_vertices[1] = Point(width, 0);
dst_vertices[2] = Point(0, height);
dst_vertices[3] = Point(width, height);
Mat warpPerspectiveMatrix = getPerspectiveTransform(src_vertices, dst_vertices);
cv::Size size_d = Size(width, height);
cv::Mat DestinationImage(width,height,CV_8UC3);
warpPerspective(sourceImage, destinationImage, warpPerspectiveMatrix, size_d, INTER_LINEAR, BORDER_CONSTANT);
을 이제 내 질문은 :
나는 포인트 p (x, y)를 가져왔다. 나는 당신이 역 관점 변환을 원하는 getPerspectiveTransform
이제 대상에서 소스로 매핑하여 새로운 'warpPerspectiveMatrix'를 얻은 다음 단일 포인트에 적용하면 나중에 얻은 결과를 얻을 수 있습니다. 그 일을 할 때의 문제점은 무엇입니까? – mmgp