Cal_PnP icon indicating copy to clipboard operation
Cal_PnP copied to clipboard

the compatibility of it with a new opencv version

Open isaryo opened this issue 4 years ago • 10 comments

hi. I try to this code with a new opencv version 4.5.0. But I can't do it at my pleasure. So, Could you tell me what version I must try it. Also, if we try version4.5.0, could you tell me points that should be revised of this code.

I will attend your reply.

isaryo avatar Oct 12 '20 22:10 isaryo

@isaryo What error message did you see? We were using OpenCV 3.4.0 when testing.

zhengthomastang avatar Oct 12 '20 22:10 zhengthomastang

I try to opencv version3.4.4. However I don't show a blue circle stands for clickpoint. May I ask probable cause? But I get Homography matrix and Reprojection error:0.0000000000. I don't care about it?

isaryo avatar Oct 13 '20 21:10 isaryo

Hi @isaryo . I am glad that the code can run through with OpenCV 3.4.4. If you want to select the 2D pixel points (blue circles) on the image, set calSel2dPtFlg in the config file to 1. A new window called selector of 2D points will pop out. Then you can click on the image to select each 2D point. Please refer to the README.md file for more details.

zhengthomastang avatar Oct 13 '20 22:10 zhengthomastang

I referred and tried to set calSel2dPtFlg in the config file to 1. Then a new window popped out. But I don't show blue circles of 'how to use step3' of README.md file.

isaryo avatar Oct 13 '20 23:10 isaryo

@isaryo Did you try to click on the new window that popped out?

zhengthomastang avatar Oct 13 '20 23:10 zhengthomastang

Yes. I clicked on the new window that popped out.

isaryo avatar Oct 13 '20 23:10 isaryo

Thanks for confirming. Did you see any error message in the terminal? Can you try pressing some buttons, e.g., return/enter, esc, o, r, etc., before clicking on the pop-out window? Please let me know if that makes any change.

zhengthomastang avatar Oct 14 '20 01:10 zhengthomastang

Only the case of o when I press some buttons, pop out a new window without a colorful grid on the 3D plane. error message is Reprojection error.

isaryo avatar Oct 14 '20 03:10 isaryo

I am sorry about the error. If the problem still persists, you may set calSel2dPtFlg in the config file to 0 and add the 2D coordinates manually in the config file at here.

zhengthomastang avatar Oct 14 '20 05:10 zhengthomastang

The problem is that the window can catch events from your keyboard, but it cannot catch the mouse events properly.

zhengthomastang avatar Oct 14 '20 06:10 zhengthomastang