2

Suppose i have 2 images (of different sizes), an image of a wall and a generic banner.

transformation

Via some calculations i have derived 4(x,y) points in the wall image which are to be the corners of the banner (shown as a,b,c,d). However, this is where i encounter the problems. I cannot get the geomatric transformation (projective) to give the correct geomatric transform.

Secondly, whenever I apply a geomatric transform the background of the banner image turns black and blocks out the image of the wall. Is it possible for the background to be transparent while keeping the transformed image in matlab, getting the result as shown in the link.

The question is similar to display image between four corner points Matlab, but having tried the answers, have not yielded any results.

To sum up the questions i have:

  1. How can i get the correct geomatric transform given 4 x,y coordinates.
  2. How do i correctly display the transformed image on top of the wall image

Many thanks!

Community
  • 1
  • 1
Fisherr
  • 21
  • 1
  • The word you're looking for is "homography" - search for that, any you'll find lots of answers. – Niki Apr 19 '14 at 19:16
  • Agreed. You need to look for homography. Specify the corner points of the sign as your source points, and specify the corner points of the viewing region you want to display the sign in as the target region. Use `maketform` then `imtransform`. This is the approach I would have done personally and it summarizes what I just said above: http://stackoverflow.com/a/21831231/3250829 – rayryeng Apr 20 '14 at 17:55

0 Answers0