EgalYue / Mobile_Marker_Based_Navigation

2 stars 3 forks source link

Results #4

Open EgalYue opened 6 years ago

EgalYue commented 6 years ago

i make simulation for 4 methods: ippe,cv2.SOLVEPNP_DLS, cv2.SOLVEPNP_EPNP, cv2.SOLVEPNP_ITERATIVE

  1. Fix X,Y axis and set Z [0.5,2], i find that as the value of Z increases,the R_error and t_error also increase,it has good relationship with condition number. But the transfer_error seems not good transfer_error_


  1. Fix Z axis,X [-0.5,0.5],Y[-0.5,0.5] a). Method: ippe, cv2.SOLVEPNP_ITERATIVE i find that,the R_error and t_error increase in the near of origin (0,0). But the transfer_error seems not good.

error1401 transfer_error_1401

b). Method: ippe, cv2.SOLVEPNP_EPNP i find that,the R_error and t_error increase in the near of origin (0,0). But the transfer_error seems not good.

error2 transfer_error_2

c). Method: ippe, cv2.SOLVEPNP_DLS t_error is almost 0, but R_error seems not good. But the transfer_error seems not good. error3 transfer_error_3

===========================================================

So can you give me some Suggest about it???

raultron commented 6 years ago

These results look really interesting. I would like to see as well the distribution of the condition number, plot the value of the condition number for each pose.

To understand what is happening with the transfer error please give me a link to the code where you are calculating the transfer error.

EgalYue commented 6 years ago

The Link of distribution of the condition number: https://github.com/EgalYue/Mobile_Marker_Based_Navigation/issues/1

The following link is calculating the transfer error. Line 144-149. Also using your code, validation_objectPoints but not objectPoints_square

https://github.com/EgalYue/Mobile_Marker_Based_Navigation/blob/master/python/CondNum_TheoryValidation/brute_force.py

raultron commented 6 years ago

I think you have to use normalized image coordinates here: https://github.com/EgalYue/Mobile_Marker_Based_Navigation/blob/08fc420d64dbf5ffb64aa171ba80831c02e65370/python/CondNum_TheoryValidation/brute_force.py#L137

replace Xi = new_imagePoints_noisy

with Xi = normalizedimagePoints

EgalYue commented 6 years ago

Perfect!!! i changed the code as you said, and i got a good result. As the condition number increases , increase also the transfer_error. And the distribution of transfer_error is as same as the distribution of condition number.

1. Fix X,Y axis and set Z [0.5,2] a). Method: ippe vs cv2.SOLVEPNP_ITERATIVE error transfer_error_


b). Method: ippe vs cv2.SOLVEPNP_EPNP error transfer_error_


c). Method: ippe vs cv2.SOLVEPNP_DLS error transfer_error_

=================================================================

  1. Fix Z axis,X [-0.5,0.5],Y[-0.5,0.5] a). Method: ippe vs cv2.SOLVEPNP_ITERATIVE

error1401 transfer_error_


b). Method: ippe vs cv2.SOLVEPNP_EPNP

error transfer_error_


c). Method: ippe vs cv2.SOLVEPNP_DLS error transfer_error_

raultron commented 6 years ago

I am wondering about the homography transfer error. Can you try repeating that plot but instead of using the Harker homography use the Opencv function?. I think that the normalization step on the homography should remove the dependence with the control points position in image coordinates.

EgalYue commented 6 years ago

i used _HnoisyOpenCV, = cv2.findHomography(Xo[:2].T.reshape(1, -1, 2), Xi[:2].T.reshape(1, -1, 2))_ instead of Hnoisy = hh(Xo, Xi) . And still set Xi = normalizedimagePoints I got the same results.

https://github.com/EgalYue/Mobile_Marker_Based_Navigation/blob/master/python/CondNum_TheoryValidation/brute_force.py Line 146

1. Fix X,Y axis and set Z [0.5,2] a). Method: ippe vs cv2.SOLVEPNP_ITERATIVE error transfer_error_

b). Method: ippe vs cv2.SOLVEPNP_EPNP error transfer_error_

c). Method: ippe vs cv2.SOLVEPNP_DLS error transfer_error_

=================================================================

  1. Fix Z axis,X [-0.5,0.5],Y[-0.5,0.5] a). Method: ippe vs cv2.SOLVEPNP_ITERATIVE error transfer_error_

    b). Method: ippe vs cv2.SOLVEPNP_EPNP error

transfer_error_

c). Method: ippe vs cv2.SOLVEPNP_DLS error

transfer_error_

EgalYue commented 6 years ago

Question to DLT homography and DLT pose estimation?

In your paper

image

H is the homography mapping from camera coordinate to world coordinate (2D) -> This is DLT homography, right?

but [r1,r2,T] is also the pose estimation we want to know, right?

i already read DLT method, but i'm still confused about that is there any different between DLT homography and DLT pose estimation?

I think the matrix A for DLT homography and DLT pose estimation are same, right?


And can we always get condition number form following formula?

image