Ask Your Question

jfix's profile - activity

2014-08-01 12:56:44 -0600 asked a question warpPerspective height adjustment

I'm creating a bird's eye view using warpPerspective() by following example 12-1 in "Learning OpenCV" by Bradski & Kaehler (The same example is readily found online as well). In the example they allow the user to adjust the "height" by changing a value in the homography matrix. However, the problem I'm having is that the effect of changing this variable is counter intuitive to adjusting the actually height of the "bird" in the bird's eye view. That is, at a height of 25 the resulting view appears closer to the ground (therefore, larger) then at a height of 10. Also, in some cases, negative numbers produce acceptable views. Am I not understanding what the "height" variable is supposed to do or do I have something else wrong?

2014-07-30 16:49:15 -0600 asked a question Bird's Eye homography height & scale?

I've created a bird's eye view of my 640x360 video stream by following example 12-1 in "Learning OpenCV" by Bradski & Kaehler (I had to make some minor changes to play nice with v2.4.9).

I have to manually play with the height in the homography matrix each time in order for the bird's eye view to look (almost) right. It seems to depend on the location of the chessboard on the ground. Also, the result is much smaller than the original image.

How can I...

  1. Automatically find the correct height?
  2. Keep the scale closer to the original size? (I know there will be some loss)

Note, I'm coding with C++, Visual Studio 2013 (w/ platform toolset set to VS2010), and OpenCV v2.4.9