How to compute the homography
조회 수: 38 (최근 30일)
이전 댓글 표시
Dear Community,
I have some issue to getting the trasnform image for homography
I want to apply the homography to an image, I do have homography martix from the general formulation
H = R+1/d*n*t'
H = rotation_matrix + t.* Normal
H =
0 -1.0000 0
-0.3420 0 -0.9397
5.9397 5.0000 4.6580
The basic concept of idea is to trying get image from vitrual camera, so the question I that how I can get the image from virtual camera ?
As you can see figure below , I have perspective image but I want to use inverse perspective mapping
Thanking you so much
댓글 수: 0
채택된 답변
darova
2019년 4월 19일
Hi, that green trapezoid is what you want. Can be found as line intersections of plane
But having all those point on a plane (in 3D) dont know how to convert them into 2D (to get that trapezoid in XY):
And how to convert image (pixels position) having that trapezoid?
See attached files
댓글 수: 3
darova
2019년 4월 21일
Create vectors Nx, Ny first:
NX = cross([0 0 1],-NZ); % camera X-axis
NX = NX/norm(NX);
NY = cross(NX, NZ); % camera Y-axis
NY = NY/norm(NY);
Then using dot product convert each point in 2D:
Where, P = (x,y,z) - point on plane
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!