How to compute the homography

46 ビュー (過去 30 日間)
Sushil  Sharma
Sushil Sharma 2019 年 4 月 18 日
コメント済み: Matt J 2019 年 12 月 28 日
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
3D2D.jpg

採用された回答

darova
darova 2019 年 4 月 19 日
Hi, that green trapezoid is what you want. Can be found as line intersections of plane
mmm.png
But having all those point on a plane (in 3D) dont know how to convert them into 2D (to get that trapezoid in XY):
mm1.png
And how to convert image (pixels position) having that trapezoid?
mm2.png
See attached files
  3 件のコメント
darova
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
Untitled.png
Sushil  Sharma
Sushil Sharma 2019 年 4 月 21 日
Thank you so much darova for your answer,
I get some idea, now I understand how to deal with situation,
Really apppericate for your help,
I wish in future you will clear my doubt as you did now
Thanks in advance

サインインしてコメントする。

その他の回答 (1 件)

Matt J
Matt J 2019 年 4 月 19 日
tform = projective2d(H);
newImage = imwarp(oldImage,tform);
  2 件のコメント
Omar Ali
Omar Ali 2019 年 12 月 28 日
how i can apply it on input image?
Matt J
Matt J 2019 年 12 月 28 日
That's what this line does
newImage = imwarp(oldImage,tform);

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGeometric Transformation and Image Registration についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by