proportions of a perspective-deformed rectangle

后端 未结 10 1656
萌比男神i
萌比男神i 2020-11-29 17:31

Given a 2d picture of a rectangle distorted by perspective:

\"enter

I know tha

10条回答
  •  悲&欢浪女
    2020-11-29 18:05

    On the question of why the results give h/w rather then w/h: I'm wondering if the expression of Equation 20 above is correct. Posted is:

           whRatio = sqrt (
                (n2*A.transpose()^(-1) * A^(-1)*n2.transpose()) / 
                (n3*A.transpose()^(-1) * A^(-1)*n3.transpose())
               ) 
    

    When I try to execute that with OpenCV, I get an exception. But everything works correctly when I use the following equation which to me looks more like Equation 20: But based on Equation 20, it looks like it should be:

            whRatio = sqrt (
                (n2.transpose()*A.transpose()^(-1) * A^(-1)*n2) /
                (n3.transpose()*A.transpose()^(-1) * A^(-1)*n3)
               )
    

提交回复
热议问题